Class: LicenseScout::DependencyManager::Bundler
- Inherits:
-
Base
- Object
- Base
- LicenseScout::DependencyManager::Bundler
show all
- Defined in:
- lib/license_scout/dependency_manager/bundler.rb
Instance Attribute Summary
Attributes inherited from Base
#directory
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#dependencies ⇒ Object
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# File 'lib/license_scout/dependency_manager/bundler.rb', line 50
def dependencies
dependency_data.map do |gem_data|
dep_name = gem_data["name"]
dep_version = gem_data["version"]
dep_license = gem_data["license"]
dep_path = if dep_name == "bundler"
"https://github.com/bundler/bundler"
elsif dep_name == "json"
"https://github.com/flori/json"
else
gem_data["path"]
end
dependency = new_dependency(dep_name, dep_version, dep_path)
unless dep_license.nil?
dependency.add_license(dep_license, "https://rubygems.org/gems/#{dep_name}/versions/#{dep_version}")
end
dependency
end.compact
end
|
#detected? ⇒ Boolean
40
41
42
43
44
45
46
47
48
|
# File 'lib/license_scout/dependency_manager/bundler.rb', line 40
def detected?
File.exist?(gemfile_path) && File.exist?(lockfile_path)
end
|
#install_command ⇒ Object
36
37
38
|
# File 'lib/license_scout/dependency_manager/bundler.rb', line 36
def install_command
"bundle install"
end
|
#name ⇒ Object
24
25
26
|
# File 'lib/license_scout/dependency_manager/bundler.rb', line 24
def name
"ruby_bundler"
end
|
#signature ⇒ Object
32
33
34
|
# File 'lib/license_scout/dependency_manager/bundler.rb', line 32
def signature
"Gemfile and Gemfile.lock files"
end
|
#type ⇒ Object
28
29
30
|
# File 'lib/license_scout/dependency_manager/bundler.rb', line 28
def type
"ruby"
end
|