Class: Pod::Installer::PodSourceInstaller
- Inherits:
-
Object
- Object
- Pod::Installer::PodSourceInstaller
- Extended by:
- Executable
- Defined in:
- lib/cocoapods/installer/pod_source_installer.rb
Overview
This class needs to consider all the activated specs of a Pod.
Controller class responsible of installing the activated specifications of a single Pod.
Installation collapse
- #specific_source ⇒ Hash readonly
Instance Attribute Summary collapse
- #sandbox ⇒ Sandbox readonly
-
#specs_by_platform ⇒ Hash{Symbol=>Array}
readonly
The specifications that need to be installed grouped by platform.
Installation collapse
-
#clean! ⇒ void
Cleans the installations if appropriate.
-
#install! ⇒ void
Creates the target in the Pods project and the relative support files.
Dependencies collapse
-
#downloader ⇒ Downloader
The downloader to use for the retrieving the source.
Instance Method Summary collapse
-
#initialize(sandbox, specs_by_platform) ⇒ PodSourceInstaller
constructor
A new instance of PodSourceInstaller.
-
#inspect ⇒ String
A string suitable for debugging.
Methods included from Executable
Constructor Details
#initialize(sandbox, specs_by_platform) ⇒ PodSourceInstaller
Returns a new instance of PodSourceInstaller.
23 24 25 26 |
# File 'lib/cocoapods/installer/pod_source_installer.rb', line 23 def initialize(sandbox, specs_by_platform) @sandbox = sandbox @specs_by_platform = specs_by_platform end |
Instance Attribute Details
#sandbox ⇒ Sandbox (readonly)
13 14 15 |
# File 'lib/cocoapods/installer/pod_source_installer.rb', line 13 def sandbox @sandbox end |
#specific_source ⇒ Hash (readonly)
68 69 70 |
# File 'lib/cocoapods/installer/pod_source_installer.rb', line 68 def specific_source @specific_source end |
#specs_by_platform ⇒ Hash{Symbol=>Array} (readonly)
Returns The specifications that need to be installed grouped by platform.
18 19 20 |
# File 'lib/cocoapods/installer/pod_source_installer.rb', line 18 def specs_by_platform @specs_by_platform end |
Instance Method Details
#clean! ⇒ void
As the pre install hooks need to run before cleaning this method should be refactored.
This method returns an undefined value.
Cleans the installations if appropriate.
62 63 64 |
# File 'lib/cocoapods/installer/pod_source_installer.rb', line 62 def clean! clean_installation unless local? end |
#downloader ⇒ Downloader
Returns The downloader to use for the retrieving the source.
150 151 152 |
# File 'lib/cocoapods/installer/pod_source_installer.rb', line 150 def downloader @downloader ||= Downloader.for_target(root, root_spec.source.dup) end |
#inspect ⇒ String
Returns A string suitable for debugging.
30 31 32 |
# File 'lib/cocoapods/installer/pod_source_installer.rb', line 30 def inspect "<#{self.class} sandbox=#{sandbox.root} pod=#{root_spec.name}" end |
#install! ⇒ void
This method returns an undefined value.
Creates the target in the Pods project and the relative support files.
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/cocoapods/installer/pod_source_installer.rb', line 44 def install! download_source unless predownloaded? || local? run_prepare_command rescue Informative raise rescue Object => e UI.notice("Error installing #{root_spec.name}") clean! raise end |