rightscale-nanite 0.4.1.3 → 0.4.1.4

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/nanite.rb +1 -1
  2. data/lib/nanite/packets.rb +11 -11
  3. metadata +1 -1
@@ -39,7 +39,7 @@ require 'nanite/security/static_certificate_store'
39
39
  require 'nanite/serializer'
40
40
 
41
41
  module Nanite
42
- VERSION = '0.4.1.3' unless defined?(Nanite::VERSION)
42
+ VERSION = '0.4.1.4' unless defined?(Nanite::VERSION)
43
43
 
44
44
  class MapperNotRunning < StandardError; end
45
45
 
@@ -89,7 +89,7 @@ module Nanite
89
89
 
90
90
  attr_accessor :chunk, :token
91
91
 
92
- def initialize(token, size=nil, chunk=nil)
92
+ def initialize(token, chunk=nil, size=nil)
93
93
  @chunk = chunk
94
94
  @token = token
95
95
  @size = size
@@ -97,7 +97,7 @@ module Nanite
97
97
 
98
98
  def self.json_create(o)
99
99
  i = o['data']
100
- new(i['token'], o['size'], i['chunk'])
100
+ new(i['token'], i['chunk'], o['size'])
101
101
  end
102
102
 
103
103
  def to_s
@@ -124,7 +124,7 @@ module Nanite
124
124
 
125
125
  DEFAULT_OPTIONS = {:selector => :least_loaded}
126
126
 
127
- def initialize(type, payload, size=nil, opts={})
127
+ def initialize(type, payload, opts={}, size=nil)
128
128
  opts = DEFAULT_OPTIONS.merge(opts)
129
129
  @type = type
130
130
  @payload = payload
@@ -140,10 +140,10 @@ module Nanite
140
140
 
141
141
  def self.json_create(o)
142
142
  i = o['data']
143
- new(i['type'], i['payload'], o['size'], { :from => i['from'], :token => i['token'],
144
- :reply_to => i['reply_to'], :selector => i['selector'],
145
- :target => i['target'], :persistent => i['persistent'],
146
- :tags => i['tags'] })
143
+ new(i['type'], i['payload'], { :from => i['from'], :token => i['token'],
144
+ :reply_to => i['reply_to'], :selector => i['selector'],
145
+ :target => i['target'], :persistent => i['persistent'],
146
+ :tags => i['tags'] }, o['size'])
147
147
  end
148
148
 
149
149
  def to_s(filter=nil)
@@ -176,7 +176,7 @@ module Nanite
176
176
 
177
177
  DEFAULT_OPTIONS = {:selector => :least_loaded}
178
178
 
179
- def initialize(type, payload, size=nil, opts={})
179
+ def initialize(type, payload, opts={}, size=nil)
180
180
  opts = DEFAULT_OPTIONS.merge(opts)
181
181
  @type = type
182
182
  @payload = payload
@@ -191,9 +191,9 @@ module Nanite
191
191
 
192
192
  def self.json_create(o)
193
193
  i = o['data']
194
- new(i['type'], i['payload'], o['size'], { :from => i['from'], :token => i['token'],
195
- :selector => i['selector'], :target => i['target'],
196
- :persistent => i['persistent'], :tags => i['tags'] })
194
+ new(i['type'], i['payload'], { :from => i['from'], :token => i['token'],
195
+ :selector => i['selector'], :target => i['target'],
196
+ :persistent => i['persistent'], :tags => i['tags'] }, o['size'])
197
197
  end
198
198
 
199
199
  def to_s(filter=nil)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rightscale-nanite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1.3
4
+ version: 0.4.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezra Zygmuntowicz