meshruby 0.0.5 → 0.0.6
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 +4 -4
- data/.gitignore +1 -0
- data/lib/meshruby.rb +7 -5
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ec8cc39262c6f096cfdd4217e55492570ef6cda
|
4
|
+
data.tar.gz: 573e1767278b6fd99e66aca5a544793855462f03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da8445e9d57b2641d3e85655c70d9572f5f3784487a57e1a603d05baf66baea82b3ef9f0c6fde258130e1eac9efd29244f59116dfa2adf757e1fb66a52048aef
|
7
|
+
data.tar.gz: 83fb9901c1e1a7b14aba62ec843b0a0a1d921f50115b3085a565d0f162eb02619c1b9ea2567df4c433e15b551065456d30b82f54df654e30548236d351f2129f
|
data/.gitignore
CHANGED
data/lib/meshruby.rb
CHANGED
@@ -21,12 +21,14 @@ module EventMachine
|
|
21
21
|
### Bootstraps all the events for MeshBlu in the correct order.
|
22
22
|
def create_socket_events
|
23
23
|
#OTHER EVENTS: :identify, :identity, :ready, :disconnect, :message
|
24
|
-
this = self
|
25
|
-
socket.on :
|
26
|
-
|
27
|
-
|
24
|
+
this = self; socket = this.socket # socket.io-client bugs?
|
25
|
+
socket.on :connect do
|
26
|
+
socket.on :identify do |data|
|
27
|
+
auth = {uuid: this.uuid, token: this.token}
|
28
|
+
emit :identity, auth
|
29
|
+
end
|
30
|
+
socket.on(:message) { |msg| this.push(msg); this.pop }
|
28
31
|
end
|
29
|
-
socket.on(:message) { |msg| this.push(msg); this.pop }
|
30
32
|
end
|
31
33
|
|
32
34
|
# Sanitize messages, making a best effort attempt to hashify them, otherwise
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meshruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rick Carlino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
147
|
rubyforge_project:
|
148
|
-
rubygems_version: 2.4.
|
148
|
+
rubygems_version: 2.4.8
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: Provides ability to connect to the MeshBlu IoT service using EventMachine
|
@@ -153,4 +153,3 @@ test_files:
|
|
153
153
|
- spec/helpers.rb
|
154
154
|
- spec/lib/meshruby_spec.rb
|
155
155
|
- spec/spec_helper.rb
|
156
|
-
has_rdoc:
|