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