Permalink
Browse files

[Specification::DSL] Add a docset url attribute

  • Loading branch information...
1 parent 9e82b78 commit 81e31a786ecf191529985ba8e147aa5d3e45a4d5 @kylef kylef committed Jan 19, 2014
@@ -156,6 +156,19 @@ module DSL
#
root_attribute :social_media_url
+ # @!method docset_url=(docset_url)
+ #
+ # The URL for the docset for the Pod
+ #
+ # @example
+ #
+ # spec.docset_url = 'http://example.org/KFData/1.0.0/xcode-docset.atom'
+ #
+ # @param [String] docset_url
+ # the docset URL.
+ #
+ root_attribute :docset_url
+
#------------------#
# The keys accepted by the license attribute.
@@ -73,6 +73,12 @@ def social_media_url
attributes_hash["social_media_url"]
end
+ # @return [String] The docset URL.
+ #
+ def docset_url
+ attributes_hash["docset_url"]
+ end
+
# @return [Hash] A hash containing the license information of the Pod.
#
# @note The indentation is stripped from the license text.
@@ -37,6 +37,11 @@ module Pod
@spec.attributes_hash["social_media_url"].should == "https://twitter.com/cocoapods"
end
+ it "allows to specify the docset url" do
+ @spec.docset_url = "http://example.org/KFData/1.0.0/xcode-docset.atom"
+ @spec.attributes_hash["docset_url"].should == "http://example.org/KFData/1.0.0/xcode-docset.atom"
+ 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' }
@@ -65,6 +65,11 @@ module Pod
@spec.social_media_url.should == 'www.example.com'
end
+ it "returns the docset url" do
+ @spec.docset_url = 'http://example.org/KFData/1.0.0/xcode-docset.atom'
+ @spec.docset_url.should == 'http://example.org/KFData/1.0.0/xcode-docset.atom'
+ end
+
it "supports the license attribute specified as a string" do
@spec.license = 'MIT'
@spec.license.should == { :type => 'MIT' }

0 comments on commit 81e31a7

Please sign in to comment.