Commit 30d8b91e authored by Eloy Duran's avatar Eloy Duran

Actually commit resolver.rb

parent 701db816
module Pod
class Resolver
def initialize(specification)
@specification = specification
end
def resolve
@sets = []
find_dependency_sets(@specification)
specs = @sets.map(&:podspec)
p specs
end
def find_dependency_sets(specification)
specification.read(:dependencies).each do |dependency|
Source.search(dependency).each do |set|
# TODO ultimately this compatibility check should be used to try and
# resolve the conflicts, but for now we'll keep it simple.
if existing_set = @sets.find { |s| s == set }
existing_set.required_by(specification, dependency)
else
set.required_by(specification, dependency)
@sets << set
find_dependency_sets(set.podspec)
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