diff options
| author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-10 17:02:02 +0200 |
|---|---|---|
| committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-11 15:29:38 +0200 |
| commit | 147ff3f0f88bdf74791122ea31463c98a20bad06 (patch) | |
| tree | 47753db00c678da578c65a45f2363d4e76561b61 /lib/bundler/shared_helpers.rb | |
| parent | b711410759259c863709a585117804ee8b69e2b7 (diff) | |
| download | bundler-147ff3f0f88bdf74791122ea31463c98a20bad06.tar.gz | |
Remove `prefer_gems_rb` settinginit_gems_rb
In my opinion, it's overkill to provide a setting for how little this
setting was doing. Both types of Gemfile are supported and work
regardless of this setting. The only difference this setting would make
is the warning message one would get when having _both_ types of
Gemfiles in the same project.
I changed things so that gems.rb is always looked up first, and the
warning message in case you have both always tells you to remove Gemfile
and Gemfile.lock.
Diffstat (limited to 'lib/bundler/shared_helpers.rb')
| -rw-r--r-- | lib/bundler/shared_helpers.rb | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index 5d9e1c24e7..1b703c5cbc 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -149,13 +149,9 @@ module Bundler break gemfiles.size != 1 end return unless multiple_gemfiles - diagnosis = "Multiple gemfiles (gems.rb and Gemfile) detected." - advice = if Bundler.feature_flag.prefer_gems_rb? - "Make sure you remove Gemfile and Gemfile.lock since bundler is ignoring them in favor of gems.rb and gems.rb.locked." - else - "The gems.rb and gems.rb.locked files are currently ignored, but they will get used as soon as you delete your Gemfile and Gemfile.lock files." - end - Bundler.ui.warn [diagnosis, advice].join(" ") + message = "Multiple gemfiles (gems.rb and Gemfile) detected. " \ + "Make sure you remove Gemfile and Gemfile.lock since bundler is ignoring them in favor of gems.rb and gems.rb.locked." + Bundler.ui.warn message end def trap(signal, override = false, &block) @@ -235,13 +231,11 @@ module Bundler def find_gemfile(order_matters = false) given = ENV["BUNDLE_GEMFILE"] return given if given && !given.empty? - names = gemfile_names - names.reverse! if order_matters && Bundler.feature_flag.prefer_gems_rb? - find_file(*names) + find_file(*gemfile_names) end def gemfile_names - ["Gemfile", "gems.rb"] + ["gems.rb", "Gemfile"] end def find_file(*names) |
