Class: Spandx::Java::Gateway
Constant Summary
collapse
- DEFAULT_SOURCE =
'https://repo.maven.apache.org/maven2'
Instance Attribute Summary
#http
Instance Method Summary
collapse
#initialize
#all, #each, #inherited, #registry
Instance Method Details
#licenses_for(dependency) ⇒ Object
12
13
14
15
16
17
18
19
|
# File 'lib/spandx/java/gateway.rb', line 12
def licenses_for(dependency)
group_id, artifact_id = dependency.name.split(':')
metadata_for(
group_id: group_id,
artifact_id: artifact_id,
version: dependency.version
).licenses
end
|
#matches?(dependency) ⇒ Boolean
8
9
10
|
# File 'lib/spandx/java/gateway.rb', line 8
def matches?(dependency)
dependency.package_manager == :maven
end
|
21
22
23
24
25
26
27
28
|
# File 'lib/spandx/java/gateway.rb', line 21
def metadata_for(group_id:, artifact_id:, version:)
::Spandx::Java::Metadata.new(
artifact_id: artifact_id,
group_id: group_id,
version: version,
source: DEFAULT_SOURCE
)
end
|