Commit ed3d3e78 authored by Marius Rackwitz's avatar Marius Rackwitz

[Refactor] Move AnalysisResult into an own file

parent 6bd6e636
...@@ -6,8 +6,8 @@ module Pod ...@@ -6,8 +6,8 @@ module Pod
class Analyzer class Analyzer
include Config::Mixin include Config::Mixin
autoload :AnalysisResult, 'cocoapods/installer/analyzer/analysis_result'
autoload :SandboxAnalyzer, 'cocoapods/installer/analyzer/sandbox_analyzer' autoload :SandboxAnalyzer, 'cocoapods/installer/analyzer/sandbox_analyzer'
autoload :LockingDependencyAnalyzer, 'cocoapods/installer/analyzer/locking_dependency_analyzer' autoload :LockingDependencyAnalyzer, 'cocoapods/installer/analyzer/locking_dependency_analyzer'
# @return [Sandbox] The sandbox where the Pods should be installed. # @return [Sandbox] The sandbox where the Pods should be installed.
...@@ -770,45 +770,6 @@ module Pod ...@@ -770,45 +770,6 @@ module Pod
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
class AnalysisResult
# @return [SpecsState] the states of the Podfile specs.
#
attr_accessor :podfile_state
# @return [Hash{TargetDefinition => Array<Spec>}] the specifications
# grouped by target.
#
attr_accessor :specs_by_target
# @return [Array<Specification>] the specifications of the resolved
# version of Pods that should be installed.
#
attr_accessor :specifications
# @return [SpecsState] the states of the {Sandbox} respect the resolved
# specifications.
#
attr_accessor :sandbox_state
# @return [Array<Target>] The Podfile targets containing library
# dependencies.
#
attr_accessor :targets
# @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`).
#
def all_user_build_configurations
targets.reduce({}) do |result, target|
result.merge(target.user_build_configurations)
end
end
end
#-----------------------------------------------------------------------#
# This class represents the state of a collection of Pods. # This class represents the state of a collection of Pods.
# #
# @note The names of the pods stored by this class are always the **root** # @note The names of the pods stored by this class are always the **root**
......
module Pod
class Installer
class Analyzer
class AnalysisResult
# @return [SpecsState] the states of the Podfile specs.
#
attr_accessor :podfile_state
# @return [Hash{TargetDefinition => Array<Spec>}] the specifications
# grouped by target.
#
attr_accessor :specs_by_target
# @return [Array<Specification>] the specifications of the resolved
# version of Pods that should be installed.
#
attr_accessor :specifications
# @return [SpecsState] the states of the {Sandbox} respect the resolved
# specifications.
#
attr_accessor :sandbox_state
# @return [Array<Target>] The Podfile targets containing library
# dependencies.
#
attr_accessor :targets
# @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`).
#
def all_user_build_configurations
targets.reduce({}) do |result, target|
result.merge(target.user_build_configurations)
end
end
end
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment