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:04:34 +0100 |
commit | 303b333df18c94866bdd25a880cfa56d0a443354 (patch) | |
tree | 0526c7d6022e919e60b9064fced1ab42d7f42c68 | |
parent | 5a1735ae100478179a5507f09659f79d6d52af52 (diff) | |
download | bundler-303b333df18c94866bdd25a880cfa56d0a443354.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 d0031563..d80b393f 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -276,7 +276,7 @@ module Bundler each do |spec| next if spec.name == 'bundler' out << spec.to_lock - end + end out << "\n" end @@ -558,8 +558,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) |