eco-helpers 2.4.7 → 2.4.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: 0ab1e50c5ccc57fd84bd6b21b40a9d455455e3457c89248f7bf60177fe82293a
4
- data.tar.gz: 169a31ded9574a5fd8a135a0cfe3f388fe71c48e87f7f67969e12036ba40ab3f
3
+ metadata.gz: facf3e640f8af36beba49a9da6eb7c72cb70b4a07ef93602ee70898cce31c356
4
+ data.tar.gz: 304bb16fdefd0db6ad63b524a654aed990375a24630565d59cfb6fa4470e94da
5
5
  SHA512:
6
- metadata.gz: 7de4657000ee0181e9c7dcea3536365c5a66fc26d5b25999715129ce4ebed459ba67042de42736b96879b617aba2adc063f92403f0ff063cac13fd5301562191
7
- data.tar.gz: e9518629a51f623b07d795eedad394682b53bc23edf1389cb2185f34519ccaed8cf2c746eba8c8ae0c4e12b41068b7444f2f6f263e3a30cd5ab91aa45be09185
6
+ metadata.gz: 6d4b1882f5c042ceeeee46bfb6e1604204092a108409c882df2f82e125259cd11551ce90e48c40cf5c7cdf50286eda42b624c9cd24d9e1ea13d4a8bb3203d9b2
7
+ data.tar.gz: 91061e3b0d8caafc59fbd77ca726cf84c83d459eb1bad420932ad3482842d57acd1a38a35373a82078638b6c7e41e570a6c7f2adb84a319a38c61509555d2bc9
data/CHANGELOG.md CHANGED
@@ -1,12 +1,17 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
- ## [2.4.8] - 2023-04-xx
4
+ ## [2.4.9] - 2023-04-xx
5
5
 
6
6
  ### Added
7
7
  ### Changed
8
8
  ### Fixed
9
9
 
10
+ ## [2.4.8] - 2023-04-03
11
+
12
+ ### Added
13
+ - `Eco::API::Organization::TagTree#ancestors` returns the ancestor nodes.
14
+
10
15
  ## [2.4.7] - 2023-04-03
11
16
 
12
17
  ### Added
@@ -84,7 +84,7 @@ module Eco
84
84
 
85
85
  # All actual nodes of this tree
86
86
  # @note order is that of the parent to child relationships
87
- # @return [Array[]]
87
+ # @return [Array<TagTree>]
88
88
  def all_nodes(&block)
89
89
  [].tap do |out_nodes|
90
90
  unless top?
@@ -97,6 +97,18 @@ module Eco
97
97
  end
98
98
  end
99
99
 
100
+ # All the acenstor nodes of the current node
101
+ # @note it does not include the current node
102
+ # @return [Array<TagTree>] ancestors sorted from top to bottom.
103
+ def ancestors
104
+ [].tap do |ans|
105
+ unless parent.top?
106
+ ans << parent
107
+ ans.concat(parent.ancestors)
108
+ end
109
+ end
110
+ end
111
+
100
112
  # @return [Array] with the differences
101
113
  def diff(tagtree, differences: {}, level: 0, **options)
102
114
  require 'hashdiff'
@@ -114,8 +126,11 @@ module Eco
114
126
  nodes_json
115
127
  else
116
128
  {
117
- "id" => tag,
118
- "nodes" => nodes_json
129
+ "id" => tag,
130
+ "archived" => archived,
131
+ "archived_token" => archived_token,
132
+ "weight" => weight,
133
+ "nodes" => nodes_json
119
134
  }
120
135
  end
121
136
  end
data/lib/eco/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eco
2
- VERSION = "2.4.7"
2
+ VERSION = "2.4.8"
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.4.7
4
+ version: 2.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Segura