From f1f8dd5fdf37427a8308c00013334b70a0770256 Mon Sep 17 00:00:00 2001 From: Christian Gregg Date: Wed, 2 Oct 2019 17:38:33 +0100 Subject: [PATCH 1/3] Fallback to :response_body if :body is not set Faraday 0.16.x changed the key names, this should allow us to support both 0.15.x and 0.16.x for now --- lib/faraday/http_cache.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 88772d9349645f873f5db6b787ddf810a860486f Mon Sep 17 00:00:00 2001 From: Christian Gregg Date: Tue, 24 Mar 2020 09:42:09 +0000 Subject: [PATCH 2/3] Add faraday 1.0.0 to build matrix --- .travis.yml | 1 + faraday-http-cache.gemspec | 2 +- gemfiles/Gemfile.faraday-1.0 | 12 ++++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 gemfiles/Gemfile.faraday-1.0 diff --git a/.travis.yml b/.travis.yml index 549d34e..5a843d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,4 +16,5 @@ notifications: secure: Ri3bGJvNKfZ6ynbHcbICknWaAJFbQPlGQE9YSY9xMB7rGomsofY4yS8yf17WlSTd2MqxhzMXgbqXfkQW759Opknw75URo8tLTnSlpJsVSqV7T4dUsfNZguyQElVZMxYacFbBZEJGBdz2Ra6xbMBdg8NqVACb65I2xeK2fsvm77k= gemfile: - gemfiles/Gemfile.faraday-0.8 + - gemfiles/Gemfile.faraday-1.0 - Gemfile diff --git a/faraday-http-cache.gemspec b/faraday-http-cache.gemspec index 75c1c9c..880016e 100644 --- a/faraday-http-cache.gemspec +++ b/faraday-http-cache.gemspec @@ -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' From 5c055e9129de770ad5d964d86ecb3e2ef447678d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Guimar=C3=A3es?= Date: Mon, 13 Apr 2020 17:44:59 -0300 Subject: [PATCH 3/3] v2.2.0 --- CHANGELOG.md | 4 ++++ faraday-http-cache.gemspec | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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 024df59..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.' 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