Permalink
Browse files

remove RubyPython dependency, #8

  • Loading branch information...
1 parent 7bc91a8 commit 862d6955a5c19c86c296e8dfae4e943a28a75776 @zzak committed Dec 4, 2012
Showing with 2 additions and 22 deletions.
  1. +0 −10 README.md
  2. +1 −1 glorify.gemspec
  3. +1 −11 lib/glorify/renderer.rb
View
@@ -99,16 +99,6 @@ this is just a simple `erb` template, but you get the idea.
the default pygments stylesheet that comes with glorify is available at the
`/pygments.css` route
-### on heroku
-
-to make this work on heroku you'll have to use python2.6
-
-```bash
-heroku config:add GLORIFY_PYTHON=python2.6
-```
-thanks to @simon for
-[pointing this out](https://github.com/zzak/glorify/pull/5#r812124)
-
## license
View
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency "sinatra"
s.add_runtime_dependency "redcarpet", "~> 2.0"
- s.add_runtime_dependency "pygments.rb", "~> 0.2.0"
+ s.add_runtime_dependency "pygments.rb"
s.add_runtime_dependency "nokogiri"
s.add_development_dependency "minitest"
View
@@ -5,18 +5,8 @@ module Sinatra
module Glorify
class Renderer < Redcarpet::Render::HTML
- def initialize(options={})
- python = ENV['GLORIFY_PYTHON'] || 'python'
- RubyPython.configure :python_exe => python
- super
- end
-
def block_code(code, lang)
- begin
- Pygments.highlight(code, :lexer => lang, :options => {:encoding => "utf-8"})
- rescue RubyPython::PythonError
- Pygments.highlight(code, :options => {:encoding => "utf-8"})
- end
+ Pygments.highlight(code, :lexer => lang, :options => {:encoding => "utf-8"})
end
end

0 comments on commit 862d695

Please sign in to comment.