Class: LicenseFinder::Erlangmk

Inherits:
PackageManager show all
Defined in:
lib/license_finder/package_managers/erlangmk.rb

Instance Method Summary collapse

Methods inherited from PackageManager

#active?, #command_exists?, #current_packages_with_relations, #detected_package_path, id, #initialize, #installed?, #prepare, #project_root?, takes_priority_over

Constructor Details

This class inherits a constructor from LicenseFinder::PackageManager

Instance Method Details

#current_packagesObject



26
27
28
29
30
# File 'lib/license_finder/package_managers/erlangmk.rb', line 26

def current_packages
  deps.map do |dep|
    ErlangmkPackage.new(dep)
  end
end

#package_management_commandObject



5
6
7
# File 'lib/license_finder/package_managers/erlangmk.rb', line 5

def package_management_command
  'make'
end

#package_management_command_with_pathObject



9
10
11
# File 'lib/license_finder/package_managers/erlangmk.rb', line 9

def package_management_command_with_path
  "#{package_management_command} --directory=#{project_path} --no-print-directory"
end

#possible_package_pathsObject



19
20
21
22
23
24
# File 'lib/license_finder/package_managers/erlangmk.rb', line 19

def possible_package_paths
  [
    project_path.join('Erlang.mk'),
    project_path.join('erlang.mk')
  ]
end

#prepare_commandObject

The IS_DEP=1 is added because not all erlang.mk-based projects are updated to a version that is compatible with LicenseFinder



15
16
17
# File 'lib/license_finder/package_managers/erlangmk.rb', line 15

def prepare_command
  "#{package_management_command_with_path} IS_DEP=1 fetch-deps"
end