class Pod::Installer::Analyzer::AnalysisResult

A simple container produced after a analysis is completed by the {Analyzer}.

Attributes

pod_targets[R]

@return [Array<PodTarget>] The pod targets created for all the aggregate targets.

podfile_dependency_cache[R]

@return [PodfileDependencyCache] the cache of all dependencies in the podfile.

podfile_state[R]

@return [SpecsState] the states of the Podfile specs.

sandbox_state[R]

@return [SpecsState] the states of the {Sandbox} respect the resolved specifications.

specifications[R]

@return [Array<Specification>] the specifications of the resolved version of Pods that should be installed.

specs_by_source[R]

@return [Hash{Source => Array<Specification>}] the specifications grouped by spec repo source.

specs_by_target[R]

@return [Hash{TargetDefinition => Array<Specification>}] the specifications grouped by target.

targets[R]

@return [Array<AggregateTarget>] The aggregate targets created for each {TargetDefinition} from the {Podfile}.

Public Class Methods

new(podfile_state, specs_by_target, specs_by_source, specifications, sandbox_state, targets, pod_targets, podfile_dependency_cache) click to toggle source
# File lib/cocoapods/installer/analyzer/analysis_result.rb, line 39
def initialize(podfile_state, specs_by_target, specs_by_source, specifications, sandbox_state, targets, pod_targets,
               podfile_dependency_cache)
  @podfile_state = podfile_state
  @specs_by_target = specs_by_target
  @specs_by_source = specs_by_source
  @specifications = specifications
  @sandbox_state = sandbox_state
  @targets = targets
  @pod_targets = pod_targets
  @podfile_dependency_cache = podfile_dependency_cache
end

Public Instance Methods

all_user_build_configurations() click to toggle source

@return [Hash{String=>Symbol}] A hash representing all the user build

configurations across all integration targets. Each key
corresponds to the name of a configuration and its value to
its type (`:debug` or `:release`).
# File lib/cocoapods/installer/analyzer/analysis_result.rb, line 56
def all_user_build_configurations
  targets.reduce({}) do |result, target|
    result.merge(target.user_build_configurations)
  end
end
needs_install?() click to toggle source

@return [Bool] Whether an installation should be performed or this

CocoaPods project is already up to date.
# File lib/cocoapods/installer/analyzer/analysis_result.rb, line 65
def needs_install?
  podfile_needs_install? || sandbox_needs_install?
end
podfile_needs_install?() click to toggle source

@return [Bool] Whether the podfile has changes respect to the lockfile.

# File lib/cocoapods/installer/analyzer/analysis_result.rb, line 71
def podfile_needs_install?
  state = podfile_state
  needing_install = state.added.length + state.changed.length + state.deleted.length
  needing_install > 0
end
sandbox_needs_install?() click to toggle source

@return [Bool] Whether the sandbox is in synch with the lockfile.

# File lib/cocoapods/installer/analyzer/analysis_result.rb, line 79
def sandbox_needs_install?
  state = sandbox_state
  needing_install = state.added.length + state.changed.length + state.deleted.length
  needing_install > 0
end