Class: LicenseFinder::Trash
Class Method Summary
collapse
Instance Method Summary
collapse
#active?, command_exists?, #current_packages_with_relations, #detected_package_path, #initialize, installed?, #prepare
Class Method Details
.package_management_command ⇒ Object
6
7
8
|
# File 'lib/license_finder/package_managers/trash.rb', line 6
def package_management_command
'trash'
end
|
.prepare_command ⇒ Object
10
11
12
|
# File 'lib/license_finder/package_managers/trash.rb', line 10
def prepare_command
'trash'
end
|
.takes_priority_over ⇒ Object
14
15
16
|
# File 'lib/license_finder/package_managers/trash.rb', line 14
def takes_priority_over
Go15VendorExperiment
end
|
Instance Method Details
#current_packages ⇒ Object
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/license_finder/package_managers/trash.rb', line 23
def current_packages
dependencies_path = project_path.join('trash.lock')
YAML.load_file(dependencies_path).fetch('import').map do |package_hash|
import_path = package_hash.fetch('package')
license_path = project_path.join('vendor', import_path)
GoPackage.from_dependency({
'ImportPath' => import_path,
'InstallPath' => license_path,
'Rev' => package_hash.fetch('version')
}, nil, true)
end
end
|
#possible_package_paths ⇒ Object
19
20
21
|
# File 'lib/license_finder/package_managers/trash.rb', line 19
def possible_package_paths
[project_path.join('vendor.conf')]
end
|