Sha256: c95307fd5e0d4b55cfa7b1981a3ad8481fa756dabf1e2d0a72dce373724dfa98

Contents?: true

Size: 462 Bytes

Versions: 14

Compression:

Stored size: 462 Bytes

Contents

require 'rack/conneg'

module <%= @gen.camelname %>
  class App < Sinatra::Base
    set :public_folder, 'public'
    set :views, 'views'

    use Rack::Conneg do |conneg|
      conneg.set :accept_all_extensions, false
      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

14 entries across 14 versions & 1 rubygems

Version Path
skellington-0.5.0 lib/templates/lib/app/racks.rb.eruby
skellington-0.4.16 lib/templates/lib/app/racks.rb.eruby
skellington-0.4.15 lib/templates/lib/app/racks.rb.eruby
skellington-0.4.13 lib/templates/lib/app/racks.rb.eruby
skellington-0.4.11 lib/templates/lib/app/racks.rb.eruby
skellington-0.4.10 lib/templates/lib/app/racks.rb.eruby
skellington-0.4.9 lib/templates/lib/app/racks.rb.eruby
skellington-0.4.8 lib/templates/lib/app/racks.rb.eruby
skellington-0.4.6 lib/templates/lib/app/racks.rb.eruby
skellington-0.4.5 lib/templates/lib/app/racks.rb.eruby
skellington-0.4.4 lib/templates/lib/app/racks.rb.eruby
skellington-0.4.3 lib/templates/lib/app/racks.rb.eruby
skellington-0.4.2 lib/templates/lib/app/racks.rb.eruby
skellington-0.4.1 lib/templates/lib/app/racks.rb.eruby