solid_cable 1.0.5 → 1.1.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfd23a7cb7209b15a906bea58757f19cc7eb94b6581e1b067af8a47a7f8038bb
|
4
|
+
data.tar.gz: f3d94b8299931398c09178f136ef09c01ce221deac97c8456f5a93150714dfe6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06b9e7127dd9ffb5d57760a5da89bed82c68d0da1cbe54a8460eab5c7663dd49ebc9b7693a3237f7a481884b450f59c6a3d0cad82216153cd36bd9abbd3d7ed0
|
7
|
+
data.tar.gz: b57dc804ae3e1e347ee99a649e48ead6e9d48aa4fb8bf5dbd4553e15d2b82af5d4440a6f73ae37f3e576be970a192524e5ca37bcd73c7ffd492cfd6fffdc143c
|
data/README.md
CHANGED
@@ -23,7 +23,7 @@ $ gem install solid_cable
|
|
23
23
|
Now, you need to run the installer:
|
24
24
|
|
25
25
|
```bash
|
26
|
-
$ bin/rails
|
26
|
+
$ bin/rails solid_cable:install
|
27
27
|
```
|
28
28
|
|
29
29
|
This will create the `db/cable_schema.rb` file.
|
@@ -57,7 +57,7 @@ production:
|
|
57
57
|
```
|
58
58
|
|
59
59
|
> [!NOTE]
|
60
|
-
> Calling `bin/rails
|
60
|
+
> Calling `bin/rails solid_cable:install` will automatically setup `config/cable.yml`, so no additional configuration is needed there (although you must make sure that you use the `cable` name in `database.yml` for this to match!). But if you want to use Solid Cable in a different environment (like staging or even development), you'll have to manually add that `connects_to` block to the respective environment in the `config/cable.yml` file. And, as always, make sure that the name you're using for the database in `config/cable.yml` matches the name you define in `config/database.yml`.
|
61
61
|
|
62
62
|
Then run `db:prepare` in production to ensure the database is created and the schema is loaded.
|
63
63
|
|
@@ -73,25 +73,13 @@ setting.
|
|
73
73
|
All configuration is managed via the `config/cable.yml`file. To use Solid Cable, the `adapter` value *must be* `solid_cable`. When using Solid Cable, the other values you can set are: `connects_to`, `polling_interval`, `silence_polling`, and `keep_messages_around_for`. For example:
|
74
74
|
|
75
75
|
```yaml
|
76
|
-
|
76
|
+
production:
|
77
77
|
adapter: solid_cable
|
78
|
-
polling_interval: 1.second
|
79
|
-
keep_messages_around_for: 1.day
|
80
|
-
|
81
|
-
development:
|
82
|
-
<<: *default
|
83
|
-
silence_polling: true
|
84
78
|
connects_to:
|
85
79
|
database:
|
86
|
-
writing:
|
87
|
-
reading: solid_cable_replica
|
88
|
-
|
89
|
-
test:
|
90
|
-
adapter: test
|
91
|
-
|
92
|
-
production:
|
93
|
-
<<: *default
|
80
|
+
writing: cable
|
94
81
|
polling_interval: 0.1.seconds
|
82
|
+
keep_messages_around_for: 1.day
|
95
83
|
```
|
96
84
|
|
97
85
|
## License
|
@@ -3,27 +3,8 @@
|
|
3
3
|
class SolidCable::InstallGenerator < Rails::Generators::Base
|
4
4
|
source_root File.expand_path("templates", __dir__)
|
5
5
|
|
6
|
-
def
|
6
|
+
def copy_files
|
7
7
|
template "db/cable_schema.rb"
|
8
|
-
|
9
|
-
|
10
|
-
def configure_production_cable
|
11
|
-
gsub_file("config/cable.yml",
|
12
|
-
/production:\n(^\s*.*$\n){2,}/,
|
13
|
-
new_production_cable_config)
|
14
|
-
end
|
15
|
-
|
16
|
-
private
|
17
|
-
|
18
|
-
def new_production_cable_config
|
19
|
-
<<~YAML
|
20
|
-
production:
|
21
|
-
adapter: solid_cable
|
22
|
-
connects_to:
|
23
|
-
database:
|
24
|
-
writing: cable
|
25
|
-
polling_interval: 0.1.seconds
|
26
|
-
keep_messages_around_for: 1.day
|
27
|
-
YAML
|
8
|
+
template "config/cable.yml", force: true
|
28
9
|
end
|
29
10
|
end
|
data/lib/solid_cable/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solid_cable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Pezza
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -40,11 +40,13 @@ files:
|
|
40
40
|
- lib/action_cable/subscription_adapter/solid_cable.rb
|
41
41
|
- lib/generators/solid_cable/install/USAGE
|
42
42
|
- lib/generators/solid_cable/install/install_generator.rb
|
43
|
+
- lib/generators/solid_cable/install/templates/config/cable.yml
|
43
44
|
- lib/generators/solid_cable/install/templates/db/cable_schema.rb
|
44
45
|
- lib/solid_cable.rb
|
45
46
|
- lib/solid_cable/engine.rb
|
46
47
|
- lib/solid_cable/railtie.rb
|
47
48
|
- lib/solid_cable/version.rb
|
49
|
+
- lib/tasks/solid_cable_tasks.rake
|
48
50
|
homepage: http://github.com/npezza93/solid_cable
|
49
51
|
licenses:
|
50
52
|
- MIT
|