bulk_dependency_eraser 1.2.0 → 1.2.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72b5cd75c6792f0b2ef4b247c2fbc2e492e99aab3549bec64b8de9b9707b9a08
|
4
|
+
data.tar.gz: 8884e4c9b65d4eede425d5d6b6cb8e7ff8e28877a9dc395657498ba44626bad0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edb16fcbfe2079074e2b2a35e2e5516718bb0b58c8fdd4db59d56606fd6c3951e98dd28b715065bc7fdd5b4cf3ad01576a49077b25b04eac2bcfd9d0e3e1d3a1
|
7
|
+
data.tar.gz: 39f2aaa80dee40262d124883c1172f2e46c5ec850c2250ec11f1c76c0c8fbe72d6d8d76467ed35b09b30a255ef170bd4c34b28c6415304ac5864aed42e65f64d
|
@@ -90,6 +90,10 @@ module BulkDependencyEraser
|
|
90
90
|
|
91
91
|
def build
|
92
92
|
begin
|
93
|
+
if opts_c.verbose
|
94
|
+
puts "Starting build for #{@query.is_a?(ActiveRecord::Relation) ? @query.klass.name : @query.name}"
|
95
|
+
end
|
96
|
+
|
93
97
|
deletion_query_parser(@query)
|
94
98
|
|
95
99
|
uniqify_errors!
|
@@ -159,9 +163,9 @@ module BulkDependencyEraser
|
|
159
163
|
|
160
164
|
if opts_c.verbose
|
161
165
|
if association_parent
|
162
|
-
puts "Building #{klass_name}"
|
166
|
+
puts "Building #{association_parent}, association of #{klass_name}"
|
163
167
|
else
|
164
|
-
puts "Building #{
|
168
|
+
puts "Building #{klass_name}"
|
165
169
|
end
|
166
170
|
end
|
167
171
|
|
@@ -185,6 +189,7 @@ module BulkDependencyEraser
|
|
185
189
|
# prevent infinite recursion here.
|
186
190
|
# - Remove any IDs that have been processed before
|
187
191
|
query_ids = query_ids - deletion_list[klass_name]
|
192
|
+
|
188
193
|
# If ids are nil, let's find that error
|
189
194
|
if query_ids.none? #|| query_ids.nil?
|
190
195
|
# quick cleanup, if turns out was an empty class
|
@@ -1,3 +1,6 @@
|
|
1
|
+
require 'active_support'
|
2
|
+
require 'active_support/core_ext/module/delegation'
|
3
|
+
|
1
4
|
module BulkDependencyEraser
|
2
5
|
class Manager < Base
|
3
6
|
DEFAULT_OPTS = {
|
@@ -39,6 +42,8 @@ module BulkDependencyEraser
|
|
39
42
|
puts "Builder execution SUCCESSFUL" if opts_c.verbose
|
40
43
|
end
|
41
44
|
|
45
|
+
@built = true
|
46
|
+
|
42
47
|
return builder_execution
|
43
48
|
end
|
44
49
|
|
@@ -2,4 +2,5 @@ require_relative 'bulk_dependency_eraser/base'
|
|
2
2
|
require_relative 'bulk_dependency_eraser/builder'
|
3
3
|
require_relative 'bulk_dependency_eraser/deleter'
|
4
4
|
require_relative 'bulk_dependency_eraser/nullifier'
|
5
|
-
require_relative 'bulk_dependency_eraser/manager'
|
5
|
+
require_relative 'bulk_dependency_eraser/manager'
|
6
|
+
require_relative 'bulk_dependency_eraser/version'
|