Sha256: 1618a0061b2ed6227f142bcca9cde31e80432faef702f4aa89d97ab9dcac5a09
Contents?: true
Size: 647 Bytes
Versions: 15
Compression:
Stored size: 647 Bytes
Contents
require 'rack/conneg' require 'rack/tracker' module <%= @gen.camelname %> class App < Sinatra::Base set :public_folder, 'public' set :views, 'views' if CONFIG['google-analytics-tag'] use Rack::Tracker do handler :google_analytics, { tracker: CONFIG['google-analytics-tag'] } end end use Rack::Conneg do |conneg| conneg.set :accept_all_extensions, true conneg.set :fallback, :html conneg.ignore_contents_of 'public' conneg.provide [ :html, :json ] end before do if negotiated? content_type negotiated_type end end end end
Version data entries
15 entries across 15 versions & 1 rubygems