Class: LicenseFinder::Glide
Class Method Summary
collapse
Instance Method Summary
collapse
#active?, #command_exists?, #current_packages_with_relations, #detected_package_path, id, #initialize, #installed?, #prepare, #project_root?
Class Method Details
.takes_priority_over ⇒ Object
24
25
26
|
# File 'lib/license_finder/package_managers/glide.rb', line 24
def self.takes_priority_over
Go15VendorExperiment
end
|
Instance Method Details
#current_packages ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/license_finder/package_managers/glide.rb', line 9
def current_packages
detected_path = detected_package_path
YAML.load_file(detected_path).fetch('imports').map do |package_hash|
import_path = package_hash.fetch('name')
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
|
#package_management_command ⇒ Object
28
29
30
|
# File 'lib/license_finder/package_managers/glide.rb', line 28
def package_management_command
'glide'
end
|
#possible_package_paths ⇒ Object
5
6
7
|
# File 'lib/license_finder/package_managers/glide.rb', line 5
def possible_package_paths
[project_path.join('glide.lock')]
end
|
#prepare_command ⇒ Object
32
33
34
|
# File 'lib/license_finder/package_managers/glide.rb', line 32
def prepare_command
'glide install'
end
|