lib/bundler/definition.rb in bundler-1.8.2 vs lib/bundler/definition.rb in bundler-1.8.3
- old
+ new
@@ -404,14 +404,21 @@
def specs_changed?(source, &block)
locked = @locked_sources.find(&block)
if locked
unlocking = @locked_specs.any? do |locked_spec|
- locked_spec.source != locked
+ locked_spec.source.class == locked.class && locked_spec.source != locked
end
end
- !locked || unlocking || source.specs != locked.specs
+ !locked || unlocking || dependencies_for_source_changed?(locked) || source.specs != locked.specs
+ end
+
+ def dependencies_for_source_changed?(source)
+ deps_for_source = @dependencies.select { |s| s.source == source }
+ locked_deps_for_source = @locked_deps.select { |s| s.source == source }
+
+ deps_for_source != locked_deps_for_source
end
# Get all locals and override their matching sources.
# Return true if any of the locals changed (for example,
# they point to a new revision) or depend on new specs.