wipe_out 1.0.0 → 1.1.0

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: eafa15a844d625664e5cd81d01e921514a84f34a2d488efedd950a5fadc77adb
4
- data.tar.gz: 92ebfff20053d46b9e2629e1c00dc3097073874083bc0d46bb077e43d1418346
3
+ metadata.gz: 32c0bc26bc8745f5906603943f5146dc93f153c0cd97136f32e320ae9dc627e3
4
+ data.tar.gz: d6649b38a1f956338a52f1097d23687f58fd919e6fb3cd258424b96f3362edb1
5
5
  SHA512:
6
- metadata.gz: 2177346bc816df8cd6a270abd66e8c660db21297e4fead9500c912792f2bb4f76fd12666ae7029091b4a3c71a430974087992d9615c155d6811f6165e03b3b27
7
- data.tar.gz: dc02b071110c0c5963f44a132de42def2ee24e317b4623eb0106eee64739160c93e1350065083b023e5e5ab3a7812819febc864ca07474eb00206de0fbc36448
6
+ metadata.gz: 89fa6d945114add77ce22a7d015bb563b26ebbb88ef9c9b2505747dbc8b1504c7269aedf6f998f190c78b50d629ecbadc478c861bb2ad95fd940acb40ebad11f
7
+ data.tar.gz: edb8c0b49f2b7266a3d9ed8439dca0f07b99de1dd53b8b197f39d5a1d6d7cf4bc2b9eb2d06da00608851fa474a0f364c5e15d478b6537c77c79e04c0b29c4e1a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.1.0
4
+
5
+ * Update `attr_extras` dependency to allow versions 7.x
6
+ * Update `zeitwerk` dependency to allow all 2.x versions
7
+
8
+ ## v1.0.1
9
+
10
+ Fix issue with callbacks being executed multiple times in child plans
11
+
3
12
  ## v1.0.0
4
13
 
5
14
  Initial release, see docs:
data/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # WipeOut
2
2
 
3
- Library for removing and clearing data in Rails ActiveRecord models.
3
+ [![Gem Version](https://badge.fury.io/rb/wipe_out.svg)](https://rubygems.org/gems/wipe_out)
4
+
5
+ ![Library for removing and clearing data in Rails ActiveRecord models](https://www.globalapptesting.com/hs-fs/hubfs/blog_post_title_image_1-14.jpeg?width=1985&name=blog_post_title_image_1-14.jpeg)
6
+
7
+ Release blog post, [ActiveRecord models: How to remove data in GDPR compliant way](https://www.globalapptesting.com/engineering/activerecord-models-how-to-remove-data-in-gdpr-compliant-way)
4
8
 
5
9
  ## Installation
6
10
 
data/catalog-info.yaml ADDED
@@ -0,0 +1,18 @@
1
+ apiVersion: backstage.io/v1alpha1
2
+ kind: Component
3
+ metadata:
4
+ name: wipe-out
5
+ description: |-
6
+ Library for removing and clearing data in Rails ActiveRecord models.
7
+ links:
8
+ - url: https://github.com/GlobalAppTesting/wipe_out
9
+ title: Repository
10
+ icon: dashboard
11
+ annotations:
12
+ backstage.io/techdocs-ref: "."
13
+ gitlab.com/project-slug: "global-app-testing/apps/wipe_out"
14
+ github.com/project-slug: "GlobalAppTesting/wipe_out"
15
+ spec:
16
+ type: library
17
+ lifecycle: production
18
+ owner: team-platform
data/docs/index.md ADDED
@@ -0,0 +1 @@
1
+ ../README.md
@@ -26,7 +26,6 @@ module WipeOut
26
26
  end
27
27
 
28
28
  def subexecution(sub_plan, record)
29
- plan.callbacks.each { |callback| sub_plan.add_callback(callback) }
30
29
  self.class.new(sub_plan, record, config)
31
30
  end
32
31
  end
@@ -66,12 +66,17 @@ module WipeOut
66
66
  # @return [nil]
67
67
  def relation(name, plan = nil, plans: nil, &block)
68
68
  if plans
69
+ plans.each do |build_plan|
70
+ forward_callbacks(@plan, build_plan.plan)
71
+ end
72
+
69
73
  @plan.add_relation_union(name, plans.map(&:plan), &block)
70
74
  else
71
75
  plan ||= Plan.new(@plan.config)
72
76
  plan = plan.plan if plan.is_a?(BuiltPlan)
73
77
  dsl = Dsl.new(plan)
74
78
  dsl.instance_exec(&block) if block.present?
79
+ forward_callbacks(@plan, plan)
75
80
 
76
81
  @plan.add_relation(name, dsl.plan)
77
82
  end
@@ -112,6 +117,11 @@ module WipeOut
112
117
  def add_callback(callback)
113
118
  plan.add_callback(callback)
114
119
  end
120
+
121
+ # @!visibility private
122
+ def forward_callbacks(source_plan, destination_plan)
123
+ source_plan.callbacks.each { |callback| destination_plan.add_callback(callback) }
124
+ end
115
125
  end
116
126
  end
117
127
  end
@@ -1,3 +1,3 @@
1
1
  module WipeOut
2
- VERSION = "1.0.0".freeze
2
+ VERSION = "1.1.0".freeze
3
3
  end
data/mkdocs.yaml ADDED
@@ -0,0 +1,11 @@
1
+ site_name: wipe-out
2
+ site_description: Library for removing and clearing data in Rails ActiveRecord models.
3
+
4
+ nav:
5
+ - Introduction: index.md
6
+ - 'Getting started': getting_started.md
7
+ - Development: development.md
8
+ - Releasing: releasing.md
9
+
10
+ plugins:
11
+ - techdocs-core
data/wipe_out.gemspec CHANGED
@@ -30,8 +30,8 @@ Gem::Specification.new do |s|
30
30
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
31
31
  end
32
32
 
33
- s.add_dependency("attr_extras", "~> 6.2")
34
- s.add_dependency("zeitwerk", "~> 2.4.2")
33
+ s.add_dependency("attr_extras", ">= 6.0", "< 8.0")
34
+ s.add_dependency("zeitwerk", ">= 2.4")
35
35
 
36
36
  s.add_development_dependency("combustion", "~> 1.3")
37
37
  s.add_development_dependency("factory_bot", "~> 6.2")
@@ -40,7 +40,7 @@ Gem::Specification.new do |s|
40
40
  s.add_development_dependency("rspec", "~> 3.10")
41
41
  s.add_development_dependency("simplecov", "~> 0.21.1")
42
42
  s.add_development_dependency("sqlite3", "~> 1.4.2")
43
- s.add_development_dependency("standard", "~> 1.1.4")
43
+ s.add_development_dependency("standard", "~> 1.24.0")
44
44
  s.add_development_dependency("super_diff", "~> 0.6.2")
45
45
  s.add_development_dependency("webrick")
46
46
  s.add_development_dependency("yard", "~> 0.9")
metadata CHANGED
@@ -1,44 +1,50 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wipe_out
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michał Foryś
8
8
  - Piotr Król
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-08-12 00:00:00.000000000 Z
12
+ date: 2023-02-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: attr_extras
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '6.2'
20
+ version: '6.0'
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '8.0'
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
- - - "~>"
28
+ - - ">="
26
29
  - !ruby/object:Gem::Version
27
- version: '6.2'
30
+ version: '6.0'
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '8.0'
28
34
  - !ruby/object:Gem::Dependency
29
35
  name: zeitwerk
30
36
  requirement: !ruby/object:Gem::Requirement
31
37
  requirements:
32
- - - "~>"
38
+ - - ">="
33
39
  - !ruby/object:Gem::Version
34
- version: 2.4.2
40
+ version: '2.4'
35
41
  type: :runtime
36
42
  prerelease: false
37
43
  version_requirements: !ruby/object:Gem::Requirement
38
44
  requirements:
39
- - - "~>"
45
+ - - ">="
40
46
  - !ruby/object:Gem::Version
41
- version: 2.4.2
47
+ version: '2.4'
42
48
  - !ruby/object:Gem::Dependency
43
49
  name: combustion
44
50
  requirement: !ruby/object:Gem::Requirement
@@ -143,14 +149,14 @@ dependencies:
143
149
  requirements:
144
150
  - - "~>"
145
151
  - !ruby/object:Gem::Version
146
- version: 1.1.4
152
+ version: 1.24.0
147
153
  type: :development
148
154
  prerelease: false
149
155
  version_requirements: !ruby/object:Gem::Requirement
150
156
  requirements:
151
157
  - - "~>"
152
158
  - !ruby/object:Gem::Version
153
- version: 1.1.4
159
+ version: 1.24.0
154
160
  - !ruby/object:Gem::Dependency
155
161
  name: super_diff
156
162
  requirement: !ruby/object:Gem::Requirement
@@ -217,8 +223,10 @@ files:
217
223
  - bin/yard
218
224
  - bin/yardoc
219
225
  - bin/yri
226
+ - catalog-info.yaml
220
227
  - docs/development.md
221
228
  - docs/getting_started.md
229
+ - docs/index.md
222
230
  - docs/releasing.md
223
231
  - docs/yard_plugin.rb
224
232
  - lib/wipe_out.rb
@@ -243,6 +251,7 @@ files:
243
251
  - lib/wipe_out/validators/defined_relations.rb
244
252
  - lib/wipe_out/validators/relations_plans.rb
245
253
  - lib/wipe_out/version.rb
254
+ - mkdocs.yaml
246
255
  - wipe_out.gemspec
247
256
  homepage: https://github.com/GlobalAppTesting/wipe_out
248
257
  licenses:
@@ -252,7 +261,7 @@ metadata:
252
261
  changelog_uri: https://github.com/GlobalAppTesting/wipe_out/blob/main/CHANGELOG.md
253
262
  source_code_uri: https://github.com/GlobalAppTesting/wipe_out
254
263
  bug_tracker_uri: https://github.com/GlobalAppTesting/wipe_out/issues
255
- post_install_message:
264
+ post_install_message:
256
265
  rdoc_options: []
257
266
  require_paths:
258
267
  - lib
@@ -267,8 +276,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
267
276
  - !ruby/object:Gem::Version
268
277
  version: '0'
269
278
  requirements: []
270
- rubygems_version: 3.2.15
271
- signing_key:
279
+ rubygems_version: 3.3.3
280
+ signing_key:
272
281
  specification_version: 4
273
282
  summary: Library for removing and clearing data in Rails ActiveRecord models.
274
283
  test_files: []