Class: Licensed::Sources::Pip
- Defined in:
- lib/licensed/sources/pip.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Source
Instance Method Summary collapse
Methods inherited from Source
#dependencies, full_type, #ignored?, inherited, #initialize, register_source, require_matched_dependency_version, #source_config, type, type_and_version
Constructor Details
This class inherits a constructor from Licensed::Sources::Source
Instance Method Details
#enabled? ⇒ Boolean
10 11 12 |
# File 'lib/licensed/sources/pip.rb', line 10 def enabled? !pip_command.empty? && Licensed::Shell.tool_available?(pip_command.join("")) end |
#enumerate_dependencies ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/licensed/sources/pip.rb', line 14 def enumerate_dependencies packages.map do |package| Dependency.new( name: package["Name"], version: package["Version"], path: package_license_location(package), metadata: { "type" => self.class.type, "summary" => package["Summary"], "homepage" => package["Home-page"] } ) end end |