diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-07-01 12:00:00 -0300 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-07-05 15:11:19 -0300 |
commit | 56c3b82d5ee5f6577ded051a9778b9aeeae14ab7 (patch) | |
tree | 8725ee6b874a5fc8a5c303d84f636a1e0494ea0c /lib/bundler/shared_helpers.rb | |
parent | 54d620bd797abc50423d958c141ad95a4db2974d (diff) | |
download | bundler-56c3b82d5ee5f6577ded051a9778b9aeeae14ab7.tar.gz |
Migrate 1-99 deprecations to new major_deprecation machinery
Diffstat (limited to 'lib/bundler/shared_helpers.rb')
-rw-r--r-- | lib/bundler/shared_helpers.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index 59cf7a05..efbedeb3 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -22,7 +22,6 @@ module Bundler def default_gemfile gemfile = find_gemfile - deprecate_gemfile(gemfile) raise GemfileNotFound, "Could not locate Gemfile" unless gemfile Pathname.new(gemfile) end @@ -129,6 +128,7 @@ module Bundler end def print_major_deprecations! + deprecate_gemfile(find_gemfile) if find_gemfile == find_file("Gemfile") if RUBY_VERSION < "2" major_deprecation("Bundler will only support ruby >= 2.0, you are running #{RUBY_VERSION}") end @@ -231,13 +231,9 @@ module Bundler end def deprecate_gemfile(gemfile) - if gemfile && File.basename(gemfile) == "Gemfile" - Bundler.respond_to?(:ui) && Bundler.ui.deprecate( - "Gemfile and Gemfile.lock are " \ - "deprecated and will be replaced with gems.rb and " \ - "gems.locked in Bundler 2.0.", true - ) - end + return unless gemfile && File.basename(gemfile) == "Gemfile" + Bundler::SharedHelpers.major_deprecation \ + "gems.rb and gems.locked will be prefered to Gemfile and Gemfile.lock." end extend self |