Class: LicenseFinder::Govendor
Class Method Summary
collapse
Instance Method Summary
collapse
#active?, active_package_managers, active_packages, command_exists?, #current_packages_with_relations, #detected_package_path, #initialize, installed?, package_managers, #prepare
Class Method Details
.package_management_command ⇒ Object
24
25
26
|
# File 'lib/license_finder/package_managers/govendor.rb', line 24
def self.package_management_command
'govendor'
end
|
.prepare_command ⇒ Object
28
29
30
|
# File 'lib/license_finder/package_managers/govendor.rb', line 28
def self.prepare_command
'govendor sync'
end
|
.takes_priority_over ⇒ Object
20
21
22
|
# File 'lib/license_finder/package_managers/govendor.rb', line 20
def self.takes_priority_over
Go15VendorExperiment
end
|
Instance Method Details
#current_packages ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/license_finder/package_managers/govendor.rb', line 7
def current_packages
file = File.read(detected_package_path)
json = JSON.parse(file)
packages = json['package']
packages.map do |package|
GoPackage.from_dependency({
'ImportPath' => package['path'],
'InstallPath' => project_path.join('vendor', package['path']),
'Rev' => package['revision']
}, nil, true)
end
end
|
#possible_package_paths ⇒ Object
3
4
5
|
# File 'lib/license_finder/package_managers/govendor.rb', line 3
def possible_package_paths
[project_path.join('vendor', 'vendor.json')]
end
|