diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-02-10 18:10:36 -0800 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-02-10 18:12:54 -0800 |
commit | e059bbfc2a3ffcc15c10d3dce8277afb5c4c2dea (patch) | |
tree | 053e658e754e5f11d82d53de04d3cf4c00825d78 | |
parent | 5e171e3faea4ddca33cabd899b87824908e2f402 (diff) | |
download | bundler-e059bbfc2a3ffcc15c10d3dce8277afb5c4c2dea.tar.gz |
[Definition] Allow adding new gemspecs to a Path source
-rw-r--r-- | lib/bundler/definition.rb | 3 | ||||
-rw-r--r-- | lib/bundler/index.rb | 2 | ||||
-rw-r--r-- | spec/install/deploy_spec.rb | 6 |
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 3a006ba229..bf3c34d9ff 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -593,7 +593,8 @@ module Bundler locked_index = Index.new locked_index.use(@locked_specs.select {|s| source.can_lock?(s) }) - source.specs != locked_index + # order here matters, since Index#== is checking source.specs.include?(locked_index) + locked_index != source.specs end # Get all locals and override their matching sources. diff --git a/lib/bundler/index.rb b/lib/bundler/index.rb index 4fe1418773..373f6132af 100644 --- a/lib/bundler/index.rb +++ b/lib/bundler/index.rb @@ -144,6 +144,8 @@ module Bundler end end + # Whether all the specs in self are in other + # TODO: rename to #include? def ==(other) all? do |spec| other_spec = other[spec].first diff --git a/spec/install/deploy_spec.rb b/spec/install/deploy_spec.rb index 1e54204e70..4a4f6e912f 100644 --- a/spec/install/deploy_spec.rb +++ b/spec/install/deploy_spec.rb @@ -77,10 +77,8 @@ RSpec.describe "install with --deployment or --frozen" do gem "bar", :path => "#{lib_path("nested")}" G - bundle :install - bundle "install --deployment" - - expect(exitstatus).to eq(0) if exitstatus + bundle! :install + bundle! "install --deployment" end it "works when there are credentials in the source URL" do |