Sha256: bb9eced04563b10c60da8865883d588c06f44c7c60fa0bc6752d6e4f0173e148

Contents?: true

Size: 810 Bytes

Versions: 29

Compression:

Stored size: 810 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 '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

29 entries across 29 versions & 1 rubygems

Version Path
padrino-core-0.16.0.pre3 test/fixtures/apps/simple.rb
padrino-core-0.16.0.pre2 test/fixtures/apps/simple.rb
padrino-core-0.15.3 test/fixtures/apps/simple.rb
padrino-core-0.15.2 test/fixtures/apps/simple.rb
padrino-core-0.15.1 test/fixtures/apps/simple.rb
padrino-core-0.15.0 test/fixtures/apps/simple.rb
padrino-core-0.14.4 test/fixtures/apps/simple.rb
padrino-core-0.14.3 test/fixtures/apps/simple.rb
padrino-core-0.12.9 test/fixtures/apps/simple.rb
padrino-core-0.14.2 test/fixtures/apps/simple.rb
padrino-core-0.13.3.4 test/fixtures/apps/simple.rb
padrino-core-0.14.1.1 test/fixtures/apps/simple.rb
padrino-core-0.14.1 test/fixtures/apps/simple.rb
padrino-core-0.14.0.2 test/fixtures/apps/simple.rb
padrino-core-0.14.0.1 test/fixtures/apps/simple.rb
padrino-core-0.14.0 test/fixtures/apps/simple.rb
padrino-core-0.14.0.rc2 test/fixtures/apps/simple.rb
padrino-core-0.14.0.rc1 test/fixtures/apps/simple.rb
padrino-core-0.13.3.3 test/fixtures/apps/simple.rb
padrino-core-0.13.3.2 test/fixtures/apps/simple.rb