lenjador 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 +4 -4
- data/.rubocop.yml +0 -3
- data/.ruby-version +1 -1
- data/.travis.yml +1 -0
- data/lenjador.gemspec +1 -1
- data/lib/lenjador/preprocessors/whitelist.rb +1 -1
- data/spec/lenjador/preprocessors/whitelist_spec.rb +0 -16
- data/spec/spec_helper.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6359342424a40cb441683e064b1612f3b0f5713d9d0fec3e47b962c6e454c4f
|
4
|
+
data.tar.gz: 4e4f17a2c36d7878e62d8e69b594233e38af42bb389baa45e18d1aa59a33ea97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ae2521b86d68b591a786241dab8b45316a8c2a5dcafd2c7ef98ad9f13c13c1141f4e15c4cef1b6fc8f1b346d217e4a96a2f7f97431bc6448a90a70143345d7b
|
7
|
+
data.tar.gz: e04916f56b096f9236c7331ac3ccbbc03f4e9dae68eff047fa252be928bf09f832d61d4e321bfb4aa9234bfceebf65ef452892ff90390cf7debbfb76711826f6
|
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.
|
1
|
+
ruby-2.7.1
|
data/.travis.yml
CHANGED
data/lenjador.gemspec
CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |gem|
|
7
7
|
gem.name = RUBY_PLATFORM =~ /java/ ? 'lenjador-jruby' : 'lenjador'
|
8
|
-
gem.version = '2.0.
|
8
|
+
gem.version = '2.0.1'
|
9
9
|
gem.authors = ['Salemove']
|
10
10
|
gem.email = ['support@salemove.com']
|
11
11
|
gem.description = "It's lenjadoric"
|
@@ -45,7 +45,7 @@ class Lenjador
|
|
45
45
|
def build_trie(config)
|
46
46
|
pointers = (config[:pointers] || []) + DEFAULT_WHITELIST
|
47
47
|
|
48
|
-
pointers.reduce(JSONPointerTrie.new(config)) do |trie, pointer|
|
48
|
+
pointers.reduce(JSONPointerTrie.new(**config)) do |trie, pointer|
|
49
49
|
validate_pointer(pointer)
|
50
50
|
|
51
51
|
trie.insert(decode(pointer))
|
@@ -146,14 +146,6 @@ RSpec.describe Lenjador::Preprocessors::Whitelist do
|
|
146
146
|
end
|
147
147
|
end
|
148
148
|
|
149
|
-
context 'with whitelisted hash' do
|
150
|
-
let(:pointers) { ['/data'] }
|
151
|
-
|
152
|
-
it 'masks hash' do
|
153
|
-
expect(processed_data).to include(data: {field: '*****'})
|
154
|
-
end
|
155
|
-
end
|
156
|
-
|
157
149
|
context 'when boolean present' do
|
158
150
|
let(:data) { {bool: true} }
|
159
151
|
|
@@ -320,14 +312,6 @@ RSpec.describe Lenjador::Preprocessors::Whitelist do
|
|
320
312
|
end
|
321
313
|
end
|
322
314
|
|
323
|
-
context 'with whitelisted hash' do
|
324
|
-
let(:pointers) { ['/data'] }
|
325
|
-
|
326
|
-
it 'masks hash' do
|
327
|
-
expect(processed_data).to include(data: {})
|
328
|
-
end
|
329
|
-
end
|
330
|
-
|
331
315
|
def process(pointers, data)
|
332
316
|
described_class.new(pointers: pointers, action: :prune).process(data)
|
333
317
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -5,7 +5,7 @@ Bundler.setup
|
|
5
5
|
|
6
6
|
require 'lenjador'
|
7
7
|
|
8
|
-
Dir[File.dirname(__FILE__) + '/support/*.rb'].each { |f| require f }
|
8
|
+
Dir[File.dirname(__FILE__) + '/support/*.rb'].sort.each { |f| require f }
|
9
9
|
|
10
10
|
RSpec.configure do |config|
|
11
11
|
config.run_all_when_everything_filtered = true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lenjador
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Salemove
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lru_redux
|
@@ -195,8 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
195
|
- !ruby/object:Gem::Version
|
196
196
|
version: '0'
|
197
197
|
requirements: []
|
198
|
-
|
199
|
-
rubygems_version: 2.7.6
|
198
|
+
rubygems_version: 3.1.2
|
200
199
|
signing_key:
|
201
200
|
specification_version: 4
|
202
201
|
summary: What description said
|