class LockDiff::LockfileComparator

Public Class Methods

compare_by(pull_request) click to toggle source
# File lib/lock_diff/lockfile_comparator.rb, line 6
def compare_by(pull_request)
  file_path = pull_request.find_content_path(lockfile_name)
  raise NotChangedLockfile if file_path.nil?

  LockDiff.config.strategy.lockfile_comparator.new(
    old_lockfile: pull_request.base_file(file_path),
    new_lockfile: pull_request.head_file(file_path)
  ).call
end
lockfile_name() click to toggle source
# File lib/lock_diff/lockfile_comparator.rb, line 16
def lockfile_name
  LockDiff.config.strategy.lockfile_name
end