Class: LicenseFinder::Rebar
Instance Method Summary
collapse
#active?, #command_exists?, #current_packages_with_relations, #detected_package_path, id, #installed?, #prepare, #prepare_command, #project_root?, takes_priority_over
Constructor Details
#initialize(options = {}) ⇒ Rebar
Returns a new instance of Rebar.
5
6
7
8
9
|
# File 'lib/license_finder/package_managers/rebar.rb', line 5
def initialize(options = {})
super
@command = options[:rebar_command] || package_management_command
@deps_path = Pathname(options[:rebar_deps_dir] || File.join(project_path, '_build/default/lib'))
end
|
Instance Method Details
#current_packages ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/license_finder/package_managers/rebar.rb', line 11
def current_packages
rebar_deps.map do |name, version|
licenses, homepage = dep_info(name)
RebarPackage.new(
name,
version,
install_path: @deps_path.join(name),
homepage: homepage,
spec_licenses: licenses.nil? ? [] : [licenses],
logger: logger
)
end
end
|
#package_management_command ⇒ Object
25
26
27
|
# File 'lib/license_finder/package_managers/rebar.rb', line 25
def package_management_command
'rebar3'
end
|
#possible_package_paths ⇒ Object
29
30
31
|
# File 'lib/license_finder/package_managers/rebar.rb', line 29
def possible_package_paths
[project_path.join('rebar.config')]
end
|