Parse dates from response.
Add this line to your application's Gemfile:
gem 'faraday-parse_dates'
And then execute:
bundle install
Or install it yourself as:
gem install faraday-parse_dates
require 'faraday/parse_dates'
connection = Faraday.new do |faraday|
## This gem only decodes responses
faraday.response :parse_dates
## Alternatively, you can use `use`
# faraday.use :parse_dates
end
It can doesn't work being placed after faraday.response :json
or similar middlewares,
but can work before them. Check the order and results.
The issue about this: lostisland/faraday#1458
And please read middlewares documentation carefully: https://lostisland.github.io/faraday/middleware/
After checking out the repo, run bin/setup
to install dependencies.
Then, run bin/test
to run the tests.
To install this gem onto your local machine, run toys gem install
.
To release a new version, run toys gem release %version%
.
See how it works here.
Bug reports and pull requests are welcome on GitHub.
The gem is available as open source under the terms of the MIT License.