eco-helpers 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -2
- data/eco-helpers.gemspec +2 -2
- data/lib/eco/api/session/config/api.rb +1 -1
- data/lib/eco/api/session/config.rb +18 -0
- data/lib/eco/api/session.rb +5 -0
- data/lib/eco/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65d5ec6baab743f216afd4ca77a4d36f9a43a52e841f0c2ca9ef73f63e3423b1
|
4
|
+
data.tar.gz: 5906de7dd2f2765c6222ac707b42b6b270914b40c964e7ba579966652a418e72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0494e227d268046a78fb6bf2df120506056bf96bf09464816ebc3a2fb2e6907e89729ed9c9ab848d93bfb9b53bdcf7f3c220c60847ffb403e54f663eca4c3c6
|
7
|
+
data.tar.gz: 26b09ee8c9eb63b9cd91772d55f1c52bdc941bff59e83da809d80272978eb8f62d687caf4417404a32d494e2853644b2e3532a151b81f001bc6b9b87f3263067
|
data/CHANGELOG.md
CHANGED
@@ -1,13 +1,28 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
-
## [2.1.
|
4
|
+
## [2.1.3] - 2022-09-xx
|
5
5
|
|
6
6
|
### Added
|
7
7
|
### Changed
|
8
8
|
### Fixed
|
9
9
|
|
10
|
-
## [2.1.
|
10
|
+
## [2.1.2] - 2022-09-29
|
11
|
+
|
12
|
+
### Added
|
13
|
+
- `Ecoportal::API::Session::Config#live_tree` to retrieve the tagtree of the back-end
|
14
|
+
- Requires `graphql` connection parameters
|
15
|
+
- `Ecoportal::API::Session#live_tree` see above
|
16
|
+
|
17
|
+
### Changed
|
18
|
+
- `Ecoportal::API::Session::Config#tagtree` to use `#live_tree` if there isn't a `tagtree.json` file
|
19
|
+
- upgraded **dependency** to `ecoportal-api-graphql` **gem**
|
20
|
+
- upgraded **dependency** to `ecoportal-api-v2` **gem**
|
21
|
+
|
22
|
+
### Fixed
|
23
|
+
- `Ecoportal::API::Session::Config::API#version_available?` **typo**
|
24
|
+
|
25
|
+
## [2.1.1] - 2022-09-26
|
11
26
|
|
12
27
|
### Added
|
13
28
|
- `Eco::API::Session::Config::Api#version_available?` to know if a version is available for use
|
data/eco-helpers.gemspec
CHANGED
@@ -31,8 +31,8 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_development_dependency "redcarpet", ">= 3.5.1", "< 3.6"
|
32
32
|
|
33
33
|
spec.add_dependency 'ecoportal-api', '>= 0.8.5', '< 0.9'
|
34
|
-
spec.add_dependency 'ecoportal-api-v2', '>= 0.9.
|
35
|
-
spec.add_dependency 'ecoportal-api-graphql', '>= 0.1.
|
34
|
+
spec.add_dependency 'ecoportal-api-v2', '>= 0.9.2', '< 0.10'
|
35
|
+
spec.add_dependency 'ecoportal-api-graphql', '>= 0.1.10', '< 0.2'
|
36
36
|
spec.add_dependency 'aws-sdk-s3', '>= 1.83.0', '< 2'
|
37
37
|
spec.add_dependency 'aws-sdk-ses', '>= 1.36.0', '< 2'
|
38
38
|
spec.add_dependency 'dotenv', '>= 2.7.6', '< 2.8'
|
@@ -228,6 +228,7 @@ module Eco
|
|
228
228
|
org["tagtree"] = file
|
229
229
|
end
|
230
230
|
|
231
|
+
# It uses the `tagtree.json` file and in its absence, if `graphql` enabled, the `life_tagtree`
|
231
232
|
# @return [Eco::API::Organization::TagTree]
|
232
233
|
def tagtree(enviro: nil)
|
233
234
|
return @tagtree if instance_variable_defined?(:@tagtree) && @tagtree.enviro == enviro
|
@@ -235,6 +236,23 @@ module Eco
|
|
235
236
|
tree = []
|
236
237
|
tree = file_manager.load_json(tree_file) unless !tree_file
|
237
238
|
@tagtree = Eco::API::Organization::TagTree.new(tree, enviro: enviro)
|
239
|
+
else
|
240
|
+
@tagtree = live_tree(enviro: enviro)
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
# It obtains the first of the live tagtree in the org
|
245
|
+
# @note it requires graphql connection configuration parameters
|
246
|
+
# @return [Eco::API::Organization::TagTree]
|
247
|
+
def live_tree(enviro: nil)
|
248
|
+
return @live_tree if instance_variable_defined?(:@live_tree) && @live_tree.enviro == enviro
|
249
|
+
if apis.active_api.version_available?(:graphql)
|
250
|
+
graphql = apis.api(version: :graphql)
|
251
|
+
if tree = graphql.currentOrganization.tagTrees.to_a.first.treeify
|
252
|
+
@live_tree = Eco::API::Organization::TagTree.new(tree, enviro: enviro)
|
253
|
+
else
|
254
|
+
@live_tree = nil
|
255
|
+
end
|
238
256
|
end
|
239
257
|
end
|
240
258
|
|
data/lib/eco/api/session.rb
CHANGED
data/lib/eco/version.rb
CHANGED
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.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oscar Segura
|
@@ -136,7 +136,7 @@ dependencies:
|
|
136
136
|
requirements:
|
137
137
|
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: 0.9.
|
139
|
+
version: 0.9.2
|
140
140
|
- - "<"
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: '0.10'
|
@@ -146,7 +146,7 @@ dependencies:
|
|
146
146
|
requirements:
|
147
147
|
- - ">="
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version: 0.9.
|
149
|
+
version: 0.9.2
|
150
150
|
- - "<"
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0.10'
|
@@ -156,7 +156,7 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - ">="
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0.1.
|
159
|
+
version: 0.1.10
|
160
160
|
- - "<"
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '0.2'
|
@@ -166,7 +166,7 @@ dependencies:
|
|
166
166
|
requirements:
|
167
167
|
- - ">="
|
168
168
|
- !ruby/object:Gem::Version
|
169
|
-
version: 0.1.
|
169
|
+
version: 0.1.10
|
170
170
|
- - "<"
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: '0.2'
|