Commit 8aba4ca8 authored by Fabio Pelosin's avatar Fabio Pelosin

[#197] Using escape gem

parent da8b99e3
......@@ -2,6 +2,7 @@ source "http://rubygems.org"
gem "open4"
gem "colored"
gem "escape"
group :development do
gem "xcodeproj", :git => "git://github.com/CocoaPods/Xcodeproj.git"
......
......@@ -11,6 +11,7 @@ GEM
bacon (1.1.0)
colored (1.2)
crack (0.3.1)
escape (0.0.4)
kicker (2.5.0)
rb-fsevent
metaclass (0.0.1)
......@@ -32,6 +33,7 @@ PLATFORMS
DEPENDENCIES
bacon
colored
escape
kicker
mocha-on-bacon
open4
......
......@@ -31,6 +31,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'xcodeproj', '~> 0.1.0'
s.add_runtime_dependency 'popen4', '~> 0.1.2'
s.add_runtime_dependency 'colored', '~> 1.2'
s.add_runtime_dependency 'escape', '~> 0.0.4'
s.add_development_dependency 'bacon', '~> 1.1'
## Make sure you can build the gem on older versions of RubyGems too:
......
require 'escape'
module Pod
module Generator
......@@ -76,11 +77,16 @@ module Pod
options += ['--output', @target_path.to_s]
options += install ? ['--create-docset'] : ['--no-create-docset']
options += files
options.map!{|s| s !~ /-.*|".*"/ ? %Q["#{s}"] : s }
@target_path.mkpath
@pod.chdir do
appledoc options.join(' ')
appledoc Escape.shell_command(options)
end
# appledoc exits with 1 if a warning was logged
if $?.exitstatus >= 2
raise "Appledoc encountered an error (exitstatus: #{$?.exitstatus})."
end
rescue Exception => e
if e.is_a?(Informative)
puts "[!] Skipping documentation generation because appledoc can't be found." if config.verbose?
......
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