diff options
author | Tim Moore <tmoore@incrementalism.net> | 2014-07-17 12:58:33 +1000 |
---|---|---|
committer | Tim Moore <tmoore@incrementalism.net> | 2014-07-30 14:16:36 +1000 |
commit | e5bdbddb618394b4ae2b1b47ec6437ccd9aba264 (patch) | |
tree | 1eb5a593bef4ea8d93718b794461f56d533ddc25 | |
parent | c94b6fd6efcf71a8e147589f77963d0bce49c6cf (diff) | |
download | bundler-e5bdbddb618394b4ae2b1b47ec6437ccd9aba264.tar.gz |
Don't warn on system gems.
-rw-r--r-- | lib/bundler/source/rubygems.rb | 1 | ||||
-rw-r--r-- | spec/install/gems/sources_spec.rb | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index 178c186eef..d31acdb980 100644 --- a/lib/bundler/source/rubygems.rb +++ b/lib/bundler/source/rubygems.rb @@ -79,6 +79,7 @@ module Bundler # Check for this spec from other sources uris = [spec.source_uri] uris += source_uris_for_spec(spec) + uris.compact! uris.uniq! Installer.ambiguous_gems << [spec.name, *uris] if uris.length > 1 diff --git a/spec/install/gems/sources_spec.rb b/spec/install/gems/sources_spec.rb index 20566f4cae..cd4bcf1992 100644 --- a/spec/install/gems/sources_spec.rb +++ b/spec/install/gems/sources_spec.rb @@ -209,4 +209,21 @@ describe "bundle install with gems on multiple sources" do end end end + + context "when an older version of the same gem also ships with Ruby" do + before do + system_gems "rack-0.9.1" + + gemfile <<-G + source "file://#{gem_repo1}" + gem "rack" # shoud come from repo1! + G + end + + it "installs the gems without any warning" do + bundle :install + expect(out).not_to include("Warning") + should_be_installed("rack 1.0.0") + end + end end |