action_cable_subscription_adapter 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -3
- data/lib/action_cable_subscription_adapter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dc942b85ff9f632967e3964e9abbc30058197fa
|
4
|
+
data.tar.gz: 07aeab84e51126fb18bc6e332a5b3b40d9e5666b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c7946b4cf33e45da18dfdfdebbc7be24c1a37a1f09a5da3e65eb54fe3461bfa7ac47fd4460b083d0655003f201ce1f33be1feb8c9e671270e70f6647910f936
|
7
|
+
data.tar.gz: fd4d4d7d4b5bb140857936c879a81b8f94fa0dc988a1db945e9870b1a4fe513fab5db8c134849d93415e5196af4eac2c2a15a86689113f363dade43c365b9448
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Implements a configuration option that allows you to inject a custom configurable Redis client
|
4
4
|
For ActionCable to use in its SubscriptionAdapter. This is useful if you use something like Redis::Namespace
|
5
|
-
Which needs to be configured with a Redis URL and Namespace name usually coming from ENV vars. Rail's `cable.yml` is insufficient for this because it
|
5
|
+
Which needs to be configured with a Redis URL and Namespace name usually coming from ENV vars. Rail's `cable.yml` is insufficient for this because it only allows URL configuration of the Redis client. You can also use this gem to using distributed Redis with Makara.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -22,7 +22,22 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
Set the adapter in `config/cable.yml`
|
26
|
+
|
27
|
+
```
|
28
|
+
development:
|
29
|
+
adapter: custom_adapter
|
30
|
+
|
31
|
+
test:
|
32
|
+
adapter: async
|
33
|
+
|
34
|
+
production:
|
35
|
+
adapter: custom_adapter
|
36
|
+
```
|
37
|
+
|
38
|
+
The `custom_adapter` will make ActionCable load this gem's SubscriptionAdapter rather than its built in one. Then...
|
39
|
+
|
40
|
+
Create an initializer and set your custom Redis client.
|
26
41
|
Example:
|
27
42
|
|
28
43
|
```ruby
|
@@ -43,7 +58,7 @@ ActionCableSubscriptionAdapter.config do |c|
|
|
43
58
|
end
|
44
59
|
```
|
45
60
|
|
46
|
-
The custom Redis client needs to conform to the [
|
61
|
+
The custom Redis client needs to conform to the [redis-rb](https://github.com/redis/redis-rb) gem's API.
|
47
62
|
|
48
63
|
## Development
|
49
64
|
|