Class: Sq::Refinement::CocoaPodsPostInstallWriter

Inherits:
Object
  • Object
show all
Defined in:
lib/sq/refinement/cocoapods_post_install_writer.rb

Overview

Called after CocoaPods installation to write an augmenting file that takes into account changes to Pod configuration, as well as the globs used by podspecs to search for files

Instance Method Summary collapse

Constructor Details

#initialize(aggregate_targets, pod_targets, config, options) ⇒ CocoaPodsPostInstallWriter

Initializes a post-install writer with CocoaPods target objects.

Parameters:

  • aggregate_targets (Array<Pod::AggregateTarget>)
  • pod_targets (Array<Pod::PodTarget>)
  • config (Pod::Config)
  • options (Hash)


20
21
22
23
24
25
26
# File 'lib/sq/refinement/cocoapods_post_install_writer.rb', line 20

def initialize(aggregate_targets, pod_targets, config, options)
  @aggregate_targets = aggregate_targets
  @pod_targets = pod_targets
  @config = config
  @repo = config.installation_root
  @options = options || {}
end

Instance Method Details

#write!Void

Writes the refinement augmenting file to the configured path

Returns:

  • (Void)


30
31
32
# File 'lib/sq/refinement/cocoapods_post_install_writer.rb', line 30

def write!
  write_file options.fetch('output_path', config.sandbox.root.join('pods_refinement.json')), paths_by_target_name
end