Commit 726d9f59 authored by Fabio Pelosin's avatar Fabio Pelosin

[#149] Draft for documentation generation

parent 6dc80f02
...@@ -22,9 +22,10 @@ module Pod ...@@ -22,9 +22,10 @@ module Pod
autoload :Spec, 'cocoapods/specification' autoload :Spec, 'cocoapods/specification'
autoload :Specification, 'cocoapods/specification' autoload :Specification, 'cocoapods/specification'
autoload :Version, 'cocoapods/version' autoload :Version, 'cocoapods/version'
autoload :Pathname, 'pathname' autoload :Pathname, 'pathname'
autoload :FileList, 'cocoapods/file_list' autoload :FileList, 'cocoapods/file_list'
autoload :Open3, 'open3'
module Generator module Generator
autoload :BridgeSupport, 'cocoapods/generator/bridge_support' autoload :BridgeSupport, 'cocoapods/generator/bridge_support'
......
...@@ -64,7 +64,6 @@ module Pod ...@@ -64,7 +64,6 @@ module Pod
# :appledoc => ['--project-name', '#{@name}', # :appledoc => ['--project-name', '#{@name}',
# '--project-company', '"Company Name"', # '--project-company', '"Company Name"',
# '--company-id', 'com.company', # '--company-id', 'com.company',
# '--output', './doc',
# '--ignore', 'Common', # '--ignore', 'Common',
# '--ignore', '.m'] # '--ignore', '.m']
} }
......
...@@ -82,6 +82,9 @@ module Pod ...@@ -82,6 +82,9 @@ module Pod
puts "* Writing Xcode project file to `#{@sandbox.project_path}'" if config.verbose? puts "* Writing Xcode project file to `#{@sandbox.project_path}'" if config.verbose?
project.save_as(@sandbox.project_path) project.save_as(@sandbox.project_path)
puts "Installing documentation" unless config.silent?
pods.each { |pod| pod.install_documentation }
end end
def run_post_install_hooks def run_post_install_hooks
......
...@@ -74,6 +74,20 @@ module Pod ...@@ -74,6 +74,20 @@ module Pod
target.add_source_file(file, nil, specification.compiler_flags) target.add_source_file(file, nil, specification.compiler_flags)
end end
end end
def install_documentation
if specification.documentation
appledoc_options = specification.documentation[:appledoc]
if appledoc_options
appledoc_options += ['--output', "#{@sandbox.root}/doc"]
appledoc_options += source_files
Open3.popen3('appledoc', *appledoc_options ) { |stdin, stdout, stderr|
puts stdout.read.chomp
puts stderr.read.chomp
}
end
end
end
def requires_arc? def requires_arc?
specification.requires_arc specification.requires_arc
...@@ -117,3 +131,4 @@ module Pod ...@@ -117,3 +131,4 @@ module Pod
end end
end end
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