Sha256: 9697c1be4db49c2e8e5255a79bdc1ae70e77ef76f2deb73b947792f6d5a3ff04

Contents?: true

Size: 778 Bytes

Versions: 10

Compression:

Stored size: 778 Bytes

Contents

module WatCatcher
  class Railtie < ::Rails::Railtie

    config.before_initialize do
      # Configure bugsnag rails defaults
      WatCatcher.configure do |config|
        config.logger = ::Rails.logger
        config.release_stage = ::Rails.env.to_s
        config.project_root = ::Rails.root.to_s
      end

      # Auto-load configuration settings from config/bugsnag.yml if it exists
      config_file = ::Rails.root.join("config", "wat_catcher.yml")
      config = YAML.load(ERB.new(File.read(config_file)).result) if File.exists?(config_file)
      WatCatcher.configure(config[::Rails.env] ? config[::Rails.env] : config) if config

   end
    initializer "wat_catcher.view_helpers" do |app|
      ActionView::Base.send :include, ::WatCatcher::Helper
    end

  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
wat_catcher-0.10.11 lib/wat_catcher/railtie.rb
wat_catcher-0.10.10 lib/wat_catcher/railtie.rb
wat_catcher-0.10.9 lib/wat_catcher/railtie.rb
wat_catcher-0.10.8 lib/wat_catcher/railtie.rb
wat_catcher-0.10.7 lib/wat_catcher/railtie.rb
wat_catcher-0.10.6 lib/wat_catcher/railtie.rb
wat_catcher-0.10.5 lib/wat_catcher/railtie.rb
wat_catcher-0.10.4 lib/wat_catcher/railtie.rb
wat_catcher-0.10.3 lib/wat_catcher/railtie.rb
wat_catcher-0.10.2 lib/wat_catcher/railtie.rb