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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 33c13138df41134b3d17319ff6d02d86e5b261ab5b45eaf901ec35e19bb0667b
4
- data.tar.gz: 963d753a7188d8ce556b2f03236db1a18e9428e8d5f71d07890e039ea6dcdf51
3
+ metadata.gz: e6359342424a40cb441683e064b1612f3b0f5713d9d0fec3e47b962c6e454c4f
4
+ data.tar.gz: 4e4f17a2c36d7878e62d8e69b594233e38af42bb389baa45e18d1aa59a33ea97
5
5
  SHA512:
6
- metadata.gz: 77ea852dc496c9c973954da2d83de33811a6c7e37b7028ca1596aece01009944e0d476f5e8e32790c380735338283d5ee62e634f0555da7aa58b8a99a73bdb91
7
- data.tar.gz: 367a1528be10b7d2cde8f9d8cbe16080ebdf90a9d9e6c0670b42ced776018c1d1871b904434f1b6d11e18eeebbd993365573e5ec8acb21f8cb6d04eb3563f585
6
+ metadata.gz: 3ae2521b86d68b591a786241dab8b45316a8c2a5dcafd2c7ef98ad9f13c13c1141f4e15c4cef1b6fc8f1b346d217e4a96a2f7f97431bc6448a90a70143345d7b
7
+ data.tar.gz: e04916f56b096f9236c7331ac3ccbbc03f4e9dae68eff047fa252be928bf09f832d61d4e321bfb4aa9234bfceebf65ef452892ff90390cf7debbfb76711826f6
@@ -34,8 +34,5 @@ RSpec/MultipleExpectations:
34
34
  Style/SafeNavigation:
35
35
  Enabled: no
36
36
 
37
- Performance/RegexpMatch:
38
- Enabled: no
39
-
40
37
  Style/SingleLineMethods:
41
38
  Enabled: no
@@ -1 +1 @@
1
- ruby-2.4.1
1
+ ruby-2.7.1
@@ -2,4 +2,5 @@ language: ruby
2
2
  rvm:
3
3
  - 2.4
4
4
  - 2.5
5
+ - 2.7
5
6
  - jruby
@@ -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.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
@@ -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.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: 2019-08-12 00:00:00.000000000 Z
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
- rubyforge_project:
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