https://github.com/AlexWayfer/faraday-parse_dates
Parse dates from Faraday response body
https://github.com/AlexWayfer/faraday-parse_dates
Last synced: 2 months ago
JSON representation
Parse dates from Faraday response body
- Host: GitHub
- URL: https://github.com/AlexWayfer/faraday-parse_dates
- Owner: AlexWayfer
- License: mit
- Created: 2022-03-10T21:33:04.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-14T12:11:42.000Z (3 months ago)
- Last Synced: 2025-03-23T23:51:30.612Z (3 months ago)
- Language: Ruby
- Size: 109 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-faraday - parse_dates - parse ISO 8601 dates from response body (Middleware)
README
# Faraday Parse Dates
[](https://cirrus-ci.com/github/AlexWayfer/faraday-parse_dates)
[](https://codecov.io/gh/AlexWayfer/faraday-parse_dates)
[](https://codeclimate.com/github/AlexWayfer/faraday-parse_dates)
[](https://depfu.com/repos/github/AlexWayfer/faraday-parse_dates)
[](https://inch-ci.org/github/AlexWayfer/faraday-parse_dates)
[](https://rubygems.org/gems/faraday-parse_dates)
[](LICENSE.md)Parse dates from response.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'faraday-parse_dates'
```And then execute:
```shell
bundle install
```Or install it yourself as:
```shell
gem install faraday-parse_dates
```## Usage
```ruby
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
```### Order note
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:
And please read middlewares documentation carefully:
## Development
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](https://github.com/AlexWayfer/gem_toys#release).## Contributing
Bug reports and pull requests are welcome on [GitHub](https://github.com/AlexWayfer/faraday-parse_dates).
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).