aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2016-06-25 16:23:33 +0900
committerSamuel Giddins <segiddins@segiddins.me>2016-06-27 16:17:38 -0500
commite4fd51d0e05bf38a4e3bc928c9331d55adae3807 (patch)
treefc2d89bd5ce14a4fbe490478201ecbdd1c7c7db0 /lib
parenteec0f4a677c096a42c3d80308b81e53d2b2e5870 (diff)
downloadbundler-e4fd51d0e05bf38a4e3bc928c9331d55adae3807.tar.gz
Auto merge of #4716 - bundler:seg-no-re-resolve-part-deux, r=indirect
[Definition] Just search for changed specs in an exactly matching source \c @indirect (cherry picked from commit faf82ccc97ab2441bd4fe849d12151fb347a81cf)
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/definition.rb22
1 files changed, 6 insertions, 16 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index efc249be..bf83d70d 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -470,19 +470,11 @@ module Bundler
end
# Check if the specs of the given source changed
- # according to the locked source. A block should be
- # in order to specify how the locked version of
- # the source should be found.
- def specs_changed?(source, &block)
- locked = @locked_sources.find(&block)
-
- if locked
- unlocking = @locked_specs.any? do |locked_spec|
- locked_spec.source.class == locked.class && locked_spec.source != locked
- end
- end
+ # according to the locked source.
+ def specs_changed?(source)
+ locked = @locked_sources.find(source)
- !locked || unlocking || dependencies_for_source_changed?(source) || specs_for_source_changed?(source)
+ !locked || dependencies_for_source_changed?(source) || specs_for_source_changed?(source)
end
def dependencies_for_source_changed?(source)
@@ -515,15 +507,13 @@ module Bundler
end
locals.any? do |source, changed|
- changed || specs_changed?(source) {|o| source.class == o.class && source.uri == o.uri }
+ changed || specs_changed?(source)
end
end
def converge_paths
sources.path_sources.any? do |source|
- specs_changed?(source) do |ls|
- ls.class == source.class && ls.path == source.path
- end
+ specs_changed?(source)
end
end