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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# 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 :i18n_scope
self.i18n_scope = :ncore
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_reader :bearer_credential_key
class_eval " def self.bearer_credential_key=(v)\n @@bearer_credential_key = v&.to_s\n end\n def bearer_credential_key=(v)\n @@bearer_credential_key = v&.to_s\n end\n MTH\n\n mattr_accessor :credentials_error_message\n self.credentials_error_message = %Q{Missing API credentials. Set default credentials using \"\#{self.module_parent.name}.credentials = {api_user: YOUR_API_USER, api_key: YOUR_API_KEY}\"}\n\n mattr_accessor :verify_ssl\n self.verify_ssl = true\n\n mattr_reader :ssl_cert_bundle\n class_eval <<-MTH\n def self.ssl_cert_bundle=(v)\n v = find_excon_bundle if v==:bundled\n @@ssl_cert_bundle = v\n end\n def ssl_cert_bundle=(v)\n v = find_excon_bundle if v==:bundled\n @@ssl_cert_bundle = v\n end\n MTH\n\n mattr_accessor :cache_store\n\n mattr_accessor :logger\n self.logger = Logger.new(STDOUT)\nend\n"
|