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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d073b7d0bba9ae161a99451c11c4416c49d8a0693ebbe6110d46e8fd898141c
4
- data.tar.gz: 748e56af552eb2556a8aa6d7770afeac04a15ff8481362efedb6ef431eb8c340
3
+ metadata.gz: 10187cc93517c873279c84000544399e121f4178cb509f5f4c5c42ff3eb80671
4
+ data.tar.gz: 5fa21a4c226a1f937178ca814f416d9acc9b5c2ef088ff5db9e83721fd026db8
5
5
  SHA512:
6
- metadata.gz: 10926532189b83b07bc128e4d96d3b23982f3b85553b8bd1e554a9503bf60b752f30ecf14a8f38f912d5428cd76fd59268b00881e6bda477811da9c07aac8ad7
7
- data.tar.gz: bd33ffa5bf16699087c90a441d74546541e5b33c1cf58e6db5da840f9a4271a15aef5ab826060e891ea4808d700a8c221a61a765cd4ff50c86b85943007f26b6
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.map do |person|
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
@@ -1,3 +1,3 @@
1
1
  module Eco
2
- VERSION = "0.8.1"
2
+ VERSION = "0.8.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eco-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Segura