Commit e0e487bd authored by Luke Redpath's avatar Luke Redpath

The Sandbox should be able to list its installed pods.

parent de263101
......@@ -6,6 +6,10 @@ module Pod
@specification, @sandbox = specification, sandbox
end
def self.from_podspec(podspec, sandbox)
new(Specification.from_file(podspec), sandbox)
end
def root
@sandbox.root + specification.name
end
......
require 'fileutils'
module Pod
class Sandbox
attr_reader :root
def initialize(path)
@root = path
@root = Pathname.new(path)
@header_search_paths = []
FileUtils.mkdir_p(@root)
......@@ -41,5 +43,11 @@ module Pod
def prepare_for_install
headers_root.rmtree if headers_root.exist?
end
def installed_pods
Dir[root + "**/*.podspec"].map do |podspec|
LocalPod.from_podspec(Pathname.new(podspec), self)
end
end
end
end
......@@ -72,5 +72,4 @@ describe Pod::Sandbox do
@sandbox.prepare_for_install
@sandbox.headers_root.should.not.exist
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