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

[#149] Draft for documentation generation

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