[LocalPod] Fix for nasty bug related to Rake::FileList.

If the paths of the pod are resolved when the directory is not
created, FileList will cache no files and not update subsequently.
This commit is contained in:
Fabio Pelosin
2012-05-25 14:47:12 +02:00
parent 7d5581ad07
commit 4458700ed6
3 changed files with 8 additions and 1 deletions

View File

@@ -137,7 +137,7 @@ module Pod
else
copy_external_source_into_sandbox(sandbox)
local_pod = sandbox.installed_pod_named(name, platform)
local_pod.clean if config.clean?
local_pod.clean if config.clean? && local_pod.exists?
local_pod.top_specification
end
end

View File

@@ -204,6 +204,8 @@ module Pod
end
def expanded_paths(patterns, options = {})
raise Informative, "[Local Pod] Attempt to resolve paths for non existent pod." unless exists?
patterns = [ patterns ] if patterns.is_a? String
patterns.map do |pattern|
pattern = root + pattern

View File

@@ -74,6 +74,11 @@ describe Pod::LocalPod do
it "returns the platform" do
@pod.platform.should == :ios
end
it "raises if the files are accessed before creating the pod dir" do
@pod.implode
lambda { @pod.source_files }.should.raise Pod::Informative
end
end
describe "with installed source," do