summaryrefslogtreecommitdiff
path: root/lib/bundler/dsl.rb
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-07-18 17:46:34 -0500
committerColby Swandale <colby@taplaboratories.com>2017-08-20 11:18:13 +1000
commitfd78b296323e4656c2df800cc6100418d0ad9aa7 (patch)
treec90e5a89101a1d87f679ecfb08174ded9a80c923 /lib/bundler/dsl.rb
parentaea4046b5b91b83b27f117822e1bd6c614da3e6e (diff)
downloadbundler-fd78b296323e4656c2df800cc6100418d0ad9aa7.tar.gz
Ensure deprecations become a hard error in Bundler 2
Diffstat (limited to 'lib/bundler/dsl.rb')
-rw-r--r--lib/bundler/dsl.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index 679c66e711..8681163277 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -178,7 +178,7 @@ module Bundler
" end\n\n"
raise DeprecatedError, msg if Bundler.feature_flag.disable_multisource?
- SharedHelpers.major_deprecation(msg.strip)
+ SharedHelpers.major_deprecation(2, msg.strip)
end
source_options = normalize_hash(options).merge(
@@ -290,7 +290,7 @@ module Bundler
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
# TODO: 2.0 upgrade this setting to the default
if Bundler.settings["github.https"]
- Bundler::SharedHelpers.major_deprecation "The `github.https` setting will be removed"
+ Bundler::SharedHelpers.major_deprecation 2, "The `github.https` setting will be removed"
"https://github.com/#{repo_name}.git"
else
"git://github.com/#{repo_name}.git"
@@ -440,7 +440,7 @@ repo_name ||= user_name
def normalize_source(source)
case source
when :gemcutter, :rubygems, :rubyforge
- Bundler::SharedHelpers.major_deprecation "The source :#{source} is deprecated because HTTP " \
+ Bundler::SharedHelpers.major_deprecation 2, "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"
@@ -464,7 +464,7 @@ repo_name ||= user_name
end
raise GemfileEvalError, msg
else
- Bundler::SharedHelpers.major_deprecation "Your Gemfile contains multiple primary sources. " \
+ Bundler::SharedHelpers.major_deprecation 2, "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. " \
@@ -482,7 +482,7 @@ repo_name ||= user_name
"do |repo_name|\n#{replacement.to_s.gsub(/^/, " ")}\n end"
end
- Bundler::SharedHelpers.major_deprecation <<-EOS
+ 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:
git_source(:#{name}) #{replacement}