Class: LicenseFinder::GoModules
Constant Summary
collapse
- PACKAGES_FILE =
'go.mod'
Class Method Summary
collapse
Instance Method Summary
collapse
#command_exists?, #current_packages_with_relations, #detected_package_path, id, #initialize, #installed?, #package_management_command, #prepare, #prepare_command, #project_root?
Class Method Details
.takes_priority_over ⇒ Object
10
11
12
|
# File 'lib/license_finder/package_managers/go_modules.rb', line 10
def takes_priority_over
Go15VendorExperiment
end
|
Instance Method Details
#active? ⇒ Boolean
15
16
17
|
# File 'lib/license_finder/package_managers/go_modules.rb', line 15
def active?
mod_files?
end
|
#current_packages ⇒ Object
19
20
21
22
23
24
25
26
27
|
# File 'lib/license_finder/package_managers/go_modules.rb', line 19
def current_packages
packages = packages_info.map do |package|
name, version, install_path = package.split(',')
read_package(install_path, name, version) if install_path.to_s != ''
end.compact
packages.reject do |package|
Pathname(package.install_path).cleanpath == Pathname(project_path).cleanpath
end
end
|