action_cable_client 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf3e80558eb6d0f95a7231691b4418cf8db5477f
4
- data.tar.gz: 86148eae1c47b441775874811d55a9b330482e88
3
+ metadata.gz: baaee0fa62db9b0663ff622b5c021d7585ced1be
4
+ data.tar.gz: 16fd65b504d340638840da44a8639eb46796732a
5
5
  SHA512:
6
- metadata.gz: 8a681d1dd7de3ca8530f36a2998ceab0cf6fbbdc890f914ccb81db8670535dd28520cda5ced1a80fdd3f54702819c23b664835e753669bcca9e2a71f3d4ea64c
7
- data.tar.gz: 0b5170f14d921eaaf7d244806b9b8083fc58563fd7f382257c1aee936a4b77a94c9734f8794c139550ebe668375cff8145ec960af2d6471ec1ff37f2777748b0
6
+ metadata.gz: 15e2a68fe24a1f114d81e392dcc71946b67f27eefee85e32321e4c1e8fe9d072fa4b243b832f9c2b25a0cbc924d21928b57772857fe3bcd9db857aba90a08e1d
7
+ data.tar.gz: aa158410952cb4d2d35347b89b806bf0a756abf94ed7e54ca8ab5d669a7c5ff3a5799e4c7cfa4b8d31c15bfa709e7b4b606606edf5f0096f6faf3b75fa1bf7e2
@@ -1,3 +1,6 @@
1
+ ## 1.2.0
2
+ * Made the handling of received messages not all happen in one method. This allows for easier overriding of what is yielded, in case someone wants to also yield the URL for example.
3
+
1
4
  ## 1.1.0
2
5
  * Made message queuing optional, off by default. This allows for near-instant message sending
3
6
 
data/README.md CHANGED
@@ -64,7 +64,7 @@ There really isn't that much to this gem. :-)
64
64
  - You should receive a message like this:
65
65
  - `{"identifier"=>"{\"channel\":\"MeshRelayChannel\"}", "type"=>"confirm_subscription"}`
66
66
  3. Once subscribed, you can send messages.
67
- - Make sure that the command string matches the data-handling method name on your ActionCable server.
67
+ - Make sure that the `action` string matches the data-handling method name on your ActionCable server.
68
68
  - Your message JSON should look like this:
69
69
  - `{"command":"message","identifier":"{\"channel\":\"MeshRelayChannel\"}","data":"{\"to\":\"user1\",\"message\":\"hello from user2\",\"action\":\"chat\"}"}`
70
70
  - Received messages should look about the same
@@ -77,7 +77,7 @@ There really isn't that much to this gem. :-)
77
77
  payload = {
78
78
  command: 'command text',
79
79
  identifier: { channel: 'MeshRelayChannel' }.to_json,
80
- data: { to: 'user', message: 'hi' }.to_json
80
+ data: { to: 'user', message: 'hi', action: 'chat' }.to_json
81
81
  }.to_json
82
82
  ```
83
83
 
@@ -2,7 +2,7 @@
2
2
  class ActionCableClient
3
3
  class Message
4
4
  IDENTIFIER_KEY = 'identifier'
5
- IDENTIFIER_PING = '_ping'
5
+ IDENTIFIER_PING = 'ping'
6
6
  # Type is never sent, but is received
7
7
  # TODO: find a better place for this constant
8
8
  TYPE_KEY = 'type'
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  class ActionCableClient
3
- VERSION = '1.2.0'
3
+ VERSION = '1.2.1'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_cable_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - L. Preston Sego III
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-22 00:00:00.000000000 Z
11
+ date: 2016-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -129,5 +129,6 @@ rubyforge_project:
129
129
  rubygems_version: 2.5.1
130
130
  signing_key:
131
131
  specification_version: 4
132
- summary: ActionCableClient-1.2.0
132
+ summary: ActionCableClient-1.2.1
133
133
  test_files: []
134
+ has_rdoc: