Commit d3ca9798 authored by Luke Redpath's avatar Luke Redpath

Rename use of "specification" to "podfile" as that is what is is using; a specification is

something else.
parent 3af9e55a
module Pod module Pod
class Resolver class Resolver
def initialize(specification, dependencies = nil) def initialize(podfile, dependencies = nil)
@specification, @dependencies = specification, dependencies || specification.dependencies @podfile, @dependencies = podfile, dependencies || podfile.dependencies
end end
def resolve def resolve
@sets, @loaded_spec_names, @specs = [], [], [] @sets, @loaded_spec_names, @specs = [], [], []
find_dependency_sets(@specification, @dependencies) find_dependency_sets(@podfile, @dependencies)
@specs.sort_by(&:name) @specs.sort_by(&:name)
end end
def find_dependency_sets(specification, dependencies = nil) def find_dependency_sets(podfile, dependencies = nil)
(dependencies || specification.dependencies).each do |dependency| (dependencies || podfile.dependencies).each do |dependency|
set = find_dependency_set(dependency) set = find_dependency_set(dependency)
set.required_by(specification) set.required_by(podfile)
unless @loaded_spec_names.include?(dependency.name) unless @loaded_spec_names.include?(dependency.name)
# Get a reference to the spec that’s actually being loaded. # Get a reference to the spec that’s actually being loaded.
# If it’s a subspec dependency, e.g. 'RestKit/Network', then # If it’s a subspec dependency, e.g. 'RestKit/Network', then
...@@ -43,8 +43,8 @@ module Pod ...@@ -43,8 +43,8 @@ module Pod
end end
def validate_platform!(spec) def validate_platform!(spec)
unless spec.platform.nil? || spec.platform == @specification.platform unless spec.platform.nil? || spec.platform == @podfile.platform
raise Informative, "The platform required by the Podfile (:#{@specification.platform}) " \ raise Informative, "The platform required by the Podfile (:#{@podfile.platform}) " \
"does not match that of #{spec} (:#{spec.platform})" "does not match that of #{spec} (:#{spec.platform})"
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