Sha256: 6a93fa964d50351a30e63fb9cba8dae456558b90ae9de2fcb8431685e6d6e279
Contents?: true
Size: 1.26 KB
Versions: 4
Compression:
Stored size: 1.26 KB
Contents
# frozen_string_literal: true require 'sinatra/contrib/setup' module Sinatra module Contrib ## # Common middleware that doesn't bring run time overhead if not used # or breaks if external dependencies are missing. Will extend # Sinatra::Application by default. module Common register :ConfigFile, 'sinatra/config_file' register :MultiRoute, 'sinatra/multi_route' register :Namespace, 'sinatra/namespace' register :RespondWith, 'sinatra/respond_with' helpers :Capture, 'sinatra/capture' helpers :ContentFor, 'sinatra/content_for' helpers :Cookies, 'sinatra/cookies' helpers :EngineTracking, 'sinatra/engine_tracking' helpers :JSON, 'sinatra/json' helpers :LinkHeader, 'sinatra/link_header' helpers :Streaming, 'sinatra/streaming' helpers :RequiredParams, 'sinatra/required_params' end ## # Other extensions you don't want to be loaded unless needed. module Custom register :Reloader, 'sinatra/reloader' helpers :HamlHelpers, 'sinatra/haml_helpers' end ## # Stuff that aren't Sinatra extensions, technically. autoload :Extension, 'sinatra/extension' autoload :TestHelpers, 'sinatra/test_helpers' end register Sinatra::Contrib::Common end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
sinatra-contrib-4.1.1 | lib/sinatra/contrib.rb |
sinatra-contrib-4.1.0 | lib/sinatra/contrib.rb |
sinatra-contrib-4.0.0 | lib/sinatra/contrib.rb |
sinatra-contrib-3.2.0 | lib/sinatra/contrib.rb |