eco-rake 0.2.27 → 0.3.1
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 +4 -4
- data/CHANGELOG.md +8 -1
- data/lib/eco-rake/lib/export/payload.rb +10 -6
- data/lib/eco-rake/lib/people/sync_launch.rb +5 -4
- data/lib/eco-rake/lib/people/sync_options.rb +4 -1
- data/lib/eco-rake/lib/people/sync_process.rb +2 -2
- data/lib/eco-rake/lib/people/sync_rely.rb +1 -0
- data/lib/eco-rake/lib/task/runner_launch.rb +4 -2
- data/lib/eco-rake/lib/task/runner_options.rb +4 -0
- data/lib/eco-rake/lib/task/runner_rely.rb +4 -3
- data/lib/eco-rake/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3228d82a42bd33d3cea2465b935ca76760536cdb5c304d96c34fdaf202425d31
|
4
|
+
data.tar.gz: f52094ec6f05d0c06ebabe2bf229e1ff0a2a143549101ff35c529a81bb0696da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '013850736bb0a3223f2cff1166bf66c4b419577c7cf0083d98fc4191aaef4f4597374f2a45a5c8696f53388c6a310db59a3492366179c1a8ab4339f6786f56f6'
|
7
|
+
data.tar.gz: 8e9cae51bb25a606e1d166c834047ed837b7a050108b7b00ae90d0ca4ca271765cadcd18ea38ab35a5210fc0b992eb46e3df6f9219c7db11b1ce5a66a59278d5
|
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
|
-
## [0.2
|
5
|
+
## [0.3.2] - 2025-04-xx
|
6
6
|
|
7
7
|
### Added
|
8
8
|
|
@@ -10,6 +10,13 @@ All notable changes to this project will be documented in this file.
|
|
10
10
|
|
11
11
|
### Fixed
|
12
12
|
|
13
|
+
## [0.3.1] - 2025-04-29
|
14
|
+
|
15
|
+
### Added
|
16
|
+
|
17
|
+
- `--notify` option
|
18
|
+
- Force notification even if in dry-run mode (`--simulate`)
|
19
|
+
|
13
20
|
## [0.2.27] - 2025-04-04
|
14
21
|
|
15
22
|
### Added
|
@@ -8,12 +8,13 @@ class EcoRake
|
|
8
8
|
module Lib
|
9
9
|
module Export
|
10
10
|
class Payload < EcoRake::Lib::BaseTask
|
11
|
-
FORWARDED_OPTIONS = %i[csv txt col_sep simulate no_email].freeze
|
11
|
+
FORWARDED_OPTIONS = %i[csv txt col_sep simulate no_email notify].freeze
|
12
12
|
FORWARD_RULES = {
|
13
13
|
enviro: ->(enviro) { "-#{enviro}" },
|
14
14
|
space: ->(space) { "-space #{space}" },
|
15
15
|
simulate: '-simulate',
|
16
16
|
no_email: '-no-email',
|
17
|
+
notify: '-notify',
|
17
18
|
csv: '-csv',
|
18
19
|
txt: '-txt',
|
19
20
|
col_sep: ->(sep) { "-col-sep #{sep}" },
|
@@ -55,7 +56,10 @@ class EcoRake
|
|
55
56
|
value&.iso8601
|
56
57
|
end
|
57
58
|
|
58
|
-
option '-m', '--no-email',
|
59
|
+
option '-m', '--no-email', TrueClass, desc: 'Do not notify', default: false
|
60
|
+
|
61
|
+
str_desc = 'Notify (even if dry-run or not remote)'
|
62
|
+
option '-y', '--notify', TrueClass, desc: str_desc, default: false
|
59
63
|
|
60
64
|
option_forwarding(**FORWARD_RULES)
|
61
65
|
|
@@ -125,8 +129,8 @@ class EcoRake
|
|
125
129
|
end
|
126
130
|
|
127
131
|
def success_notify
|
128
|
-
return if options[:simulate]
|
129
|
-
return if options[:no_email]
|
132
|
+
return if options[:simulate] && !options[:notify]
|
133
|
+
return if options[:no_email] && !options[:notify]
|
130
134
|
return unless (inbox = mail_to)
|
131
135
|
|
132
136
|
email(
|
@@ -142,8 +146,8 @@ class EcoRake
|
|
142
146
|
msg = res.to_s
|
143
147
|
puts msg
|
144
148
|
|
145
|
-
exit 1 if options[:simulate]
|
146
|
-
exit 1 if options[:no_email]
|
149
|
+
exit 1 if options[:simulate] && !options[:notify]
|
150
|
+
exit 1 if options[:no_email] && !options[:notify]
|
147
151
|
exit 1 unless (inbox = mail_to)
|
148
152
|
|
149
153
|
email(
|
@@ -6,14 +6,15 @@ class EcoRake
|
|
6
6
|
# - Should be able to log at debug level.
|
7
7
|
# @note in integration repos this is used to be called `run:hris`
|
8
8
|
class SyncLaunch < EcoRake::Lib::People::BaseTask
|
9
|
-
ADDITIONAL_OPTIONS = %i[only_stats no_policy simulate no_email].freeze
|
9
|
+
ADDITIONAL_OPTIONS = %i[only_stats no_policy simulate no_email notify].freeze
|
10
10
|
FORWARD_RULES = {
|
11
11
|
space: ->(space) { "-space #{space}" },
|
12
12
|
schema: ->(schema) { "-schema-id \"#{schema}\"" },
|
13
13
|
only_stats: '-feed-only-stats',
|
14
14
|
no_policy: '-skip-batch-policy',
|
15
15
|
simulate: '-simulate',
|
16
|
-
no_email: '-no-email'
|
16
|
+
no_email: '-no-email',
|
17
|
+
notify: '-notify'
|
17
18
|
}.freeze
|
18
19
|
|
19
20
|
attr_const :target_enviro, required: true
|
@@ -59,8 +60,8 @@ class EcoRake
|
|
59
60
|
msg = 'Missing files to be processed'
|
60
61
|
puts msg
|
61
62
|
|
62
|
-
exit 1 if options[:simulate]
|
63
|
-
exit 1 if options[:no_email]
|
63
|
+
exit 1 if options[:simulate] && !options[:notify]
|
64
|
+
exit 1 if options[:no_email] && !options[:notify]
|
64
65
|
exit 1 unless (inbox = mail_to)
|
65
66
|
|
66
67
|
email_missing_files(
|
@@ -10,7 +10,10 @@ class EcoRake
|
|
10
10
|
option '-o', '--only-stats', TrueClass, desc: 'To display only stats in the feedback'
|
11
11
|
option '-b', '--no-policy', FalseClass, desc: 'To skip the batch policy'
|
12
12
|
option '-n', '--no-get', FalseClass, desc: 'Skip get people step'
|
13
|
-
option '-m', '--no-email',
|
13
|
+
option '-m', '--no-email', TrueClass, desc: 'Do not notify', default: false
|
14
|
+
|
15
|
+
str_desc = 'Notify (even if dry-run or not remote)'
|
16
|
+
option '-y', '--notify', TrueClass, desc: str_desc, default: false
|
14
17
|
end
|
15
18
|
end
|
16
19
|
end
|
@@ -104,8 +104,8 @@ class EcoRake
|
|
104
104
|
msg = 'File decryption failed'
|
105
105
|
puts msg
|
106
106
|
|
107
|
-
exit 1 if options[:simulate]
|
108
|
-
exit 1 if options[:no_email]
|
107
|
+
exit 1 if options[:simulate] && !options[:notify]
|
108
|
+
exit 1 if options[:no_email] && !options[:notify]
|
109
109
|
exit 1 unless (inbox = mail_to)
|
110
110
|
|
111
111
|
email(
|
@@ -5,7 +5,9 @@ class EcoRake
|
|
5
5
|
FORWARD_RULES = {
|
6
6
|
enviro: ->(enviro) { "-#{enviro}" },
|
7
7
|
space: ->(space) { "-space #{space}" },
|
8
|
-
simulate: '-simulate'
|
8
|
+
simulate: '-simulate',
|
9
|
+
no_email: '-no-email',
|
10
|
+
notify: '-notify'
|
9
11
|
}.freeze
|
10
12
|
|
11
13
|
options_with_defaults true
|
@@ -79,7 +81,7 @@ class EcoRake
|
|
79
81
|
|
80
82
|
def command(*args)
|
81
83
|
cmd = [ruby_runner]
|
82
|
-
cmd.push(*forward_options(:enviro, :space, :simulate))
|
84
|
+
cmd.push(*forward_options(:enviro, :space, :simulate, :no_email, :notify))
|
83
85
|
cmd.push(*args)
|
84
86
|
cmd = yield(cmd) if block_given?
|
85
87
|
string_cmd(*cmd)
|
@@ -6,6 +6,10 @@ class EcoRake
|
|
6
6
|
option '-e', '--enviro ENVIRO', String, desc: 'Target environment to run against (i.e. org, live)', required: true
|
7
7
|
option '-w', '--space SPACE', String, desc: 'Target space of the envionment (i.e. uat)'
|
8
8
|
option '-t', '--task NAME', String, desc: 'Target task to run', required: true
|
9
|
+
option '-m', '--no-email', TrueClass, desc: 'Do not notify', default: false
|
10
|
+
|
11
|
+
str_desc = 'Notify (even if dry-run or not remote)'
|
12
|
+
option '-y', '--notify', TrueClass, desc: str_desc, default: false
|
9
13
|
end
|
10
14
|
end
|
11
15
|
end
|
@@ -5,7 +5,9 @@ class EcoRake
|
|
5
5
|
FORWARD_RULES = {
|
6
6
|
simulate: :mirror,
|
7
7
|
task: :mirror,
|
8
|
-
space: :mirror
|
8
|
+
space: :mirror,
|
9
|
+
no_email: :mirror,
|
10
|
+
notify: :mirror
|
9
11
|
}.freeze
|
10
12
|
|
11
13
|
options_with_defaults true
|
@@ -23,8 +25,7 @@ class EcoRake
|
|
23
25
|
cmd = [base_command]
|
24
26
|
cmd << target_task
|
25
27
|
cmd << '--'
|
26
|
-
cmd
|
27
|
-
cmd << forward_option(:simulate)
|
28
|
+
cmd.push(*forward_options(:task, :simulate, :no_email, :notify))
|
28
29
|
string_cmd(*cmd)
|
29
30
|
end
|
30
31
|
|
data/lib/eco-rake/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eco-rake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oscar Segura Samper
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
11
|
+
date: 2025-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|