Class: Licensed::Sources::Cocoapods
- Defined in:
- lib/licensed/sources/cocoapods.rb
Constant Summary collapse
- DEFAULT_POD_COMMAND =
"pod".freeze
- MISSING_PLUGIN_MESSAGE =
"Error running `pods dependencies`. Please ensure the cocoapods-dependencies-list gem is installed, it is required for licensed to enumerate dependencies.".freeze
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
12 13 14 15 16 |
# File 'lib/licensed/sources/cocoapods.rb', line 12 def enabled? return unless Licensed::Shell.tool_available?("pod") config.pwd.join("Podfile").exist? && config.pwd.join("Podfile.lock").exist? end |
#enumerate_dependencies ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/licensed/sources/cocoapods.rb', line 18 def enumerate_dependencies pods.map do |pod| Dependency.new( name: pod["name"], version: pod["version"], path: pod["path"], metadata: { "type" => Cocoapods.type, "summary" => pod["summary"], "homepage" => pod["homepage"] } ) end end |