anycable-rails 0.6.4 → 0.6.5
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/CHANGELOG.md +12 -0
- data/README.md +11 -7
- data/lib/anycable/rails/refinements/subscriptions.rb +5 -0
- data/lib/anycable/rails/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d538541df27b5712aadd225d788d43c7d6de563a15dcbb85dd9ef51ff1b13be4
|
4
|
+
data.tar.gz: e7e5c055860a07f2554af925cee5076a07f97cfcdfa7d540891cb187bbc32f72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 007b964f71b796feb189e76d82f2ae3e16c679c56811b9a1b7105bc5663e5e432bcebe4f9a16a971e3819be658f2fcfb8198576d7c9d75495dcc9dcd9db7949e
|
7
|
+
data.tar.gz: 257f761cfdd1fc3b05d8e1446297a7b31119c667e88e73db1a72485252f5f57e672ee6ac3c39b72e32286b4994d7b62f30f888c4aa12039202c8ccc93fb8df38
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,17 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 0.6.5 (2020-02-05)
|
6
|
+
|
7
|
+
- Make channel not found exception more descriptive. ([@palkan][])
|
8
|
+
|
9
|
+
Previusly, we returned `Undefined method handle_subscribe for nil` when Action Cable
|
10
|
+
couldn't resolve the channel class. Now we return `Channel not found: <name>`.
|
11
|
+
|
12
|
+
- Require a minimum version of Ruby when installing the gem. ([@bibendi][])
|
13
|
+
|
14
|
+
- Add ability to develop the gem with Docker. ([@bibendi][])
|
15
|
+
|
5
16
|
## 0.6.4 (2019-06-26) 👶
|
6
17
|
|
7
18
|
- Fix Compatibility bug when using with AnyCable. ([@palkan][])
|
@@ -131,3 +142,4 @@ Ignore tagged logger features ('cause we do not have _persistent_ logger).
|
|
131
142
|
[@alekseyl]: https://github.com/alekseyl
|
132
143
|
[@DmitryTsepelev]: https://github.com/DmitryTsepelev
|
133
144
|
[@sponomarev]: https://github.com/sponomarev
|
145
|
+
[@bibendi]: https://github.com/bibendi
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
[](https://gitpitch.com/anycable/anycable/master?grs=github) [](https://rubygems.org/gems/anycable-rails) [](https://travis-ci.org/anycable/anycable-rails)
|
2
2
|
[](https://gitter.im/anycable/Lobby)
|
3
|
-
[](https://docs.anycable.io
|
3
|
+
[](https://docs.anycable.io/#/ruby/rails)
|
4
4
|
|
5
5
|
# AnyCable Rails
|
6
6
|
|
@@ -20,8 +20,8 @@ You can even use Action Cable in development and not be afraid of [compatibility
|
|
20
20
|
|
21
21
|
## Requirements
|
22
22
|
|
23
|
-
- Ruby
|
24
|
-
- Rails
|
23
|
+
- Ruby >= 2.4; **NOTE:** for Ruby 2.6 use RC version of `google-protobuf` gem. In your Gemfile: `gem "google-protobuf", '>=3.7.0.rc.2'`
|
24
|
+
- Rails >= 5.0;
|
25
25
|
- Redis (see [other options]() for broadcasting)
|
26
26
|
|
27
27
|
## How It Works?
|
@@ -64,7 +64,7 @@ config.action_cable.url = "ws://localhost:3334/cable"
|
|
64
64
|
config.action_cable.url = "wss://ws.example.com/cable"
|
65
65
|
```
|
66
66
|
|
67
|
-
|
67
|
+
Then, run AnyCable RPC server:
|
68
68
|
|
69
69
|
```ruby
|
70
70
|
$ bundle exec anycable
|
@@ -74,17 +74,17 @@ $ bundle exec anycable
|
|
74
74
|
$ RAILS_ENV=production bundle exec anycable
|
75
75
|
```
|
76
76
|
|
77
|
-
And, finally, run AnyCable WebSocket server, e.g. [anycable-go](https://docs.anycable.io
|
77
|
+
And, finally, run AnyCable WebSocket server, e.g. [anycable-go](https://docs.anycable.io/#/anycable-go/getting_started):
|
78
78
|
|
79
79
|
```sh
|
80
80
|
anycable-go --host=localhost --port=3334
|
81
81
|
```
|
82
82
|
|
83
|
-
See [documentation](https://docs.anycable.io
|
83
|
+
See [documentation](https://docs.anycable.io/#/ruby/rails) for more information on AnyCable + Rails usage.
|
84
84
|
|
85
85
|
## Action Cable Compatibility
|
86
86
|
|
87
|
-
See [documentation](https://docs.anycable.io
|
87
|
+
See [documentation](https://docs.anycable.io/#/ruby/compatibility).
|
88
88
|
|
89
89
|
## Links
|
90
90
|
|
@@ -107,5 +107,9 @@ See [documentation](https://docs.anycable.io/#compatibility).
|
|
107
107
|
|
108
108
|
Bug reports and pull requests are welcome on GitHub at https://github.com/anycable/anycable-rails.
|
109
109
|
|
110
|
+
## Development
|
111
|
+
|
112
|
+
If you are familiar with Docker, you can use [DIP](https://github.com/bibendi/dip) to start developing the gem quickly.
|
113
|
+
|
110
114
|
## License
|
111
115
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
@@ -7,6 +7,11 @@ module AnyCable
|
|
7
7
|
# Find or add a subscription to the list
|
8
8
|
def fetch(identifier)
|
9
9
|
add("identifier" => identifier) unless subscriptions[identifier]
|
10
|
+
|
11
|
+
unless subscriptions[identifier]
|
12
|
+
raise "Channel not found: #{ActiveSupport::JSON.decode(identifier).fetch('channel')}"
|
13
|
+
end
|
14
|
+
|
10
15
|
subscriptions[identifier]
|
11
16
|
end
|
12
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anycable-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- palkan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: anycable
|
@@ -168,14 +168,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
168
168
|
requirements:
|
169
169
|
- - ">="
|
170
170
|
- !ruby/object:Gem::Version
|
171
|
-
version: '
|
171
|
+
version: '2.4'
|
172
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
173
|
requirements:
|
174
174
|
- - ">="
|
175
175
|
- !ruby/object:Gem::Version
|
176
176
|
version: '0'
|
177
177
|
requirements: []
|
178
|
-
rubygems_version: 3.0.
|
178
|
+
rubygems_version: 3.0.6
|
179
179
|
signing_key:
|
180
180
|
specification_version: 4
|
181
181
|
summary: Rails adapter for AnyCable
|