12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# File 'lib/ncore/configuration.rb', line 12
def init_config_options
mattr_accessor :default_url
self.default_url = 'https://api.example.com/v1/'
mattr_accessor :default_headers
self. = {
accept: 'application/json',
content_type: 'application/json',
user_agent: "NCore/ruby v#{VERSION}"
}
mattr_accessor :credentials
mattr_accessor :debug
self.debug = false
mattr_accessor :strict_attributes
self.strict_attributes = true
mattr_accessor :instrument_key
self.instrument_key = 'request.ncore'
mattr_accessor :status_page
self.status_page = 'the status page'
mattr_accessor :auth_header_prefix
self. = 'X-Api'
mattr_accessor :credentials_error_message
self.credentials_error_message = %Q{Missing API credentials. Set default credentials using "#{self.parent.name}.credentials = {api_user: YOUR_API_USER, api_key: YOUR_API_KEY}"}
mattr_accessor :verify_ssl
self.verify_ssl = true
mattr_accessor :ssl_cert_bundle
self.ssl_cert_bundle = File.dirname(__FILE__)+'/ssl/ca-certificates.crt'
mattr_accessor :logger
self.logger = Logger.new(STDOUT)
end
|