pii_safe_schema 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -1
- data/.rubocop.yml +4 -0
- data/.ruby-version +1 -1
- data/lib/pii_safe_schema/configuration.rb +4 -5
- data/lib/pii_safe_schema/migration_generator.rb +1 -3
- data/lib/pii_safe_schema/version.rb +1 -1
- data/lib/tasks/pii_safe_schema.rake +1 -1
- data/pii_safe_schema.gemspec +2 -0
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ebd5e7d63f153bb4cedccaa5345086238c221520e0a9a65e4874c5cdb5e4b0a
|
4
|
+
data.tar.gz: c788254ae8852acc2dc8a8e1b62fb4463cd4133fdec748499715cbfb4132cd40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ff11da6f69694f15a90b66d4d9ed8a81beb01db60f6ab119120cae2af2019b82026b0721ffb441ef66d199ab794b6d6212ffae25d276f80fb14e8fb8cd68344
|
7
|
+
data.tar.gz: e3f2cb9127b90fc06ffc56c8a109097dc2dd4b67c2e238ebd3afd4336aca218d2e27606f13936becb4f4e84947c24b0b3db20527baeef6cb4647a345d970e820
|
data/.circleci/config.yml
CHANGED
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.7.2
|
@@ -27,11 +27,10 @@ module PiiSafeSchema
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def datadog_client
|
30
|
-
@datadog_client ||=
|
31
|
-
KNOWN_DD_CLIENTS.
|
32
|
-
|
30
|
+
@datadog_client ||=
|
31
|
+
KNOWN_DD_CLIENTS.find do |client|
|
32
|
+
client.safe_constantize if defined?(client)
|
33
33
|
end
|
34
|
-
end
|
35
34
|
end
|
36
35
|
|
37
36
|
def ignore_tables
|
@@ -47,7 +46,7 @@ module PiiSafeSchema
|
|
47
46
|
def validate_ignore(ignore_params)
|
48
47
|
raise_config_error(:ignore) unless ignore_params.is_a?(Hash)
|
49
48
|
|
50
|
-
ignore_params.
|
49
|
+
ignore_params.each_value do |ip|
|
51
50
|
raise_config_error(:ignore) unless valid_column_list?(ip) || ip == :*
|
52
51
|
end
|
53
52
|
true
|
@@ -18,9 +18,7 @@ module PiiSafeSchema
|
|
18
18
|
migration_file = generator.create_migration_file
|
19
19
|
file_lines = File.open(migration_file, 'r').read.split("\n")
|
20
20
|
change_line = file_lines.find_index { |i| /def change/.match(i) }
|
21
|
-
new_contents = file_lines[0..change_line] +
|
22
|
-
generated_lines +
|
23
|
-
file_lines[change_line + 1..-1]
|
21
|
+
new_contents = file_lines[0..change_line] + generated_lines + file_lines[change_line + 1..]
|
24
22
|
|
25
23
|
File.open(migration_file, 'w') do |f|
|
26
24
|
f.write(new_contents.join("\n"))
|
@@ -11,7 +11,7 @@ namespace :pii_safe_schema do
|
|
11
11
|
|
12
12
|
exit(0) # forces rake to stop after this and not assume args are tasks
|
13
13
|
rescue ActiveRecord::StatementInvalid, PiiSafeSchema::InvalidColumnError => e
|
14
|
-
raise e if e.
|
14
|
+
raise e if e.instance_of?(ActiveRecord::StatementInvalid) && e.cause.class != PG::UndefinedTable
|
15
15
|
|
16
16
|
puts <<~HEREDOC
|
17
17
|
Unable to generate PII annotation migration. Either the underlying table or column does not exist:
|
data/pii_safe_schema.gemspec
CHANGED
@@ -10,6 +10,8 @@ Gem::Specification.new do |s|
|
|
10
10
|
|
11
11
|
s.summary = 'Schema migration tool for checking and adding comments on PII columns.'
|
12
12
|
s.homepage = 'https://github.com/wealthsimple/pii_safe_schema'
|
13
|
+
s.license = "MIT"
|
14
|
+
s.required_ruby_version = Gem::Requirement.new(">= 2.6")
|
13
15
|
|
14
16
|
s.files = `git ls-files -z`.split("\x0").reject do |f|
|
15
17
|
f.match(%r{^(test|spec|features)/})
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pii_safe_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexi Garrow
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -200,22 +200,22 @@ dependencies:
|
|
200
200
|
name: rspec
|
201
201
|
requirement: !ruby/object:Gem::Requirement
|
202
202
|
requirements:
|
203
|
-
- - ">="
|
204
|
-
- !ruby/object:Gem::Version
|
205
|
-
version: '3.0'
|
206
203
|
- - "<"
|
207
204
|
- !ruby/object:Gem::Version
|
208
205
|
version: '4'
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '3.0'
|
209
209
|
type: :development
|
210
210
|
prerelease: false
|
211
211
|
version_requirements: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
|
-
- - ">="
|
214
|
-
- !ruby/object:Gem::Version
|
215
|
-
version: '3.0'
|
216
213
|
- - "<"
|
217
214
|
- !ruby/object:Gem::Version
|
218
215
|
version: '4'
|
216
|
+
- - ">="
|
217
|
+
- !ruby/object:Gem::Version
|
218
|
+
version: '3.0'
|
219
219
|
- !ruby/object:Gem::Dependency
|
220
220
|
name: rspec-collection_matchers
|
221
221
|
requirement: !ruby/object:Gem::Requirement
|
@@ -363,7 +363,8 @@ files:
|
|
363
363
|
- lib/tasks/pii_safe_schema.rake
|
364
364
|
- pii_safe_schema.gemspec
|
365
365
|
homepage: https://github.com/wealthsimple/pii_safe_schema
|
366
|
-
licenses:
|
366
|
+
licenses:
|
367
|
+
- MIT
|
367
368
|
metadata: {}
|
368
369
|
post_install_message:
|
369
370
|
rdoc_options: []
|
@@ -373,14 +374,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
373
374
|
requirements:
|
374
375
|
- - ">="
|
375
376
|
- !ruby/object:Gem::Version
|
376
|
-
version: '
|
377
|
+
version: '2.6'
|
377
378
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
378
379
|
requirements:
|
379
380
|
- - ">="
|
380
381
|
- !ruby/object:Gem::Version
|
381
382
|
version: '0'
|
382
383
|
requirements: []
|
383
|
-
rubygems_version: 3.
|
384
|
+
rubygems_version: 3.1.4
|
384
385
|
signing_key:
|
385
386
|
specification_version: 4
|
386
387
|
summary: Schema migration tool for checking and adding comments on PII columns.
|