better-faraday 1.1.4 → 1.2.0

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: 30c3a63862a5faff00055d0f7fa905b8a67bcb85b3197929a0dcc1b7cce84d5c
4
- data.tar.gz: 1d21b6f8fc0ce3efa6dcfec7fcec79e490a27a7c8b48b8a5d97e6d27d196ef26
3
+ metadata.gz: b4091f67de65133fa096eef795198cf51895c03ada658fb72e84fbfae2c14522
4
+ data.tar.gz: c79c87d6051648a39a58e91259bb78309e78368d9874ca4605d09152388b908f
5
5
  SHA512:
6
- metadata.gz: 181d98b5697219d6bc095d275c0335438b148dd0ddf3e0d08d97855c5f4457731d541d83e19d3c8b3b187023171621baffe13d03417a00d4be50a414809a3d0e
7
- data.tar.gz: fcaa327eb416c1ec95e8df522e580a92809ff927f043402f9c998a2797e19eda91b666261280edf89ccf08bfb8c58822399211ba6b8d899d9647b8cf28273001
6
+ metadata.gz: 80c822fc52bc8bf778d37b769bbce32e2e7c75e3c94fb9a2098659f8b4d66e37df8c6e02c8c34b9f9bedc9f3fcaa7c64fa30de7c491a5f86f00fda575d1c3d65
7
+ data.tar.gz: bdca3821190b987e8de4f334c712c3380985b4c60f4703a261a821aceba6e4bb8cb7fef5b742153d65230f23d418ca87d77da0c4369957df56e67e002e2422c1
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.1
1
+ 2.7.3
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "better-faraday"
6
- s.version = "1.1.4"
6
+ s.version = "1.2.0"
7
7
  s.author = "Yaroslav Konoplov"
8
8
  s.email = "eahome00@gmail.com"
9
9
  s.summary = "Extends Faraday with useful features."
@@ -13,6 +13,6 @@ Gem::Specification.new do |s|
13
13
  s.files = `git ls-files -z`.split("\x0")
14
14
  s.test_files = `git ls-files -z -- {test,spec,features}/*`.split("\x0")
15
15
  s.require_paths = ["lib"]
16
- s.add_dependency "faraday", ">= 0.17", "< 2.0"
16
+ s.add_dependency "faraday", ">= 1.0", "< 2.0"
17
17
  s.add_dependency "activesupport", ">= 4.0", "< 7.0"
18
18
  end
@@ -167,7 +167,7 @@ module Faraday
167
167
  return data.map(&method(:__protect_data)) if ::Array === data
168
168
  return data unless ::Hash === data
169
169
  data.each_with_object({}) do |(key, value), memo|
170
- memo[key] = if key.to_s.underscore.tr("_", " ").yield_self { |k| Faraday.secrets.any? { |s| k.match?(s) } }
170
+ memo[key] = if key.to_s.underscore.tr("_", " ").yield_self { |k| Faraday::Inspection.secrets.any? { |s| k.match?(s) } }
171
171
  "SECRET"
172
172
  else
173
173
  __protect_data(value)
@@ -184,9 +184,21 @@ module Faraday
184
184
  class HTTP422 < HTTP4xx; end
185
185
  class HTTP429 < HTTP4xx; end
186
186
 
187
- class << self
188
- attr_accessor :secrets
187
+ module Inspection
188
+ class << self
189
+ attr_accessor :secrets
190
+ end
191
+
192
+ self.secrets = [/\bpass(?:word|phrase)\b/i, /\bauthorization\b/i, /\bsecret\b/i, /\b(:?access)?token\b/i]
189
193
  end
190
194
 
191
- self.secrets = [/\bpass(?:word|phrase)\b/i, /\bauthorization\b/i, /\bsecret\b/i, /\b(:?access)?token\b/i]
195
+ class << self
196
+ def secrets
197
+ Inspection.secrets
198
+ end
199
+
200
+ def secrets=(value)
201
+ Inspection.secrets = value
202
+ end
203
+ end
192
204
  end
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: 1.1.4
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Konoplov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-26 00:00:00.000000000 Z
11
+ date: 2021-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.17'
19
+ version: '1.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '2.0'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.17'
29
+ version: '1.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2.0'
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  requirements: []
85
- rubygems_version: 3.1.2
85
+ rubygems_version: 3.1.6
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Extends Faraday with useful features.