eco-helpers 2.5.6 → 2.5.8
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: 28c284a7c27d048f79b4f3b08b7c5fabca039fe1c3840809c7b608b024ba666b
|
4
|
+
data.tar.gz: 42218a8878c3b3ffb937c4bc66d0b8227ba8b44771e7047a4bb6bf2fdbcf34e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a7f9160a34384831722dc1552d50dd70fb039df2110f675c9e9083143e59f33263669b532c3f000d3a12d09568f95b9c7933a5e89175b6870595cb6f55c98bb
|
7
|
+
data.tar.gz: 5ba00795fc3cded86e5fe820385355153dfa51ab4ddac0e84a8a00cdd01d1db66ddf238c0ad0debae0ae107f584324f5ca941453ff79b9d1e8f7d52009046b83
|
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,25 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
-
## [2.5.
|
4
|
+
## [2.5.9] - 2023-08-xx
|
5
5
|
|
6
6
|
### Added
|
7
7
|
### Changed
|
8
8
|
### Fixed
|
9
9
|
|
10
|
+
## [2.5.8] - 2023-08-28
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
- `Eco::API::UseCases::OozeSamples::RegisterUpdateCase`
|
14
|
+
- Deafult prompt should be `Yes` on **remote**
|
15
|
+
|
16
|
+
## [2.5.7] - 2023-08-15
|
17
|
+
|
18
|
+
### Added
|
19
|
+
- `Eco::API::Session::Config#tagtree_id=` allows to define a target structure id
|
20
|
+
- This is for `live` retrieval of tagtree on people sync processes
|
21
|
+
- It only makes sense if graphql credentials are configured
|
22
|
+
|
10
23
|
## [2.5.6] - 2023-08-14
|
11
24
|
|
12
25
|
### Changed
|
@@ -6,24 +6,26 @@ module Eco
|
|
6
6
|
class MissingTagtree < StandardError
|
7
7
|
end
|
8
8
|
|
9
|
-
attr_key :file
|
9
|
+
attr_key :file, :structure_id
|
10
10
|
|
11
11
|
# @param include_archived [Boolean] whether or not it should include archived nodes.
|
12
12
|
# @return [Eco::API::Organization::TagTree]
|
13
13
|
def scope_tree(enviro: nil, include_archived: true, raise_on_missing: true)
|
14
14
|
return @tagtree if instance_variable_defined?(:@tagtree) && @tagtree.enviro == enviro
|
15
15
|
|
16
|
-
if tree_file = self.file
|
17
|
-
if (tree = file_manager.load_json(tree_file)) && !tree.empty?
|
18
|
-
@tagtree = Eco::API::Organization::TagTree.new(tree, enviro: enviro)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
16
|
kargs = {
|
23
17
|
enviro: enviro,
|
24
18
|
includeArchivedNodes: include_archived
|
25
19
|
}
|
26
20
|
|
21
|
+
if tree_file = self.file
|
22
|
+
if (tree = file_manager.load_json(tree_file)) && !tree.empty?
|
23
|
+
@tagtree = Eco::API::Organization::TagTree.new(tree, enviro: enviro)
|
24
|
+
end
|
25
|
+
elsif self.structure_id
|
26
|
+
kargs.merge(id: self.structure_id)
|
27
|
+
end
|
28
|
+
|
27
29
|
@tagtree ||= live_tree(**kargs).tap do |tree|
|
28
30
|
unless tree && !tree.empty?
|
29
31
|
msg = "Could not find a local or live locations structure."
|
@@ -234,6 +234,10 @@ module Eco
|
|
234
234
|
tagtree_config.file = file
|
235
235
|
end
|
236
236
|
|
237
|
+
def tagtree_id=(value)
|
238
|
+
tagtree_config.structure_id = value
|
239
|
+
end
|
240
|
+
|
237
241
|
# It uses the `tagtree.json` file and in its absence, if `graphql` enabled, the largest `life_tagtree`
|
238
242
|
# @note it does NOT include archived nodes by default.
|
239
243
|
# - This is for legacy (most usecases don't)
|
@@ -204,7 +204,8 @@ class Eco::API::UseCases::OozeSamples::RegisterUpdateCase < Eco::API::UseCases::
|
|
204
204
|
apiv2.registers.search(register_id, search_options.merge(only_first: true)).tap do |search_results|
|
205
205
|
@total_search_oozes = search_results.total
|
206
206
|
str_results = "Total target entries: #{search_results.total} (out of #{search_results.total_before_filtering})"
|
207
|
-
|
207
|
+
default_answer = if session.config.run_mode_remote? then "Y" else "N" end
|
208
|
+
session.prompt_user("Do you want to proceed (y/N):", explanation: str_results, default: default_answer, timeout: 10) do |res|
|
208
209
|
unless res.upcase.start_with?("Y")
|
209
210
|
puts "..."
|
210
211
|
logger.info "Aborting script..."
|
data/lib/eco/version.rb
CHANGED