factor 0.6.6 → 0.6.7

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
2
  SHA1:
3
- metadata.gz: af39fc9efe3999659f027cfc4cdf50a2c40c4533
4
- data.tar.gz: deebd96954ace642c46f23f9fdb6b038c6ad4d99
3
+ metadata.gz: 93e8d25a5a0d125f0a77ec8fabac82042e7646c1
4
+ data.tar.gz: 973999ec111eb0a9df7c3842bc8dd939f7da1751
5
5
  SHA512:
6
- metadata.gz: f85d0d40425675967ca5b8b01709a36ae06803560be6fe10e633a26e6bdb897a7ffebbb0c905062332dcb642e3dc0e0d8075949fc2e1c77bd8286ccd40192899
7
- data.tar.gz: a7dcd984dba299c0812f69e0b7da04aebf5d9bfa1cf16039384e6f5bd2ba35be0bc339837589f4b3569114204122a9db1875ee667504e84fa9980af89c8fdcbf
6
+ metadata.gz: 5db62b45f21408b389d3e5a5e7be8465383a7309d751a89be8f9e679114990d5c16406752d76b5531efc11392fa986166a2e04a4fef16eaccb07d89d6d1fa90a
7
+ data.tar.gz: 7b2ac9f5c3aa133ee8d591684a2141e674c428ece1e360d1a6aaac116db881e079f2355057d9eed3fd6fbb77e93657705d3fb87c78b177b72abc9b7564127319
@@ -141,7 +141,7 @@ module Factor
141
141
  logger.info "Starting workflow"
142
142
  runtime.load(workflow_definition)
143
143
  rescue => ex
144
- logger.error message: "Couldn't workflow", exception: ex
144
+ logger.error message: "Couldn't start workflow", exception: ex
145
145
  end
146
146
  end
147
147
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Primary Factor.io module
4
4
  module Factor
5
- VERSION = '0.6.6'
5
+ VERSION = '0.6.7'
6
6
  end
@@ -39,7 +39,7 @@ module Factor
39
39
  e = ExecHandler.new(service_ref, params)
40
40
  connector_url = @connectors[address.namespace]
41
41
 
42
- if !connector_url
42
+ unless connector_url
43
43
  error "Listener '#{address}' not found"
44
44
  e.fail_block.call({}) if e.fail_block
45
45
  else
@@ -116,37 +116,43 @@ module Factor
116
116
  end
117
117
  else
118
118
  connector_url = @connectors[address.namespace]
119
- caller = ServiceCaller.new(connector_url)
120
119
 
121
- caller.on :open do
122
- info "Action '#{address}' starting"
123
- end
120
+ unless connector_url
121
+ error "Action '#{address}' not found"
122
+ e.fail_block.call({}) if e.fail_block
123
+ else
124
+ caller = ServiceCaller.new(connector_url)
124
125
 
125
- caller.on :error do
126
- error "Action '#{address}' dropped the connection"
127
- end
126
+ caller.on :open do
127
+ info "Action '#{address}' starting"
128
+ end
128
129
 
129
- caller.on :return do |data|
130
- success "Action '#{address}' responded"
131
- caller.close
132
- block.call(Factor::Common.simple_object_convert(data)) if block
133
- end
130
+ caller.on :error do
131
+ error "Action '#{address}' dropped the connection"
132
+ end
134
133
 
135
- caller.on :close do
136
- error "Action '#{address}' disconnected"
137
- end
134
+ caller.on :return do |data|
135
+ success "Action '#{address}' responded"
136
+ caller.close
137
+ block.call(Factor::Common.simple_object_convert(data)) if block
138
+ end
138
139
 
139
- caller.on :fail do |info|
140
- error "Action '#{address}' failed"
141
- e.fail_block.call(info) if e.fail_block
142
- end
140
+ caller.on :close do
141
+ error "Action '#{address}' disconnected"
142
+ end
143
143
 
144
- caller.on :log do |log_info|
145
- @logger.log log_info[:status], log_info
146
- end
144
+ caller.on :fail do |info|
145
+ error "Action '#{address}' failed"
146
+ e.fail_block.call(info) if e.fail_block
147
+ end
147
148
 
148
- service_credentials = @credentials[address.service.to_sym] || {}
149
- caller.action(address.id,params.merge(service_credentials))
149
+ caller.on :log do |log_info|
150
+ @logger.log log_info[:status], log_info
151
+ end
152
+
153
+ service_credentials = @credentials[address.service.to_sym] || {}
154
+ caller.action(address.id,params.merge(service_credentials))
155
+ end
150
156
  end
151
157
  e
152
158
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Skierkowski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-14 00:00:00.000000000 Z
11
+ date: 2014-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander