data-anonymization 0.8.4 → 0.8.5

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: 0a3da98d682c6d4c804dd3a02163941374ffef2581961a86c4cd854cc764b557
4
- data.tar.gz: 9d0ea5dea0878140d7c889ac701f2da31e0932471e7470051ef9f1f0677e3523
3
+ metadata.gz: 7c24dc45a72724bdc3a3d96977afbf04382ab3d40e04981b5b9a6676ffaf83f0
4
+ data.tar.gz: 1b9bfd7209781e2afc867248ad374e5cac923c975b1933691e0216f0684721c1
5
5
  SHA512:
6
- metadata.gz: b929f6b8c62208837b90914318fd5a81ed6f61d10aa07550d294956cb9d26a7d03b2159ecf1a303d49e358c3ea0ea163eb4a32815be8c08fe12367609b3acd61
7
- data.tar.gz: dadfeaa41cf64ed801f44a18feb29b2a7bd09614400dd7941d1cc67f55cbfe38ef5fb1e924b2d665995768110ed7096a81aaac2aef9c47647d6f52d7ef15a3f8
6
+ metadata.gz: 58d1c365443b98223f2a59f31eab5700ad8023df5924c61157104fb503946a84145d6d8b5d413f0549935644a83de9386dcd5e663dc7caa451ad13d20881d57e
7
+ data.tar.gz: 382c0e5c77ae689d09351969898baba8b5cc8dea3775293ce402fa4f953307141295ad76e8fbe589ebac7be3125a989083eb6e489087c050abb5c9d768518dc9
@@ -1 +1 @@
1
- ruby-2.5.3
1
+ ruby-2.7.1
@@ -4,6 +4,6 @@ services:
4
4
  before_install: gem install bundler
5
5
  before_script: rake empty_dest
6
6
  rvm:
7
- - 2.3.8
8
- - 2.4.5
9
- - 2.5.3
7
+ - 2.5.8
8
+ - 2.6.6
9
+ - 2.7.1
@@ -19,9 +19,9 @@ Gem::Specification.new do |gem|
19
19
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
20
20
  gem.require_paths = ['lib']
21
21
 
22
- gem.add_dependency('activerecord', '~> 5.2')
23
- gem.add_dependency('composite_primary_keys', '~> 11.0')
24
- gem.add_dependency('activesupport', '~> 5.2')
22
+ gem.add_dependency('activerecord', '~> 6.0')
23
+ gem.add_dependency('composite_primary_keys', '~> 12.0')
24
+ gem.add_dependency('activesupport', '~> 6.0')
25
25
  gem.add_dependency('rgeo', '~> 1.0')
26
26
  gem.add_dependency('rgeo-geojson', '~> 2.0')
27
27
  gem.add_dependency('powerbar', '~> 1.0')
@@ -58,8 +58,8 @@ module DataAnon
58
58
  month = @anonymize_month? DataAnon::Utils::RandomInt.generate(1,12) : original_time.month
59
59
  days_in_month = Time.new(year,month,1,1,1,1).end_of_month.day
60
60
  day = @anonymize_day? DataAnon::Utils::RandomInt.generate(1,days_in_month) : original_time.day
61
- hour = @anonymize_hour? DataAnon::Utils::RandomInt.generate(1,24) : original_time.hour
62
- min = @anonymize_min? DataAnon::Utils::RandomInt.generate(1,60) : original_time.min
61
+ hour = @anonymize_hour? DataAnon::Utils::RandomInt.generate(0,23) : original_time.hour
62
+ min = @anonymize_min? DataAnon::Utils::RandomInt.generate(0,59) : original_time.min
63
63
  sec = original_time.sec
64
64
 
65
65
  create_object(year, month, day, hour, min, sec)
@@ -74,4 +74,4 @@ module DataAnon
74
74
  end
75
75
  end
76
76
  end
77
- end
77
+ end
@@ -16,7 +16,7 @@ module DataAnon
16
16
  end
17
17
 
18
18
  def anonymize field
19
- return BigDecimal.new("#{field.value + DataAnon::Utils::RandomFloat.generate(-@delta, +@delta)}")
19
+ return BigDecimal("#{field.value + DataAnon::Utils::RandomFloat.generate(-@delta, +@delta)}")
20
20
  end
21
21
 
22
22
  end
@@ -4,8 +4,8 @@ module DataAnon
4
4
 
5
5
  def self.generate min, max
6
6
  return 0 if (min == 0 && max == 0)
7
- Random.new.rand min...max
7
+ Random.new.rand min..max
8
8
  end
9
9
  end
10
10
  end
11
- end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module DataAnonymization
2
- VERSION = '0.8.4'
2
+ VERSION = '0.8.5'
3
3
  end
@@ -4,7 +4,7 @@ require 'bigdecimal'
4
4
  describe FieldStrategy::RandomBigDecimalDelta do
5
5
 
6
6
  RandomBigDecimalDelta = FieldStrategy::RandomBigDecimalDelta
7
- let(:field) {DataAnon::Core::Field.new('decimal_field',BigDecimal.new("53422342378687687342893.23324"),1,nil)}
7
+ let(:field) {DataAnon::Core::Field.new('decimal_field',BigDecimal("53422342378687687342893.23324"),1,nil)}
8
8
 
9
9
  describe 'anonymized big decimal should not be the same as original value' do
10
10
  let(:anonymized_value) {RandomBigDecimalDelta.new.anonymize(field)}
@@ -22,10 +22,4 @@ describe 'Utils' do
22
22
  conditionals.all.length == 0
23
23
  end
24
24
 
25
- it 'should test the connection to destination database' do
26
- album = DataAnon::Utils::DestinationTable.create 'Album', ['AlbumId']
27
- album.count.should == 0
28
- album.all.length == 0
29
- end
30
-
31
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data-anonymization
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sunit Parekh
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-10-26 00:00:00.000000000 Z
13
+ date: 2020-05-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -18,42 +18,42 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '5.2'
21
+ version: '6.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: '5.2'
28
+ version: '6.0'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: composite_primary_keys
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - "~>"
34
34
  - !ruby/object:Gem::Version
35
- version: '11.0'
35
+ version: '12.0'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: '11.0'
42
+ version: '12.0'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: activesupport
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: '5.2'
49
+ version: '6.0'
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - "~>"
55
55
  - !ruby/object:Gem::Version
56
- version: '5.2'
56
+ version: '6.0'
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: rgeo
59
59
  requirement: !ruby/object:Gem::Requirement
@@ -298,8 +298,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
298
298
  - !ruby/object:Gem::Version
299
299
  version: '0'
300
300
  requirements: []
301
- rubyforge_project:
302
- rubygems_version: 2.7.6
301
+ rubygems_version: 3.1.2
303
302
  signing_key:
304
303
  specification_version: 4
305
304
  summary: Tool to create anonymized production data dump to use for performance and