Commit 4458700e authored by Fabio Pelosin's avatar Fabio Pelosin

[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.
parent 7d5581ad
...@@ -137,7 +137,7 @@ module Pod ...@@ -137,7 +137,7 @@ module Pod
else else
copy_external_source_into_sandbox(sandbox) copy_external_source_into_sandbox(sandbox)
local_pod = sandbox.installed_pod_named(name, platform) 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 local_pod.top_specification
end end
end end
......
...@@ -204,6 +204,8 @@ module Pod ...@@ -204,6 +204,8 @@ module Pod
end end
def expanded_paths(patterns, options = {}) 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 = [ patterns ] if patterns.is_a? String
patterns.map do |pattern| patterns.map do |pattern|
pattern = root + pattern pattern = root + pattern
......
...@@ -74,6 +74,11 @@ describe Pod::LocalPod do ...@@ -74,6 +74,11 @@ describe Pod::LocalPod do
it "returns the platform" do it "returns the platform" do
@pod.platform.should == :ios @pod.platform.should == :ios
end 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 end
describe "with installed source," do describe "with installed source," do
......
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