Commit c2008b4f authored by Fabio's avatar Fabio Committed by Fabio

[#149] documentation and license_text to hash and support for appledoc

parent cffe89f7
...@@ -40,13 +40,11 @@ module Pod ...@@ -40,13 +40,11 @@ module Pod
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = '#{@name}' s.name = '#{@name}'
s.version = '1.0.0' s.version = '1.0.0'
s.license = 'MIT'
s.summary = 'A short description of #{@name}.' s.summary = 'A short description of #{@name}.'
s.homepage = 'http://EXAMPLE/#{@name}' s.homepage = 'http://EXAMPLE/#{@name}'
s.author = { '#{author}' => '#{email}' } s.author = { '#{author}' => '#{email}' }
# Specify the atom link pointing to the documentation set of the Pod.
# s.documentation = 'http://example.com/com.company.#{@name}.atom'
# Specify the location from where the source should be retreived. # Specify the location from where the source should be retreived.
# #
s.source = { :git => 'http://EXAMPLE/#{@name}.git', :tag => '1.0.0' } s.source = { :git => 'http://EXAMPLE/#{@name}.git', :tag => '1.0.0' }
...@@ -55,13 +53,30 @@ module Pod ...@@ -55,13 +53,30 @@ module Pod
s.description = 'An optional longer description of #{@name}.' s.description = 'An optional longer description of #{@name}.'
# Specify the license type and the path of the file containing the license text. # If available specify the online link for the documentation and
# If a single license file is not available specify a file containing the # the atom link of the Xcode 4 compatible documentation set.
# license text and the range of the relevant lines in a [int]..[int] format. # If the pod supports appledoc documentation generation enable it
# and specify the appledoc options. Appledoc will be run on the files
# specified in s.source_file.
#
# s.documentation[:html] = 'http://EXAMPLE/#{@name}/documentation'
# s.documentation[:atom] = 'http://EXAMPLE/#{@name}/com.company.#{@name}.atom'
# s.documentation[:appledoc] = true
# s.documentation[:options] << '--project-name' << '#{@name}' <<
# '--project-company' << '"Company Name"' <<
# '--company-id' << 'com.company' <<
# '--output' << './doc' <<
# '--ignore' << 'Common' <<
# '--ignore' << '.m'
# Specify the file containing the license of the pod.
# If a dedicated license file is not available specify a file containing
# the license and the ruby range of the relevant lines. If the license
# is not available in any file it is specify the text directly.
# #
s.license = 'MIT' s.license_text[:file] = 'LICENSE'
s.license_text = 'LICENSE' # s.license_text[:range] = 1..15
# s.license_text_lines = '1..15' # s.license_text[:text] = 'Permission is hereby granted ...'
# If this Pod runs only on iOS or OS X, then specify that with one of # If this Pod runs only on iOS or OS X, then specify that with one of
# these, or none if it runs on both platforms. # these, or none if it runs on both platforms.
......
...@@ -29,7 +29,8 @@ module Pod ...@@ -29,7 +29,8 @@ module Pod
# TODO This is just to work around a MacRuby bug # TODO This is just to work around a MacRuby bug
def post_initialize def post_initialize
@dependencies, @source_files, @resources, @clean_paths, @subspecs = [], [], [], [], [] @documentation, @license_text = {}, {}
@dependencies, @source_files, @resources, @clean_paths, @subspecs, @documentation[:options] = [], [], [], [], [], []
@platform = Platform.new(nil) @platform = Platform.new(nil)
@xcconfig = Xcodeproj::Config.new @xcconfig = Xcodeproj::Config.new
end end
...@@ -42,7 +43,6 @@ module Pod ...@@ -42,7 +43,6 @@ module Pod
attr_accessor :source attr_accessor :source
attr_accessor :license attr_accessor :license
attr_accessor :license_text attr_accessor :license_text
attr_accessor :license_text_lines
attr_accessor :documentation attr_accessor :documentation
attr_reader :version attr_reader :version
...@@ -381,7 +381,7 @@ module Pod ...@@ -381,7 +381,7 @@ module Pod
end end
# Override the getters to always return the value of the top level parent spec. # Override the getters to always return the value of the top level parent spec.
[:version, :summary, :platform, :license, :license_text, :license_text_lines, :authors, :requires_arc, :compiler_flags, :documentation].each do |attr| [:version, :summary, :platform, :license, :license_text, :authors, :requires_arc, :compiler_flags, :documentation].each do |attr|
define_method(attr) { top_level_parent.send(attr) } define_method(attr) { top_level_parent.send(attr) }
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment