diff --git a/.travis.yml b/.travis.yml index 6b27c77..f7011e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,4 +12,5 @@ notifications: email: false gemfile: - gemfiles/Gemfile.faraday-0.8 + - gemfiles/Gemfile.faraday-1.0 - Gemfile diff --git a/CHANGELOG.md b/CHANGELOG.md index d25e225..6b42bae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Unreleased +## 2.2.0 (2019-04-13) + +* Support for faraday 1.x + ## 2.0.0 (2016-11-16) * Ruby version constraint changed to 2.1.0. diff --git a/faraday-http-cache.gemspec b/faraday-http-cache.gemspec index 1b6a79d..a96e0a4 100644 --- a/faraday-http-cache.gemspec +++ b/faraday-http-cache.gemspec @@ -1,7 +1,7 @@ # frozen_string_literal: true Gem::Specification.new do |gem| gem.name = 'faraday-http-cache' - gem.version = '2.1.0' + gem.version = '2.2.0' gem.licenses = ['Apache 2.0'] gem.description = 'Middleware to handle HTTP caching' gem.summary = 'A Faraday middleware that stores and validates cache expiration.' @@ -15,5 +15,5 @@ Gem::Specification.new do |gem| gem.executables = [] gem.required_ruby_version = '>= 2.1.0' - gem.add_dependency 'faraday', '~> 0.8' + gem.add_dependency 'faraday', '>= 0.8' end diff --git a/gemfiles/Gemfile.faraday-1.0 b/gemfiles/Gemfile.faraday-1.0 new file mode 100644 index 0000000..e4afeaf --- /dev/null +++ b/gemfiles/Gemfile.faraday-1.0 @@ -0,0 +1,12 @@ +source 'http://rubygems.org' + +gem 'faraday-http-cache', path: '..' + +gem 'faraday', '1.0.0' +gem 'faraday_middleware', '1.0.0.rc1' + +gem 'em-http-request', '~> 1.1' +gem 'rspec', '~> 3.1' +gem 'rake', '~> 12.0' +gem 'activesupport', '>= 5.0' +gem 'sinatra', '~> 2.0' diff --git a/lib/faraday/http_cache.rb b/lib/faraday/http_cache.rb index e33bb75..df502e3 100644 --- a/lib/faraday/http_cache.rb +++ b/lib/faraday/http_cache.rb @@ -297,7 +297,7 @@ def create_response(env) { status: hash[:status], - body: hash[:body], + body: hash[:body] || hash[:response_body], response_headers: hash[:response_headers] } end pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy