Sha256: 0aced9b3c85e3449314a5950235c80b4de6f7d13caf2f3d1509bff3618728614

Contents?: true

Size: 504 Bytes

Versions: 20

Compression:

Stored size: 504 Bytes

Contents

class GemsToPatchReconciler
  attr_reader :reconciled_patches

  def initialize(vulnerable_patches, requested_patches=[])
    @vulnerable_patches = vulnerable_patches
    @requested_patches = requested_patches
    reconcile
  end

  private

  def reconcile
    @reconciled_patches = []
    unless @requested_patches.empty?
      @vulnerable_patches.reject! { |gp| !@requested_patches.include?(gp) }
      @reconciled_patches.push(*((@vulnerable_patches + @requested_patches).uniq))
    end
  end
end



Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
bundler-patch-1.2.0 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-1.1.0 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-1.1.0.pre6 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-1.1.0.pre5 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-1.1.0.pre4 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-1.1.0.pre3 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-1.1.0.pre2 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-1.1.0.pre1 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-1.0.0 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-1.0.0.pre.1 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-0.10.4 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-0.10.3 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-0.10.2 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-0.10.1 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-0.10.0 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-0.9.0 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-0.8.0 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-0.7.2 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-0.7.1 lib/bundler/patch/gems_to_patch_reconciler.rb
bundler-patch-0.7.0 lib/bundler/patch/gems_to_patch_reconciler.rb