forked from exercism/exercism
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.rb
57 lines (50 loc) · 1.28 KB
/
app.rb
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
require './config/build_id'
require './config/bugsnag'
require_relative './lib/exercism'
require 'sinatra/petroglyph'
require 'sinatra/reloader'
require 'will_paginate'
require 'will_paginate/active_record'
require 'kss'
require 'tilt/erb'
require_relative './app/presenters'
require_relative './app/helpers'
require_relative './app/routes'
module ExercismWeb
DEFAULT_SESSION_KEY = "Need to know only."
class App < Sinatra::Base
configure do
use Rack::Session::Cookie, secret: ENV.fetch('SESSION_SECRET', DEFAULT_SESSION_KEY)
end
if settings.development?
use Routes::Backdoor
register Sinatra::Reloader
end
use Routes::Profile
use Routes::Inbox
use Routes::Languages
use Routes::Static
use Routes::Contribute
use Routes::Legacy
use Routes::Main
use Routes::Stats
use Routes::Account
use Routes::Looks
use Routes::Notifications
use Routes::Exercises
use Routes::UserExercises
use Routes::Submissions
use Routes::Solutions
use Routes::Comments
use Routes::Tags
use Routes::Teams
use Routes::Invitations
use Routes::Requests
use Routes::Tracks
use Routes::Sessions
use Routes::Styleguide
use Routes::Subscriptions
use Routes::User
use Routes::Errors
end
end