forked from fastlane/ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fastlane_app.rb
37 lines (31 loc) · 910 Bytes
/
fastlane_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
# External
require "sinatra/base"
require_relative "./fastfile-parser/fastfile_parser"
# Internal
require_relative "services/services"
require_relative "workers/refresh_config_data_sources_worker"
require_relative "shared/logging_module"
require_relative "shared/fastlane_ci_error" # TODO: move somewhere else
# All things fastlane ci related go in this module
module FastlaneCI
# Used to use the same layout file across all views
# https://stackoverflow.com/questions/26080599/sinatra-method-to-set-layout
def self.default_layout
"../../../features/global/layout".to_sym
end
# Our CI app main class
class FastlaneApp < Sinatra::Base
include FastlaneCI::Logging
Thread.current[:thread_id] = "main"
get "/" do
if session[:user]
redirect("/dashboard")
else
redirect("/login")
end
end
get "/favico.ico" do
"nope"
end
end
end