foreman-tasks 8.2.0 → 8.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/lib/actions/observable_action.rb +11 -2
- data/lib/foreman_tasks/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: 4ea98197d16aef3c4ca8f16c10b9533f7e89e916c8cefffed1e8523966dc85fa
|
4
|
+
data.tar.gz: fee12ffd69d32683f091f49c1362df778523a29bba97d411931c0608cedd19cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbeafbdf22b249957160385253f62b1f901cd4faca182c47fe5f637a375f55e98b57d7fe28ab814bf3f5fadb11aac50133b7f291e6371e2e1a8896c136410c4e
|
7
|
+
data.tar.gz: 946b98f863337862dfbd3b1cf6bd421b139836cd2920368e5642e50aed3a7ba1118bed49d481ee3e2ef208acd921275bcc3ef4c5b7316b1199b894cecbb715e2
|
@@ -36,7 +36,7 @@ module Actions
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def event_names
|
39
|
-
[event_name_base + '_' + event_name_suffix(
|
39
|
+
[:success, :failure].map { |suffix| event_name_base + '_' + event_name_suffix(suffix) }
|
40
40
|
end
|
41
41
|
|
42
42
|
def namespaced_event_names
|
@@ -51,7 +51,16 @@ module Actions
|
|
51
51
|
def self.included(base)
|
52
52
|
base.extend ClassMethods
|
53
53
|
base.include ::Foreman::Observable
|
54
|
-
base.execution_plan_hooks.use :
|
54
|
+
base.execution_plan_hooks.use :emit_event_success, :on => :success
|
55
|
+
base.execution_plan_hooks.use :emit_event_failure, :on => :failure
|
56
|
+
end
|
57
|
+
|
58
|
+
def emit_event_success(execution_plan)
|
59
|
+
emit_event(execution_plan, :success)
|
60
|
+
end
|
61
|
+
|
62
|
+
def emit_event_failure(execution_plan)
|
63
|
+
emit_event(execution_plan, :failure)
|
55
64
|
end
|
56
65
|
|
57
66
|
def emit_event(execution_plan, hook = :success)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman-tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.
|
4
|
+
version: 8.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dynflow
|