data-anonymization 0.8.8 → 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: 54949ef95a4b40b126137fa17705f53e626233d0d01655b8ba9690ee7c8e2717
4
- data.tar.gz: 7fb939be3ff264343c80e8ee6398b52577c93e27ba9f40bfabde4d34284c007a
3
+ metadata.gz: 070b019ccf2ec4c53e6626bd4b8b362b01f23f99b2239202038b3416ab439ce5
4
+ data.tar.gz: 2d9dbb71b78d7316d8725197d67b7047e48f971c320e55481de6bc9a0e7d6679
5
5
  SHA512:
6
- metadata.gz: 641c1a1637477b42100449e4e54c55a90115a3860dfc4557656893db9c7297434f63b6e49adc8f5a6cf8921299a8c026aad5699fedac42273f36608e89b636f3
7
- data.tar.gz: 3ed2e8a122e15558c30488ea0379da85cf124a4b1d1dfbdaa0eedc592dfc73342fad38e0187bda84e87b7d0779dbf1d89216ee563904e0cafe2f3ec05e0ccc21
6
+ metadata.gz: 1ead943a5de565aa4dfd5ec0c6ebeefcbb1c3d37a33a7e37a52b6d0375249a8fbf2765b0bb1c383bc8a7e98db454b6536b1d4a4640f8f014b108af49c1d5f105
7
+ data.tar.gz: 1c03261b62a0cbebff575ec60aeee798f2ad34b87b78b730095cb2e3029683e707d9232bf53083b07e7b5084d4fe738d37644e2cef3814cb60877b131d61ec25
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-3.1.0
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/utils/logging.rb CHANGED
@@ -6,15 +6,15 @@ module DataAnon
6
6
  module Logging
7
7
 
8
8
  def logger
9
- @@logger ||= (self.logger = Logger.new(STDOUT) )
9
+ @@utils_logger ||= (self.logger = Logger.new(STDOUT) )
10
10
  end
11
11
 
12
12
  def logger= logger
13
- @@logger = logger
13
+ @@utils_logger = logger
14
14
  ActiveRecord::Base.logger = logger
15
- @@logger
15
+ @@utils_logger
16
16
  end
17
17
 
18
18
  end
19
19
  end
20
- end
20
+ end
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DataAnonymization
2
- VERSION = '0.8.8'
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.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: 2022-09-08 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