Sha256: f4d2343f940c0a73a795a5a1949907d5a4dc7908d53bf26971381e00ef788b45

Contents?: true

Size: 561 Bytes

Versions: 7

Compression:

Stored size: 561 Bytes

Contents

require 'rubygems'
require 'sinatra'
require 'rackamole'

configure do
  set :sessions, true
  set :environment, :development
  use Rack::Reloader
  use Rack::Mole, { :app_name => "My Sinatra App", :user_key => :user_name }
end

before do
  session[:user_name] = "Fernand"
end

get '/normal' do  
  @blee = "Snap!!"
  session[:fred] = "duh me"
  erb :normal
end

get '/params/:id' do  
  @blee = params[:id]
  session[:fred] = "duh me"
  erb :params
end

get '/error' do
  raise "Oh Shit!!"
end

get '/slow' do
  sleep 10
  '<h1> I am the slow one...</h1>'
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rackamole-0.0.9 samples/sinatra/moled.rb
rackamole-0.0.8 samples/sinatra/moled.rb
rackamole-0.0.7 samples/sinatra/moled.rb
rackamole-0.0.6 samples/sinatra/moled.rb
rackamole-0.0.4 samples/sinatra/moled.rb
rackamole-0.0.3 samples/sinatra/moled.rb
rackamole-0.0.2 samples/sinatra/moled.rb