]> cat aescling's git repositories - mastodon.git/blob - config/application.rb
Fix hashtag column options styling (#14247)
[mastodon.git] / config / application.rb
1 require_relative 'boot'
2
3 require 'rails/all'
4
5 # Require the gems listed in Gemfile, including any gems
6 # you've limited to :test, :development, or :production.
7 Bundler.require(*Rails.groups)
8
9 require_relative '../app/lib/exceptions'
10 require_relative '../lib/redis/namespace_extensions'
11 require_relative '../lib/paperclip/url_generator_extensions'
12 require_relative '../lib/paperclip/attachment_extensions'
13 require_relative '../lib/paperclip/media_type_spoof_detector_extensions'
14 require_relative '../lib/paperclip/transcoder_extensions'
15 require_relative '../lib/paperclip/lazy_thumbnail'
16 require_relative '../lib/paperclip/gif_transcoder'
17 require_relative '../lib/paperclip/video_transcoder'
18 require_relative '../lib/paperclip/type_corrector'
19 require_relative '../lib/paperclip/response_with_limit_adapter'
20 require_relative '../lib/mastodon/snowflake'
21 require_relative '../lib/mastodon/version'
22 require_relative '../lib/devise/two_factor_ldap_authenticatable'
23 require_relative '../lib/devise/two_factor_pam_authenticatable'
24 require_relative '../lib/chewy/strategy/custom_sidekiq'
25
26 Dotenv::Railtie.load
27
28 Bundler.require(:pam_authentication) if ENV['PAM_ENABLED'] == 'true'
29
30 require_relative '../lib/mastodon/redis_config'
31
32 module Mastodon
33 class Application < Rails::Application
34 # Initialize configuration defaults for originally generated Rails version.
35 config.load_defaults 5.2
36
37 # Settings in config/environments/* take precedence over those specified here.
38 # Application configuration should go into files in config/initializers
39 # -- all .rb files in that directory are automatically loaded.
40
41 # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
42 # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
43 # config.time_zone = 'Central Time (US & Canada)'
44
45 # All translations from config/locales/*.rb,yml are auto loaded.
46 # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
47 config.i18n.available_locales = [
48 :ar,
49 :ast,
50 :bg,
51 :bn,
52 :br,
53 :ca,
54 :co,
55 :cs,
56 :cy,
57 :da,
58 :de,
59 :el,
60 :en,
61 :eo,
62 :es,
63 :'es-AR',
64 :et,
65 :eu,
66 :fa,
67 :fi,
68 :fr,
69 :ga,
70 :gl,
71 :he,
72 :hi,
73 :hr,
74 :hu,
75 :hy,
76 :id,
77 :io,
78 :is,
79 :it,
80 :ja,
81 :ka,
82 :kab,
83 :kk,
84 :kn,
85 :ko,
86 :lt,
87 :lv,
88 :mk,
89 :ml,
90 :mr,
91 :ms,
92 :nl,
93 :nn,
94 :no,
95 :oc,
96 :pl,
97 :'pt-BR',
98 :'pt-PT',
99 :ro,
100 :ru,
101 :sk,
102 :sl,
103 :sq,
104 :sr,
105 :'sr-Latn',
106 :sv,
107 :ta,
108 :te,
109 :th,
110 :tr,
111 :uk,
112 :ur,
113 :vi,
114 :'zh-CN',
115 :'zh-HK',
116 :'zh-TW',
117 ]
118
119 config.i18n.default_locale = ENV['DEFAULT_LOCALE']&.to_sym
120
121 unless config.i18n.available_locales.include?(config.i18n.default_locale)
122 config.i18n.default_locale = :en
123 end
124
125 # config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb')
126 # config.autoload_paths += Dir[Rails.root.join('app', 'api', '*')]
127
128 config.active_job.queue_adapter = :sidekiq
129
130 config.middleware.use Rack::Attack
131 config.middleware.use Rack::Deflater
132
133 config.to_prepare do
134 Doorkeeper::AuthorizationsController.layout 'modal'
135 Doorkeeper::AuthorizedApplicationsController.layout 'admin'
136 Doorkeeper::Application.send :include, ApplicationExtension
137 Devise::FailureApp.send :include, AbstractController::Callbacks
138 Devise::FailureApp.send :include, HttpAcceptLanguage::EasyAccess
139 Devise::FailureApp.send :include, Localized
140 end
141 end
142 end
This page took 0.102378 seconds and 4 git commands to generate.