Sha256: dcd713ac4b2a4b6ef1395c9c3e0ce18b033195150892ebac0795922a0b298417
Contents?: true
Size: 515 Bytes
Versions: 1
Compression:
Stored size: 515 Bytes
Contents
module GovukAppConfig class Railtie < Rails::Railtie def self.enable_railtie_for?(name) Rails.env.production? && !ENV.has_key?("GOVUK_APP_CONFIG_DISABLE_#{name.upcase}") end initializer('govuk_app_config') do |app| GovukXRay.initialize(app) if self.enable_railtie_for?('xray') end config.before_initialize do GovukLogging.configure if Rails.env.production? end config.after_initialize do GovukXRay.start if self.enable_railtie_for?('xray') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
govuk_app_config-1.11.1 | lib/govuk_app_config/railtie.rb |