data-anonymization 0.9.0 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be90abba09603ada2f5797d805f3f5b72104d19b24408aaec98c9eaddb42f3a0
4
- data.tar.gz: a818e50b23c9b462b11b9cbf5f57327fc23a7cb9447f69bf799c5a88c5d9897d
3
+ metadata.gz: 0bb38d30414a03290980e241da1e1939a166442f1537f3e9ab54c3874a8d7645
4
+ data.tar.gz: 4510376be2df5592fb7c8b579b9702e4d0cf4a13e5b79a857236f7b198de5767
5
5
  SHA512:
6
- metadata.gz: 89b4450ffd900a961965186a6085c013172a6ccd57d38eacf1026193a1aa7dec06e1de653fb86e5393a42e4649f935d1724caae4e5443b0fd4b5a17e15f59165
7
- data.tar.gz: a261f4a625f5616ef6b4bd18487323d00329d733deb1f7a0b98c5eda3a6afa140cdc94af8d543384848c2a1083ce673dd68b2d60a0a4305de370539a847d5664
6
+ metadata.gz: bb76db8a62bd65871377c295a87a6830278a046cb201f3bc1281821666d04067dfd84de3f29e05d704ffb642eb2a06a62ea9e3d29becd991ffd2389f2816a9cf
7
+ data.tar.gz: 700d1e46351f0827765a96d70fd3f8b5caba8dfb08f2b2868d50ec7357b23eb2cc033a63e097389ad700892ec00129019588c4fd2bf063f34d816cf54a930e7f
data/README.md CHANGED
@@ -81,10 +81,15 @@ Postgresql database having **composite primary key**
81
81
 
82
82
  ## Changelog
83
83
 
84
+ #### 0.9.2 (Jan 29, 2025)
85
+ 1. Upgraded Thor to 1.4.0+ version
86
+
87
+ #### 0.9.1 (Jan 29, 2025)
88
+ 1. Fixed issue with connection pool
89
+
84
90
  #### 0.9.0 (Dec 24, 2024)
85
91
  1. Upgraded to rails 8.0
86
92
 
87
-
88
93
  #### 0.8.10 (Mar 20, 2024)
89
94
  1. Upgraded to rails 7.1
90
95
 
data/commands.txt CHANGED
@@ -1,8 +1,21 @@
1
1
  rbenv exec bundle update
2
2
  rbenv exec bundle outdated
3
3
 
4
+ # run tests
4
5
  rbenv exec bundle exec rake
5
6
 
7
+ # start mongodb database
8
+ mongod --dbpath ./data
6
9
 
7
10
 
8
- mongod --dbpath ./data
11
+ # git commands
12
+ git pull --rebase
13
+ git add .
14
+ git commit -m "upgraded to ActiveRecord and ActiveSupport 8.0"
15
+ git push
16
+
17
+
18
+ # ruby gemspec commands
19
+ gem build data-anonymization.gemspec
20
+ gem push data-anonymization-0.9.1.gem
21
+
@@ -12,6 +12,7 @@ Gem::Specification.new do |gem|
12
12
  gem.summary = %q{Tool to create anonymized production data dump to use for performance and testing environments.}
13
13
  gem.homepage = 'http://sunitparekh.github.com/data-anonymization'
14
14
  gem.license = 'MIT'
15
+ gem.required_ruby_version = '>= 3.0'
15
16
 
16
17
 
17
18
  gem.files = `git ls-files`.split($/).select { |f| !f.match(/^sample-data/) }
@@ -25,5 +26,5 @@ Gem::Specification.new do |gem|
25
26
  gem.add_dependency('powerbar', '~> 2.0')
26
27
  gem.add_dependency('rgeo', '~> 2.4.0')
27
28
  gem.add_dependency('rgeo-geojson', '~> 2.1.1')
28
- gem.add_dependency('thor', '~> 1.2.1')
29
+ gem.add_dependency('thor', '~> 1.4.0')
29
30
  end
@@ -1,36 +1,31 @@
1
- require 'thor'
2
- require 'active_record'
3
- require 'erb'
1
+ require "thor"
2
+ require "active_record"
3
+ require "erb"
4
4
 
5
5
  module DataAnon
6
6
  module ThorHelpers
7
7
  class RDBMSDSLGenerator
8
-
9
8
  def self.source_root
10
9
  File.dirname(__FILE__)
11
10
  end
12
11
 
13
12
  def generate_whitelist_script(configuration_hash)
14
-
15
13
  @configuration_hash = configuration_hash
16
- @ar_object = ActiveRecord::Base.establish_connection(@configuration_hash)
14
+ connection_pool = ActiveRecord::Base.establish_connection(@configuration_hash)
15
+ @connection = connection_pool.lease_connection
17
16
 
18
- @tables = @ar_object.connection.tables
17
+ @tables = @connection.tables
19
18
 
20
- erb = ERB.new( File.new(RDBMSDSLGenerator.source_root + "/../templates/whitelist_template.erb").read, nil, '-')
19
+ erb = ERB.new(File.new(RDBMSDSLGenerator.source_root + "/../templates/whitelist_template.erb").read, trim_mode: "-")
21
20
 
22
- File.open('rdbms_whitelist_generated.rb', 'w') do |f|
21
+ File.open("rdbms_whitelist_generated.rb", "w") do |f|
23
22
  f.write erb.result(binding)
24
23
  f.close
25
24
  end
26
-
27
25
  rescue => e
28
26
  puts "\e[31mActiverecord was unable to establish a connection to the specified database. Please check the configuration options and try again.\e[0m"
29
27
  puts e.backtrace
30
28
  end
31
-
32
29
  end
33
30
  end
34
31
  end
35
-
36
-
@@ -10,8 +10,8 @@ database 'Template' do
10
10
 
11
11
  <% @tables.each do |table| %>
12
12
  table '<%= table %>' do
13
- primary_key '<%= @ar_object.connection.primary_key("#{table}").nil? ? "<No primary key found. Possible composite key. Please enter the value>" : @ar_object.connection.primary_key("#{table}") %>'
14
- <%- @ar_object.connection.indexes("#{table}").each do |index| -%>
13
+ primary_key '<%= @connection.primary_key("#{table}").nil? ? "<No primary key found. Possible composite key. Please enter the value>" : @connection.primary_key("#{table}") %>'
14
+ <%- @connection.indexes("#{table}").each do |index| -%>
15
15
  whitelist '<%= index.columns.first %>'
16
16
  <%- end -%>
17
17
  end
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DataAnonymization
2
- VERSION = '0.9.0'
2
+ VERSION = '0.9.2'
3
3
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data-anonymization
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sunit Parekh
8
8
  - Anand Agrawal
9
9
  - Satyam Agarwala
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-12-24 00:00:00.000000000 Z
13
+ date: 2025-08-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -102,14 +102,14 @@ dependencies:
102
102
  requirements:
103
103
  - - "~>"
104
104
  - !ruby/object:Gem::Version
105
- version: 1.2.1
105
+ version: 1.4.0
106
106
  type: :runtime
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - "~>"
111
111
  - !ruby/object:Gem::Version
112
- version: 1.2.1
112
+ version: 1.4.0
113
113
  description: Data anonymization tool for RDBMS and MongoDB databases
114
114
  email:
115
115
  - parekh.sunit@gmail.com
@@ -269,7 +269,7 @@ homepage: http://sunitparekh.github.com/data-anonymization
269
269
  licenses:
270
270
  - MIT
271
271
  metadata: {}
272
- post_install_message:
272
+ post_install_message:
273
273
  rdoc_options: []
274
274
  require_paths:
275
275
  - lib
@@ -277,15 +277,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
277
277
  requirements:
278
278
  - - ">="
279
279
  - !ruby/object:Gem::Version
280
- version: '0'
280
+ version: '3.0'
281
281
  required_rubygems_version: !ruby/object:Gem::Requirement
282
282
  requirements:
283
283
  - - ">="
284
284
  - !ruby/object:Gem::Version
285
285
  version: '0'
286
286
  requirements: []
287
- rubygems_version: 3.0.3.1
288
- signing_key:
287
+ rubygems_version: 3.5.22
288
+ signing_key:
289
289
  specification_version: 4
290
290
  summary: Tool to create anonymized production data dump to use for performance and
291
291
  testing environments.