Sha256: 88280289250836008e4a2c9053dfe70ef8d435340154cb579a2225e1ad3596e6
Contents?: true
Size: 1.11 KB
Versions: 24
Compression:
Stored size: 1.11 KB
Contents
# frozen_string_literal: true module Rimless # Rails-specific initializations. class Railtie < Rails::Railtie # Run before all Rails initializers, but after the application is defined config.before_initialize do conf = Rimless.configuration app_name = Rimless.local_app_name # Reset the default application name (which is +nil+), because the Rails # application was not defined when the rimless gem was loaded conf.app_name = app_name # Set the app name as default client id, when not already set conf.client_id ||= app_name end # Run after all configuration is set via Rails initializers config.after_initialize do # Reconfigure our dependencies Rimless.configure_dependencies # Load the Karafka application inside the Sidekiq server application if defined? Sidekiq Sidekiq.configure_server do Rimless.consumer.initialize! end end end # Load all our Rake tasks if we're supposed to do rake_tasks do Dir[File.join(__dir__, 'tasks', '*.rake')].each { |file| load file } end end end
Version data entries
24 entries across 24 versions & 1 rubygems