-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
16d2eaa
commit 3ab31c2
Showing
4 changed files
with
25 additions
and
21 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
lib/evss/disability_compensation_form/non_breakered_configuration.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'evss/configuration' | ||
|
||
module EVSS | ||
module DisabilityCompensationForm | ||
class NonBreakeredConfiguration < EVSS::DisabilityCompensationForm::Configuration | ||
def set_evss_middlewares(faraday, snakecase: true) | ||
# faraday.use :breakers # DONT USE BREAKERS | ||
faraday.use EVSS::ErrorMiddleware | ||
faraday.use Faraday::Response::RaiseError | ||
faraday.response :betamocks if mock_enabled? | ||
faraday.response :snakecase, symbolize: false if snakecase | ||
# calls to EVSS returns non JSON responses for some scenarios that don't make it through VAAFI | ||
# content_type: /\bjson$/ ensures only json content types are attempted to be parsed. | ||
faraday.response :json, content_type: /\bjson$/ | ||
faraday.use :immutable_headers | ||
faraday.adapter Faraday.default_adapter | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters