eco-helpers 2.0.67 → 2.0.68

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: f70487179ebb87c5d44b0050fda66b5e87ed8a79d8e75c16cc5e5d9be131ec53
4
- data.tar.gz: be65600c6f6f2f713322bc3dc2588814643fb2815bc026d8a2d2f757c435736e
3
+ metadata.gz: 4252ad8eca24aa081cf86912ec2eb3e8a2417e9221d887700cb1f0572de62e62
4
+ data.tar.gz: ff3b1ebcaf7e3e234a3c0a787a10634050acdbf1af2366d1bd799ebf1eb3316b
5
5
  SHA512:
6
- metadata.gz: c13a4b7998ca745cf3e5d9c44da3fda08ea4109963179887b51b0d1fc1281e3c3213e14734748418a147aa32395a5b2abc0a6229c45d806a290ab06b1eea20da
7
- data.tar.gz: 33b060518fea320eb17c0a2cd6fc8bd528b8a7cfdd1779af643300aac53adb77dcbd200a1f70dad4ea28c51801d6427bf19b9ce7d676fddd8187401a68f266bf
6
+ metadata.gz: 2f8f9ef76245e0ee390b8f9118ace7cf46cb071699d94b8dd56591e0df11314a81ba0e83d688e64e6a53d3cfba510de8be5559a4ed948a13806baa14d69e9d80
7
+ data.tar.gz: e3ed91fb997fe84596ae2775b5841637eaf70173c2c1767290c10fceef0a9b3417c66c2f17ff46459558ca1f21ae81f248a60e0fd977642b9c8d30acb2dcec63
data/CHANGELOG.md CHANGED
@@ -1,7 +1,25 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
- ## [2.0.67] - 2022-08-11
4
+ ## [2.0.69] - 2022-09-xx
5
+
6
+ ### Added
7
+ ### Changed
8
+ ### Fixed
9
+
10
+ ## [2.0.68] - 2022-09-19
11
+
12
+ ### Added
13
+ - `Eco::API::UseCases::OozeSamples::OozeBaseCase`: **added** a couple of functions to support **page creation**: `#new_page` and `#create_page`
14
+
15
+ ### Changed
16
+ - upgraded **dependency** to `ecoportal-api-graphql` **gem**
17
+ - upgraded **dependency** to `ecoportal-api-v2` **gem**
18
+
19
+ ### Fixed
20
+ - `Eco::API::Session::Config::Api`, the `org_id` is **not** a required parameter for `APIv2`
21
+
22
+ ## [2.0.67] - 2022-09-15
5
23
 
6
24
  ### Added
7
25
  - **dependency** to `ecoportal-api-graphql` **gem**
@@ -21,23 +39,14 @@ All notable changes to this project will be documented in this file.
21
39
 
22
40
  ## [2.0.66] - 2022-08-11
23
41
 
24
- ### Added
25
- ### Changed
26
42
  ### Fixed
27
43
  - `Eco::API::UseCases::DefaultCases::Samples::Sftp` manage exception when trying to access remote folder
28
44
 
29
45
  ## [2.0.65] - 2022-08-11
30
46
 
31
- ### Added
32
- ### Changed
33
47
  ### Fixed
34
48
  - Typo of a fix
35
49
 
36
- ## [2.0.64] - 2022-08-11
37
-
38
- ### Changed
39
- - Nothing
40
-
41
50
  ## [2.0.63] - 2022-08-11
42
51
 
43
52
  ### Changed
@@ -50,7 +59,6 @@ All notable changes to this project will be documented in this file.
50
59
  - `Eco::API::Common::Session::Sftp` fetches from config
51
60
  - `Eco::API::Session::Config::Sftp#password`
52
61
 
53
- ### Changed
54
62
  ### Fixed
55
63
  - `Eco::API::UseCases::DefaultCases::CreateCase` had a typo
56
64
 
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.8.31', '< 0.9'
35
- spec.add_dependency 'ecoportal-api-graphql', '>= 0.1.3', '< 0.2'
34
+ spec.add_dependency 'ecoportal-api-v2', '>= 0.8.32', '< 0.9'
35
+ spec.add_dependency 'ecoportal-api-graphql', '>= 0.1.6', '< 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'
@@ -186,9 +186,9 @@ module Eco
186
186
  when :v1
187
187
  external_key && host
188
188
  when :v2
189
- org_id && external_key && user_key
189
+ external_key && user_key && host
190
190
  when :graphql
191
- email && pass && org_id
191
+ email && pass && org_id && host
192
192
  end
193
193
  end
194
194
 
@@ -29,6 +29,23 @@ class Eco::API::UseCases::OozeSamples::OozeBaseCase < Eco::API::Common::Loaders:
29
29
 
30
30
  protected
31
31
 
32
+ def new_page(template_id)
33
+ apiv2.pages.get_new(template_id)
34
+ end
35
+
36
+ def create_page(page = nil, template_id: nil, retrieve: false)
37
+ template_id = template_id.id if template_id.is_a?(Ecoportal::API::V2::Page)
38
+ template_id ||= page.template_id if page.respond_to?(:template_id)
39
+ template_id ||= page["template_id"] if page.is_a?(Hash)
40
+ page = new_page(template_id) unless page || !template_id
41
+ yield(page) if block_given?
42
+ reference = apiv2.pages.create(page, from: template_id)
43
+ ooze_id = reference.page_id
44
+ stage_id = reference.active_stage_id
45
+ return [ooze_id, stage_id] unless retrieve
46
+ ooze(ooze_id, stage_id: stage_id)
47
+ end
48
+
32
49
  def add_field_by_doc(doc, section, after: nil, before: nil, side: :left)
33
50
  unless section.is_a?(Ecoportal::API::V2::Page::Section)
34
51
  raise "You need to specify a section for a new field. Given: #{section.class}"
data/lib/eco/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eco
2
- VERSION = "2.0.67"
2
+ VERSION = "2.0.68"
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.0.67
4
+ version: 2.0.68
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.8.31
139
+ version: 0.8.32
140
140
  - - "<"
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0.9'
@@ -146,7 +146,7 @@ dependencies:
146
146
  requirements:
147
147
  - - ">="
148
148
  - !ruby/object:Gem::Version
149
- version: 0.8.31
149
+ version: 0.8.32
150
150
  - - "<"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0.9'
@@ -156,7 +156,7 @@ dependencies:
156
156
  requirements:
157
157
  - - ">="
158
158
  - !ruby/object:Gem::Version
159
- version: 0.1.3
159
+ version: 0.1.6
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.3
169
+ version: 0.1.6
170
170
  - - "<"
171
171
  - !ruby/object:Gem::Version
172
172
  version: '0.2'