Sha256: 6cce32f4a92bb378f2b9a1b5937cd305d1cd866d471f5567a18f472c0270aa50

Contents?: true

Size: 636 Bytes

Versions: 3

Compression:

Stored size: 636 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_file(config_file) if File.exists?(config_file)
      WatCatcher.configure(config[::Rails.env] ? config[::Rails.env] : config) if config
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wat_catcher-0.0.7 lib/wat_catcher/railtie.rb
wat_catcher-0.0.6 lib/wat_catcher/railtie.rb
wat_catcher-0.0.5 lib/wat_catcher/railtie.rb