rsmp 0.11.3 → 0.11.6

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: 429ca780c80b9fd2e2a320256f76a8d1ed37bc6f2ca2045cbebb40c537c6888a
4
- data.tar.gz: 9cdb92a02f59e8ee2dd82a60e64e9b097dd6039ef2ca0e331bfe43a8e63a44e9
3
+ metadata.gz: dd03d3fe9826584ad89229facf44019af119faeb363ce243d778fe09fcfe2008
4
+ data.tar.gz: 61b2ec5ae4ddea340e530b000a41ef0437e12ba5d93f648a6a90e38f8b621f04
5
5
  SHA512:
6
- metadata.gz: 35e87d762b71abb1e108b5045c05d97d024b193d683882444851e34af6dc34facffff91b6017fca83309a6f46eeec301f22530d0fd907526f417ce9b3d3b7eef
7
- data.tar.gz: fde8b4459dc7cb15a08d2fa2a19584f0a47303f4591c76b390957f7b018f5704205be125d567b7648865a011a239fa52a460a9663b7b03b1daf7f5b0648eb24f
6
+ metadata.gz: 3819a6d25cdbcca1fc7cd5c9df732488beb79b72eaaf15dfa8d18f117371c2527c3eb673874a98fbaddfb83c9a5257e21b78b6da88828eeaccaf36fd818f18ba
7
+ data.tar.gz: 8ed11618013b91ec70596027bf79b3509b5cf3e5913d4ebd12f006ecfce94894fc0fdda9455d55bd86616ef7c0f6815c400ba59b6e9277471acd40f2342ead02
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rsmp (0.11.3)
4
+ rsmp (0.11.6)
5
5
  async (~> 1.29.1)
6
6
  async-io (~> 1.32.2)
7
7
  colorize (~> 0.8.1)
@@ -143,7 +143,7 @@ module RSMP
143
143
  if query.got && query.got['s']
144
144
  h[sCI][n] = { {s=>query.got['s']} => query.done? }
145
145
  else
146
- h[sCI][n] = {s=>:anything}
146
+ h[sCI][n] = { s=>nil }
147
147
  end
148
148
  end
149
149
  end
@@ -186,19 +186,19 @@ module RSMP
186
186
  @queries.each do |query|
187
187
  want = query.want
188
188
  got = query.got
189
- if got['cCI']
189
+ if want['cCI']
190
190
  cCI = want['cCI']
191
191
  h[cCI] ||= {}
192
192
  cO = want['cO']
193
193
  h[cCI][cO] ||= {}
194
194
  n = want['n']
195
- v = got['v']
195
+ v = got ? got['v'] : nil
196
196
  h[cCI][cO][n] = v
197
197
  elsif want['sCI']
198
198
  sCI = want['sCI']
199
199
  h[sCI] ||= {}
200
200
  n = want['n']
201
- s = got['s']
201
+ s = got ? got['s'] : nil
202
202
  h[sCI][n] = s
203
203
  end
204
204
  end
data/lib/rsmp/proxy.rb CHANGED
@@ -13,9 +13,10 @@ module RSMP
13
13
  include Inspect
14
14
  include Task
15
15
 
16
- attr_reader :state, :archive, :connection_info, :sxl, :collector, :ip, :port
16
+ attr_reader :state, :archive, :connection_info, :sxl, :collector, :ip, :port, :node
17
17
 
18
18
  def initialize options
19
+ @node = options[:node]
19
20
  initialize_logging options
20
21
  initialize_distributor
21
22
  initialize_task
@@ -120,7 +121,7 @@ module RSMP
120
121
  end
121
122
 
122
123
  def clock
123
- node.clock
124
+ @node.clock
124
125
  end
125
126
 
126
127
  def ready?
@@ -203,7 +204,7 @@ module RSMP
203
204
  end
204
205
 
205
206
  def notify_error e, options={}
206
- node.notify_error e, options
207
+ @node.notify_error e, options
207
208
  end
208
209
 
209
210
  def start_watchdog
@@ -369,7 +370,7 @@ module RSMP
369
370
  end
370
371
 
371
372
  def process_deferred
372
- node.process_deferred
373
+ @node.process_deferred
373
374
  end
374
375
 
375
376
  def verify_sequence message
@@ -419,7 +420,7 @@ module RSMP
419
420
  close
420
421
  message
421
422
  ensure
422
- node.clear_deferred
423
+ @node.clear_deferred
423
424
  end
424
425
 
425
426
  def process_message message
@@ -620,12 +621,8 @@ module RSMP
620
621
  def version_acknowledged
621
622
  end
622
623
 
623
- def node
624
- raise 'Must be overridden'
625
- end
626
-
627
624
  def author
628
- node.site_id
625
+ @node.site_id
629
626
  end
630
627
 
631
628
  def send_and_optionally_collect message, options, &block
@@ -7,7 +7,7 @@ module RSMP
7
7
  attr_reader :supervisor, :site_id
8
8
 
9
9
  def initialize options
10
- super options
10
+ super options.merge(node:options[:supervisor])
11
11
  initialize_components
12
12
  @supervisor = options[:supervisor]
13
13
  @settings = @supervisor.supervisor_settings.clone
@@ -8,7 +8,7 @@ module RSMP
8
8
  attr_reader :supervisor_id, :site
9
9
 
10
10
  def initialize options
11
- super options
11
+ super options.merge(node:options[:site])
12
12
  @site = options[:site]
13
13
  @site_settings = @site.site_settings.clone
14
14
  @ip = options[:ip]
@@ -18,10 +18,6 @@ module RSMP
18
18
  @synthetic_id = Supervisor.build_id_from_ip_port @ip, @port
19
19
  end
20
20
 
21
- def node
22
- site
23
- end
24
-
25
21
  # handle communication
26
22
  # if disconnected, then try to reconnect
27
23
  def run
data/lib/rsmp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RSMP
2
- VERSION = "0.11.3"
2
+ VERSION = "0.11.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsmp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.3
4
+ version: 0.11.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Tin