Sha256: e0fac0c23af475170288c966d33487a22249a100df84b7d98b5717971d7b5c63

Contents?: true

Size: 920 Bytes

Versions: 34

Compression:

Stored size: 920 Bytes

Contents

require "timber/integrations/action_controller"
require "timber/integrations/action_dispatch"
require "timber/integrations/action_view"
require "timber/integrations/active_record"
require "timber/integrations/rack"
require "timber/integrations/rails"

module Timber
  # Namespace for all integrations. Each integration provides it's own settings.
  # And all integrations can be disabled with the {.enabled=} class method.
  module Integrations
    # Disable / enable _all_ integrations with one setting.
    def self.enabled=(value)
      ActionController.enabled = value
      ActionView.enabled = value
      ActiveRecord.enabled = value
      Rack.enabled = value
    end

    # Integrates all enabled integrations in one call.
    def self.integrate!
      ActionController.integrate!
      ActionDispatch.integrate!
      ActionView.integrate!
      ActiveRecord.integrate!
      Rails.integrate!
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
timber-2.6.2 lib/timber/integrations.rb
timber-2.6.1 lib/timber/integrations.rb
timber-2.6.0 lib/timber/integrations.rb
timber-2.6.0.pre.beta2 lib/timber/integrations.rb
timber-2.6.0.pre.beta1 lib/timber/integrations.rb
timber-2.5.1 lib/timber/integrations.rb
timber-2.5.0 lib/timber/integrations.rb
timber-2.4.0 lib/timber/integrations.rb
timber-2.3.4 lib/timber/integrations.rb
timber-2.3.3 lib/timber/integrations.rb
timber-2.3.2 lib/timber/integrations.rb
timber-2.3.1 lib/timber/integrations.rb
timber-2.3.0 lib/timber/integrations.rb
timber-2.2.3 lib/timber/integrations.rb
timber-2.2.2 lib/timber/integrations.rb
timber-2.2.1 lib/timber/integrations.rb
timber-2.2.0 lib/timber/integrations.rb
timber-2.1.10 lib/timber/integrations.rb
timber-2.1.9 lib/timber/integrations.rb
timber-2.1.8 lib/timber/integrations.rb