Commit ddc5ac50 authored by Eloy Duran's avatar Eloy Duran

Make specs green.

parent 55d5c919
...@@ -20,7 +20,7 @@ module Pod ...@@ -20,7 +20,7 @@ module Pod
if name_and_version_requirements.last.is_a?(Hash) if name_and_version_requirements.last.is_a?(Hash)
@external_spec_source = name_and_version_requirements.pop @external_spec_source = name_and_version_requirements.pop
end end
super(name_and_version_requirements.first) super(*name_and_version_requirements)
else else
raise Informative, "A dependency needs either a name and version requirements, " \ raise Informative, "A dependency needs either a name and version requirements, " \
...@@ -32,8 +32,7 @@ module Pod ...@@ -32,8 +32,7 @@ module Pod
def ==(other) def ==(other)
super && super &&
@only_part_of_other_pod == other.only_part_of_other_pod && @only_part_of_other_pod == other.only_part_of_other_pod &&
@external_spec_source == other.external_spec_source && (@specification ? @specification == other.specification : @external_spec_source == other.external_spec_source)
@specification == other.specification
end end
def external_podspec? def external_podspec?
...@@ -46,22 +45,23 @@ module Pod ...@@ -46,22 +45,23 @@ module Pod
def specification def specification
@specification ||= begin @specification ||= begin
# This is an external podspec if external_podspec?
pod_root = Config.instance.project_pods_root + @name pod_root = Config.instance.project_pods_root + @name
spec = nil spec = nil
if @external_spec_source[:podspec] if @external_spec_source[:podspec]
Config.instance.project_pods_root.mkdir Config.instance.project_pods_root.mkdir
spec = Config.instance.project_pods_root + "#{@name}.podspec" spec = Config.instance.project_pods_root + "#{@name}.podspec"
# can be http, file, etc # can be http, file, etc
require 'open-uri' require 'open-uri'
open(@external_spec_source[:podspec]) do |io| open(@external_spec_source[:podspec]) do |io|
spec.open('w') { |f| f << io.read } spec.open('w') { |f| f << io.read }
end
else
Downloader.for_source(pod_root, @external_spec_source).download
spec = pod_root + "#{@name}.podspec"
end end
else Specification.from_file(spec)
Downloader.for_source(pod_root, @external_spec_source).download
spec = pod_root + "#{@name}.podspec"
end end
Specification.from_file(spec)
end end
end end
......
...@@ -101,7 +101,6 @@ describe "A Pod::Specification loaded from a podspec" do ...@@ -101,7 +101,6 @@ describe "A Pod::Specification loaded from a podspec" do
@spec.compiler_flags = "-Wunused-value" @spec.compiler_flags = "-Wunused-value"
@spec.compiler_flags.should == "-Wunused-value -fobj-arc" @spec.compiler_flags.should == "-Wunused-value -fobj-arc"
end end
end end
describe "A Pod::Specification that's part of another pod's source" do describe "A Pod::Specification that's part of another pod's 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