From 171803d5d34feb1b4244ca81b9db0a7bc2171c85 Mon Sep 17 00:00:00 2001 From: Kevin Deisz Date: Tue, 29 Oct 2019 10:08:37 -0400 Subject: Promote did_you_mean to default gem At the moment, there are some problems with regard to bundler + did_you_mean because of did_you_mean being a bundled gem. Since the vendored version of thor inside bundler and ruby itself explicitly requires did_you_mean, it can become difficult to load it when using Bundler.setup. See this issue: https://github.com/yuki24/did_you_mean/issues/117#issuecomment-482733159 for more details. --- tool/sync_default_gems.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tool/sync_default_gems.rb') diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 810f1e9a92..1c07073e2d 100644 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -48,6 +48,7 @@ # * https://github.com/ruby/yaml # * https://github.com/ruby/uri # * https://github.com/ruby/openssl +# * https://github.com/ruby/did_you_mean # require 'fileutils' @@ -102,6 +103,7 @@ $repositories = { yaml: "ruby/yaml", uri: "ruby/uri", openssl: "ruby/openssl", + did_you_mean: "ruby/did_you_mean" } def sync_default_gems(gem) @@ -262,6 +264,12 @@ def sync_default_gems(gem) when "readlineext" sync_lib "readline-ext" mv "lib/readline-ext.gemspec", "ext/readline" + when "did_you_mean" + rm_rf(%w[lib/did_you_mean* test/did_you_mean]) + cp_r(Dir.glob("#{upstream}/lib/did_you_mean*"), "lib") + cp_r("#{upstream}/did_you_mean.gemspec", "lib/did_you_mean") + cp_r("#{upstream}/test", "test/did_you_mean") + rm_rf(%w[test/did_you_mean/tree_spell/test_explore.rb]) else sync_lib gem end -- cgit v1.2.3