Skip to content

Commit

Permalink
spec source validation for dummies
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Boehmer committed Aug 2, 2012
1 parent 6654114 commit 22f70ec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/cocoapods/command/spec.rb
Expand Up @@ -296,7 +296,7 @@ def podspec_errors
messages << "Missing summary" unless spec.summary
messages << "Missing homepage" unless spec.homepage
messages << "Missing author(s)" unless spec.authors
messages << "Missing source" unless spec.source
messages << "Missing or invalid source: #{spec.source}" unless source_valid?

# attributes with multiplatform values
return messages unless platform_valid?
Expand All @@ -315,6 +315,10 @@ def platform_valid?
!spec.platform || [:ios, :osx].include?(spec.platform.name)
end

def source_valid?
spec.source && !spec.source =~ /http:\/\/EXAMPLE/
end

def paths_starting_with_a_slash_errors
messages = []
%w[source_files resources clean_paths].each do |accessor|
Expand Down

0 comments on commit 22f70ec

Please sign in to comment.