foreman-tasks-core 0.2.4 → 0.2.5

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
- SHA1:
3
- metadata.gz: bce611af37009e959d490739b5e91a250d2ee97c
4
- data.tar.gz: 3bde706553fae34bea7495cfd41d192ae1e0414b
2
+ SHA256:
3
+ metadata.gz: 7ed79b3e3352fb7ea1fcb798fd4498514807289d642d55eee9e6a371638889b4
4
+ data.tar.gz: a2bc83a4d0d3e3f977ddf34a88e9d50be589f4b1d9977853acd162c7a4c3d216
5
5
  SHA512:
6
- metadata.gz: c7f4c63c90d8235fb56e6133ae249b4a2b1524f7bc73e0d52447659c014c83a86adc06eb5e06b011b9dc6c4ba9c8f180cd7c8749d9ac11188254fdafd13a722d
7
- data.tar.gz: 43788ece9ba029a630c63482cc35b9c100a9801b5c56517245acd38ee1fd9f7f84164f4486b7db4b7aa4d3f2498750ff52b6511485916b17f9e45877a87d2520
6
+ metadata.gz: a06f4cd323183c182c63cc491805c796dce8ef01af1e947f69382ef44916ad5880134daa1ad780b093dcd443f782997383e7926c2d8635b6463047e393b6420c
7
+ data.tar.gz: 6242f08a2e763c09973ea93813a50e2369b1f406a3041e10503f4ce5299cbdf9a1723071d058466ebe4c7622b8578f3e47f99396f1e54d94a82f74e3a01e91b2
@@ -24,7 +24,7 @@ module ForemanTasksCore
24
24
 
25
25
  def finalize
26
26
  # To mark the task as a whole as failed
27
- error! 'Script execution failed' if failed_run?
27
+ error! 'Script execution failed' if on_proxy? && failed_run?
28
28
  end
29
29
 
30
30
  def rescue_strategy_for_self
@@ -4,7 +4,7 @@ module ForemanTasksCore
4
4
  # provide update data on refresh call.
5
5
  class Base
6
6
  attr_reader :id
7
- attr_accessor :logger
7
+ attr_writer :logger
8
8
 
9
9
  def initialize(*_args)
10
10
  @id = SecureRandom.uuid
@@ -11,9 +11,15 @@ module ForemanTasksCore
11
11
 
12
12
  planned_action = plan_self(input)
13
13
  # code only applicable, when run with SmartProxyDynflowCore in place
14
- if defined?(SmartProxyDynflowCore::Callback) && callback
14
+ if on_proxy? && callback
15
15
  plan_action(SmartProxyDynflowCore::Callback::Action, callback, planned_action.output)
16
16
  end
17
17
  end
18
+
19
+ private
20
+
21
+ def on_proxy?
22
+ defined?(SmartProxyDynflowCore::Callback)
23
+ end
18
24
  end
19
25
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanTasksCore
2
- VERSION = '0.2.4'.freeze
2
+ VERSION = '0.2.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,17 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman-tasks-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
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: 2017-09-19 00:00:00.000000000 Z
11
+ date: 2018-05-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: |
14
- Common code used both at Forman and Foreman proxy regarding tasks
13
+ description: 'Common code used both at Forman and Foreman proxy regarding tasks
14
+
15
+ '
15
16
  email:
16
17
  - inecas@redhat.com
17
18
  executables: []
@@ -51,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
51
52
  version: '0'
52
53
  requirements: []
53
54
  rubyforge_project:
54
- rubygems_version: 2.6.12
55
+ rubygems_version: 2.7.3
55
56
  signing_key:
56
57
  specification_version: 4
57
58
  summary: Common code used both at Forman and Foreman proxy regarding tasks