module LockfilePreserver

Constants

VERSION

Public Class Methods

keep(original, updated, section = :bundled_with) click to toggle source
# File lib/lockfile_preserver.rb, line 8
def self.keep(original, updated, section = :bundled_with)
  if section == :bundled_with
    LockfilePreserver::BundledWith.new(original, updated).keep
  elsif section == :ruby_version
    LockfilePreserver::RubyVersion.new(original, updated).keep
  elsif section == :platforms
    LockfilePreserver::Platforms.new(original, updated).keep
  elsif
    abort %(We currently only support preserve "BUNDLED WITH" & "RUBY VERSION" section of lockfile.)
  end
end
keep_all(original, updated) click to toggle source
# File lib/lockfile_preserver.rb, line 20
def self.keep_all(original, updated)
  pipeline = Pipeline.new [
    LockfilePreserver::BundledWith,
    LockfilePreserver::RubyVersion,
    LockfilePreserver::Platforms,
  ]

  pipeline.call(original, updated)
end