From 9cbf8fb404ad2faa30b10f493e8951dd0cdf0f31 Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Fri, 24 Jun 2016 18:12:54 -0500 Subject: [Definition] Just search for changed specs in an exactly matching source --- lib/bundler/definition.rb | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 0305f404e3..7932d2d7e2 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -491,19 +491,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) @@ -536,15 +528,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 -- cgit v1.2.1