eco-helpers 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eco/api/usecases/default_cases/delete_case.rb +13 -1
- data/lib/eco/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10187cc93517c873279c84000544399e121f4178cb509f5f4c5c42ff3eb80671
|
4
|
+
data.tar.gz: 5fa21a4c226a1f937178ca814f416d9acc9b5c2ef088ff5db9e83721fd026db8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c1a369ddd71f17473dd93c391e8f201831e774cd033573c112fafd7083e67e056e2cff99bfa3c9ea51734eee96943007da439813897507c9e756812ddb9520a
|
7
|
+
data.tar.gz: 78ac39af7a431aecf2cf3b2debf746a6af596024b09be5130c5c9000d0597f22b4bb37c769a51b6798d6fd3cecdb759df8f7df8ee041e9929612fae7f9b9c3f5
|
@@ -7,10 +7,22 @@ module Eco
|
|
7
7
|
def process
|
8
8
|
@cases.define("delete", type: :transform) do |people, session|
|
9
9
|
delete = session.job_group("main").new("delete", type: :delete, sets: [:core, :details, :account])
|
10
|
-
people.
|
10
|
+
people.each_with_index do |person|
|
11
11
|
delete.add(person)
|
12
12
|
end
|
13
13
|
end
|
14
|
+
|
15
|
+
@cases.define("delete", type: :sync) do |entries, people, session|
|
16
|
+
delete = session.job_group("main").new("delete", type: :delete, sets: [:core, :details, :account])
|
17
|
+
strict_search = session.config.people.strict_search? && (!options[:search]&.key?(:strict) || options.dig(:search, :strict))
|
18
|
+
entries.each_with_index do |entry|
|
19
|
+
if person = people.find(entry, strict: strict_search)
|
20
|
+
delete.add(person)
|
21
|
+
else
|
22
|
+
session.logger.error("Entry(#{i}) - this person does not exist: #{entry.to_s(:identify)}")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
14
26
|
end
|
15
27
|
|
16
28
|
end
|
data/lib/eco/version.rb
CHANGED