Commit cc2826bf authored by Eloy Durán's avatar Eloy Durán

Merge pull request #1130 from HBehrens/master

fix for erroneous linting on 0.21.0.rc1
parents 2fa29fb1 62ddb8e8
...@@ -208,8 +208,11 @@ module Pod ...@@ -208,8 +208,11 @@ module Pod
installer = Installer.new(sandbox, podfile) installer = Installer.new(sandbox, podfile)
installer.install! installer.install!
file_accessors = installer.aggregate_targets.first.pod_targets.first.file_accessors file_accessors = installer.aggregate_targets.map do |target|
@file_accessor = file_accessors.find { |accessor| accessor.spec == spec } target.pod_targets.map(&:file_accessors)
end.flatten
@file_accessor = file_accessors.find { |accessor| accessor.spec.root.name == spec.root.name }
config.silent config.silent
end end
......
...@@ -6,7 +6,7 @@ module Pod ...@@ -6,7 +6,7 @@ module Pod
# @return [void] # @return [void]
# #
def write_podspec(text, name = 'JSONKit.podspec') def write_podspec(text, name = 'JSONKit.podspec')
file = temporary_directory + 'JSONKit.podspec' file = temporary_directory + name
File.open(file, 'w') {|f| f.write(text) } File.open(file, 'w') {|f| f.write(text) }
file file
end end
...@@ -64,6 +64,19 @@ module Pod ...@@ -64,6 +64,19 @@ module Pod
validator.results.map(&:to_s).first.should.match /source_files.*did not match/ validator.results.map(&:to_s).first.should.match /source_files.*did not match/
validator.result_type.should == :error validator.result_type.should == :error
end end
it "validates a podspec with dependencies" do
podspec = stub_podspec(/s.name.*$/, 's.name = "ZKit"')
podspec.gsub!(/s.requires_arc/, "s.dependency 'SBJson', '~> 3.2'\n s.requires_arc")
podspec.gsub!(/s.license.*$/, 's.license = "Public Domain"')
file = write_podspec(podspec, "ZKit.podspec")
spec = Specification.from_file(file)
validator = Validator.new(spec)
validator.validate
validator.results.should.be.empty
validator.validated?.should.be.true
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