Sha256: 77525aba0db72b4f6142187a53db1338077a2c7b4d0ac132ae6a1af6efd328d6

Contents?: true

Size: 753 Bytes

Versions: 13

Compression:

Stored size: 753 Bytes

Contents

PADRINO_ROOT = File.dirname(__FILE__) unless defined? PADRINO_ROOT
# Remove this comment if you want do some like this: ruby PADRINO_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: 39!' # Change only the number!!!
  end

  get "/rand" do
    rand(99).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

13 entries across 13 versions & 1 rubygems

Version Path
padrino-core-0.9.24 test/fixtures/apps/simple.rb
padrino-core-0.9.23 test/fixtures/apps/simple.rb
padrino-core-0.9.22 test/fixtures/apps/simple.rb
padrino-core-0.9.21 test/fixtures/apps/simple.rb
padrino-core-0.9.20 test/fixtures/apps/simple.rb
padrino-core-0.9.19 test/fixtures/apps/simple.rb
padrino-core-0.9.18 test/fixtures/apps/simple.rb
padrino-core-0.9.17 test/fixtures/apps/simple.rb
padrino-core-0.9.16 test/fixtures/apps/simple.rb
padrino-core-0.9.15 test/fixtures/apps/simple.rb
padrino-core-0.9.14 test/fixtures/apps/simple.rb
padrino-core-0.9.13 test/fixtures/apps/simple.rb
padrino-core-0.9.12 test/fixtures/apps/simple.rb