Skip to content

Commit

Permalink
[Specifiction::DSL] Add social_media_url attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiopelosin committed Nov 9, 2013
1 parent a777f7f commit 7c25768
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/cocoapods-core/specification/dsl.rb
Expand Up @@ -132,6 +132,24 @@ module DSL

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

# @!method social_media_url=(social_media_url)
#
# The URL for the social media contact of the library. CocoaPods web
# services can use it, for example the Twitter notifications will
# include the twitter handle (shortening the description) if the URL is
# relative to Twitter.
#
# @example
#
# spec.social_media_url = 'https://twitter.com/cocoapods'
#
# @param [String] social_media_url
# the social media URL.
#
root_attribute :social_media_url

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

# The keys accepted by the license attribute.
#
LICENSE_KEYS = [:type, :file, :text].freeze
Expand Down
5 changes: 5 additions & 0 deletions spec/specification/dsl_spec.rb
Expand Up @@ -32,6 +32,11 @@ module Pod
@spec.attributes_hash["authors"].should == { 'orta' => 'orta.therox@gmail.com' }
end

it "allows to specify the social media contact" do
@spec.social_media_url = "https://twitter.com/cocoapods"
@spec.attributes_hash["social_media_url"].should == "https://twitter.com/cocoapods"
end

it "allows to specify the license" do
@spec.license = { :type => 'MIT', :file => 'MIT-LICENSE' }
@spec.attributes_hash["license"].should == { "type" => 'MIT', "file" => 'MIT-LICENSE' }
Expand Down

0 comments on commit 7c25768

Please sign in to comment.