data-anonymization 0.7.4 → 0.8.0.rc1

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
  SHA1:
3
- metadata.gz: 066880fbf97030bf79f2365fa16cf2a64488861e
4
- data.tar.gz: fb799b830d294413448e8bd3026fb23a8aff8519
3
+ metadata.gz: 0787fa76c8069f100ca463d72aaf2a820b1c62b3
4
+ data.tar.gz: 301d9be5c42b28e116726aa9c93b62372a71f34a
5
5
  SHA512:
6
- metadata.gz: 3836066283d02a2be8886e97879f2de7d79f7c5d94b073cf021d7ff67d64ad11d655c17f268469053114e0be6226bb1e11f27f0243207dd400d0a096eac149e9
7
- data.tar.gz: 4e4a9847744419a73aea031c77d5e74f495b8dab9015b818e07abb65a5eeb7cd27e31f067e13ac404526199103a43bf056c438053e2b4bd1f5506a99be5d1add
6
+ metadata.gz: 148dee779404e0c8218c31cb16633846e66b925b41c8fe525402dfde7cd06d4e3838a44ca6d11fee23dc901f9def3f37b528d64e006588e25aa0415af0698371
7
+ data.tar.gz: 01f3d96dbdb697d0002859ae318f1a54e9dfd648866b6505fb798d73e15fb383dafda5e1915463a5827756422612426ebb456e5accb63e17059d78c41de1a7bb
@@ -4,6 +4,5 @@ services:
4
4
  before_install: gem install bundler -v 1.12.5
5
5
  before_script: rake empty_dest
6
6
  rvm:
7
- - 2.1.10
8
7
  - 2.2.5
9
8
  - 2.3.1
data/README.md CHANGED
@@ -70,6 +70,9 @@ Postgresql database having **composite primary key**
70
70
 
71
71
  ## Changelog
72
72
 
73
+ #### 0.8.0.rc1 (Sep 5, 2016)
74
+ 1. Upgraded to rails 5.0, please report any issue or use case not working.
75
+
73
76
  #### 0.7.3 (Feb 5, 2016)
74
77
  1. Fixed issue with batchsize. Thanks to [Jan Raasch](https://github.com/janraasch) for sending pull request.
75
78
 
@@ -19,13 +19,12 @@ 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', '~> 4.2')
23
- gem.add_dependency('protected_attributes', '~> 1.0')
24
- gem.add_dependency('composite_primary_keys', '~> 8.0')
25
- gem.add_dependency('activesupport', '~> 4.2')
26
- gem.add_dependency('rgeo', '~> 0.3')
27
- gem.add_dependency('rgeo-geojson', '~> 0.3')
22
+ gem.add_dependency('activerecord', '~> 5.0')
23
+ gem.add_dependency('composite_primary_keys', '~> 9.0')
24
+ gem.add_dependency('activesupport', '~> 5.0')
25
+ gem.add_dependency('rgeo', '~> 0.5')
26
+ gem.add_dependency('rgeo-geojson', '~> 0.4')
28
27
  gem.add_dependency('powerbar', '~> 1.0')
29
- gem.add_dependency('parallel', '~> 1.0')
28
+ gem.add_dependency('parallel', '~> 1.9')
30
29
  gem.add_dependency('thor', '~> 0.19')
31
30
  end
@@ -100,9 +100,6 @@ module DataAnon
100
100
  end
101
101
  progress.close
102
102
  end
103
- if source_table.respond_to?('clear_all_connections!')
104
- source_table.clear_all_connections!
105
- end
106
103
  end
107
104
 
108
105
  def process_table progress
@@ -6,7 +6,7 @@ module DataAnon
6
6
  #
7
7
  # !!!ruby
8
8
  # # values are collected using `select distinct state from customers` query connecting to specified database in connection_spec
9
- # anonymize('State').using FieldStrategy::SelectFromDatabase.new('customers','state', connection_spec)
9
+ # anonymize('state').using FieldStrategy::SelectFromDatabase.new('customers','state', connection_spec)
10
10
 
11
11
  class SelectFromDatabase < SelectFromFile
12
12
  include Utils::Logging
@@ -15,7 +15,7 @@ module DataAnon
15
15
  dest_record_map[field_name] = field_strategy.anonymize(field)
16
16
  end
17
17
  end
18
- dest_record = dest_table.new dest_record_map, without_protection: true
18
+ dest_record = dest_table.new dest_record_map
19
19
  @primary_keys.each do |key|
20
20
  dest_record[key] = record[key]
21
21
  end
@@ -1,16 +1,10 @@
1
1
  require 'active_record'
2
- require 'protected_attributes'
3
2
  require 'composite_primary_keys'
4
3
  require 'logger'
5
4
 
6
5
  module DataAnon
7
6
  module Utils
8
7
 
9
- class MassAssignmentIgnoreSanitizer < ActiveModel::MassAssignmentSecurity::Sanitizer
10
- def process_removed_attributes(klass, attrs)
11
- end
12
- end
13
-
14
8
  class TempDatabase < ActiveRecord::Base
15
9
  self.abstract_class = true
16
10
  end
@@ -38,7 +32,6 @@ module DataAnon
38
32
  self.primary_key = primary_keys[0] if primary_keys.length == 1
39
33
  self.primary_key = nil if primary_keys.length == 0
40
34
  self.inheritance_column = :_type_disabled
41
- self.mass_assignment_sanitizer = MassAssignmentIgnoreSanitizer.new
42
35
  end
43
36
  )
44
37
  end
@@ -1,3 +1,3 @@
1
1
  module DataAnonymization
2
- VERSION = '0.7.4'
2
+ VERSION = '0.8.0.rc1'
3
3
  end
@@ -1,8 +1,6 @@
1
- require 'protected_attributes'
2
-
3
1
  class CustomerSample
4
2
 
5
- class CreateCustomer < ActiveRecord::Migration
3
+ class CreateCustomer < ActiveRecord::Migration[5.0]
6
4
  def up
7
5
  create_table :customers, { :id => false, :force => true } do |t|
8
6
  t.integer :cust_id, :primary => true
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.7.4
4
+ version: 0.8.0.rc1
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: 2016-10-29 00:00:00.000000000 Z
13
+ date: 2016-09-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -18,84 +18,70 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '4.2'
21
+ version: '5.0'
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: '4.2'
29
- - !ruby/object:Gem::Dependency
30
- name: protected_attributes
31
- requirement: !ruby/object:Gem::Requirement
32
- requirements:
33
- - - "~>"
34
- - !ruby/object:Gem::Version
35
- version: '1.0'
36
- type: :runtime
37
- prerelease: false
38
- version_requirements: !ruby/object:Gem::Requirement
39
- requirements:
40
- - - "~>"
41
- - !ruby/object:Gem::Version
42
- version: '1.0'
28
+ version: '5.0'
43
29
  - !ruby/object:Gem::Dependency
44
30
  name: composite_primary_keys
45
31
  requirement: !ruby/object:Gem::Requirement
46
32
  requirements:
47
33
  - - "~>"
48
34
  - !ruby/object:Gem::Version
49
- version: '8.0'
35
+ version: '9.0'
50
36
  type: :runtime
51
37
  prerelease: false
52
38
  version_requirements: !ruby/object:Gem::Requirement
53
39
  requirements:
54
40
  - - "~>"
55
41
  - !ruby/object:Gem::Version
56
- version: '8.0'
42
+ version: '9.0'
57
43
  - !ruby/object:Gem::Dependency
58
44
  name: activesupport
59
45
  requirement: !ruby/object:Gem::Requirement
60
46
  requirements:
61
47
  - - "~>"
62
48
  - !ruby/object:Gem::Version
63
- version: '4.2'
49
+ version: '5.0'
64
50
  type: :runtime
65
51
  prerelease: false
66
52
  version_requirements: !ruby/object:Gem::Requirement
67
53
  requirements:
68
54
  - - "~>"
69
55
  - !ruby/object:Gem::Version
70
- version: '4.2'
56
+ version: '5.0'
71
57
  - !ruby/object:Gem::Dependency
72
58
  name: rgeo
73
59
  requirement: !ruby/object:Gem::Requirement
74
60
  requirements:
75
61
  - - "~>"
76
62
  - !ruby/object:Gem::Version
77
- version: '0.3'
63
+ version: '0.5'
78
64
  type: :runtime
79
65
  prerelease: false
80
66
  version_requirements: !ruby/object:Gem::Requirement
81
67
  requirements:
82
68
  - - "~>"
83
69
  - !ruby/object:Gem::Version
84
- version: '0.3'
70
+ version: '0.5'
85
71
  - !ruby/object:Gem::Dependency
86
72
  name: rgeo-geojson
87
73
  requirement: !ruby/object:Gem::Requirement
88
74
  requirements:
89
75
  - - "~>"
90
76
  - !ruby/object:Gem::Version
91
- version: '0.3'
77
+ version: '0.4'
92
78
  type: :runtime
93
79
  prerelease: false
94
80
  version_requirements: !ruby/object:Gem::Requirement
95
81
  requirements:
96
82
  - - "~>"
97
83
  - !ruby/object:Gem::Version
98
- version: '0.3'
84
+ version: '0.4'
99
85
  - !ruby/object:Gem::Dependency
100
86
  name: powerbar
101
87
  requirement: !ruby/object:Gem::Requirement
@@ -116,14 +102,14 @@ dependencies:
116
102
  requirements:
117
103
  - - "~>"
118
104
  - !ruby/object:Gem::Version
119
- version: '1.0'
105
+ version: '1.9'
120
106
  type: :runtime
121
107
  prerelease: false
122
108
  version_requirements: !ruby/object:Gem::Requirement
123
109
  requirements:
124
110
  - - "~>"
125
111
  - !ruby/object:Gem::Version
126
- version: '1.0'
112
+ version: '1.9'
127
113
  - !ruby/object:Gem::Dependency
128
114
  name: thor
129
115
  requirement: !ruby/object:Gem::Requirement
@@ -306,9 +292,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
306
292
  version: '0'
307
293
  required_rubygems_version: !ruby/object:Gem::Requirement
308
294
  requirements:
309
- - - ">="
295
+ - - ">"
310
296
  - !ruby/object:Gem::Version
311
- version: '0'
297
+ version: 1.3.1
312
298
  requirements: []
313
299
  rubyforge_project:
314
300
  rubygems_version: 2.5.1