data-anonymization 0.8.3 → 0.8.4

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: dc0216d076506f27de3825ea3afe3fe882589a34ca7ee9bf093299c3d94dbab5
4
- data.tar.gz: 1abba846e6f447480c72ac18d49ffffc7f2ad1ee861a4e43016224ed00690f49
3
+ metadata.gz: 0a3da98d682c6d4c804dd3a02163941374ffef2581961a86c4cd854cc764b557
4
+ data.tar.gz: 9d0ea5dea0878140d7c889ac701f2da31e0932471e7470051ef9f1f0677e3523
5
5
  SHA512:
6
- metadata.gz: 522f6c119710060fa7dacb9056bb6671d890f6057b9abb63bb78d06c3c1defd8de4ec33b8cbb1ec463385260c1a7d8f6722980353c4382fcebca6720db9a7859
7
- data.tar.gz: be0be6df490fac97beaed277eda3c89d9d5b92c72e64bd5cef5e381ea66a58cf1664fe753f9a803953f54457a2f4762b6de4e72ae0756693038e89a9ba7c2abb
6
+ metadata.gz: b929f6b8c62208837b90914318fd5a81ed6f61d10aa07550d294956cb9d26a7d03b2159ecf1a303d49e358c3ea0ea163eb4a32815be8c08fe12367609b3acd61
7
+ data.tar.gz: dadfeaa41cf64ed801f44a18feb29b2a7bd09614400dd7941d1cc67f55cbfe38ef5fb1e924b2d665995768110ed7096a81aaac2aef9c47647d6f52d7ef15a3f8
@@ -25,7 +25,7 @@ module DataAnon
25
25
 
26
26
  def self.create_table database, table_name, primary_keys = []
27
27
  klass_name = table_name.to_s.downcase.capitalize
28
- return database.const_get klass_name if database.const_defined? klass_name
28
+ return database.const_get(klass_name, false) if database.const_defined?(klass_name, false)
29
29
  database.const_set(klass_name, Class.new(database) do
30
30
  self.table_name = table_name
31
31
  self.primary_keys = primary_keys if primary_keys.length > 1
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DataAnonymization
2
- VERSION = '0.8.3'
2
+ VERSION = '0.8.4'
3
3
  end
@@ -16,6 +16,12 @@ describe 'Utils' do
16
16
  album.all.length > 0
17
17
  end
18
18
 
19
+ it 'ignores inherited constants when creating a table with matching name' do
20
+ conditionals = DataAnon::Utils::SourceTable.create 'Conditionals'
21
+ conditionals.count.should == 0
22
+ conditionals.all.length == 0
23
+ end
24
+
19
25
  it 'should test the connection to destination database' do
20
26
  album = DataAnon::Utils::DestinationTable.create 'Album', ['AlbumId']
21
27
  album.count.should == 0
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.3
4
+ version: 0.8.4
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: 2018-11-10 00:00:00.000000000 Z
13
+ date: 2019-10-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord