data-anonymization 0.8.9 → 0.8.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +4 -2
- data/data-anonymization.gemspec +2 -3
- data/lib/strategy/base.rb +3 -2
- data/lib/utils/database.rb +1 -2
- data/lib/version.rb +1 -1
- metadata +6 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 070b019ccf2ec4c53e6626bd4b8b362b01f23f99b2239202038b3416ab439ce5
|
4
|
+
data.tar.gz: 2d9dbb71b78d7316d8725197d67b7047e48f971c320e55481de6bc9a0e7d6679
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ead943a5de565aa4dfd5ec0c6ebeefcbb1c3d37a33a7e37a52b6d0375249a8fbf2765b0bb1c383bc8a7e98db454b6536b1d4a4640f8f014b108af49c1d5f105
|
7
|
+
data.tar.gz: 1c03261b62a0cbebff575ec60aeee798f2ad34b87b78b730095cb2e3029683e707d9232bf53083b07e7b5084d4fe738d37644e2cef3814cb60877b131d61ec25
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-3.1
|
1
|
+
ruby-3.2.1
|
data/.travis.yml
CHANGED
data/data-anonymization.gemspec
CHANGED
@@ -19,9 +19,8 @@ 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', '~> 7.
|
23
|
-
gem.add_dependency('activesupport', '~> 7.
|
24
|
-
gem.add_dependency('composite_primary_keys', '~> 14.0')
|
22
|
+
gem.add_dependency('activerecord', '~> 7.1')
|
23
|
+
gem.add_dependency('activesupport', '~> 7.1')
|
25
24
|
gem.add_dependency('parallel', '~> 1.21')
|
26
25
|
gem.add_dependency('powerbar', '~> 2.0')
|
27
26
|
gem.add_dependency('rgeo', '~> 2.4.0')
|
data/lib/strategy/base.rb
CHANGED
@@ -95,6 +95,7 @@ module DataAnon
|
|
95
95
|
def process
|
96
96
|
logger.debug "Processing table #{@name} with fields strategies #{@fields}"
|
97
97
|
total = source_table.count
|
98
|
+
|
98
99
|
if total > 0
|
99
100
|
progress = progress_bar.new(@name, total)
|
100
101
|
if @primary_keys.empty? || !@batch_size.present?
|
@@ -106,8 +107,8 @@ module DataAnon
|
|
106
107
|
end
|
107
108
|
progress.close
|
108
109
|
end
|
109
|
-
if source_table.respond_to?(
|
110
|
-
source_table.clear_all_connections!
|
110
|
+
if source_table.respond_to?("connection_handler")
|
111
|
+
source_table.connection_handler.clear_all_connections!
|
111
112
|
end
|
112
113
|
end
|
113
114
|
|
data/lib/utils/database.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'active_record'
|
2
|
-
require 'composite_primary_keys'
|
3
2
|
require 'logger'
|
4
3
|
|
5
4
|
module DataAnon
|
@@ -28,7 +27,7 @@ module DataAnon
|
|
28
27
|
return database.const_get(klass_name, false) if database.const_defined?(klass_name, false)
|
29
28
|
database.const_set(klass_name, Class.new(database) do
|
30
29
|
self.table_name = table_name
|
31
|
-
self.
|
30
|
+
self.primary_key = primary_keys if primary_keys.length > 1
|
32
31
|
self.primary_key = primary_keys[0] if primary_keys.length == 1
|
33
32
|
self.primary_key = nil if primary_keys.length == 0
|
34
33
|
self.inheritance_column = :_type_disabled
|
data/lib/version.rb
CHANGED
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
|
+
version: 0.8.10
|
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:
|
13
|
+
date: 2024-03-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|
@@ -18,42 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '7.
|
21
|
+
version: '7.1'
|
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: '7.
|
28
|
+
version: '7.1'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: activesupport
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: '7.
|
35
|
+
version: '7.1'
|
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: '7.
|
43
|
-
- !ruby/object:Gem::Dependency
|
44
|
-
name: composite_primary_keys
|
45
|
-
requirement: !ruby/object:Gem::Requirement
|
46
|
-
requirements:
|
47
|
-
- - "~>"
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '14.0'
|
50
|
-
type: :runtime
|
51
|
-
prerelease: false
|
52
|
-
version_requirements: !ruby/object:Gem::Requirement
|
53
|
-
requirements:
|
54
|
-
- - "~>"
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: '14.0'
|
42
|
+
version: '7.1'
|
57
43
|
- !ruby/object:Gem::Dependency
|
58
44
|
name: parallel
|
59
45
|
requirement: !ruby/object:Gem::Requirement
|