factor 0.5.08 → 0.5.09

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.
Files changed (3) hide show
  1. data/lib/factor/version.rb +1 -1
  2. data/lib/runtime.rb +7 -1
  3. metadata +1 -1
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Primary Factor.io module
4
4
  module Factor
5
- VERSION = '0.5.08'
5
+ VERSION = '0.5.09'
6
6
  end
@@ -161,7 +161,13 @@ module Factor
161
161
  end
162
162
 
163
163
  def error_handle_call(listener_response, &block)
164
- block.call(OpenStruct.new(listener_response['payload'])) if block
164
+ payload = if listener_response['payload'].is_a?(Hash)
165
+ OpenStruct.new(listener_response['payload'])
166
+ else
167
+ listener_response['payload']
168
+ end
169
+ block.call(payload) if block
170
+
165
171
  rescue => ex
166
172
  error "Error in workflow definition: #{ex.message}"
167
173
  ex.backtrace.each do |line|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.08
4
+ version: 0.5.09
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: