acts_as_scrubbable 2.0.0 → 2.1.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 +4 -4
- data/.github/workflows/pr-security.yaml +32 -0
- data/Gemfile +1 -1
- data/acts_as_scrubbable.gemspec +3 -3
- data/lib/acts_as_scrubbable/ar_class_processor.rb +1 -1
- data/lib/acts_as_scrubbable/task_runner.rb +1 -1
- data/lib/acts_as_scrubbable/version.rb +1 -1
- data/spec/lib/acts_as_scrubbable/ar_class_processor_spec.rb +0 -1
- metadata +12 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc8917662cd62adb9270f1d9751326025cc41f56453b042977f0d7601016fce9
|
4
|
+
data.tar.gz: 55631d73472e2003fafea3e98c60fff4839572d5a6e7a84ba098b37c7c878cba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f54a6c9ed8a27968208a63bbd737f331a9458f50fddd538e1d0405dd58dfe4224c03a7da1b3a1829e7edc19b534a67d5ea08f7257d0a37e0fabc2f49caad7cb
|
7
|
+
data.tar.gz: 84decd9137e35a2469213763888d1cc009ad37bddae59c71d250005eebcf176c396eca580ec44f5e1ab513c9e9e890373ad806d0f47771a62cfd98df8bc23c68
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
# onemedical/<repo>/.github/workflows/pr-security.yaml
|
3
|
+
#
|
4
|
+
# This is the workflow for distribution to repositories across the organization.
|
5
|
+
# It will call the reusable PR security workflow, and run scans against each PR.
|
6
|
+
name: PR Security
|
7
|
+
|
8
|
+
|
9
|
+
# yamllint disable-line rule:truthy
|
10
|
+
on:
|
11
|
+
pull_request:
|
12
|
+
branches: [main, master]
|
13
|
+
|
14
|
+
|
15
|
+
permissions:
|
16
|
+
# Required for workflows in private repositories.
|
17
|
+
contents: read
|
18
|
+
|
19
|
+
# Required for SARIF results upload to GHAS.
|
20
|
+
security-events: write
|
21
|
+
actions: read
|
22
|
+
|
23
|
+
|
24
|
+
jobs:
|
25
|
+
# Run the reusable workflow.
|
26
|
+
run-workflow:
|
27
|
+
name: Run Workflow
|
28
|
+
# yamllint disable-line rule:line-length
|
29
|
+
uses: onemedical/github-reusable-workflows/.github/workflows/reusable-pr-security.yaml@main
|
30
|
+
# The detect-secrets tool is used in some repositories, and generates false
|
31
|
+
# positives like the one below. Add comment to ignore.
|
32
|
+
secrets: inherit # pragma: allowlist secret
|
data/Gemfile
CHANGED
data/acts_as_scrubbable.gemspec
CHANGED
@@ -11,13 +11,13 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.summary = %q{Scrubbing data made easy}
|
12
12
|
s.description = %q{ActsAsScrubbable helps you scrub your database the easy way with mock data at the ActiveRecord level}
|
13
13
|
s.license = "MIT"
|
14
|
-
s.required_ruby_version = '
|
14
|
+
s.required_ruby_version = ['>= 2.0', '< 4.0']
|
15
15
|
|
16
16
|
s.add_runtime_dependency 'activesupport' , '>= 6.1', '< 8'
|
17
17
|
s.add_runtime_dependency 'activerecord' , '>= 6.1', '< 8'
|
18
18
|
s.add_runtime_dependency 'railties' , '>= 6.1', '< 8'
|
19
19
|
s.add_runtime_dependency 'faker' , '>= 1.4'
|
20
|
-
s.add_runtime_dependency 'highline' , '>= 1.
|
20
|
+
s.add_runtime_dependency 'highline' , '>= 2.1.0'
|
21
21
|
s.add_runtime_dependency 'term-ansicolor' , '>= 1.3'
|
22
22
|
s.add_runtime_dependency 'parallel' , '>= 1.6'
|
23
23
|
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_development_dependency 'guard-rspec' , '~> 4.6'
|
27
27
|
s.add_development_dependency 'pry-byebug' , '~> 3.2'
|
28
28
|
s.add_development_dependency 'terminal-notifier-guard' , '~> 1.6'
|
29
|
-
s.add_development_dependency 'activerecord-nulldb-adapter', '~> 0
|
29
|
+
s.add_development_dependency 'activerecord-nulldb-adapter', '~> 1.0'
|
30
30
|
|
31
31
|
s.files = `git ls-files`.split("\n")
|
32
32
|
s.test_files = `git ls-files -- spec/*`.split("\n")
|
@@ -28,7 +28,7 @@ module ActsAsScrubbable
|
|
28
28
|
end
|
29
29
|
|
30
30
|
ActsAsScrubbable.logger.info Term::ANSIColor.blue("#{scrubbed_count} #{ar_class} objects scrubbed")
|
31
|
-
ActiveRecord::Base.connection.verify!
|
31
|
+
ActiveRecord::Base.connection.verify! unless ActiveRecord::Base.connection.is_a?(ActiveRecord::ConnectionAdapters::NullDBAdapter)
|
32
32
|
|
33
33
|
ActsAsScrubbable.logger.info Term::ANSIColor.white("Scrub Complete!")
|
34
34
|
end
|
@@ -55,7 +55,7 @@ module ActsAsScrubbable
|
|
55
55
|
Parallel.each(ar_classes) do |ar_class|
|
56
56
|
ActsAsScrubbable::ArClassProcessor.new(ar_class).process(num_of_batches)
|
57
57
|
end
|
58
|
-
ActiveRecord::Base.connection.verify!
|
58
|
+
ActiveRecord::Base.connection.verify! unless ActiveRecord::Base.connection.is_a?(ActiveRecord::ConnectionAdapters::NullDBAdapter)
|
59
59
|
|
60
60
|
after_hooks unless skip_after_hooks
|
61
61
|
end
|
@@ -37,7 +37,6 @@ RSpec.describe ActsAsScrubbable::ArClassProcessor do
|
|
37
37
|
end
|
38
38
|
|
39
39
|
it "calls the expected helper classes with the expected batch size" do
|
40
|
-
expect(ActiveRecord::Base.connection).to receive(:verify!)
|
41
40
|
expect(update_processor_mock).to receive(:scrub_query).with(query)
|
42
41
|
subject.process(num_of_batches)
|
43
42
|
expect(ActsAsScrubbable::ParallelTableScrubber).to have_received(:new).with(ar_class, 256)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_scrubbable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samer Masry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -90,14 +90,14 @@ dependencies:
|
|
90
90
|
requirements:
|
91
91
|
- - ">="
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
93
|
+
version: 2.1.0
|
94
94
|
type: :runtime
|
95
95
|
prerelease: false
|
96
96
|
version_requirements: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
98
|
- - ">="
|
99
99
|
- !ruby/object:Gem::Version
|
100
|
-
version:
|
100
|
+
version: 2.1.0
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
102
|
name: term-ansicolor
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
@@ -202,14 +202,14 @@ dependencies:
|
|
202
202
|
requirements:
|
203
203
|
- - "~>"
|
204
204
|
- !ruby/object:Gem::Version
|
205
|
-
version: '0
|
205
|
+
version: '1.0'
|
206
206
|
type: :development
|
207
207
|
prerelease: false
|
208
208
|
version_requirements: !ruby/object:Gem::Requirement
|
209
209
|
requirements:
|
210
210
|
- - "~>"
|
211
211
|
- !ruby/object:Gem::Version
|
212
|
-
version: '0
|
212
|
+
version: '1.0'
|
213
213
|
description: ActsAsScrubbable helps you scrub your database the easy way with mock
|
214
214
|
data at the ActiveRecord level
|
215
215
|
email:
|
@@ -218,6 +218,7 @@ executables: []
|
|
218
218
|
extensions: []
|
219
219
|
extra_rdoc_files: []
|
220
220
|
files:
|
221
|
+
- ".github/workflows/pr-security.yaml"
|
221
222
|
- ".gitignore"
|
222
223
|
- ".rspec"
|
223
224
|
- ".travis.yml"
|
@@ -255,16 +256,19 @@ require_paths:
|
|
255
256
|
- lib
|
256
257
|
required_ruby_version: !ruby/object:Gem::Requirement
|
257
258
|
requirements:
|
258
|
-
- - "
|
259
|
+
- - ">="
|
259
260
|
- !ruby/object:Gem::Version
|
260
261
|
version: '2.0'
|
262
|
+
- - "<"
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
version: '4.0'
|
261
265
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
262
266
|
requirements:
|
263
267
|
- - ">="
|
264
268
|
- !ruby/object:Gem::Version
|
265
269
|
version: '0'
|
266
270
|
requirements: []
|
267
|
-
rubygems_version: 3.
|
271
|
+
rubygems_version: 3.4.10
|
268
272
|
signing_key:
|
269
273
|
specification_version: 4
|
270
274
|
summary: Scrubbing data made easy
|