Commit 1fd90d26 authored by Fabio Pelosin's avatar Fabio Pelosin

[Spec#lint] Support remote podspecs.

Like `pod spec lint https://github.com/tibr/Specs/raw/123277fe658059c6efd5801aee1e504f55d488f6/Kiwi/1.1.0/Kiwi.podspec --verbose'
parent a21d1e73
......@@ -80,6 +80,7 @@ module Pod
else
raise Informative, count == 1 ? "The spec did not pass validation." : "#{invalid_count} out of #{count} specs failed validation."
end
podspecs_tmp_dir.rmtree if tmp_dir.exist?
end
private
......@@ -130,6 +131,16 @@ module Pod
def podspecs_to_lint
@podspecs_to_lint ||= begin
if @repo_or_podspec =~ /https?:\/\//
require 'open-uri'
output_path = podspecs_tmp_dir + File.basename(@repo_or_podspec)
output_path.dirname.mkpath
open(@repo_or_podspec) do |io|
output_path.open('w') { |f| f << io.read }
end
return [output_path]
end
path = Pathname.new(@repo_or_podspec || '.')
if path.directory?
files = path.glob('**/*.podspec')
......@@ -143,6 +154,10 @@ module Pod
end
end
def podspecs_tmp_dir
Pathname.new('/tmp/CocoaPods/Lint_podspec')
end
def specs_to_lint
@specs_to_lint ||= begin
podspecs_to_lint.map do |podspec|
......
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