Class: LicenseFinder::Gvt
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
30
31
32
|
# File 'lib/license_finder/package_managers/gvt.rb', line 30
def self.takes_priority_over
Go15VendorExperiment
end
|
Instance Method Details
#current_packages ⇒ Object
20
21
22
23
24
25
26
27
28
|
# File 'lib/license_finder/package_managers/gvt.rb', line 20
def current_packages
shell_command = "cd #{project_path} && gvt list -f \"{{.Importpath}} {{.Revision}} {{.Repository}}\""
path = project_path.join(project_path, 'vendor')
stdout, _stderr, status = Cmd.run(shell_command)
return [] unless status.success?
packages_from_output(stdout, path)
end
|
#package_management_command ⇒ Object
12
13
14
|
# File 'lib/license_finder/package_managers/gvt.rb', line 12
def package_management_command
'gvt'
end
|
#possible_package_paths ⇒ Object
7
8
9
10
|
# File 'lib/license_finder/package_managers/gvt.rb', line 7
def possible_package_paths
potential_path = project_path.join('vendor', 'manifest')
[Pathname(potential_path)]
end
|
#prepare_command ⇒ Object
16
17
18
|
# File 'lib/license_finder/package_managers/gvt.rb', line 16
def prepare_command
'gvt restore'
end
|