forked from ossboard-org/ossboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ru
29 lines (21 loc) · 881 Bytes
/
config.ru
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require './config/environment'
require 'omniauth'
require 'newrelic_rpm'
require 'newrelic-hanami'
# TODO: call `letsencrypt_heroku` when we switch to Hobby heroku plan
use LetsencryptRack::Middleware
NewRelic::Agent.manual_start
use SecureHeaders::Middleware
use Rack::Session::Cookie, secret: ENV['SESSIONS_SECRET']
use OmniAuth::Builder do
provider :github, ENV['GITHUB_KEY'], ENV['GITHUB_SECRET'], scope: "write:repo_hook", provider_ignores_state: true
end
if Hanami.env?(:development)
require 'rack-mini-profiler'
Rack::MiniProfiler.config.disable_caching = false
Rack::MiniProfiler.config.storage = Rack::MiniProfiler::FileStore
Rack::MiniProfiler.config.storage_options = { path: './tmp' }
Rack::MiniProfiler.profile_method(Hanami::View::Rendering::Partial, :render) { "Render partial #{@options[:partial]}" }
use Rack::MiniProfiler
end
run Hanami.app