Class: LicenseScout::DependencyManager::Dep
- Inherits:
-
Base
- Object
- Base
- LicenseScout::DependencyManager::Dep
show all
- Defined in:
- lib/license_scout/dependency_manager/dep.rb
Overview
Instance Attribute Summary
Attributes inherited from Base
#directory
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#dependencies ⇒ Object
48
49
50
51
52
53
54
55
56
|
# File 'lib/license_scout/dependency_manager/dep.rb', line 48
def dependencies
Array(gopkg.dig("projects")).map do |pkg_info|
dep_name = pkg_info["name"]
dep_version = pkg_info["version"] || pkg_info["revision"]
dep_path = package_path(dep_name)
new_dependency(dep_name, dep_version, dep_path)
end.compact
end
|
#detected? ⇒ Boolean
44
45
46
|
# File 'lib/license_scout/dependency_manager/dep.rb', line 44
def detected?
File.exist?(gopkg_lock_path)
end
|
#install_command ⇒ Object
40
41
42
|
# File 'lib/license_scout/dependency_manager/dep.rb', line 40
def install_command
"dep ensure"
end
|
#name ⇒ Object
28
29
30
|
# File 'lib/license_scout/dependency_manager/dep.rb', line 28
def name
"golang_dep"
end
|
#signature ⇒ Object
36
37
38
|
# File 'lib/license_scout/dependency_manager/dep.rb', line 36
def signature
"Gopkg.lock file"
end
|
#type ⇒ Object
32
33
34
|
# File 'lib/license_scout/dependency_manager/dep.rb', line 32
def type
"golang"
end
|