Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (18 sloc) 0.449 kB
# https://github.com/lmarburger/pygments.rb-test
require 'pygments'
require 'rubygems'
require 'sinatra/base'
# Use python2.6 as 2.7 errors on some Heroku stacks.
require 'rubypython'
RubyPython.configure :python_exe => 'python'
class PygmentsTest < Sinatra::Base
set :public, 'public'
get '/' do
erb :show
end
def code
file = File.open __FILE__
Pygments.highlight file.read, :lexer => 'ruby'
end
end
run PygmentsTest
Jump to Line
Something went wrong with that request. Please try again.