mqtt 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/NEWS CHANGED
@@ -1,26 +1,37 @@
1
1
  Ruby MQTT NEWS
2
2
  ==============
3
3
 
4
+
5
+ Ruby MQTT Version 0.0.9 (2012-12-21)
6
+ ------------------------------------
7
+
8
+ * Fixes for Ruby 1.9.3 by Mike English
9
+ * Fix for ```client_id``` typo by Anubisss
10
+ * Added methods to inspect the incoming message queue: ```queue_empty?``` and ```queue_length```
11
+ * Fixed incorrect implementation of the parsing and serialising of Subscription Acknowledgement packets
12
+ * Changed test mocking from Mocha to rspec-mocks
13
+
14
+
4
15
  Ruby MQTT Version 0.0.8 (2011-02-04)
5
16
  ------------------------------------
6
17
 
7
- * Implemented Last Will and Testament feature.
8
- * Renamed dup attribute to duplicate to avoid method name clash.
9
- * Made the random client_id generator a public class method.
18
+ * Implemented Last Will and Testament feature
19
+ * Renamed dup attribute to duplicate to avoid method name clash
20
+ * Made the random ```client_id``` generator a public class method
10
21
 
11
22
 
12
23
  Ruby MQTT Version 0.0.7 (2011-01-19)
13
24
  ------------------------------------
14
25
 
15
26
  * You can now pass a topic and block to client.get
16
- * Added MQTT::Client.connect class method.
27
+ * Added MQTT::Client.connect class method
17
28
 
18
29
 
19
30
  Ruby MQTT Version 0.0.5 (2011-01-18)
20
31
  ------------------------------------
21
32
 
22
33
  * Implemented setting username and password (MQTT 3.1)
23
- * Renamed clean_start to clean_session
34
+ * Renamed ```clean_start``` to ``clean_session```
24
35
  * Started using autoload to load classes
25
36
  * Modernised Gem building mechanisms
26
37
 
@@ -28,24 +39,24 @@ Ruby MQTT Version 0.0.5 (2011-01-18)
28
39
  Ruby MQTT Version 0.0.4 (2009-02-22)
29
40
  ------------------------------------
30
41
 
31
- * Re-factored packet encoding/decoding into one class per packet type.
32
- * Added MQTT::Proxy class for implementing an MQTT proxy.
42
+ * Re-factored packet encoding/decoding into one class per packet type
43
+ * Added MQTT::Proxy class for implementing an MQTT proxy
33
44
 
34
45
 
35
46
  Ruby MQTT Version 0.0.3 (2009-02-08)
36
47
  ------------------------------------
37
48
 
38
- * Added checking of Connection Acknowledgement.
39
- * Automatic client identifier generation.
49
+ * Added checking of Connection Acknowledgement
50
+ * Automatic client identifier generation
40
51
 
41
52
 
42
53
  Ruby MQTT Version 0.0.2 (2009-02-03)
43
54
  ------------------------------------
44
55
 
45
- * Added support for packets longer than 127 bytes.
56
+ * Added support for packets longer than 127 bytes
46
57
 
47
58
 
48
59
  Ruby MQTT Version 0.0.1 (2009-02-01)
49
60
  ------------------------------------
50
61
 
51
- * Initial Release.
62
+ * Initial Release
data/lib/mqtt/client.rb CHANGED
@@ -117,7 +117,7 @@ class MQTT::Client
117
117
  def connect(clientid=nil)
118
118
  if !clientid.nil?
119
119
  @client_id = clientid
120
- elsif @clientid.nil?
120
+ elsif @client_id.nil?
121
121
  @client_id = MQTT::Client.generate_client_id
122
122
  @clean_session = true
123
123
  end
@@ -167,11 +167,11 @@ class MQTT::Client
167
167
  packet = MQTT::Packet::Disconnect.new
168
168
  send_packet(packet)
169
169
  end
170
- @read_thread.kill if @read_thread and @read_thread.alive?
171
- @read_thread = nil
172
170
  @socket.close unless @socket.nil?
173
171
  @socket = nil
174
172
  end
173
+ @read_thread.kill if @read_thread and @read_thread.alive?
174
+ @read_thread = nil
175
175
  end
176
176
 
177
177
  # Checks whether the client is connected to the broker.
@@ -248,6 +248,16 @@ class MQTT::Client
248
248
  end
249
249
  end
250
250
 
251
+ # Returns true if the incoming message queue is empty.
252
+ def queue_empty?
253
+ @read_queue.empty?
254
+ end
255
+
256
+ # Returns the length of the incoming message queue.
257
+ def queue_length
258
+ @read_queue.length
259
+ end
260
+
251
261
  # Send a unsubscribe message for one or more topics on the MQTT broker
252
262
  def unsubscribe(*topics)
253
263
  packet = MQTT::Packet::Unsubscribe.new(
data/lib/mqtt/packet.rb CHANGED
@@ -59,7 +59,7 @@ module MQTT
59
59
  # The header is removed from the buffer passed into this function
60
60
  def self.parse_header(buffer)
61
61
  # Work out the class
62
- type_id = ((buffer[0] & 0xF0) >> 4)
62
+ type_id = ((buffer.unpack("C*")[0] & 0xF0) >> 4)
63
63
  packet_class = MQTT::PACKET_TYPES[type_id]
64
64
  if packet_class.nil?
65
65
  raise ProtocolException.new("Invalid packet type identifier: #{type_id}")
@@ -67,9 +67,9 @@ module MQTT
67
67
 
68
68
  # Create a new packet object
69
69
  packet = packet_class.new(
70
- :duplicate => ((buffer[0] & 0x08) >> 3) == 0x01,
71
- :qos => ((buffer[0] & 0x06) >> 1),
72
- :retain => ((buffer[0] & 0x01) >> 0) == 0x01
70
+ :duplicate => ((buffer.unpack("C*")[0] & 0x08) >> 3) == 0x01,
71
+ :qos => ((buffer.unpack("C*")[0] & 0x06) >> 1),
72
+ :retain => ((buffer.unpack("C*")[0] & 0x01) >> 0) == 0x01
73
73
  )
74
74
 
75
75
  # Parse the packet length
@@ -80,7 +80,7 @@ module MQTT
80
80
  if buffer.length <= pos
81
81
  raise ProtocolException.new("The packet length header is incomplete")
82
82
  end
83
- digit = buffer[pos]
83
+ digit = buffer.unpack("C*")[pos]
84
84
  body_length += ((digit & 0x7F) * multiplier)
85
85
  multiplier *= 0x80
86
86
  pos += 1
@@ -617,11 +617,16 @@ module MQTT
617
617
  @granted_qos ||= []
618
618
  end
619
619
 
620
+ # Set the granted QOS value for each of the topics that were subscribed to
621
+ # Can either be an integer or an array or integers.
620
622
  def granted_qos=(value)
621
- unless value.is_a?(Array)
622
- raise "granted QOS should be an array of arrays"
623
+ if value.is_a?(Array)
624
+ @granted_qos = value
625
+ elsif value.is_a?(Integer)
626
+ @granted_qos = [value]
627
+ else
628
+ raise "granted QOS should be an integer or an array of QOS levels"
623
629
  end
624
- @granted_qos = value
625
630
  end
626
631
 
627
632
  # Get serialisation of packet's body
@@ -630,7 +635,7 @@ module MQTT
630
635
  raise "no granted QOS given when serialising packet"
631
636
  end
632
637
  body = encode_short(@message_id)
633
- granted_qos.flatten.each { |qos| body += encode_bytes(qos) }
638
+ granted_qos.each { |qos| body += encode_bytes(qos) }
634
639
  return body
635
640
  end
636
641
 
@@ -639,7 +644,7 @@ module MQTT
639
644
  super(buffer)
640
645
  @message_id = shift_short(buffer)
641
646
  while(buffer.length>0)
642
- @granted_qos << [shift_byte(buffer),shift_byte(buffer)]
647
+ @granted_qos << shift_byte(buffer)
643
648
  end
644
649
  end
645
650
  end
data/lib/mqtt/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module MQTT
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -8,6 +8,7 @@ describe MQTT::Client do
8
8
  before(:each) do
9
9
  @client = MQTT::Client.new
10
10
  @socket = StringIO.new
11
+ @socket.set_encoding("binary") if @socket.respond_to?(:set_encoding)
11
12
  end
12
13
 
13
14
  describe "initializing a client" do
@@ -64,24 +65,24 @@ describe MQTT::Client do
64
65
 
65
66
  describe "when calling the 'connect' method" do
66
67
  before(:each) do
67
- TCPSocket.stubs(:new).returns(@socket)
68
- Thread.stubs(:new)
69
- @client.stubs(:receive_connack)
68
+ TCPSocket.stub(:new).and_return(@socket)
69
+ Thread.stub(:new)
70
+ @client.stub(:receive_connack)
70
71
  end
71
72
 
72
73
  it "should create a TCP Socket if not connected" do
73
- TCPSocket.expects(:new).once.returns(@socket)
74
+ TCPSocket.should_receive(:new).once.and_return(@socket)
74
75
  @client.connect('myclient')
75
76
  end
76
77
 
77
78
  it "should not create a new TCP Socket if connected" do
78
- @client.stubs(:connected?).returns(true)
79
- TCPSocket.expects(:new).never
79
+ @client.stub(:connected?).and_return(true)
80
+ TCPSocket.should_receive(:new).never
80
81
  @client.connect('myclient')
81
82
  end
82
83
 
83
84
  it "should start the reader thread if not connected" do
84
- Thread.expects(:new).once
85
+ Thread.should_receive(:new).once
85
86
  @client.connect('myclient')
86
87
  end
87
88
 
@@ -91,17 +92,17 @@ describe MQTT::Client do
91
92
  end
92
93
 
93
94
  it "should try and read an acknowledgement packet to the socket if not connected" do
94
- @client.expects(:receive_connack).once
95
+ @client.should_receive(:receive_connack).once
95
96
  @client.connect('myclient')
96
97
  end
97
98
 
98
99
  it "should disconnect after connecting, if a block is given" do
99
- @client.expects(:disconnect).once
100
+ @client.should_receive(:disconnect).once
100
101
  @client.connect('myclient') { nil }
101
102
  end
102
103
 
103
104
  it "should not disconnect after connecting, if no block is given" do
104
- @client.expects(:disconnect).never
105
+ @client.should_receive(:disconnect).never
105
106
  @client.connect('myclient')
106
107
  end
107
108
 
@@ -162,7 +163,7 @@ describe MQTT::Client do
162
163
  describe "when calling the 'receive_connack' method" do
163
164
  before(:each) do
164
165
  @client.instance_variable_set(:@socket, @socket)
165
- IO.stubs(:select).returns([[@socket], [], []])
166
+ IO.stub(:select).and_return([[@socket], [], []])
166
167
  end
167
168
 
168
169
  it "should not throw an exception for a successful CONNACK packet" do
@@ -204,30 +205,31 @@ describe MQTT::Client do
204
205
 
205
206
  describe "when calling the 'disconnect' method" do
206
207
  before(:each) do
208
+ thread = double('Read Thread', :alive? => true, :kill => true)
207
209
  @client.instance_variable_set(:@socket, @socket)
208
- @client.instance_variable_set(:@read_thread, stub_everything('Read Thread'))
210
+ @client.instance_variable_set(:@read_thread, thread)
209
211
  end
210
212
 
211
213
  it "should not do anything if the socket is already disconnected" do
212
- @client.stubs(:connected?).returns(false)
214
+ @client.stub(:connected?).and_return(false)
213
215
  @client.disconnect(true)
214
216
  @socket.string.should == ""
215
217
  end
216
218
 
217
219
  it "should write a valid DISCONNECT packet to the socket if connected and the send_msg=true an" do
218
- @client.stubs(:connected?).returns(true)
220
+ @client.stub(:connected?).and_return(true)
219
221
  @client.disconnect(true)
220
222
  @socket.string.should == "\xE0\x00"
221
223
  end
222
224
 
223
225
  it "should not write anything to the socket if the send_msg=false" do
224
- @client.stubs(:connected?).returns(true)
226
+ @client.stub(:connected?).and_return(true)
225
227
  @client.disconnect(false)
226
228
  @socket.string.should be_empty
227
229
  end
228
230
 
229
231
  it "should call the close method on the socket" do
230
- @socket.expects(:close)
232
+ @socket.should_receive(:close)
231
233
  @client.disconnect
232
234
  end
233
235
  end
@@ -300,17 +302,41 @@ describe MQTT::Client do
300
302
  @socket.string.should == "\x82\x0e\x00\x01\x00\x03a/b\x00\x00\x03c/d\x01"
301
303
  end
302
304
  end
305
+
306
+ describe "when calling the 'queue_length' method" do
307
+ it "should return 0 if there are no incoming messages waiting" do
308
+ @client.queue_length.should == 0
309
+ end
310
+
311
+ it "should return 1 if there is one incoming message waiting" do
312
+ inject_packet(:topic => 'topic0', :payload => 'payload0', :qos => 0)
313
+ @client.queue_length.should == 1
314
+ end
315
+
316
+ it "should return 2 if there are two incoming message waiting" do
317
+ inject_packet(:topic => 'topic0', :payload => 'payload0', :qos => 0)
318
+ inject_packet(:topic => 'topic0', :payload => 'payload1', :qos => 0)
319
+ @client.queue_length.should == 2
320
+ end
321
+ end
322
+
323
+
324
+ describe "when calling the 'queue_emtpy?' method" do
325
+ it "should return return true if there no incoming messages waiting" do
326
+ @client.queue_empty?.should be_true
327
+ end
328
+
329
+ it "should return return false if there is an incoming messages waiting" do
330
+ inject_packet(:topic => 'topic0', :payload => 'payload0', :qos => 0)
331
+ @client.queue_empty?.should be_false
332
+ end
333
+ end
303
334
 
304
335
  describe "when calling the 'get' method" do
305
336
  before(:each) do
306
337
  @client.instance_variable_set(:@socket, @socket)
307
338
  end
308
339
 
309
- def inject_packet(opts={})
310
- packet = MQTT::Packet::Publish.new(opts)
311
- @client.instance_variable_get('@read_queue').push(packet)
312
- end
313
-
314
340
  it "should successfull receive a valid PUBLISH packet with a QoS 0" do
315
341
  inject_packet(:topic => 'topic0', :payload => 'payload0', :qos => 0)
316
342
  topic,payload = @client.get
@@ -323,6 +349,7 @@ describe MQTT::Client do
323
349
  topic,payload = @client.get
324
350
  topic.should == 'topic1'
325
351
  payload.should == 'payload1'
352
+ @client.queue_empty?.should be_true
326
353
  end
327
354
  end
328
355
 
@@ -345,9 +372,10 @@ describe MQTT::Client do
345
372
  describe "when calling the 'receive_packet' method" do
346
373
  before(:each) do
347
374
  @client.instance_variable_set(:@socket, @socket)
348
- IO.stubs(:select).returns([[@socket], [], []])
375
+ IO.stub(:select).and_return([[@socket], [], []])
349
376
  @read_queue = @client.instance_variable_get(:@read_queue)
350
- @parent_thread = Thread.current[:parent] = stub_everything('Parent Thread')
377
+ @parent_thread = Thread.current[:parent] = double('Parent Thread')
378
+ @parent_thread.stub(:raise)
351
379
  end
352
380
 
353
381
  it "should put PUBLISH messages on to the read queue" do
@@ -365,21 +393,21 @@ describe MQTT::Client do
365
393
  end
366
394
 
367
395
  it "should send a ping packet if one is due" do
368
- IO.expects(:select).returns(nil)
396
+ IO.should_receive(:select).and_return(nil)
369
397
  @client.instance_variable_set(:@last_pingreq, Time.at(0))
370
- @client.expects(:ping).once
398
+ @client.should_receive(:ping).once
371
399
  @client.send(:receive_packet)
372
400
  end
373
401
 
374
402
  it "should close the socket if there is an exception" do
375
- @socket.expects(:close).once
376
- MQTT::Packet.stubs(:read).raises(MQTT::Exception)
403
+ @socket.should_receive(:close).once
404
+ MQTT::Packet.stub(:read).and_raise(MQTT::Exception)
377
405
  @client.send(:receive_packet)
378
406
  end
379
407
 
380
408
  it "should pass exceptions up to parent thread" do
381
- @parent_thread.expects(:raise).once
382
- MQTT::Packet.stubs(:read).raises(MQTT::Exception)
409
+ @parent_thread.should_receive(:raise).once
410
+ MQTT::Packet.stub(:read).and_raise(MQTT::Exception)
383
411
  @client.send(:receive_packet)
384
412
  end
385
413
  end
@@ -422,4 +450,11 @@ describe MQTT::Client do
422
450
  end
423
451
  end
424
452
 
453
+ private
454
+
455
+ def inject_packet(opts={})
456
+ packet = MQTT::Packet::Publish.new(opts)
457
+ @client.instance_variable_get('@read_queue').push(packet)
458
+ end
459
+
425
460
  end
@@ -69,7 +69,7 @@ describe MQTT::Packet do
69
69
  end
70
70
 
71
71
  it "should provide a encode_bytes method to get some bytes as Integers" do
72
- data = @packet.send(:encode_bytes, 0x48, 0x65, 0x6c, 0x6c, ?o)
72
+ data = @packet.send(:encode_bytes, 0x48, 0x65, 0x6c, 0x6c, 'o'.unpack('C1')[0])
73
73
  data.should == 'Hello'
74
74
  end
75
75
 
@@ -977,13 +977,13 @@ end
977
977
  describe MQTT::Packet::Suback do
978
978
  describe "when serialising a packet" do
979
979
  it "should output the correct bytes for an acknowledgement to a single topic" do
980
- packet = MQTT::Packet::Suback.new( :granted_qos => [0,1], :message_id => 5 )
981
- packet.to_s.should == "\x90\x04\x00\x05\x00\x01"
980
+ packet = MQTT::Packet::Suback.new( :granted_qos => 0, :message_id => 5 )
981
+ packet.to_s.should == "\x90\x03\x00\x05\x00"
982
982
  end
983
983
 
984
984
  it "should output the correct bytes for an acknowledgement to a two topics" do
985
- packet = MQTT::Packet::Suback.new( :granted_qos => [[0,0],[1,0]], :message_id => 6 )
986
- packet.to_s.should == "\x90\x06\x00\x06\x00\x00\x01\x00"
985
+ packet = MQTT::Packet::Suback.new( :granted_qos => [0,1], :message_id => 6 )
986
+ packet.to_s.should == "\x90\x04\x00\x06\x00\x01"
987
987
  end
988
988
 
989
989
  it "should throw an exception when no granted QOSs are given" do
@@ -994,16 +994,34 @@ describe MQTT::Packet::Suback do
994
994
  )
995
995
  end
996
996
 
997
- it "should throw an exception if the granted QOSs are not an array" do
997
+ it "should throw an exception if the granted QOS is not an integer" do
998
998
  lambda {
999
- MQTT::Packet::Suback.new(:message_id => 8, :granted_qos => :foo).to_s
999
+ MQTT::Packet::Suback.new(:granted_qos => :foo, :message_id => 8).to_s
1000
1000
  }.should raise_error(
1001
- 'granted QOS should be an array of arrays'
1001
+ 'granted QOS should be an integer or an array of QOS levels'
1002
1002
  )
1003
1003
  end
1004
1004
  end
1005
1005
 
1006
- describe "when parsing a packet" do
1006
+ describe "when parsing a packet with a single QOS value of 0" do
1007
+ before(:each) do
1008
+ @packet = MQTT::Packet.parse( "\x90\x03\x12\x34\x00" )
1009
+ end
1010
+
1011
+ it "should correctly create the right type of packet object" do
1012
+ @packet.class.should == MQTT::Packet::Suback
1013
+ end
1014
+
1015
+ it "should set the message id of the packet correctly" do
1016
+ @packet.message_id.should == 0x1234
1017
+ end
1018
+
1019
+ it "should set the Granted QOS of the packet correctly" do
1020
+ @packet.granted_qos.should == [0]
1021
+ end
1022
+ end
1023
+
1024
+ describe "when parsing a packet with two QOS values" do
1007
1025
  before(:each) do
1008
1026
  @packet = MQTT::Packet.parse( "\x90\x04\x12\x34\x01\x01" )
1009
1027
  end
@@ -1017,7 +1035,7 @@ describe MQTT::Packet::Suback do
1017
1035
  end
1018
1036
 
1019
1037
  it "should set the Granted QOS of the packet correctly" do
1020
- @packet.granted_qos.should == [[1,1]]
1038
+ @packet.granted_qos.should == [1,1]
1021
1039
  end
1022
1040
  end
1023
1041
  end
@@ -1183,6 +1201,19 @@ describe "Serialising an invalid packet" do
1183
1201
  end
1184
1202
  end
1185
1203
 
1204
+ describe "Reading in an invalid packet" do
1205
+ context "that has 0 length" do
1206
+ it "should throw an exception" do
1207
+ lambda {
1208
+ data = StringIO.new
1209
+ MQTT::Packet.read(data)
1210
+ }.should raise_error(
1211
+ MQTT::ProtocolException
1212
+ )
1213
+ end
1214
+ end
1215
+ end
1216
+
1186
1217
  describe "Parsing an invalid packet" do
1187
1218
  context "that has an invalid type identifier" do
1188
1219
  it "should throw an exception" do
metadata CHANGED
@@ -1,177 +1,134 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: mqtt
3
- version: !ruby/object:Gem::Version
4
- hash: 15
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 0
9
- - 8
10
- version: 0.0.8
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.9
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Nicholas J Humfrey
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-02-04 00:00:00 +00:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-12-21 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: bundler
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 25
30
- segments:
31
- - 1
32
- - 0
33
- - 7
34
- version: 1.0.7
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 1.0.14
35
22
  type: :development
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: yard
39
23
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 1.0.14
30
+ - !ruby/object:Gem::Dependency
31
+ name: yard
32
+ requirement: !ruby/object:Gem::Requirement
41
33
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 7
46
- segments:
47
- - 0
48
- - 7
49
- - 2
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
50
37
  version: 0.7.2
51
38
  type: :development
52
- version_requirements: *id002
53
- - !ruby/object:Gem::Dependency
54
- name: rake
55
39
  prerelease: false
56
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.7.2
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake
48
+ requirement: !ruby/object:Gem::Requirement
57
49
  none: false
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- hash: 49
62
- segments:
63
- - 0
64
- - 8
65
- - 7
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
66
53
  version: 0.8.7
67
54
  type: :development
68
- version_requirements: *id003
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
55
  prerelease: false
72
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
73
57
  none: false
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- hash: 23
78
- segments:
79
- - 2
80
- - 6
81
- - 0
82
- version: 2.6.0
83
- type: :development
84
- version_requirements: *id004
85
- - !ruby/object:Gem::Dependency
86
- name: mocha
87
- prerelease: false
88
- requirement: &id005 !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.8.7
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec
64
+ requirement: !ruby/object:Gem::Requirement
89
65
  none: false
90
- requirements:
91
- - - ">="
92
- - !ruby/object:Gem::Version
93
- hash: 55
94
- segments:
95
- - 0
96
- - 10
97
- - 0
98
- version: 0.10.0
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: 2.6.0
99
70
  type: :development
100
- version_requirements: *id005
101
- - !ruby/object:Gem::Dependency
102
- name: rcov
103
71
  prerelease: false
104
- requirement: &id006 !ruby/object:Gem::Requirement
72
+ version_requirements: !ruby/object:Gem::Requirement
105
73
  none: false
106
- requirements:
107
- - - ">="
108
- - !ruby/object:Gem::Version
109
- hash: 59
110
- segments:
111
- - 0
112
- - 9
113
- - 0
114
- version: 0.9.0
115
- type: :development
116
- version_requirements: *id006
117
- description: Pure Ruby gem that implements the MQTT (Message Queue Telemetry Transport) protocol, a lightweight protocol for publish/subscribe messaging.
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: 2.6.0
78
+ description: Pure Ruby gem that implements the MQTT (Message Queue Telemetry Transport)
79
+ protocol, a lightweight protocol for publish/subscribe messaging.
118
80
  email: njh@aelius.com
119
81
  executables: []
120
-
121
82
  extensions: []
122
-
123
83
  extra_rdoc_files: []
124
-
125
- files:
84
+ files:
126
85
  - README
127
86
  - COPYING
128
87
  - GPL
129
88
  - NEWS
130
- - lib/mqtt/version.rb
131
- - lib/mqtt/proxy.rb
132
- - lib/mqtt/packet.rb
133
89
  - lib/mqtt/client.rb
90
+ - lib/mqtt/packet.rb
91
+ - lib/mqtt/proxy.rb
92
+ - lib/mqtt/version.rb
134
93
  - lib/mqtt.rb
135
- - spec/mqtt_packet_spec.rb
136
- - spec/mqtt_version_spec.rb
137
94
  - spec/mqtt_client_spec.rb
95
+ - spec/mqtt_packet_spec.rb
138
96
  - spec/mqtt_proxy_spec.rb
139
- has_rdoc: true
97
+ - spec/mqtt_version_spec.rb
140
98
  homepage: http://github.com/njh/ruby-mqtt
141
- licenses:
99
+ licenses:
142
100
  - Ruby
143
101
  post_install_message:
144
102
  rdoc_options: []
145
-
146
- require_paths:
103
+ require_paths:
147
104
  - lib
148
- required_ruby_version: !ruby/object:Gem::Requirement
105
+ required_ruby_version: !ruby/object:Gem::Requirement
149
106
  none: false
150
- requirements:
151
- - - ">="
152
- - !ruby/object:Gem::Version
153
- hash: 3
154
- segments:
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ segments:
155
112
  - 0
156
- version: "0"
157
- required_rubygems_version: !ruby/object:Gem::Requirement
113
+ hash: -1124379170804665788
114
+ required_rubygems_version: !ruby/object:Gem::Requirement
158
115
  none: false
159
- requirements:
160
- - - ">="
161
- - !ruby/object:Gem::Version
162
- hash: 3
163
- segments:
116
+ requirements:
117
+ - - ! '>='
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ segments:
164
121
  - 0
165
- version: "0"
122
+ hash: -1124379170804665788
166
123
  requirements: []
167
-
168
124
  rubyforge_project: mqtt
169
- rubygems_version: 1.3.7
125
+ rubygems_version: 1.8.23
170
126
  signing_key:
171
127
  specification_version: 3
172
128
  summary: Implementation of the MQTT (Message Queue Telemetry Transport) protocol
173
- test_files:
174
- - spec/mqtt_packet_spec.rb
175
- - spec/mqtt_version_spec.rb
129
+ test_files:
176
130
  - spec/mqtt_client_spec.rb
131
+ - spec/mqtt_packet_spec.rb
177
132
  - spec/mqtt_proxy_spec.rb
133
+ - spec/mqtt_version_spec.rb
134
+ has_rdoc: