Commit 3e7fc5f1 authored by Eloy Duran's avatar Eloy Duran

MRI 1.9.3 does not convert Pathname to String in Open3.popen.

parent 34b12c12
...@@ -74,7 +74,7 @@ module Pod ...@@ -74,7 +74,7 @@ module Pod
def generate(install = false) def generate(install = false)
options = generate_appledoc_options options = generate_appledoc_options
options += ['--output', @target_path] options += ['--output', @target_path.to_s]
options += ['--keep-intermediate-files'] options += ['--keep-intermediate-files']
options += install ? ['-create-docset'] : ['--no-create-docset'] options += install ? ['-create-docset'] : ['--no-create-docset']
@target_path.mkpath @target_path.mkpath
...@@ -83,7 +83,7 @@ module Pod ...@@ -83,7 +83,7 @@ module Pod
end end
end end
def appledoc (options) def appledoc(options)
unless self.class.appledoc_installed? unless self.class.appledoc_installed?
puts "\n[!] Skipping documentation generation because appledoc can't be found." unless config.silent? puts "\n[!] Skipping documentation generation because appledoc can't be found." unless config.silent?
return return
...@@ -91,7 +91,9 @@ module Pod ...@@ -91,7 +91,9 @@ module Pod
arguments = [] arguments = []
arguments += options arguments += options
arguments += ['--print-settings'] if config.verbose? arguments += ['--print-settings'] if config.verbose?
arguments += files arguments += files.map(&:to_s)
#p arguments
puts "appledoc #{arguments.join("' '")}"
Open3.popen3('appledoc', *arguments) do |i, o, e| Open3.popen3('appledoc', *arguments) do |i, o, e|
if config.verbose? if config.verbose?
puts o.read.chomp puts o.read.chomp
......
...@@ -7,11 +7,6 @@ describe Pod::DocsGenerator do ...@@ -7,11 +7,6 @@ describe Pod::DocsGenerator do
@pod = Pod::LocalPod.new(fixture_spec('banana-lib/BananaLib.podspec'), @sandbox) @pod = Pod::LocalPod.new(fixture_spec('banana-lib/BananaLib.podspec'), @sandbox)
copy_fixture_to_pod('banana-lib', @pod) copy_fixture_to_pod('banana-lib', @pod)
@doc_installer = Pod::DocsGenerator.new(@pod) @doc_installer = Pod::DocsGenerator.new(@pod)
@doc_installer.generate
end
after do
@sandbox.implode
end end
it 'returns reads correctly the Pod documentation' do it 'returns reads correctly the Pod documentation' do
...@@ -50,6 +45,14 @@ describe Pod::DocsGenerator do ...@@ -50,6 +45,14 @@ describe Pod::DocsGenerator do
end end
if Pod::DocsGenerator.appledoc_installed? if Pod::DocsGenerator.appledoc_installed?
before do
@doc_installer.generate
end
after do
@sandbox.implode
end
it 'creates the html' do it 'creates the html' do
File.directory?(@sandbox.root + "Documentation/BananaLib/html").should.be.true File.directory?(@sandbox.root + "Documentation/BananaLib/html").should.be.true
index = (@sandbox.root + 'Documentation/BananaLib/html/index.html').read index = (@sandbox.root + 'Documentation/BananaLib/html/index.html').read
......
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