eco-helpers 3.0.10 → 3.0.12

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: 618c3849705c9b3977d73927a2ffc26ca15dd8772868b35f554524912e31ba93
4
- data.tar.gz: c11a69b25ca5b2c12ac4cc9efc7b14d276d58c3baabe8be6027f87b59770c47b
3
+ metadata.gz: 2e1a4de8ccbd93ffde8cb5669e2990c7b45d173d3c4a5d9cb8e82e8b516c1e6d
4
+ data.tar.gz: 000c5decbcbbc3620a22febb9682e8d996dc2239fdbe857072c62b5aa7482aae
5
5
  SHA512:
6
- metadata.gz: 7e5a67b202d231c987f2909639f1a3f40e43a04c86ea66ec3d93d4a22bca08ea1f30b481382e44ef24c6b3d48c2e5a7ae7a51d05df9919ac896163a7813176f6
7
- data.tar.gz: f69d8e030008308840daf7ddb00c67df6d63e1029d4cd4de3d435f8c05467c1eb0f9b3ddb2a7fbf44a0f70faa23006d4ac7a00e166743d133f9e8cbe000fb7f3
6
+ metadata.gz: 645a4b17b0f3212e5d65140f90079f0c0cf905bf6fee5db22c4e15f62b5f2b98eeaef6b47645b63df9e4826b66147dc52cbbae687863df1d0917de39e98146b5
7
+ data.tar.gz: 58a53215c91e6b29cc29292d2b6858ac87a41c1f674f4111d0a90d73777d752f155e9d4721176d3805ad29a43c111737cb0bda3bdacc324e4651c75d9c34cfb6
data/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [3.0.11] - 2024-09-xx
5
+ ## [3.0.13] - 2024-09-xx
6
6
 
7
7
  ### Added
8
8
 
@@ -10,12 +10,25 @@ All notable changes to this project will be documented in this file.
10
10
 
11
11
  ### Fixed
12
12
 
13
- ## [3.0.10] - 2024-09-05
13
+ ## [3.0.12] - 2024-09-06
14
14
 
15
- ### Added
15
+ ### Fixed
16
+
17
+ - Enable multiple classifications per location node on updates
18
+ - `Eco::API::UseCases::GraphQL::Helpers::Location::Base::ClassificationsParser`
19
+ - `#to_classification_ids` split on `|`
20
+ - `Eco::API::UseCases::GraphQL::Helpers::Location::Command::Diff::AsUpdate`
21
+ - `#diff_hash`
22
+
23
+ ## [3.0.11] - 2024-09-06
16
24
 
17
25
  ### Changed
18
26
 
27
+ - Prevent double-up of notifications
28
+ - Prevent double log of errors
29
+
30
+ ## [3.0.10] - 2024-09-05
31
+
19
32
  ### Fixed
20
33
 
21
34
  - wrong sftp error constant path
@@ -63,6 +63,8 @@ module Eco
63
63
  # @see Net::SFTP::Session#rename
64
64
  def move(fullname_source, fullname_dest, flags = 0x0001, override: true, &callback)
65
65
  sftp_session.rename!(fullname_source, fullname_dest, flags, &callback)
66
+
67
+ true
66
68
  rescue Net::SFTP::StatusException => err
67
69
  case err.code
68
70
  when Net::SFTP::Constants::StatusCodes::FX_FILE_ALREADY_EXISTS
@@ -87,6 +89,8 @@ module Eco
87
89
  else
88
90
  raise
89
91
  end
92
+
93
+ false
90
94
  end
91
95
 
92
96
  # Downloads the files specified to a local folder
@@ -7,6 +7,10 @@ module Eco::API::UseCases::GraphQL::Helpers::Base
7
7
 
8
8
  private
9
9
 
10
+ def exception_already_captured?(err)
11
+ err == exception
12
+ end
13
+
10
14
  def interrupted?(err = exception)
11
15
  interrupt_errors.any? {|klass| err.is_a?(klass)}
12
16
  end
@@ -19,7 +23,10 @@ module Eco::API::UseCases::GraphQL::Helpers::Base
19
23
  yield
20
24
  rescue StandardError => err
21
25
  self.exception ||= err
22
- log(:error) { err.patch_full_message }
26
+
27
+ unless exception_already_captured?(err)
28
+ log(:error) { err.patch_full_message }
29
+ end
23
30
  end
24
31
 
25
32
  def with_error_handling
@@ -22,7 +22,8 @@ module Eco::API::UseCases::GraphQL::Helpers::Location
22
22
 
23
23
  def to_classification_ids(values)
24
24
  values = [values].flatten unless values.is_a?(Array)
25
- values.compact.map {|val| to_classification(val)}.compact
25
+ values = values.compact.map {|val| val.split('|')}.flatten
26
+ values.compact.map {|val| to_classification(val)}.compact.uniq
26
27
  end
27
28
 
28
29
  # @note
@@ -15,6 +15,7 @@ class Eco::API::UseCases::GraphQL::Helpers::Location::Command::Diff
15
15
  if h.key?('classifications')
16
16
  class_ids = h.delete('classifications')
17
17
  class_ids = [class_ids].flatten.compact unless class_ids.is_a?(Array)
18
+ class_ids = class_ids.compact.map {|val| val.split('|')}.flatten.uniq
18
19
  h['classificationIds'] = class_ids
19
20
  end
20
21
 
@@ -91,7 +91,10 @@ class Eco::API::UseCases::GraphQL::Samples::Location
91
91
  digest_msgs = logger.cache.logs(level: %i[info error warn])
92
92
  str_exception = exception ? " - Exception!" : ''
93
93
  subject = "#{config.active_enviro} - #{title}#{str_exception}"
94
- session.mail(subject: subject, body: digest_msgs.join)
94
+
95
+ session.mail(subject: subject, body: digest_msgs.join).tap do
96
+ options.deep_merge!({worfklow: {no_email: true}})
97
+ end
95
98
  end
96
99
 
97
100
  def print_diff_details?
data/lib/eco/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eco
2
- VERSION = '3.0.10'.freeze
2
+ VERSION = '3.0.12'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eco-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.10
4
+ version: 3.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Segura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-04 00:00:00.000000000 Z
11
+ date: 2024-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake