diff options
author | Andre Arko <andre@arko.net> | 2015-03-30 12:02:23 +0100 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-03-30 12:02:23 +0100 |
commit | 896bb74d2e6f4b4fd96179f2e20ea47414a4f9ee (patch) | |
tree | 375c1e9d4a0bb4a1a440a4a85383b97346df0a11 | |
parent | e602472c87d7cd30de6fc3bbb4c94c85437ca21b (diff) | |
download | bundler-896bb74d2e6f4b4fd96179f2e20ea47414a4f9ee.tar.gz |
check gemfile changes for sourced gems correctly
fixes #3520
-rw-r--r-- | lib/bundler/definition.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 4c15866577..0381697954 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -272,7 +272,7 @@ module Bundler each do |spec| next if spec.name == 'bundler' out << spec.to_lock - end + end out << "\n" end @@ -561,8 +561,16 @@ module Bundler resolve end - def in_locked_deps?(dep, d) - d && dep.source == d.source + def in_locked_deps?(dep, locked_dep) + return nil if locked_dep.nil? + return true if locked_dep.source == dep.source + + # Because the lockfile can't link a dep to a specific remote, we need to + # treat sources as equivalent anytime the locked dep has all the remotes + # that the Gemfile dep does. + dep.source.remotes.all? do |remote| + locked_dep.source.remotes.include?(remote) + end end def satisfies_locked_spec?(dep) |