Class: Lighthouse::VeteransHealth::Configuration
Instance Attribute Summary
#base_request_headers, #open_timeout, #read_timeout, #request_types, #user_agent
Instance Method Summary
collapse
#breakers_error_threshold, #breakers_exception_handler, #breakers_matcher, #breakers_service, #create_new_breakers_service, #current_module, #request_options, #service_exception
Instance Method Details
#base_path ⇒ Object
9
10
11
|
# File 'lib/lighthouse/veterans_health/configuration.rb', line 9
def base_path
Settings.lighthouse.veterans_health.url
end
|
#connection ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/lighthouse/veterans_health/configuration.rb', line 21
def connection
Faraday.new(base_path, headers: , request: request_options) do |faraday|
faraday.use :breakers
faraday.use Faraday::Response::RaiseError
faraday.options.params_encoder = Faraday::FlatParamsEncoder
faraday.response :json
faraday.response :betamocks if Settings.lighthouse.veterans_health.use_mocks
faraday.adapter Faraday.default_adapter
end
end
|
#rsa_key ⇒ Object
17
18
19
|
# File 'lib/lighthouse/veterans_health/configuration.rb', line 17
def rsa_key
@key ||= OpenSSL::PKey::RSA.new(File.read(Settings.lighthouse.veterans_health.fast_tracker.api_key))
end
|
#service_name ⇒ Object
13
14
15
|
# File 'lib/lighthouse/veterans_health/configuration.rb', line 13
def service_name
'Lighthouse_VeteransHealth'
end
|