all repos — markup @ dc002b302b9ed5470f746209e89d6eb07c7c0d1b

The code we use to render README.your_favorite_markup

FileUtils
Chris Wanstrath chris@ozmm.org
Tue, 17 Nov 2009 11:03:21 -0800
commit

dc002b302b9ed5470f746209e89d6eb07c7c0d1b

parent

f4bd4763e34379099d8b57ac700cff92c650564a

1 files changed, 3 insertions(+), 2 deletions(-)

jump to
M lib/github/markups.rblib/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