summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2012-03-03 01:26:06 -0800
committerAndre Arko <andre@arko.net>2012-03-03 01:26:06 -0800
commit9dac5767bc49bfe1e15eccedf1cc07895d105d55 (patch)
tree684b9ef0b413bcc6d7b8620a0d26946acc900bd7
parentde572da03f07d61832a2c5f9d3d7f040b8cfedd2 (diff)
downloadbundler-9dac5767bc49bfe1e15eccedf1cc07895d105d55.tar.gz
unlock when gems are added to a path
-rw-r--r--lib/bundler/definition.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 11d0318f67..874d2e1011 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -75,7 +75,15 @@ module Bundler
ls.class == source.class && ls.path == source.path
end
- !locked || source.specs != locked.specs
+ if locked
+ unlocking = locked.specs.any? do |spec|
+ @locked_specs.any? do |locked_spec|
+ locked_spec.source != locked
+ end
+ end
+ end
+
+ !locked || unlocking || source.specs != locked.specs
end
eager_unlock = expand_dependencies(@unlock[:gems])
@unlock[:gems] = @locked_specs.for(eager_unlock).map { |s| s.name }