eco-helpers 2.7.7 → 2.7.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -2
- data/eco-helpers.gemspec +1 -1
- data/lib/eco/api/common/people/default_parsers/date_parser.rb +1 -1
- data/lib/eco/api/usecases/graphql/base.rb +0 -1
- data/lib/eco/api/usecases/graphql/helpers/location/command/result.rb +9 -6
- data/lib/eco/api/usecases/graphql/helpers/location/command/results.rb +1 -1
- data/lib/eco/api/usecases/graphql/samples/location/command/service/tree_update.rb +2 -0
- data/lib/eco/cli_default/options.rb +12 -7
- data/lib/eco/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73af9e54de9fc73f1986db49810ae91ad2a8c0153c26d40681873cc52754a923
|
4
|
+
data.tar.gz: eb978a976711797b852cfbf2d39f68cfc760906463753a8440e9c6f595269c51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c454c5ec9ed3713e6bb4fd0e73b582343d5bc96fe6de677b63070838af87b93cb86dad96d1446ba4c6ead007587798c90d30d7c73cea601067db6acd9da32156
|
7
|
+
data.tar.gz: afd3bb1f221ddd4db2056a5347799f88c0ad70bbf6dbf868c1f8a231a1ee311df252db2e899f95ada3e31925b8376d74145bb55b0449aa88793d10b33dea1583
|
data/CHANGELOG.md
CHANGED
@@ -1,16 +1,36 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
-
## [2.7.
|
4
|
+
## [2.7.9] - 2024-05-xx
|
5
5
|
|
6
6
|
### Added
|
7
7
|
### Changed
|
8
8
|
### Fixed
|
9
9
|
|
10
|
-
## [2.7.
|
10
|
+
## [2.7.8] - 2024-05-16
|
11
|
+
|
12
|
+
### Added
|
13
|
+
- `Eco::API::UseCases::GraphQL::Helpers::Location::Command:Result`
|
14
|
+
- Feedback original command.
|
15
|
+
|
16
|
+
### Changed
|
17
|
+
- upgraded `ecoportal-api-graphql` gem
|
18
|
+
- able to skip email via options (`-no-email`)
|
19
|
+
|
20
|
+
## [2.7.8] - 2024-05-xx
|
11
21
|
|
12
22
|
### Added
|
23
|
+
- `Eco::API::UseCases::GraphQL::Helpers::Location::Command:Result`
|
24
|
+
- Feedback original command.
|
25
|
+
|
13
26
|
### Changed
|
27
|
+
- upgraded `ecoportal-api-graphql` gem
|
28
|
+
- able to skip email via options (`-no-email`)
|
29
|
+
|
30
|
+
### Fixed
|
31
|
+
|
32
|
+
## [2.7.7] - 2024-05-16
|
33
|
+
|
14
34
|
### Fixed
|
15
35
|
- `Eco::API::UseCases::OozeSamples::TargetOozesUpdateCase`
|
16
36
|
- default prompt to user to `Y` when in remote mode.
|
data/eco-helpers.gemspec
CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
32
32
|
|
33
33
|
spec.add_dependency 'ecoportal-api', '>= 0.9.8', '< 0.10'
|
34
34
|
spec.add_dependency 'ecoportal-api-v2', '>= 1.1.8', '< 1.2'
|
35
|
-
spec.add_dependency 'ecoportal-api-graphql', '>= 0.3.
|
35
|
+
spec.add_dependency 'ecoportal-api-graphql', '>= 0.3.18', '< 0.4'
|
36
36
|
spec.add_dependency 'aws-sdk-s3', '>= 1.142.0', '< 2'
|
37
37
|
spec.add_dependency 'aws-sdk-ses', '>= 1.58.0', '< 2'
|
38
38
|
spec.add_dependency 'dotenv', '>= 2.8.1', '< 3'
|
@@ -24,7 +24,7 @@ class Eco::API::Common::People::DefaultParsers::DateParser < Eco::API::Common::L
|
|
24
24
|
date = Date.parse(value)
|
25
25
|
return date if valid_range?(date)
|
26
26
|
|
27
|
-
wrong!(value, attr: attr, desc: 'Date out of range (1900-2099). Given:
|
27
|
+
wrong!(value, attr: attr, desc: 'Date out of range (1900-2099). Given:')
|
28
28
|
rescue TypeError, Date::Error
|
29
29
|
nil
|
30
30
|
end
|
@@ -9,7 +9,6 @@ class Eco::API::UseCases::GraphQL::Base < Eco::API::Common::Loaders::UseCase
|
|
9
9
|
include Eco::Language::Methods::CallDetector
|
10
10
|
|
11
11
|
def main(_sess, options, _case)
|
12
|
-
options.deep_merge!(workflow: {no_email: true}) # prevent the default mailer to quick in
|
13
12
|
options[:end_get] = false
|
14
13
|
process
|
15
14
|
end
|
@@ -41,13 +41,16 @@ module Eco::API::UseCases::GraphQL::Helpers::Location::Command
|
|
41
41
|
|
42
42
|
def error_msg
|
43
43
|
return nil unless error?
|
44
|
-
msg = ''
|
45
|
-
msg << "(#{command} '#{node_id}') #{error.message}\n"
|
46
|
-
return msg if error.validationErrors.empty?
|
47
44
|
|
48
|
-
msg
|
49
|
-
msg << error.
|
50
|
-
|
45
|
+
msg = []
|
46
|
+
msg << "(#{command} '#{node_id}') #{error.message}"
|
47
|
+
|
48
|
+
feed = []
|
49
|
+
feed.concat(error.validationErrors.map(&:message)) unless error.validationErrors.empty?
|
50
|
+
feed << "Command: #{command_input_data.pretty_inspect}"
|
51
|
+
|
52
|
+
msg << " • #{feed.join("\n • ")}"
|
53
|
+
msg.join("\n")
|
51
54
|
end
|
52
55
|
|
53
56
|
def command_result
|
@@ -82,6 +82,8 @@ class Eco::API::UseCases::GraphQL::Samples::Location
|
|
82
82
|
|
83
83
|
def email_digest(title)
|
84
84
|
return if simulate?
|
85
|
+
return if options.dig(:workflow, :no_email)
|
86
|
+
|
85
87
|
digest_msgs = logger.cache.logs(level: %i[info error warn])
|
86
88
|
exception = exception ? " - Exception!" : ''
|
87
89
|
subject = "#{config.active_enviro} - #{title}#{exception}"
|
@@ -1,8 +1,8 @@
|
|
1
|
-
ASSETS.cli.config do |cnf|
|
2
|
-
cnf.options_set do |options_set, options|
|
3
|
-
options_set.add("--help", "Offers a HELP") do |options,
|
1
|
+
ASSETS.cli.config do |cnf| # rubocop:disable Metrics/BlockLength
|
2
|
+
cnf.options_set do |options_set, options| # rubocop:disable Metrics/BlockLength
|
3
|
+
options_set.add("--help", "Offers a HELP") do |options, session|
|
4
4
|
conf = ASSETS.cli.config
|
5
|
-
active =
|
5
|
+
active = proc do |opt|
|
6
6
|
if there = SCR.get_arg(opt)
|
7
7
|
refine = SCR.get_arg(opt, with_param: true)
|
8
8
|
end
|
@@ -37,7 +37,7 @@ ASSETS.cli.config do |cnf|
|
|
37
37
|
desc = "Redirect Standard Ouput to file"
|
38
38
|
options_set.add("-stdout", desc) do |options, session|
|
39
39
|
file = SCR.get_arg("-stdout", with_param: true) || "output.txt"
|
40
|
-
|
40
|
+
$stdout.reopen(file, "w+")
|
41
41
|
end
|
42
42
|
|
43
43
|
desc = "Skips the check of the headers"
|
@@ -125,14 +125,14 @@ ASSETS.cli.config do |cnf|
|
|
125
125
|
options.deep_merge!(report: {people: {csv: file}})
|
126
126
|
end
|
127
127
|
|
128
|
-
desc
|
128
|
+
desc = "Runs in dry-run (no requests sent to server)"
|
129
129
|
options_set.add(["-dry-run", "-simulate"], desc) do |options, session|
|
130
130
|
options[:dry_run] = true
|
131
131
|
options[:simulate] = true
|
132
132
|
session.config.dry_run!
|
133
133
|
end
|
134
134
|
|
135
|
-
desc
|
135
|
+
desc = "Runs runs post_launch cases even if in dry-run"
|
136
136
|
options_set.add("-run-postlaunch", desc) do |options, session|
|
137
137
|
options.deep_merge!(post_launch: {run: true})
|
138
138
|
end
|
@@ -181,6 +181,11 @@ ASSETS.cli.config do |cnf|
|
|
181
181
|
options.deep_merge!(search: {soft: true, strict: false})
|
182
182
|
end
|
183
183
|
|
184
|
+
desc = "Prevent email to be sent (experimental)"
|
185
|
+
options_set.add("-no-email", desc) do |options|
|
186
|
+
options.deep_merge!(workflow: {no_email: true})
|
187
|
+
end
|
188
|
+
|
184
189
|
desc = "Silence notifications on account creation or invites"
|
185
190
|
options_set.add(["-no-invites", "-exclude-invites"], desc) do |options|
|
186
191
|
options.merge!(send_invites: false)
|
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.7.
|
4
|
+
version: 2.7.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oscar Segura
|
@@ -156,7 +156,7 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - ">="
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0.3.
|
159
|
+
version: 0.3.18
|
160
160
|
- - "<"
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '0.4'
|
@@ -166,7 +166,7 @@ dependencies:
|
|
166
166
|
requirements:
|
167
167
|
- - ">="
|
168
168
|
- !ruby/object:Gem::Version
|
169
|
-
version: 0.3.
|
169
|
+
version: 0.3.18
|
170
170
|
- - "<"
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: '0.4'
|