Sha256: 4f7a9cd3ed7a4f20e9c0521299a91ad074872c8572ec690fb3d31455f4fb8ae3

Contents?: true

Size: 1.05 KB

Versions: 9

Compression:

Stored size: 1.05 KB

Contents

module Errplane
  class Configuration
    attr_accessor :api_key
    attr_accessor :api_host
    attr_accessor :application_id
    attr_accessor :application_name

    attr_accessor :logger
    attr_accessor :rails_environment
    attr_accessor :rails_root
    attr_accessor :framework
    attr_accessor :framework_version
    attr_accessor :language
    attr_accessor :language_version
    attr_accessor :ignored_exceptions
    attr_accessor :ignored_environments
    attr_accessor :environment_variables

    DEFAULTS = {
      :api_host => "api.errplane.com",
      :ignored_exceptions => %w{ActiveRecord::RecordNotFound
                                ActionController::RoutingError},
      :ignored_environments => %w{development test cucumber selenium}
    }

    def initialize
      @api_host = DEFAULTS[:api_host]
      @ignored_exceptions = DEFAULTS[:ignored_exceptions].dup
      @ignored_environments = DEFAULTS[:ignored_environments].dup
    end

    def ignore_current_environment?
      self.ignored_environments.include?(self.rails_environment)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
errplane-0.1.8 lib/errplane/configuration.rb
errplane-0.1.7 lib/errplane/configuration.rb
errplane-0.1.6 lib/errplane/configuration.rb
errplane-0.1.5 lib/errplane/configuration.rb
errplane-0.1.4 lib/errplane/configuration.rb
errplane-0.1.3 lib/errplane/configuration.rb
errplane-0.1.2 lib/errplane/configuration.rb
errplane-0.1.1 lib/errplane/configuration.rb
errplane-0.1.0 lib/errplane/configuration.rb