Permalink
Browse files

no more shelling out

  • Loading branch information...
1 parent 9cfedd5 commit 55f33a75fbea598fdcd6d65e4657724200bf502c @defunkt defunkt committed Mar 20, 2011
Showing with 0 additions and 13 deletions.
  1. +0 −13 app/helpers/sinatra.rb
View
@@ -14,19 +14,6 @@ def colorize(hash = {})
tokens = CodeRay.scan(hash.values.first, hash.keys.first)
tokens.html.div.sub('CodeRay', 'highlight')
end
-
- # shell "cat", :stdin => "file.rb"
- def shell(cmd, options = {})
- ret = ''
- Open3.popen3(cmd) do |stdin, stdout, stderr|
- if options[:stdin]
- stdin.puts options[:stdin].to_s
- stdin.close
- end
- ret = stdout.read.strip
- end
- ret
- end
end
end
end

0 comments on commit 55f33a7

Please sign in to comment.