diff options
author | Andre Arko <andre@arko.net> | 2015-05-05 13:52:31 -0700 |
---|---|---|
committer | Samuel E. Giddins <segiddins@segiddins.me> | 2015-07-16 08:29:00 -0700 |
commit | c4a5df454579e44e7e990f0df4aff2edd9d134ac (patch) | |
tree | 10125be69deee5b0830d38ae079ceae6465eb1ef | |
parent | eb9f322124fb257043c805e468f43b88a05eee3d (diff) | |
download | bundler-c4a5df454579e44e7e990f0df4aff2edd9d134ac.tar.gz |
note that disable_multisource will be the default
-rw-r--r-- | lib/bundler/dsl.rb | 10 | ||||
-rw-r--r-- | spec/install/gems/sources_spec.rb | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 068c9b252f..d51aad005b 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -362,18 +362,18 @@ module Bundler def check_primary_source_safety(source) return unless source.rubygems_primary_remotes.any? + # TODO 2.0 upgrade from setting to default if Bundler.settings[:disable_multisource] raise GemspecError, "Warning: this Gemfile contains multiple primary sources. " \ "Each source after the first must include a block to indicate which gems " \ - "should come from that source. To downgrade this error to a warning, run " \ - "`bundle config --delete disable_multisource`." + "should come from that source." else - Bundler.ui.warn "Warning: this Gemfile contains multiple primary sources. " \ + Bundler.ui.deprecate "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. " \ - "To upgrade this warning to an error, run `bundle config " \ - "disable_multisource true`." + "It will be an error to have multiple primary sources in Bundler 2.0. " \ + "To enable that error now, run `bundle config disable_multisource true`." end end diff --git a/spec/install/gems/sources_spec.rb b/spec/install/gems/sources_spec.rb index bf302d8d9e..307c2baad6 100644 --- a/spec/install/gems/sources_spec.rb +++ b/spec/install/gems/sources_spec.rb @@ -30,7 +30,7 @@ describe "bundle install with gems on multiple sources" do it "warns about ambiguous gems, but installs anyway, prioritizing sources last to first" do bundle :install - expect(out).to include("Warning: this Gemfile contains multiple primary sources.") + expect(err).to include("DEPRECATION: Your Gemfile contains multiple primary sources.") expect(out).to include("Warning: the gem 'rack' was found in multiple sources.") expect(out).to include("Installed from: file:#{gem_repo1}") should_be_installed("rack-obama 1.0.0", "rack 1.0.0") @@ -59,7 +59,7 @@ describe "bundle install with gems on multiple sources" do it "warns about ambiguous gems, but installs anyway" do bundle :install - expect(out).to include("Warning: this Gemfile contains multiple primary sources.") + expect(err).to include("DEPRECATION: Your Gemfile contains multiple primary sources.") expect(out).to include("Warning: the gem 'rack' was found in multiple sources.") expect(out).to include("Installed from: file:#{gem_repo1}") should_be_installed("rack-obama 1.0.0", "rack 1.0.0") @@ -223,7 +223,7 @@ describe "bundle install with gems on multiple sources" do it "installs from the other source and warns about ambiguous gems" do bundle :install - expect(out).to include("Warning: this Gemfile contains multiple primary sources.") + expect(err).to include("DEPRECATION: Your Gemfile contains multiple primary sources.") expect(out).to include("Warning: the gem 'rack' was found in multiple sources.") expect(out).to include("Installed from: file:#{gem_repo2}") should_be_installed("depends_on_rack 1.0.1", "rack 1.0.0") |