-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathapplication.rb
44 lines (34 loc) · 1.18 KB
/
application.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
require_relative "boot"
require "rails/all"
Bundler.require(*Rails.groups)
module RubyDocs
class Application < Rails::Application
config.load_defaults 7.1
config.autoload_lib ignore: %w(assets tasks)
config.time_zone = "Berlin"
config.revision = begin
ENV.fetch("HATCHBOX_REVISION")
rescue KeyError
`git rev-parse HEAD 2> /dev/null`.chomp
end.presence or raise "Could not load revision."
config.action_mailer.delivery_method = :postmark
config.active_record.query_log_tags_enabled = true
config.active_record.sqlite3_production_warning = false
config.assets.excluded_paths.concat [
Rails.root.join("app", "assets", "stylesheets")
]
config.i18n.raise_on_missing_translations = true
config.middleware.insert 0, Rack::Deflater
Rails.application.routes.default_url_options =
config.action_mailer.default_url_options = {
host: Rails.application.env_credentials.host!,
protocol: "https"
}
if Rails.version >= "7.2"
raise "this is not needed anymore, yjit should be enabled by default in rails 7.2."
end
config.after_initialize do
RubyVM::YJIT.enable
end
end
end