Class: LicenseFinder::GoDep
Class Method Summary
collapse
Instance Method Summary
collapse
#active?, command_exists?, #current_packages_with_relations, #detected_package_path, installed?, #prepare, prepare_command, takes_priority_over
Constructor Details
#initialize(options = {}) ⇒ GoDep
Returns a new instance of GoDep.
5
6
7
8
|
# File 'lib/license_finder/package_managers/go_dep.rb', line 5
def initialize(options = {})
super
@full_version = options[:go_full_version]
end
|
Class Method Details
.package_management_command ⇒ Object
31
32
33
|
# File 'lib/license_finder/package_managers/go_dep.rb', line 31
def self.package_management_command
'godep'
end
|
Instance Method Details
#current_packages ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/license_finder/package_managers/go_dep.rb', line 10
def current_packages
json = JSON.parse(detected_package_path.read)
dependencies_info = json['Deps'].map do |dep_json|
{
'Homepage' => homepage(dep_json),
'ImportPath' => import_path(dep_json),
'InstallPath' => dep_json['InstallPath'],
'Rev' => dep_json['Rev']
}
end
dependencies_info.uniq.map do |info|
GoPackage.from_dependency(info, install_prefix, @full_version)
end
end
|
#possible_package_paths ⇒ Object
27
28
29
|
# File 'lib/license_finder/package_managers/go_dep.rb', line 27
def possible_package_paths
[project_path.join('Godeps/Godeps.json')]
end
|