eco-helpers 2.0.28 → 2.0.32
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 +20 -4
- data/lib/eco/api/common/loaders/base.rb +1 -1
- data/lib/eco/api/common/people/default_parsers/xls_parser.rb +18 -3
- data/lib/eco/api/session/batch/job.rb +5 -4
- data/lib/eco/api/usecases/ooze_samples/ooze_update_case.rb +2 -2
- 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: 0a1f04caab2cae362249d46b694021287a8904052f3851151b4cb6103e7f8790
|
4
|
+
data.tar.gz: b050e7dd4626f331080cb6dc1437da74a793460bce5426ff3aa5a9b91bba5a53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7eb83d0cd4b318f42e90065f772b0b9aa801afddd39d0f2e6fa9861446fd06d537cc436500f8cc9a2c852ce46d3ea2b00a2d3a7199cdba9bf244a8104aa63bfc
|
7
|
+
data.tar.gz: ef8ab06e274156c0341212b9b72865e0dfe4e55e9c4f0f816b67554739b6fc2a1b15614a973bfae234dbdd03de7b429513ad19edcd9264b0123cb80374dc78b8
|
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,31 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
-
## [2.0.
|
4
|
+
## [2.0.32] - 2021-07-xx
|
5
5
|
|
6
6
|
### Added
|
7
7
|
|
8
8
|
### Changed
|
9
9
|
|
10
|
+
### Fixed
|
11
|
+
- `Eco::API::UseCases::OozeSamples::OozeUpdateCase` prompting user, fixed typo
|
12
|
+
- `Eco::API::Session::Batch::Job`: `include-excluded` again... typo.
|
13
|
+
|
14
|
+
## [2.0.31] - 2021-07-13
|
15
|
+
|
16
|
+
### Fixed
|
17
|
+
- `Eco::API::Session::Batch::Job`: `include-excluded` was triggering a type error.
|
18
|
+
|
19
|
+
## [2.0.30] - 2021-07-08
|
20
|
+
|
21
|
+
### Added
|
22
|
+
* `Eco::API::Common::People::DefaultParsers::XLSParser` uses as default the `fields_map.json` to identify the headers.
|
23
|
+
|
24
|
+
### Fixed
|
25
|
+
* `Eco::API::Common::People::DefaultParsers::XLSParser` should return all `String` values
|
26
|
+
|
27
|
+
## [2.0.29] - 2021-07-08
|
28
|
+
|
10
29
|
### Fixed
|
11
30
|
- `Eco::API::Common::People::PersonEntryAttributeMapper#details_attrs`
|
12
31
|
* What a mess this was doing to the `csv` export :/
|
@@ -75,9 +94,6 @@ All notable changes to this project will be documented in this file.
|
|
75
94
|
* when in `dry-run` it fakes the `id` with a counter
|
76
95
|
- `Eco::API::Common::People::PersonFactory` gets `subordinates` initialized to `0` (when **creating** a `new` person)
|
77
96
|
|
78
|
-
### Fixed
|
79
|
-
|
80
|
-
|
81
97
|
## [2.0.25] - 2021-06-23
|
82
98
|
|
83
99
|
### Added
|
@@ -6,7 +6,12 @@ class Eco::API::Common::People::DefaultParsers::XLSParser < Eco::API::Common::Lo
|
|
6
6
|
|
7
7
|
def parser(file, deps)
|
8
8
|
@file = file
|
9
|
-
rows.tap
|
9
|
+
rows.tap do |rws|
|
10
|
+
@file = nil
|
11
|
+
rws.each do |row|
|
12
|
+
to_string!(row)
|
13
|
+
end
|
14
|
+
end
|
10
15
|
end
|
11
16
|
|
12
17
|
def serializer(array_hash, deps)
|
@@ -15,8 +20,18 @@ class Eco::API::Common::People::DefaultParsers::XLSParser < Eco::API::Common::Lo
|
|
15
20
|
|
16
21
|
private
|
17
22
|
|
23
|
+
def to_string!(row)
|
24
|
+
row.transform_values! do |val|
|
25
|
+
next nil unless val
|
26
|
+
next val if val.is_a?(String)
|
27
|
+
val.to_s
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
|
18
32
|
def headers
|
19
|
-
|
33
|
+
logger.warn("Headers detection is using your fields_map.json file (native behaviour)")
|
34
|
+
session.fields_mapper.list(:external).uniq
|
20
35
|
end
|
21
36
|
|
22
37
|
def sheet_name
|
@@ -34,7 +49,7 @@ class Eco::API::Common::People::DefaultParsers::XLSParser < Eco::API::Common::Lo
|
|
34
49
|
|
35
50
|
def rows(target = headers)
|
36
51
|
begin
|
37
|
-
spreadheet.parse(header_search: target)
|
52
|
+
spreadheet.parse(header_search: target, clean: true)
|
38
53
|
rescue Roo::HeaderRowNotFoundError => e
|
39
54
|
missing = JSON.parse(e.message)
|
40
55
|
logger.warn("The input file is missing these headers: #{missing}")
|
@@ -252,13 +252,14 @@ module Eco
|
|
252
252
|
# - filter out excluded entries from the api update
|
253
253
|
def api_included(full_queue)
|
254
254
|
return full_queue if type == :create
|
255
|
-
return full_queue unless
|
256
|
-
|
257
|
-
|
255
|
+
return full_queue unless excluded_callback = session.config.people.api_excluded
|
256
|
+
excluded = options.dig(:include, :excluded)
|
257
|
+
if excluded.is_a?(Hash) && excluded[:only]
|
258
|
+
full_queue.select {|entry| excluded_callback.call(entry, session, options, self)}
|
258
259
|
elsif options.dig(:include, :excluded)
|
259
260
|
full_queue
|
260
261
|
else
|
261
|
-
full_queue.select {|entry| !
|
262
|
+
full_queue.select {|entry| !excluded_callback.call(entry, session, options, self)}
|
262
263
|
end
|
263
264
|
end
|
264
265
|
|
@@ -45,7 +45,7 @@ class Eco::API::UseCases::OozeSamples::OozeUpdateCase < Eco::API::Common::Loader
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def ooze
|
48
|
-
@ooze ||= apiv2.pages.get(ooze_id).tap do |ooze|
|
48
|
+
@ooze ||= apiv2.pages.get(ooze_id, stage_id: stage_id).tap do |ooze|
|
49
49
|
if ooze
|
50
50
|
new_target(ooze)
|
51
51
|
logger.info("Got #{object_reference(ooze)}")
|
@@ -124,7 +124,7 @@ class Eco::API::UseCases::OozeSamples::OozeUpdateCase < Eco::API::Common::Loader
|
|
124
124
|
end
|
125
125
|
|
126
126
|
def prompt_to_confirm!
|
127
|
-
prompt_user("Do you want to proceed (y/N)?", default: "Y") do |response|
|
127
|
+
micro.prompt_user("Do you want to proceed (y/N)?", default: "Y") do |response|
|
128
128
|
exit(1) unless response.upcase.start_with?("Y")
|
129
129
|
end
|
130
130
|
end
|
data/lib/eco/version.rb
CHANGED