class Batbugger::Configuration
Constants
- DEFAULT_BACKTRACE_FILTERS
- DEFAULT_PARAMS_FILTERS
- IGNORE_DEFAULT
- OPTIONS
Attributes
api_key[RW]
async[W]
backtrace_filters[R]
debug[RW]
development_environments[RW]
environment_name[RW]
framework[RW]
host[RW]
http_open_timeout[RW]
http_read_timeout[RW]
ignore[R]
ignore_by_filters[R]
ignore_user_agent[R]
logger[RW]
notifier_name[RW]
notifier_url[RW]
notifier_version[RW]
params_filters[R]
port[RW]
project_root[RW]
proxy_host[RW]
proxy_pass[RW]
proxy_port[RW]
proxy_user[RW]
rescue_rake_exceptions[RW]
secure[RW]
secure?[RW]
send_request_session[RW]
source_extract_radius[RW]
use_system_ssl_cert_chain[RW]
use_system_ssl_cert_chain?[RW]
user_information[RW]
Public Class Methods
new()
click to toggle source
# File lib/batbugger/configuration.rb, line 103 def initialize @secure = true @use_system_ssl_cert_chain = false @host = 'www.batbugger.io' @http_open_timeout = 2 @http_read_timeout = 5 @params_filters = DEFAULT_PARAMS_FILTERS.dup @backtrace_filters = DEFAULT_BACKTRACE_FILTERS.dup @ignore_by_filters = [] @ignore = IGNORE_DEFAULT.dup @ignore_user_agent = [] @development_environments = %w(development test cucumber) @notifier_name = 'Batbugger Notifier' @notifier_version = VERSION @notifier_url = 'https://github.com/grepruby/batbugger' @framework = 'Standalone' @user_information = 'Batbugger Error {{error_id}}' @rescue_rake_exceptions = nil @source_extract_radius = 2 @send_request_session = true @debug = false end
Public Instance Methods
[](option)
click to toggle source
# File lib/batbugger/configuration.rb, line 142 def [](option) send(option) end
async()
click to toggle source
# File lib/batbugger/configuration.rb, line 161 def async @async = Proc.new if block_given? @async end
Also aliased as: async?
ca_bundle_path()
click to toggle source
# File lib/batbugger/configuration.rb, line 179 def ca_bundle_path if use_system_ssl_cert_chain? && File.exist?(OpenSSL::X509::DEFAULT_CERT_FILE) OpenSSL::X509::DEFAULT_CERT_FILE else local_cert_path end end
current_user_method=(null)
click to toggle source
# File lib/batbugger/configuration.rb, line 191 def current_user_method=(null) ; end
filter_backtrace(&block)
click to toggle source
# File lib/batbugger/configuration.rb, line 126 def filter_backtrace(&block) self.backtrace_filters << block end
ignore_by_filter(&block)
click to toggle source
# File lib/batbugger/configuration.rb, line 130 def ignore_by_filter(&block) self.ignore_by_filters << block end
ignore_only=(names)
click to toggle source
# File lib/batbugger/configuration.rb, line 134 def ignore_only=(names) @ignore = [names].flatten end
ignore_user_agent_only=(names)
click to toggle source
# File lib/batbugger/configuration.rb, line 138 def ignore_user_agent_only=(names) @ignore_user_agent = [names].flatten end
local_cert_path()
click to toggle source
# File lib/batbugger/configuration.rb, line 187 def local_cert_path File.expand_path(File.join("..", "..", "..", "resources", "ca-bundle.crt"), __FILE__) end
merge(hash)
click to toggle source
# File lib/batbugger/configuration.rb, line 153 def merge(hash) to_hash.merge(hash) end
protocol()
click to toggle source
# File lib/batbugger/configuration.rb, line 171 def protocol if secure? 'https' else 'http' end end
public?()
click to toggle source
# File lib/batbugger/configuration.rb, line 157 def public? !development_environments.include?(environment_name) end
to_hash()
click to toggle source
# File lib/batbugger/configuration.rb, line 146 def to_hash OPTIONS.inject({}) do |hash, option| hash[option.to_sym] = self.send(option) hash end end
Private Instance Methods
default_port()
click to toggle source
# File lib/batbugger/configuration.rb, line 195 def default_port if secure? 443 else 80 end end