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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/lib/meshruby.rb +7 -5
  4. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfbcd2a125b9389e43bb7d01e098a2a78ba97c68
4
- data.tar.gz: a099684d5522cf5431ed0afeea195f42b5c22fc9
3
+ metadata.gz: 6ec8cc39262c6f096cfdd4217e55492570ef6cda
4
+ data.tar.gz: 573e1767278b6fd99e66aca5a544793855462f03
5
5
  SHA512:
6
- metadata.gz: 6ae30b9515a7174dab9e92118ee7ae5e6ce5b23131e31920c1b8abad967357f891fb6d8a4e5c51b76dd06a1834b5f4004d32c706b1cf607d83f901f28f9075d2
7
- data.tar.gz: cc69084eeef375728a2c64daebf50a589c70a8db0e52dc08d1c09919abdfaef40c4537b9b4dadbe93f8b2d249c7104c7d85b4c06034c55fb873bf536f24ea7d6
6
+ metadata.gz: da8445e9d57b2641d3e85655c70d9572f5f3784487a57e1a603d05baf66baea82b3ef9f0c6fde258130e1eac9efd29244f59116dfa2adf757e1fb66a52048aef
7
+ data.tar.gz: 83fb9901c1e1a7b14aba62ec843b0a0a1d921f50115b3085a565d0f162eb02619c1b9ea2567df4c433e15b551065456d30b82f54df654e30548236d351f2129f
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ *.gem
1
2
  *.rbc
2
3
  *.swp
3
4
  .bundle/*
@@ -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 :identify do |data|
26
- auth = {uuid: this.uuid, token: this.token, socketid: data['socketid']}
27
- emit :identity, auth
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.5
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-06-26 00:00:00.000000000 Z
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.6
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: