lhc 15.1.0 → 15.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lhc/scrubbers/cache_scrubber.rb +4 -1
- data/lib/lhc/version.rb +1 -1
- data/spec/request/scrubbed_options_spec.rb +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 301499c3239741a748386c3e33d552611f2817f2880579b3df9e320b336db894
|
4
|
+
data.tar.gz: 27c61057ca12aa70076e0fbe71da8cf8f0eac225420dcdd11ba297336aea85e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 890dd068ed2902de6990b1b90ef5082f4f6d0c26e65022db14157615dd858f7302a8419b8457f6da403f3423aabdfa13f0838a748846f7f93e13339c0415eca6
|
7
|
+
data.tar.gz: e66683421af741d105294a5eb5fb33f26dbab024653b51647f3597e3256cd2bb114202d1599e4f0019f6157b08123afea794c68ddddd6f286518a99476c9dc9d
|
@@ -19,7 +19,10 @@ class LHC::CacheScrubber < LHC::Scrubber
|
|
19
19
|
return if scrubbed[:key].blank?
|
20
20
|
|
21
21
|
scrub_elements.each do |scrub_element|
|
22
|
-
|
22
|
+
matches = scrubbed[:key].match(/:#{scrub_element}=>"(.*?)"/)
|
23
|
+
next if matches.nil?
|
24
|
+
|
25
|
+
value = matches[-1]
|
23
26
|
scrubbed[:key].gsub!(value, SCRUB_DISPLAY)
|
24
27
|
end
|
25
28
|
end
|
data/lib/lhc/version.rb
CHANGED
@@ -58,6 +58,19 @@ describe LHC::Request do
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
+
context 'when parameter should not get scrubbed' do
|
62
|
+
let(:params) { { any_parameter: 'any-parameter' } }
|
63
|
+
|
64
|
+
let(:cache) do
|
65
|
+
{ key: "LHS_REQUEST_CYCLE_CACHE(v1) POST http://local.ch?#{params}" }
|
66
|
+
end
|
67
|
+
|
68
|
+
it 'does not scrubb the parameter' do
|
69
|
+
expect(request.scrubbed_options[:cache])
|
70
|
+
.to include(key: "LHS_REQUEST_CYCLE_CACHE(v1) POST http://local.ch?#{params}")
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
61
74
|
context 'when body data is nested' do
|
62
75
|
let(:body) do
|
63
76
|
{
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lhc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 15.1.
|
4
|
+
version: 15.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/local-ch/lhc/contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|