lhc 15.1.0 → 15.1.1

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: 24396a7fdc614a0af2564a93a52b2ef4b644ad574b1cdf35e8a0d885d34f356d
4
- data.tar.gz: d31c263bdfb9252352767a6dc59cc18dc47177739cd1713b4c3e0b0d01a66b82
3
+ metadata.gz: 301499c3239741a748386c3e33d552611f2817f2880579b3df9e320b336db894
4
+ data.tar.gz: 27c61057ca12aa70076e0fbe71da8cf8f0eac225420dcdd11ba297336aea85e8
5
5
  SHA512:
6
- metadata.gz: 9a6e689b200144b2b1f154dfa773b0cd765f3fecca312ecbdfd599c317a16bd81eb089c74ee33679c0a065984dec34306aafa3884b41d256001e8d3a9f64d553
7
- data.tar.gz: a782d7e841d55227fc2dd999f6ceb827717f332afdf776796e76097131681661710fa2cbf5bf934d83778ae2594a2b6b0127d6ceaf9899613aa9c94677173288
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
- value = scrubbed[:key].match(/:#{scrub_element}=>"(.*?)"/)[-1]
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LHC
4
- VERSION ||= '15.1.0'
4
+ VERSION ||= '15.1.1'
5
5
  end
@@ -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.0
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-10-29 00:00:00.000000000 Z
11
+ date: 2021-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport