Permalink
Browse files

[ExternalSources] Better robustness :-)

  • Loading branch information...
1 parent 6624bfc commit 7a80f78fea4102b0e0898448244b553af81b597a @fabiopelosin fabiopelosin committed Aug 20, 2012
Showing with 4 additions and 2 deletions.
  1. +3 −1 lib/cocoapods/dependency.rb
  2. +1 −1 spec/unit/specification_spec.rb
View
4 lib/cocoapods/dependency.rb
@@ -204,7 +204,9 @@ def copy_external_source_into_sandbox(sandbox, _)
output_path = sandbox.root + "Local Podspecs/#{name}.podspec"
output_path.dirname.mkpath
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 }
end
end
View
2 spec/unit/specification_spec.rb
@@ -471,7 +471,7 @@
end
it "it returns the expanded local path" do
- @spec.local_path.should == fixture("integration/JSONKit")
+ @spec.source.should == {:local => fixture("integration/JSONKit")}
end
end

0 comments on commit 7a80f78

Please sign in to comment.