template/lib/routes.rb in pliny-0.1.0 vs template/lib/routes.rb in pliny-0.2.0
- old
+ new
@@ -1,17 +1,16 @@
Routes = Rack::Builder.new do
- use Pliny::Middleware::RescueErrors, raise: !Config.rescue_errors?
- use Honeybadger::Rack::ErrorNotifier if Config.honeybadger_api_key
+ use Pliny::Middleware::RescueErrors, raise: Config.raise_errors?
use Pliny::Middleware::CORS
use Pliny::Middleware::RequestID
use Pliny::Middleware::RequestStore, store: Pliny::RequestStore
use Pliny::Middleware::Timeout, timeout: Config.timeout.to_i if Config.timeout.to_i > 0
use Pliny::Middleware::Versioning,
default: Config.versioning_default,
- app_name: Config.versioning_app_name if Config.versioning.downcase == 'true'
+ app_name: Config.versioning_app_name if Config.versioning?
use Rack::Deflater
use Rack::MethodOverride
- use Rack::SSL if Config.force_ssl.downcase == 'true'
+ use Rack::SSL if Config.force_ssl?
use Pliny::Router do
# mount all endpoints here
end