Sha256: e07e53efa3f5629000aabae39d745b6fa0bfbbfea09bf7aea16c8b7f335a654b
Contents?: true
Size: 844 Bytes
Versions: 1
Compression:
Stored size: 844 Bytes
Contents
require 'appsignal/careful_logger' module Appsignal class Config include Appsignal::CarefulLogger attr_accessor :root_path, :rails_env def initialize(root_path, rails_env, logger=Appsignal.logger) @root_path = root_path @rails_env = rails_env @logger = logger end def load file = File.join(@root_path, 'config/appsignal.yml') unless File.exists?(file) carefully_log_error "config not found at: #{file}" return end config = YAML.load_file(file)[@rails_env] unless config carefully_log_error "config for '#{@rails_env}' not found" return end config = {:ignore_exceptions => [], :endpoint => 'https://push.appsignal.com/1', :slow_request_threshold => 200 }.merge(config.symbolize_keys) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
appsignal-0.4.7 | lib/appsignal/config.rb |