Sha256: 9d8999ea0a1ed207bbb2743c90073fbde287f36360e2821a43cff2a2c2e49c67

Contents?: true

Size: 1.06 KB

Versions: 46

Compression:

Stored size: 1.06 KB

Contents

# This test Padrino stack file was taken from the padrino-core gem.
#
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 :public_folder, File.dirname(__FILE__)
  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

  get "/render" do
    render :erb, "This is an erb render"
  end

  get "/break" do
    raise "This is a controller exception!"
  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

46 entries across 46 versions & 2 rubygems

Version Path
traceview-3.0.1-java test/frameworks/apps/padrino_simple.rb
traceview-3.0.1 test/frameworks/apps/padrino_simple.rb
traceview-3.0.0-java test/frameworks/apps/padrino_simple.rb
traceview-3.0.0 test/frameworks/apps/padrino_simple.rb
oboe-2.7.19-java test/frameworks/apps/padrino_simple.rb
oboe-2.7.19 test/frameworks/apps/padrino_simple.rb
oboe-2.7.18-java test/frameworks/apps/padrino_simple.rb
oboe-2.7.18 test/frameworks/apps/padrino_simple.rb
oboe-2.7.17.1-java test/frameworks/apps/padrino_simple.rb
oboe-2.7.17.1 test/frameworks/apps/padrino_simple.rb
oboe-2.7.16.1 test/frameworks/apps/padrino_simple.rb
oboe-2.7.16.1-java test/frameworks/apps/padrino_simple.rb
oboe-2.7.15.1-java test/frameworks/apps/padrino_simple.rb
oboe-2.7.15.1 test/frameworks/apps/padrino_simple.rb
oboe-2.7.14.1-java test/frameworks/apps/padrino_simple.rb
oboe-2.7.14.1 test/frameworks/apps/padrino_simple.rb
oboe-2.7.13.3-java test/frameworks/apps/padrino_simple.rb
oboe-2.7.13.3 test/frameworks/apps/padrino_simple.rb
oboe-2.7.12.1-java test/frameworks/apps/padrino_simple.rb
oboe-2.7.12.1 test/frameworks/apps/padrino_simple.rb