better-faraday 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8c5cfa773e01c53223151db865f52ad18b5ab411ad0df1d67415a5bd4ef1e73
4
- data.tar.gz: dde3e3df19d758f85d156ae357d96cb017e0a2746d7de2d14533a860d0dacd9c
3
+ metadata.gz: c8f236710b44dc72e1efa535f4750f9cc782bce797be1d771da23d7f2ff3ded1
4
+ data.tar.gz: 4f9c6d1453f308abb928b234429f68c26345056c6b1ff8df2efc17dafce73bcf
5
5
  SHA512:
6
- metadata.gz: e9affc8fce7fe302214440777db7778ecc429d9ca188385ae42b58297a76d4a9db5c6e051313b5bc2f211af287c729bdcf39226652c132ff40b2570ef2ee2ea3
7
- data.tar.gz: c0baba390fcef6d87131569c948cf3492233e99cb317900a79b459dddb0fc7653b05811b279bf71bc7339384f7f2b581a34c69004af8e847718bf10fd2918ce6
6
+ metadata.gz: a3a4bb57f6938d021ebf37e9f854e06b55e4022f2ea983a62de1264085c64807a30d8eeeec72c8913b3dd6229c8777293ab2577b4aabd5cc41dd9e1c0b6d3db4
7
+ data.tar.gz: c0f632bb82dd8eeb84a071d12b1f957a9542494278eaa297e774ca71ef2c1a8a52bad868bec86410b74e9d9beafcb0f823b9eb64b8d4cefc8da840f47befc07f
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "better-faraday"
6
- s.version = "2.0.0"
6
+ s.version = "2.0.1"
7
7
  s.author = "Yaroslav Konoplov"
8
8
  s.email = "eahome00@gmail.com"
9
9
  s.summary = "Extends Faraday with useful features."
@@ -113,7 +113,9 @@ module Faraday
113
113
  response_body_bytes_count = response_body.bytesize
114
114
 
115
115
  if env.bf_request_headers["content-type"].to_s.match?(/\bapplication\/json\b/i)
116
- request_json = bf_json_dump(bf_protect_data(bf_json_parse(request_body)))
116
+ request_json = bf_json_parse(request_body).yield_self do |data|
117
+ bf_json_dump(bf_protect_data(data)) if data
118
+ end
117
119
  end
118
120
 
119
121
  if env.response_headers
@@ -121,7 +123,9 @@ module Faraday
121
123
  end
122
124
 
123
125
  if env.response_headers && env.response_headers["content-type"].to_s.match?(/\bapplication\/json\b/i)
124
- response_json = bf_json_dump(bf_protect_data(bf_json_parse(response_body)))
126
+ response_json = bf_json_parse(response_body).yield_self do |data|
127
+ bf_json_dump(bf_protect_data(data)) if data
128
+ end
125
129
  end
126
130
 
127
131
  lines = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better-faraday
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Konoplov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-25 00:00:00.000000000 Z
11
+ date: 2022-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday