eco-helpers 2.5.6 → 2.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/lib/eco/api/session/config/tagtree.rb +9 -7
- data/lib/eco/api/session/config.rb +4 -0
- 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: 712a817db8970559d9d45923531ff092edc4eed7a6f937a51251ab7510b21e48
|
4
|
+
data.tar.gz: c00d489419212cfcb52de588b5b066c789e558e5d38b508e3946a3ba90d1a774
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32e7c9cf3d1bb894e7402e7ee162cd823db5c79fe9853ac9a5d6856442b8b09334b1515e0fb61a87d301255f070a0567cf8424828b53db5e9b6cb831f0627159
|
7
|
+
data.tar.gz: e9db4bcaf310a3d77967497f05fb9bab8e8e76c2c328ba3c1a33a02d2c8df8cc730cde8f2534145d9d1d5774a88c83b5647151ee7cd0494babf7b031271a1c7f
|
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,19 @@
|
|
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.8] - 2023-08-xx
|
5
5
|
|
6
6
|
### Added
|
7
7
|
### Changed
|
8
8
|
### Fixed
|
9
9
|
|
10
|
+
## [2.5.7] - 2023-08-15
|
11
|
+
|
12
|
+
### Added
|
13
|
+
- `Eco::API::Session::Config#tagtree_id=` allows to define a target structure id
|
14
|
+
- This is for `live` retrieval of tagtree on people sync processes
|
15
|
+
- It only makes sense if graphql credentials are configured
|
16
|
+
|
10
17
|
## [2.5.6] - 2023-08-14
|
11
18
|
|
12
19
|
### 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)
|
data/lib/eco/version.rb
CHANGED