Sha256: 3a9064832631317a99471587edd58731f89013ea708190152bd2ba1baae22178

Contents?: true

Size: 816 Bytes

Versions: 2

Compression:

Stored size: 816 Bytes

Contents

require 'sinatra/base'
require 'haml'
require 'rack/jquery'

class App < Sinatra::Base

  enable :inline_templates
  use Rack::JQuery

  get "/" do
    "RUNNING"
  end

  get "/google-cdn" do
    haml :index, :layout => :google
  end

  get "/media-temple-cdn" do
    haml :index, :layout => :mediatemple
  end

  get "/microsoft-cdn" do
    haml :index, :layout => :microsoft
  end

  get "/unspecified-cdn" do
    haml :index, :layout => :unspecified
  end
end

__END__

@@google
%html
  %head
    = Rack::JQuery.cdn( :google )
  = yield

@@microsoft
%html
  %head
    = Rack::JQuery.cdn( :microsoft )
  = yield

@@mediatemple
%html
  %head
    = Rack::JQuery.cdn( :media_temple )
  = yield

@@unspecified
%html
  %head
    = Rack::JQuery.cdn()
  = yield

@@index
%p
  "NOTHING TO SEE HERE, MOVE ALONG, MOVE ALONG"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rack-jquery-1.0.0 examples/config.rb
rack-jquery-0.0.1 examples/config.rb