Sha256: db7c72d9b6c422a0b8047602ac48a63c97f20b801b5e19c028e9f131fcebe047

Contents?: true

Size: 831 Bytes

Versions: 11

Compression:

Stored size: 831 Bytes

Contents

PADRINO_ROOT = File.dirname(__FILE__) unless defined? PADRINO_ROOT
# Remove this comment if you want do some like this: ruby RACK_ENV=test app.rb
#
# require 'rubygems'
# require 'padrino-core'
#

class SimpleDemo < Padrino::Application
  set :reload, true
  before { true }
  after  { true }
  error(404) { "404" }
end

SimpleDemo.controllers do
  get "/" do
    'The magick number is: 2767356926488785838763860464013972991031534522105386787489885890443740254365!' # Change only the number!!!
  end

  get "/rand" do
    rand(2 ** 256).to_s
  end
end

## If you want use this as a standalone app uncomment:
#
# Padrino.mount("SimpleDemo").to("/")
# Padrino.run! unless Padrino.loaded? # If you enable reloader prevent to re-run the app
#
# Then run it from your console: ruby -I"lib" test/fixtures/apps/simple.rb
#

Padrino.load!

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
padrino-core-0.12.8.1 test/fixtures/apps/simple.rb
padrino-core-0.12.8 test/fixtures/apps/simple.rb
padrino-core-0.12.7 test/fixtures/apps/simple.rb
padrino-core-0.12.6 test/fixtures/apps/simple.rb
padrino-core-0.12.5 test/fixtures/apps/simple.rb
padrino-core-0.12.4 test/fixtures/apps/simple.rb
padrino-core-0.12.3 test/fixtures/apps/simple.rb
padrino-core-0.12.2 test/fixtures/apps/simple.rb
padrino-core-0.12.1 test/fixtures/apps/simple.rb
padrino-core-0.12.0 test/fixtures/apps/simple.rb
padrino-core-0.12.0.rc3 test/fixtures/apps/simple.rb