Class: LicenseFinder::Pip
- Inherits:
-
PackageManager
- Object
- PackageManager
- LicenseFinder::Pip
- Defined in:
- lib/license_finder/package_managers/pip.rb
Class Method Summary collapse
Instance Method Summary collapse
- #current_packages ⇒ Object
-
#initialize(options = {}) ⇒ Pip
constructor
A new instance of Pip.
Methods inherited from PackageManager
#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
Returns a new instance of Pip.
6 7 8 9 |
# File 'lib/license_finder/package_managers/pip.rb', line 6 def initialize( = {}) super @requirements_path = [: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 |