diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-06-22 17:35:25 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-06-23 18:41:36 -0500 |
commit | e008a1aa7bf18fadb8783e7d03ac61c2abab9a21 (patch) | |
tree | 02b3243df38af593710df83f8908cc77ddf8a812 /lib | |
parent | 3821b16cd72d634032aa5526f5aaa2e5858193fc (diff) | |
download | bundler-e008a1aa7bf18fadb8783e7d03ac61c2abab9a21.tar.gz |
Print the first batch of major deprecation warnings
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler.rb | 1 | ||||
-rw-r--r-- | lib/bundler/dsl.rb | 2 | ||||
-rw-r--r-- | lib/bundler/shared_helpers.rb | 9 |
3 files changed, 11 insertions, 1 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index 9da798e2bf..a2260e0142 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -211,6 +211,7 @@ module Bundler # @deprecated Use `original_env` instead # @return [Hash] Environment with all bundler-related variables removed def clean_env + Bundler::SharedHelpers.major_deprecation("`Bundler.clean_env` has weird edge cases, use `.original_env` instead") env = original_env if env.key?("BUNDLE_ORIG_MANPATH") diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 4208f9b575..358784a9de 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -374,7 +374,7 @@ module Bundler def normalize_source(source) case source when :gemcutter, :rubygems, :rubyforge - Bundler.ui.warn "The source :#{source} is deprecated because HTTP " \ + Bundler::SharedHelpers.major_deprecation "The source :#{source} is deprecated because HTTP " \ "requests are insecure.\nPlease change your source to 'https://" \ "rubygems.org' if possible, or 'http://rubygems.org' if not." "http://rubygems.org" diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index 376235abfd..7b56619c5f 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -127,6 +127,15 @@ module Bundler ui.warn("[DEPRECATED FOR #{Bundler::VERSION.split(".").first.to_i + 1}.0] #{message}") end + def print_major_deprecations! + if RUBY_VERSION < "2" + major_deprecation("Bundler will only support ruby >= 2.0, you are running #{RUBY_VERSION}") + end + unless Bundler.rubygems.provides?(">= 2") + major_deprecation("Bundler will only support rubygems >= 2.4, you are running #{self.class.version}") + end + end + private def find_gemfile |