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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37742fbd9ebda37050c8e0b851cbfaba6a8a6eedc70283e46a393bcdc2baf1c0
4
- data.tar.gz: 285e70b4e2aabf1a089471044c6495f685fa9b187cbc5514a42e7d3eafbd8b4b
3
+ metadata.gz: 1ebd5e7d63f153bb4cedccaa5345086238c221520e0a9a65e4874c5cdb5e4b0a
4
+ data.tar.gz: c788254ae8852acc2dc8a8e1b62fb4463cd4133fdec748499715cbfb4132cd40
5
5
  SHA512:
6
- metadata.gz: 1528541842d2b5af3a78d06ec7711eccb372f317b8f12fc9850435ce4d326dae796ebcbc43c8b2dd355dd24d737eb60c3d4a8d86a098a5d1a784bb06168e9dc6
7
- data.tar.gz: cb2af9ed4ac8019c201394ad2e3a4ec5263ce56ca2c1a631b980c8f4252eb4ce2928f003544bdbb1136cf92dfecf6a9b08e9109c3d1958db23e4aa9dd3f96e60
6
+ metadata.gz: 3ff11da6f69694f15a90b66d4d9ed8a81beb01db60f6ab119120cae2af2019b82026b0721ffb441ef66d199ab794b6d6212ffae25d276f80fb14e8fb8cd68344
7
+ data.tar.gz: e3f2cb9127b90fc06ffc56c8a109097dc2dd4b67c2e238ebd3afd4336aca218d2e27606f13936becb4f4e84947c24b0b3db20527baeef6cb4647a345d970e820
data/.circleci/config.yml CHANGED
@@ -3,7 +3,7 @@ version: 2
3
3
  defaults: &defaults
4
4
  working_directory: /home/circleci/wealthsimple
5
5
  docker:
6
- - image: circleci/ruby:2.6.5
6
+ - image: circleci/ruby:2.7.2
7
7
  - image: circleci/postgres:9.5.9-alpine
8
8
  environment:
9
9
  POSTGRES_USER: circleci
data/.rubocop.yml CHANGED
@@ -1,3 +1,7 @@
1
+ ---
1
2
  inherit_gem:
2
3
  ws-style:
3
4
  - default.yml
5
+
6
+ AllCops:
7
+ TargetRubyVersion: 2.6
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.5
1
+ 2.7.2
@@ -27,11 +27,10 @@ module PiiSafeSchema
27
27
  end
28
28
 
29
29
  def datadog_client
30
- @datadog_client ||= begin
31
- KNOWN_DD_CLIENTS.each do |client|
32
- return client.safe_constantize if defined?(client)
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.values.each do |ip|
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"))
@@ -1,3 +1,3 @@
1
1
  module PiiSafeSchema
2
- VERSION = '1.3.1'.freeze
2
+ VERSION = '1.3.2'.freeze
3
3
  end
@@ -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.class == ActiveRecord::StatementInvalid && e.cause.class != PG::UndefinedTable
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:
@@ -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.1
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: 2019-11-08 00:00:00.000000000 Z
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: '0'
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.0.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.