Class: LicenseFinder::Pip
Class Method Summary
collapse
Instance Method Summary
collapse
#active?, active_package_managers, active_packages, command_exists?, #current_packages_with_relations, #detected_package_path, installed?, package_managers, #prepare, prepare_command, takes_priority_over
Constructor Details
#initialize(options = {}) ⇒ Pip
6
7
8
9
|
# File 'lib/license_finder/package_managers/pip.rb', line 6
def initialize(options = {})
super
@requirements_path = options[:pip_requirements_path] || Pathname('requirements.txt')
end
|
Class Method Details
.package_management_command ⇒ Object
24
25
26
|
# File 'lib/license_finder/package_managers/pip.rb', line 24
def self.package_management_command
'pip'
end
|
Instance Method Details
#current_packages ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/license_finder/package_managers/pip.rb', line 11
def current_packages
pip_output.map do |name, version, children, location|
PipPackage.new(
name,
version,
pypi_def(name, version),
logger: logger,
children: children,
install_path: Pathname(location).join(name)
)
end
end
|