Sha256: 130c51415318ec0acaddeb694983c9c4877b6772f84c4de5738e25e1c14de69d

Contents?: true

Size: 686 Bytes

Versions: 4

Compression:

Stored size: 686 Bytes

Contents

require 'sinatra'

class SinatraSimple < Sinatra::Base
  set :reload, true

  template :layout do
    # Use both the legacy and new RUM helper
    # oboe_rum_header + traceview_rum_footer
    %q{
<html>
  <head><%= oboe_rum_header %></head>
  <body>
    <%= yield %>
    <%= traceview_rum_footer %>
  </body>
</html>}
  end

  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

use SinatraSimple

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
traceview-3.0.2-java test/frameworks/apps/sinatra_simple.rb
traceview-3.0.2 test/frameworks/apps/sinatra_simple.rb
traceview-3.0.1-java test/frameworks/apps/sinatra_simple.rb
traceview-3.0.1 test/frameworks/apps/sinatra_simple.rb