Skip to content

Commit

Permalink
Adding a warning for leaving the homepage as default in a podspec.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshkalpin committed Oct 23, 2013
1 parent 4769d4a commit 8599bc8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/cocoapods-core/specification/linter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ def _validate_description(d)
warning "The description is shorter than the summary." if d.length < spec.summary.length
end

def _validate_homepage(h)
warning "The homepage has not been updated from default" if h =~ /http:\/\/EXAMPLE/
end

# Performs validations related to the `license` attribute.
#
def _validate_license(l)
Expand Down
7 changes: 7 additions & 0 deletions spec/specification/linter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,13 @@ def message_should_include(*values)

#------------------#

it "checks if the homepage has been changed from default" do
@spec.stubs(:homepage).returns('http://EXAMPLE/test')
message_should_include('homepage', 'default')
end

#------------------#

it "checks whether the license type" do
@spec.stubs(:license).returns({ :file => 'License' })
message_should_include('license', 'type')
Expand Down

0 comments on commit 8599bc8

Please sign in to comment.