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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b4f35490448b3b8f50b3632eae9f565b954642055c8d81726e0774cbf0d5fbc5
4
- data.tar.gz: f837f11d4a5e7c1d5d4fcc831bd20139d822374cb0289e5d9990f64830eac2f9
3
+ metadata.gz: 4ea98197d16aef3c4ca8f16c10b9533f7e89e916c8cefffed1e8523966dc85fa
4
+ data.tar.gz: fee12ffd69d32683f091f49c1362df778523a29bba97d411931c0608cedd19cc
5
5
  SHA512:
6
- metadata.gz: 83be04fc0573f35f6caa81af65adb8a5e81dbde915fa6f7465837d580dce1abe5e92fad16a4d3970e16170a0c195e08067d1e6fc2af97719f4e51bd7364c09af
7
- data.tar.gz: ac31f6183e48f5dd4040e4679c2dc394afdc624bee2d0bf2beab8c94ca7661f8e72f165b92177551f1bb097bfb676669e5fa4c248c856b1bea2bd6080d3d54aa
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(:success)]
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 :emit_event, :on => :success
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)
@@ -1,3 +1,3 @@
1
1
  module ForemanTasks
2
- VERSION = '8.2.0'.freeze
2
+ VERSION = '8.3.0'.freeze
3
3
  end
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.2.0
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-08-28 00:00:00.000000000 Z
11
+ date: 2023-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dynflow