Skip to content

Commit

Permalink
[ExternalSources] Better robustness :-)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiopelosin committed Aug 20, 2012
1 parent 6624bfc commit 7a80f78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/cocoapods/dependency.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ def copy_external_source_into_sandbox(sandbox, _)
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
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/specification_spec.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@
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


Expand Down

0 comments on commit 7a80f78

Please sign in to comment.