eco-helpers 2.0.39 → 2.0.40

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: 84c964d986dd27f75c533dfcca194ca69354eeda318fe751f40db3f1276c4d69
4
- data.tar.gz: 958a277abf32af125c768b17e5b6bf0791c6136658ebb1e0183f973b4b4b4839
3
+ metadata.gz: 48ff2a20387ce7665b56aebc5b9c4746088c4bdcbe1eb47cf97dd8464e8cea07
4
+ data.tar.gz: 2a63611643f60bd63f84e273a6fab267685b46dead2e01060e71f37a05398e22
5
5
  SHA512:
6
- metadata.gz: c704901e864a071f11b62a8e2ec4916f3cfb63fc6ebd87a92391339dfb559afe1e1f062c0234e2ffaa9a754a99eec978969447cdb19bbe49aa629aac040d7d80
7
- data.tar.gz: 98348a3777cb58849a007b3e4487db3f270190c595c6dc8384e2b28a838f203332fe746a2429adb69cc32b3af62fb6048376e3606587a9ea9df548708321251a
6
+ metadata.gz: e421231ced6f863fd0f849f229ebba0ca242b666304613dce7d2084a891ac304de9e9002fb7a97212948a002cfe959351ce25752707daa74f63163b684f8332a
7
+ data.tar.gz: b4273a6a9e9de5fddc0bcd117ec0a467bcd57d3b904286f3130c36e6226b930e9b38bf6839867a09d79b0c284af17087b4bf0ea38b0edc69e024c64884097941
data/CHANGELOG.md CHANGED
@@ -1,9 +1,16 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
- ## [2.0.39] - 2021-09-07
4
+ ## [2.0.40] - 2021-09-xx
5
5
 
6
6
  ### Added
7
+ - Unique access point for `validation` via core case `Eco::API::UseCases::OozeSamples::OozeBaseCase#update_ooze`
8
+
9
+ ### Changed
10
+ ### Fixed
11
+
12
+ ## [2.0.39] - 2021-09-28
13
+
7
14
  ### Changed
8
15
  - `Eco::API::UseCases::OozeSamples::OozeBaseCase`
9
16
  - Moved helpers from `Eco::API::UseCases::OozeSamples::OozeUpdateCase`
data/eco-helpers.gemspec CHANGED
@@ -31,7 +31,7 @@ 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.3', '< 0.9'
34
- spec.add_dependency 'ecoportal-api-v2', '>= 0.8.14', '< 0.9'
34
+ spec.add_dependency 'ecoportal-api-v2', '>= 0.8.19', '< 0.9'
35
35
  spec.add_dependency 'aws-sdk-s3', '>= 1.83.0', '< 2'
36
36
  spec.add_dependency 'aws-sdk-ses', '>= 1.36.0', '< 2'
37
37
  spec.add_dependency 'dotenv', '>= 2.7.6', '< 2.8'
@@ -27,7 +27,7 @@ class Eco::API::UseCases::OozeSamples::OozeBaseCase < Eco::API::Common::Loaders:
27
27
  end
28
28
 
29
29
  protected
30
-
30
+
31
31
  def add_field(name, type, section, after: nil, before: nil, side: :left)
32
32
  unless section.is_a?(Ecoportal::API::V2::Page::Section)
33
33
  raise "You need to specify a section for a new field. Given: #{section.class}"
@@ -112,6 +112,11 @@ class Eco::API::UseCases::OozeSamples::OozeBaseCase < Eco::API::Common::Loaders:
112
112
  def update_ooze(ooze = target)
113
113
  if !options[:simulate]
114
114
  return unless dirty?(ooze)
115
+
116
+ ooze.validate.tap do |validation|
117
+ raise validation if validation.is_a?(String)
118
+ end
119
+
115
120
  apiv2.pages.update(ooze).tap do |response|
116
121
  if response.success?
117
122
  ooze.consolidate!
data/lib/eco/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eco
2
- VERSION = "2.0.39"
2
+ VERSION = "2.0.40"
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.39
4
+ version: 2.0.40
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.14
139
+ version: 0.8.19
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.14
149
+ version: 0.8.19
150
150
  - - "<"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0.9'