lib/bundler/patch/conservative_definition.rb in bundler-patch-0.10.4 vs lib/bundler/patch/conservative_definition.rb in bundler-patch-1.0.0.pre.1

- old
+ new

@@ -70,13 +70,13 @@ def prep @bundler_def ||= Bundler.definition(@gems_to_update.to_bundler_definition) @bundler_def.extend ConservativeDefinition @bundler_def.gems_to_update = @gems_to_update - @bundler_def.strict = @options[:strict_updates] - @bundler_def.minor_preferred = @options[:minor_preferred] - @bundler_def.prefer_minimal = @options[:prefer_minimal] + @bundler_def.strict = @options[:strict] + @bundler_def.minor_preferred = @options[:minor] + @bundler_def.prefer_minimal = @options[:minimal] fixup_empty_remotes if @gems_to_update.to_bundler_definition === true @bundler_def end # This came out a real-life case with sidekiq and sidekiq-pro where the sidekiq-pro gem is served from their gem @@ -103,10 +103,11 @@ class GemsToPatch attr_reader :gem_patches def initialize(gem_patches) @gem_patches = Array(gem_patches) + STDERR.puts "Unlocked gems: #{unlocking_description}" if ENV['DEBUG_PATCH_RESOLVER'] end def to_bundler_definition unlocking_all? ? true : {gems: to_gem_names} end @@ -123,8 +124,12 @@ @gem_patches.empty? end def unlocking_gem?(gem_name) unlocking_all? || to_gem_names.include?(gem_name) + end + + def unlocking_description + unlocking_all? ? 'ALL' : to_gem_names.sort.join(', ') end end end