Restructure a bit
This commit is contained in:
@@ -8,12 +8,24 @@ module Fizzy
|
||||
# moved from config/initializers/queenbee.rb
|
||||
Queenbee.host_app = Fizzy
|
||||
|
||||
initializer "fizzy_saas.settings", before: :load_config_initializers do |app|
|
||||
if Rails.env.local?
|
||||
if Rails.root.join("tmp/structured-logging.txt").exist?
|
||||
app.config.structured_logging.logger = ActiveSupport::Logger.new("log/structured-development.log")
|
||||
end
|
||||
else
|
||||
app.config.active_storage.service = :purestorage
|
||||
app.config.structured_logging.logger = ActiveSupport::Logger.new(STDOUT)
|
||||
end
|
||||
end
|
||||
|
||||
initializer "fizzy.saas.mount" do |app|
|
||||
app.routes.append do
|
||||
mount Fizzy::Saas::Engine => "/", as: "saas"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
initializer "fizzy_saas.transaction_pinning" do |app|
|
||||
app.config.middleware.insert_after(ActiveRecord::Middleware::DatabaseSelector, TransactionPinning::Middleware)
|
||||
end
|
||||
@@ -54,17 +66,6 @@ module Fizzy
|
||||
end
|
||||
end
|
||||
|
||||
initializer "fizzy_saas.production_config", before: :load_config_initializers do |app|
|
||||
if Rails.env.local?
|
||||
if Rails.root.join("tmp/structured-logging.txt").exist?
|
||||
app.config.structured_logging.logger = ActiveSupport::Logger.new("log/structured-development.log")
|
||||
end
|
||||
else
|
||||
app.config.active_storage.service = :purestorage
|
||||
app.config.structured_logging.logger = ActiveSupport::Logger.new(STDOUT)
|
||||
end
|
||||
end
|
||||
|
||||
# Load test mocks automatically in test environment
|
||||
initializer "fizzy_saas.test_mocks", after: :load_config_initializers do
|
||||
if Rails.env.test?
|
||||
|
||||
Reference in New Issue
Block a user