FileUtils
Chris Wanstrath chris@ozmm.org
Tue, 17 Nov 2009 11:03:21 -0800
1 files changed,
3 insertions(+),
2 deletions(-)
jump to
M
lib/github/markups.rb
→
lib/github/markups.rb
@@ -20,9 +20,10 @@ #
# Any block passed to `command` will be handed the command's STDOUT for # post processing. command("/usr/bin/env pod2html", /pod/) do |rendered| + require 'fileutils' if rendered =~ /<body.+?>\s*(.+)\s*<\/body>/mi - `rm pod2htmd.tmp` if File.exists?('pod2htmd.tmp') rescue nil - `rm pod2htmi.tmp` if File.exists?('pod2htmi.tmp') rescue nil + FileUtils.rm("pod2htmd.tmp") if File.exists?('pod2htmd.tmp') rescue nil + FileUtils.rm("pod2htmi.tmp") if File.exists?('pod2htmi.tmp') rescue nil $1.sub('<!-- INDEX BEGIN -->', '').sub('<!-- INDEX END -->', '') end end