Commit 7a80f78f authored by Fabio Pelosin's avatar Fabio Pelosin

[ExternalSources] Better robustness :-)

parent 6624bfc8
...@@ -204,7 +204,9 @@ module Pod ...@@ -204,7 +204,9 @@ module Pod
output_path = sandbox.root + "Local Podspecs/#{name}.podspec" output_path = sandbox.root + "Local Podspecs/#{name}.podspec"
output_path.dirname.mkpath output_path.dirname.mkpath
puts "-> Fetching podspec for `#{name}' from: #{@params[:podspec]}" unless config.silent? puts "-> Fetching podspec for `#{name}' from: #{@params[:podspec]}" unless config.silent?
open(Pathname.new(@params[:podspec]).expand_path) do |io| path = @params[:podspec]
path = Pathname.new(path).expand_path if path.start_with?("~")
open(path) do |io|
output_path.open('w') { |f| f << io.read } output_path.open('w') { |f| f << io.read }
end end
end end
......
...@@ -471,7 +471,7 @@ describe "A Pod::Specification with :local source" do ...@@ -471,7 +471,7 @@ describe "A Pod::Specification with :local source" do
end end
it "it returns the expanded local path" do it "it returns the expanded local path" do
@spec.local_path.should == fixture("integration/JSONKit") @spec.source.should == {:local => fixture("integration/JSONKit")}
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