-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathsetup.rb
More file actions
43 lines (37 loc) · 1.03 KB
/
setup.rb
File metadata and controls
43 lines (37 loc) · 1.03 KB
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
# frozen_string_literal: true
module Html2rss
module Web
module Boot
##
# Applies boot-time runtime configuration outside the Roda class body.
module Setup
class << self
# Validates environment configuration and wires the request service.
#
# @return [void]
def call!
validate_environment!
configure_request_service!
configure_runtime_logging!
end
private
# @return [void]
def validate_environment!
EnvironmentValidator.validate_environment!
EnvironmentValidator.validate_production_security!
Flags.validate!
end
# @return [void]
def configure_request_service!
nil
end
# @return [void]
def configure_runtime_logging!
return unless defined?(Rack::Timeout::Logger)
Rack::Timeout::Logger.logger = AppLogger.logger
end
end
end
end
end
end