faraday-http-cache 2.4.1 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f9734c5eda496aee6fc6d189e27f9e39b43600ffb467976649ad3f7046a8efc
4
- data.tar.gz: 1a4d2d137c3ec0a97790cc4b5bcb706f7e0c2af0d0700e0ae03dfc79f5e2bdba
3
+ metadata.gz: 9ec7c39769697b84b0fd12f97d8dd14953cef613f3621be2bea6561e40a77805
4
+ data.tar.gz: f47c57b3233c0e7fec8ae527f33be203918393eb8efc3443bfc3e1a421ddd3b9
5
5
  SHA512:
6
- metadata.gz: f93240786d8c3b8012cce14545e2f0f34f1bb12811da4edc549ad145284712b59380dac02f91ed6170d19af7af220e48d905a31a1159129d2b32b45799251df6
7
- data.tar.gz: 8b2480bebc178003743ca2e0535966ad617349ef7ead2f7b5907f00d4580ba990332472d2ac393dc6b5bd79b787d8d560e5d772f9bfc1faca76ac6b34a5061d7
6
+ metadata.gz: 46ae27b09f324cea6d5d49c6f83b9ee11c00e3840dce48243534896bf9fed16cc3e2f55d9711b8355597327af7118b35aa70fa5ba6bfc97ef924ff58b249e22c
7
+ data.tar.gz: 6a013f290b94a09be66880fd339885fde26df832f65eff3a0352fc1689a5bd2c7dece5e80998c0ab6ea8890ebd3b6b77e8a1d8643a94b4429e9de2a7b3ed60d1
@@ -142,7 +142,8 @@ module Faraday
142
142
  {
143
143
  status: @payload[:status],
144
144
  body: @payload[:body],
145
- response_headers: @payload[:response_headers]
145
+ response_headers: @payload[:response_headers],
146
+ reason_phrase: @payload[:reason_phrase]
146
147
  }
147
148
  end
148
149
 
@@ -301,7 +301,8 @@ module Faraday
301
301
  {
302
302
  status: hash[:status],
303
303
  body: hash[:body] || hash[:response_body],
304
- response_headers: hash[:response_headers]
304
+ response_headers: hash[:response_headers],
305
+ reason_phrase: hash[:reason_phrase]
305
306
  }
306
307
  end
307
308
 
@@ -200,7 +200,7 @@ describe Faraday::HttpCache::Response do
200
200
  end
201
201
 
202
202
  describe 'response unboxing' do
203
- subject { described_class.new(status: 200, response_headers: {}, body: 'Hi!') }
203
+ subject { described_class.new(status: 200, response_headers: {}, body: 'Hi!', reason_phrase: 'Success') }
204
204
 
205
205
  let(:env) { { method: :get } }
206
206
  let(:response) { subject.to_response(env) }
@@ -224,6 +224,10 @@ describe Faraday::HttpCache::Response do
224
224
  it 'merges the body' do
225
225
  expect(response.body).to eq('Hi!')
226
226
  end
227
+
228
+ it 'merges the reason phrase' do
229
+ expect(response.reason_phrase).to eq('Success') if response.respond_to?(:reason_phrase)
230
+ end
227
231
  end
228
232
 
229
233
  describe 'remove age before caching and normalize max-age if non-zero age present' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faraday-http-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Mazza
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-08-08 00:00:00.000000000 Z
13
+ date: 2023-04-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  requirements: []
84
- rubygems_version: 3.2.3
84
+ rubygems_version: 3.2.22
85
85
  signing_key:
86
86
  specification_version: 4
87
87
  summary: A Faraday middleware that stores and validates cache expiration.