lib/grape/app.rb in grape-app-0.8.7 vs lib/grape/app.rb in grape-app-0.8.8

- old
+ new

@@ -76,14 +76,17 @@ if config.force_ssl.is_a?(Hash) use Rack::SslEnforcer, **config.force_ssl elsif config.force_ssl use Rack::SslEnforcer end + config.middleware.each do |block| instance_eval(&block) end + use Grape::App::Middleware::ConnectionManagement if defined?(ActiveRecord) + run Grape::App end end private @@ -105,5 +108,6 @@ end require 'grape/app/configuration' require 'grape/app/helpers' require 'grape/app/inflector' +require 'grape/app/middleware'