Class: LockDiff::LockfileComparator
- Inherits:
-
Object
- Object
- LockDiff::LockfileComparator
show all
- Defined in:
- lib/lock_diff/lockfile_comparator.rb
Defined Under Namespace
Classes: NotChangedLockfile
Class Method Summary
collapse
Class Method Details
.compare_by(pull_request) ⇒ Object
6
7
8
9
10
11
12
13
14
|
# 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 ⇒ Object
16
17
18
|
# File 'lib/lock_diff/lockfile_comparator.rb', line 16
def lockfile_name
LockDiff.config.strategy.lockfile_name
end
|