Class: VRE::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
22
23
24
|
# File 'lib/vre/configuration.rb', line 22
def base_path
Settings.veteran_readiness_and_employment.base_url
end
|
#connection ⇒ Object
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/vre/configuration.rb', line 7
def connection
@conn ||= Faraday.new(base_path, headers: , request: request_options) do |faraday|
faraday.use :breakers
faraday.use Faraday::Response::RaiseError
faraday.response :betamocks if mock_enabled?
faraday.response :snakecase, symbolize: false
faraday.response :json, content_type: /\bjson/
faraday.adapter Faraday.default_adapter
end
end
|
#mock_enabled? ⇒ Boolean
18
19
20
|
# File 'lib/vre/configuration.rb', line 18
def mock_enabled?
Settings.veteran_readiness_and_employment.mock_ch_31 || false
end
|
#service_name ⇒ Object
26
27
28
|
# File 'lib/vre/configuration.rb', line 26
def service_name
'VeteranReadinessEmployment'
end
|