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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d33eb1cd4401917aba2967a32731807725e9ca49fb5fab72dcb14fe495df8b9a
4
- data.tar.gz: d09c5105e971426b028e20027e65cfe4784d7de919bc2ee774e14951f77e14ca
3
+ metadata.gz: 070b019ccf2ec4c53e6626bd4b8b362b01f23f99b2239202038b3416ab439ce5
4
+ data.tar.gz: 2d9dbb71b78d7316d8725197d67b7047e48f971c320e55481de6bc9a0e7d6679
5
5
  SHA512:
6
- metadata.gz: 2a0d28811d4ea83eab80109fcf2d0f2b3df7405b76cf55fe32820c71bda7a549af7cd31e68dc0e1d86bc1db1634e2378f81e50130fba8fb675810f10eaf2d4b8
7
- data.tar.gz: '0935c0edf46d1404221cee1efa8e0404cdf1574238412448e18ed9532c1c779047d9ace11f02dd91f779d77b27d7511398dd3feae98677ff1e6a95de824b5454'
6
+ metadata.gz: 1ead943a5de565aa4dfd5ec0c6ebeefcbb1c3d37a33a7e37a52b6d0375249a8fbf2765b0bb1c383bc8a7e98db454b6536b1d4a4640f8f014b108af49c1d5f105
7
+ data.tar.gz: 1c03261b62a0cbebff575ec60aeee798f2ad34b87b78b730095cb2e3029683e707d9232bf53083b07e7b5084d4fe738d37644e2cef3814cb60877b131d61ec25
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-3.1.2
1
+ ruby-3.2.1
data/.travis.yml CHANGED
@@ -4,5 +4,7 @@ services:
4
4
  before_install: gem install bundler
5
5
  before_script: rake empty_dest
6
6
  rvm:
7
- - 2.7.5
8
- - 3.1.0
7
+ - 2.7.7
8
+ - 3.0.5
9
+ - 3.1.3
10
+ - 3.2.1
@@ -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.0')
23
- gem.add_dependency('activesupport', '~> 7.0')
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?('clear_all_connections!')
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
 
@@ -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.primary_keys = primary_keys if primary_keys.length > 1
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
@@ -1,3 +1,3 @@
1
1
  module DataAnonymization
2
- VERSION = '0.8.9'
2
+ VERSION = '0.8.10'
3
3
  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.9
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: 2023-03-28 00:00:00.000000000 Z
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.0'
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.0'
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.0'
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.0'
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