Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 489b71f13c
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (19 sloc) 0.43 kB
require 'rubygems'
require 'sinatra'
require 'open-uri'
require 'lib/mutable_image'
require 'haml'
require 'sass/plugin/rack'
use Sass::Plugin::Rack
get '/' do
haml :index
end
get '/image.png' do
send_file 'tmp/image.png', :disposition => 'inline'
end
post '/' do
@image = MutableImage.new(params[:image_url])
@image.send(params[:task]) if params[:task]
@generated = @image.save_to('tmp/image.png')
haml :index
end
Jump to Line
Something went wrong with that request. Please try again.