Skip to content

Commit

Permalink
Merge branch 'master' into linter-refactor
Browse files Browse the repository at this point in the history
Conflicts:
	lib/cocoapods-core/specification/linter.rb
  • Loading branch information
joshkalpin committed Apr 1, 2014
2 parents ea328ea + 17bc1d3 commit 780dcfc
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# CocoaPods Core Changelog

## Master

##### Enhancements

* Check social_media_url changed from default value
[Richard Lee](https://github.com/dlackty)
[#67](https://github.com/CocoaPods/Core/issues/67)
[#85](https://github.com/CocoaPods/Core/pull/85)

## 0.31.1

##### Enhancements
Expand Down Expand Up @@ -36,4 +45,3 @@
Introduction of the Changelog.

[irrationalfab]: https://github.com/irrationalfab

14 changes: 14 additions & 0 deletions lib/cocoapods-core/specification/linter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,20 @@ def perform_github_source_checks(s)
end
end

# Performs validations related to the `social_media_url` attribute.
#
def _validate_social_media_url(s)
if s =~ %r{https://twitter.com/EXAMPLE}
warning "The social media URL has not been updated from default"
end
end

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

# @!group All specs validation helpers

private

# Performs validations related to the `compiler_flags` attribute.
#
def _validate_compiler_flags(flags)
Expand Down
9 changes: 8 additions & 1 deletion spec/specification/linter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def message_should_include(*values)
@spec.stubs(:source).returns({ :git => 'http://repo.git', :tag => '1.0' })
message_should_include('git', 'version', 'tag')
end

it "checks that the version is included in the git tag when the version is a Version" do
@spec.stubs(:version).returns(Version.new '1.0.1')
@spec.stubs(:source).returns({ :git => 'http://repo.git', :tag => (Version.new '1.0') })
Expand Down Expand Up @@ -323,6 +323,13 @@ def message_should_include(*values)

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

it "checks if the social_media_url has been changed from default" do
@spec.stubs(:social_media_url).returns('https://twitter.com/EXAMPLE')
message_should_include('social media URL', 'default')
end

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

it "checks that frameworks do not end with a .framework extension" do
@spec.frameworks = %w(AddressBook.framework QuartzCore.framework)
message_should_include('framework', 'name')
Expand Down

0 comments on commit 780dcfc

Please sign in to comment.