eco-helpers 2.2.3 → 2.2.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac9d8f190b56ad971ec86e7c51be2d8bce759b7769e11065c7a61e4b26e2c5f2
4
- data.tar.gz: b4a0de11bae2d18e4156e4904a5ca051d070c08e8c3c213749ac83acaa326059
3
+ metadata.gz: '0281c78aabb03180573c1089c8c7fbea48f9efcdc9b26ca44ff7027dff1fade4'
4
+ data.tar.gz: 3c0aed71b46dfa29012ee171492d4ed26a19d7ed3a173ea548f12123a5f52469
5
5
  SHA512:
6
- metadata.gz: 19cfac22cebdb7a601879a9ce3c6a897c424dceeca2e42c65d8632dcdadd7c49fe239daab17926ae6531e87fe03ca962a42cf0bc815c29c8cf24d8cbbd2fbe73
7
- data.tar.gz: 1912c842a4f517f1977024b7337dca4ab648eb77e4d6b30ab5c28fdf1d2381e6e851107d4b1a6693e603133c70b7dd231861ab78d70d0fce5cdcbdc4ed7d6b9c
6
+ metadata.gz: 2f1e8b821ec4d9a62bb4820e0a4c57afd9cf60af897585b474b89063ea0ce260ebb26dd7c9f09d5d3abcac2ab92f53f0bb41d10fff59228006a3c244b2774197
7
+ data.tar.gz: ee33bfe26cb343df58e437dc8fb1bdc48c5117171fff82adb54fa6f864205a3de927eeb41689a118943936e9d8c42d8085d69aea3ad23c84045faa0dc142300d
data/CHANGELOG.md CHANGED
@@ -1,11 +1,27 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
- ## [2.2.3] - 2023-02-xx
4
+ ## [2.2.6] - 2023-03-xx
5
+
6
+ ### Added
7
+ ### Changed
8
+ ### Fixed
9
+
10
+ ## [2.2.5] - 2023-03-07
11
+
12
+ ### Fixed
13
+ - Make it, so it requires to have a locations structure with nodes (raise exception otherwise)
14
+
15
+ ## [2.2.4] - 2023-03-07
16
+
17
+ ### Fixed
18
+ - Logger object when logging from config
19
+
20
+ ## [2.2.3] - 2023-03-07
5
21
 
6
22
  ### Added
7
23
  - Logger info for live tree selected.
8
-
24
+
9
25
  ### Changed
10
26
  - `Eco::API::Common::People::DefaultParsers::PolicyGroupsParser`
11
27
  - Should warn of unknown policy groups
@@ -84,7 +84,7 @@ module Eco
84
84
 
85
85
  # @return [Boolean] `true` if there are tags in the node, `false` otherwise.
86
86
  def empty?
87
- @hash_tags.empty?
87
+ count <= 1
88
88
  end
89
89
 
90
90
  # @return [Integer] the number of locations
@@ -38,10 +38,6 @@ module Eco
38
38
  config.apis
39
39
  end
40
40
 
41
- def logger
42
- config.logger
43
- end
44
-
45
41
  def clone(config:)
46
42
  keys.each_with_object(self.class.new(config: config)) do |key, cnf|
47
43
  begin
@@ -12,7 +12,11 @@ module Eco
12
12
  @tagtree = Eco::API::Organization::TagTree.new(tree, enviro: enviro)
13
13
  end
14
14
  end
15
- @tagtree ||= live_tree(enviro: enviro)
15
+ @tagtree ||= live_tree(enviro: enviro).tap do |tree|
16
+ unless tree && !tree.empty?
17
+ raise "Could not find a locations structure."
18
+ end
19
+ end
16
20
  end
17
21
 
18
22
  # Among all the locations structures it selects the one with more location nodes
@@ -24,9 +28,7 @@ module Eco
24
28
  end.max do |a,b|
25
29
  a.count <=> b.count
26
30
  end.tap do |tree|
27
- if tree
28
- logger.info("Live tree in use: '#{tree.name}'")
29
- end
31
+ session_logger.info("Using LIVE LOCATIONS Structure: '#{tree.name}'") if tree
30
32
  end
31
33
  end
32
34
 
@@ -47,6 +49,16 @@ module Eco
47
49
  end
48
50
  end
49
51
  end
52
+
53
+ private
54
+
55
+ def session
56
+ ASSETS.session
57
+ end
58
+
59
+ def session_logger
60
+ session.logger
61
+ end
50
62
  end
51
63
  end
52
64
  end
data/lib/eco/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eco
2
- VERSION = "2.2.3"
2
+ VERSION = "2.2.5"
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: 2.2.3
4
+ version: 2.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Segura