eco-helpers 2.1.10 → 2.1.12
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/CHANGELOG.md +16 -1
- data/lib/eco/api/session/batch/errors.rb +10 -5
- data/lib/eco/api/usecases/default_cases/set_supervisor_case.rb +3 -9
- 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: 335e1112db6baee9a3ddfa8ebe5bf66d6bd257c91c5c09808182683b07b7f408
|
4
|
+
data.tar.gz: e0b69526d52606752bb27c80f16534a8eb2cd3ae8e334cfe2576d71b37be596f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c07bd1e0009ce543d7f479a2bf5e21eada3b59e8e2a8e79c65b265b97fbd5c2a7a196f7ef6cd8ed8a8a979ea9ac7b59c29f986d16edac25b113369ece6bedcf9
|
7
|
+
data.tar.gz: c8e042cd62c67ad78db3f7cb2771c394142e471ca49b8dcf43351df4fa9b60f01e4f49df956775e0d842ddff7fea7cf6bc8d5fb309ac2f3c002ca06306dec361
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,26 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
-
## [2.1.
|
4
|
+
## [2.1.13] - 2022-11-xx
|
5
5
|
|
6
6
|
### Added
|
7
7
|
### Changed
|
8
8
|
### Fixed
|
9
|
+
- `Eco::API::Session::Batch::Errors#str` remove double up on error message
|
10
|
+
- wrong require
|
11
|
+
|
12
|
+
## [2.1.12] - 2022-11-30
|
13
|
+
|
14
|
+
### Fixed
|
15
|
+
- `Eco::API::Session::Batch::Errors#str` remove double up on error message
|
16
|
+
- wrong require
|
17
|
+
|
18
|
+
## [2.1.11] - 2022-11-30
|
19
|
+
|
20
|
+
### Changed
|
21
|
+
- Bring the `-set-supervisor` native case up to date
|
22
|
+
- `Eco::API::Session::Batch::Errors#errors`
|
23
|
+
- better error catching and description
|
9
24
|
|
10
25
|
## [2.1.10] - 2022-11-30
|
11
26
|
|
@@ -85,11 +85,16 @@ module Eco
|
|
85
85
|
response = status[entry]
|
86
86
|
if body = response.body
|
87
87
|
errs = []
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
88
|
+
case body
|
89
|
+
when Hash
|
90
|
+
if errs = (body["errors"] || body["error"])
|
91
|
+
errs = [errs].flatten(1).compact
|
92
|
+
end
|
93
|
+
if errs.empty? && !response.success?
|
94
|
+
errs = [body["response"]].flatten(1).compact
|
95
|
+
end
|
96
|
+
when String
|
97
|
+
errs = [body]
|
93
98
|
end
|
94
99
|
errs.each do |msg|
|
95
100
|
arr.push(ErrorCache.new(
|
@@ -7,17 +7,11 @@ class Eco::API::UseCases::DefaultCases::SetSupervisorCase < Eco::API::Common::Lo
|
|
7
7
|
update = session.new_job("main", "update", :update, usecase)
|
8
8
|
|
9
9
|
micro.with_each_present(entries, people, options, log_starter: true) do |entry, person|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
person.supervisor_id = supervisor.id unless options.dig(:exclude, :supervisor)
|
14
|
-
else
|
15
|
-
unless !entry.supervisor_id
|
16
|
-
session.logger.warn("Supervisor '#{entry.supervisor_id}' does not exist. Entry: #{entry.to_s(:identify)}")
|
17
|
-
end
|
10
|
+
if entry.supervisor_id?
|
11
|
+
micro.set_supervisor(person, entry.supervisor_id, people, options) do |unknown_id|
|
12
|
+
session.logger.warn("Supervisor '#{entry.supervisor_id}' does not exist. Entry: #{entry.to_s(:identify)}")
|
18
13
|
end
|
19
14
|
end
|
20
15
|
end
|
21
16
|
end
|
22
|
-
|
23
17
|
end
|
data/lib/eco/version.rb
CHANGED