em-mqtt 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/bin/em-mqtt CHANGED
@@ -1,8 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
-
3
- $:.unshift File.dirname(__FILE__)+'/../lib'
4
-
5
2
  require 'rubygems'
6
- require 'em-mqtt'
3
+ $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", 'lib')))
4
+ require 'em/mqtt'
7
5
 
8
6
  EventMachine::MQTT::Server.new(ARGV).run
data/lib/em/mqtt.rb ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'eventmachine'
4
+ require 'logger'
5
+ require 'mqtt'
6
+
7
+ require "em/mqtt/version"
8
+
9
+ module EventMachine::MQTT
10
+
11
+ autoload :ClientConnection, 'em/mqtt/client_connection'
12
+ autoload :Connection, 'em/mqtt/connection'
13
+ autoload :Server, 'em/mqtt/server'
14
+ autoload :ServerConnection, 'em/mqtt/server_connection'
15
+
16
+ end
File without changes
@@ -52,9 +52,9 @@ class EventMachine::MQTT::ClientConnection < EventMachine::MQTT::Connection
52
52
  @receive_callback = block
53
53
  end
54
54
 
55
- def receive_msg(message)
55
+ def receive_msg(packet)
56
56
  # Alternatively, subclass this method
57
- @receive_callback.call(message) unless @receive_callback.nil?
57
+ @receive_callback.call(packet) unless @receive_callback.nil?
58
58
  end
59
59
 
60
60
  def unbind
File without changes
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  module EventMachine
2
2
  module MQTT
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -1,7 +1,6 @@
1
1
  $:.unshift(File.dirname(__FILE__))
2
2
 
3
3
  require 'spec_helper'
4
- require 'em-mqtt'
5
4
 
6
5
  describe EventMachine::MQTT do
7
6
 
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: em-mqtt
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease:
4
+ prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 0
9
- - 2
10
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
11
10
  platform: ruby
12
11
  authors:
13
12
  - Nicholas J Humfrey
@@ -15,134 +14,91 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2012-09-16 00:00:00 Z
17
+ date: 2013-04-10 00:00:00 +01:00
18
+ default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- name: eventmachine
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
21
+ type: :runtime
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
25
23
  requirements:
26
24
  - - ">="
27
25
  - !ruby/object:Gem::Version
28
- hash: 3
29
26
  segments:
30
27
  - 0
31
28
  version: "0"
32
- type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: mqtt
29
+ name: eventmachine
30
+ requirement: *id001
36
31
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- none: false
32
+ - !ruby/object:Gem::Dependency
33
+ type: :runtime
34
+ version_requirements: &id002 !ruby/object:Gem::Requirement
39
35
  requirements:
40
36
  - - ">="
41
37
  - !ruby/object:Gem::Version
42
- hash: 15
43
38
  segments:
44
39
  - 0
45
40
  - 0
46
41
  - 8
47
42
  version: 0.0.8
48
- type: :runtime
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
51
- name: bundler
43
+ name: mqtt
44
+ requirement: *id002
52
45
  prerelease: false
53
- requirement: &id003 !ruby/object:Gem::Requirement
54
- none: false
46
+ - !ruby/object:Gem::Dependency
47
+ type: :development
48
+ version_requirements: &id003 !ruby/object:Gem::Requirement
55
49
  requirements:
56
50
  - - ">="
57
51
  - !ruby/object:Gem::Version
58
- hash: 25
59
52
  segments:
60
53
  - 1
61
54
  - 0
62
- - 7
63
- version: 1.0.7
64
- type: :development
65
- version_requirements: *id003
66
- - !ruby/object:Gem::Dependency
67
- name: yard
55
+ - 14
56
+ version: 1.0.14
57
+ name: bundler
58
+ requirement: *id003
68
59
  prerelease: false
69
- requirement: &id004 !ruby/object:Gem::Requirement
70
- none: false
60
+ - !ruby/object:Gem::Dependency
61
+ type: :development
62
+ version_requirements: &id004 !ruby/object:Gem::Requirement
71
63
  requirements:
72
64
  - - ">="
73
65
  - !ruby/object:Gem::Version
74
- hash: 7
75
66
  segments:
76
67
  - 0
77
68
  - 7
78
69
  - 2
79
70
  version: 0.7.2
80
- type: :development
81
- version_requirements: *id004
82
- - !ruby/object:Gem::Dependency
83
- name: rake
71
+ name: yard
72
+ requirement: *id004
84
73
  prerelease: false
85
- requirement: &id005 !ruby/object:Gem::Requirement
86
- none: false
74
+ - !ruby/object:Gem::Dependency
75
+ type: :development
76
+ version_requirements: &id005 !ruby/object:Gem::Requirement
87
77
  requirements:
88
78
  - - ">="
89
79
  - !ruby/object:Gem::Version
90
- hash: 49
91
80
  segments:
92
81
  - 0
93
82
  - 8
94
83
  - 7
95
84
  version: 0.8.7
96
- type: :development
97
- version_requirements: *id005
98
- - !ruby/object:Gem::Dependency
99
- name: rspec
85
+ name: rake
86
+ requirement: *id005
100
87
  prerelease: false
101
- requirement: &id006 !ruby/object:Gem::Requirement
102
- none: false
88
+ - !ruby/object:Gem::Dependency
89
+ type: :development
90
+ version_requirements: &id006 !ruby/object:Gem::Requirement
103
91
  requirements:
104
92
  - - ">="
105
93
  - !ruby/object:Gem::Version
106
- hash: 23
107
94
  segments:
108
95
  - 2
109
96
  - 6
110
97
  - 0
111
98
  version: 2.6.0
112
- type: :development
113
- version_requirements: *id006
114
- - !ruby/object:Gem::Dependency
115
- name: mocha
116
- prerelease: false
117
- requirement: &id007 !ruby/object:Gem::Requirement
118
- none: false
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- hash: 55
123
- segments:
124
- - 0
125
- - 10
126
- - 0
127
- version: 0.10.0
128
- type: :development
129
- version_requirements: *id007
130
- - !ruby/object:Gem::Dependency
131
- name: rcov
99
+ name: rspec
100
+ requirement: *id006
132
101
  prerelease: false
133
- requirement: &id008 !ruby/object:Gem::Requirement
134
- none: false
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- hash: 59
139
- segments:
140
- - 0
141
- - 9
142
- - 0
143
- version: 0.9.0
144
- type: :development
145
- version_requirements: *id008
146
102
  description: This gem adds MQTT (Message Queue Telemetry Transport) protocol support to EventMachine.
147
103
  email: njh@aelius.com
148
104
  executables:
@@ -156,15 +112,14 @@ files:
156
112
  - COPYING
157
113
  - GPL
158
114
  - NEWS
159
- - lib/em-mqtt/client.rb.new.rb
160
- - lib/em-mqtt/client_connection.rb
161
- - lib/em-mqtt/connection.rb
162
- - lib/em-mqtt/server.rb
163
- - lib/em-mqtt/server_connection.rb
164
- - lib/em-mqtt/version.rb
165
- - lib/em-mqtt.rb
166
- - spec/em_mqtt_version_spec.rb
167
- - bin/em-mqtt
115
+ - lib/em/mqtt/client.rb.new.rb
116
+ - lib/em/mqtt/client_connection.rb
117
+ - lib/em/mqtt/connection.rb
118
+ - lib/em/mqtt/server.rb
119
+ - lib/em/mqtt/server_connection.rb
120
+ - lib/em/mqtt/version.rb
121
+ - lib/em/mqtt.rb
122
+ has_rdoc: true
168
123
  homepage: http://github.com/njh/ruby-em-mqtt
169
124
  licenses:
170
125
  - Ruby
@@ -174,30 +129,25 @@ rdoc_options: []
174
129
  require_paths:
175
130
  - lib
176
131
  required_ruby_version: !ruby/object:Gem::Requirement
177
- none: false
178
132
  requirements:
179
133
  - - ">="
180
134
  - !ruby/object:Gem::Version
181
- hash: 3
182
135
  segments:
183
136
  - 0
184
137
  version: "0"
185
138
  required_rubygems_version: !ruby/object:Gem::Requirement
186
- none: false
187
139
  requirements:
188
140
  - - ">="
189
141
  - !ruby/object:Gem::Version
190
- hash: 3
191
142
  segments:
192
143
  - 0
193
144
  version: "0"
194
145
  requirements: []
195
146
 
196
147
  rubyforge_project:
197
- rubygems_version: 1.8.11
148
+ rubygems_version: 1.3.6
198
149
  signing_key:
199
150
  specification_version: 3
200
151
  summary: MQTT for EventMachine
201
152
  test_files:
202
153
  - spec/em_mqtt_version_spec.rb
203
- has_rdoc:
data/lib/em-mqtt.rb DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'eventmachine'
4
- require 'logger'
5
- require 'mqtt'
6
-
7
- require "em-mqtt/version"
8
-
9
- module EventMachine::MQTT
10
-
11
- autoload :ClientConnection, 'em-mqtt/client_connection'
12
- autoload :Connection, 'em-mqtt/connection'
13
- autoload :Server, 'em-mqtt/server'
14
- autoload :ServerConnection, 'em-mqtt/server_connection'
15
-
16
- end