From e97741e12a22d78825a3a9dfcb7382adb0e27855 Mon Sep 17 00:00:00 2001 From: hsbt Date: Fri, 4 Jan 2019 13:10:58 +0000 Subject: Merge Bundler 2.0.1 from upstream. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/bundler/dsl.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/bundler/dsl.rb') diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 1a2114ed93..90ac073c36 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -194,7 +194,7 @@ module Bundler " end\n\n" raise DeprecatedError, msg if Bundler.feature_flag.disable_multisource? - SharedHelpers.major_deprecation(2, msg.strip) + SharedHelpers.major_deprecation(3, msg.strip) end source_options = normalize_hash(options).merge( @@ -305,8 +305,8 @@ module Bundler # end repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") # TODO: 2.0 upgrade this setting to the default - if Bundler.feature_flag.github_https? - Bundler::SharedHelpers.major_deprecation 2, "The `github.https` setting will be removed" + if Bundler.settings["github.https"] + Bundler::SharedHelpers.major_deprecation 3, "The `github.https` setting will be removed" "https://github.com/#{repo_name}.git" else "git://github.com/#{repo_name}.git" @@ -456,7 +456,7 @@ repo_name ||= user_name def normalize_source(source) case source when :gemcutter, :rubygems, :rubyforge - Bundler::SharedHelpers.major_deprecation 2, "The source :#{source} is deprecated because HTTP " \ + Bundler::SharedHelpers.major_deprecation 3, "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" @@ -474,13 +474,13 @@ repo_name ||= user_name msg = "This Gemfile contains multiple primary sources. " \ "Each source after the first must include a block to indicate which gems " \ "should come from that source" - unless Bundler.feature_flag.bundler_2_mode? + unless Bundler.feature_flag.bundler_3_mode? msg += ". To downgrade this error to a warning, run " \ "`bundle config --delete disable_multisource`" end raise GemfileEvalError, msg else - Bundler::SharedHelpers.major_deprecation 2, "Your Gemfile contains multiple primary sources. " \ + Bundler::SharedHelpers.major_deprecation 3, "Your Gemfile contains multiple primary sources. " \ "Using `source` more than once without a block is a security risk, and " \ "may result in installing unexpected gems. To resolve this warning, use " \ "a block to indicate which gems should come from the secondary source. " \ @@ -498,8 +498,8 @@ repo_name ||= user_name "do |repo_name|\n#{replacement.to_s.gsub(/^/, " ")}\n end" end - Bundler::SharedHelpers.major_deprecation 2, <<-EOS -The :#{name} git source is deprecated, and will be removed in Bundler 2.0.#{additional_message} Add this code to the top of your Gemfile to ensure it continues to work: + Bundler::SharedHelpers.major_deprecation 3, <<-EOS +The :#{name} git source is deprecated, and will be removed in Bundler 3.0.#{additional_message} Add this code to the top of your Gemfile to ensure it continues to work: git_source(:#{name}) #{replacement} -- cgit v1.2.3