nodevent 3.1.5 → 3.1.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.
@@ -28,12 +28,13 @@ module NoDevent
28
28
  end
29
29
 
30
30
  def publish(where, message)
31
+ message = JSON.parse(message)
31
32
  req = {
32
33
  :body => {
33
34
  :api_key => api_key,
34
- :event => message[:event],
35
- :room => message[:room],
36
- :message => message[:message]
35
+ :event => message["event"],
36
+ :room => message["room"],
37
+ :message => message["message"]
37
38
  }
38
39
  }
39
40
  self.class.post("http://#{HOSTNAME}/namespaces#{where}/emit",req)
@@ -1,3 +1,3 @@
1
1
  module Nodevent
2
- VERSION = "3.1.5"
2
+ VERSION = "3.1.6"
3
3
  end
@@ -15,7 +15,7 @@ describe ::NoDevent::NetPublisher do
15
15
  subject.namespace.should be_present
16
16
  end
17
17
  context "#publish" do
18
- subject {net_publisher.publish(net_publisher.namespace, {:room => "the_room", :event => "the_event", :message => "the_message"})}
18
+ subject {net_publisher.publish(net_publisher.namespace, {:room => "the_room", :event => "the_event", :message => "the_message"}.to_json)}
19
19
  it {should be_success}
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nodevent
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.5
4
+ version: 3.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: