cable_ready 4.5.0 → 5.0.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 +4 -4
- data/CHANGELOG.md +2 -376
- data/Gemfile +4 -1
- data/Gemfile.lock +146 -144
- data/README.md +54 -20
- data/Rakefile +8 -8
- data/app/assets/javascripts/cable_ready.js +1269 -0
- data/app/assets/javascripts/cable_ready.umd.js +1190 -0
- data/app/channels/cable_ready/stream.rb +14 -0
- data/app/helpers/cable_ready/view_helper.rb +58 -0
- data/app/jobs/cable_ready/broadcast_job.rb +15 -0
- data/app/models/concerns/cable_ready/updatable/collection_updatable_callbacks.rb +21 -0
- data/app/models/concerns/cable_ready/updatable/collections_registry.rb +59 -0
- data/app/models/concerns/cable_ready/updatable/memory_cache_debounce_adapter.rb +24 -0
- data/app/models/concerns/cable_ready/updatable/model_updatable_callbacks.rb +33 -0
- data/app/models/concerns/cable_ready/updatable.rb +211 -0
- data/app/models/concerns/extend_has_many.rb +15 -0
- data/bin/standardize +1 -1
- data/cable_ready.gemspec +20 -6
- data/lib/cable_ready/broadcaster.rb +4 -3
- data/lib/cable_ready/cable_car.rb +19 -0
- data/lib/cable_ready/channel.rb +29 -31
- data/lib/cable_ready/channels.rb +4 -5
- data/lib/cable_ready/compoundable.rb +11 -0
- data/lib/cable_ready/config.rb +28 -1
- data/lib/cable_ready/engine.rb +59 -0
- data/lib/cable_ready/identifiable.rb +48 -0
- data/lib/cable_ready/importmap.rb +4 -0
- data/lib/cable_ready/installer.rb +224 -0
- data/lib/cable_ready/operation_builder.rb +80 -0
- data/lib/cable_ready/sanity_checker.rb +63 -0
- data/lib/cable_ready/stream_identifier.rb +13 -0
- data/lib/cable_ready/version.rb +1 -1
- data/lib/cable_ready.rb +23 -10
- data/lib/cable_ready_helper.rb +13 -0
- data/lib/generators/cable_ready/channel_generator.rb +110 -0
- data/lib/generators/cable_ready/templates/app/javascript/channels/consumer.js.tt +6 -0
- data/lib/generators/cable_ready/templates/app/javascript/channels/index.js.esbuild.tt +4 -0
- data/lib/generators/cable_ready/templates/app/javascript/channels/index.js.importmap.tt +2 -0
- data/lib/generators/cable_ready/templates/app/javascript/channels/index.js.shakapacker.tt +5 -0
- data/lib/generators/cable_ready/templates/app/javascript/channels/index.js.vite.tt +1 -0
- data/lib/generators/cable_ready/templates/app/javascript/channels/index.js.webpacker.tt +5 -0
- data/lib/generators/cable_ready/templates/app/javascript/config/cable_ready.js.tt +4 -0
- data/lib/generators/cable_ready/templates/app/javascript/config/index.js.tt +1 -0
- data/lib/generators/cable_ready/templates/app/javascript/config/mrujs.js.tt +9 -0
- data/lib/generators/cable_ready/templates/app/javascript/controllers/%file_name%_controller.js.tt +38 -0
- data/lib/generators/cable_ready/templates/app/javascript/controllers/application.js.tt +11 -0
- data/lib/generators/cable_ready/templates/app/javascript/controllers/index.js.esbuild.tt +7 -0
- data/lib/generators/cable_ready/templates/app/javascript/controllers/index.js.importmap.tt +5 -0
- data/lib/generators/cable_ready/templates/app/javascript/controllers/index.js.shakapacker.tt +5 -0
- data/lib/generators/cable_ready/templates/app/javascript/controllers/index.js.vite.tt +5 -0
- data/lib/generators/cable_ready/templates/app/javascript/controllers/index.js.webpacker.tt +5 -0
- data/lib/generators/cable_ready/templates/config/initializers/cable_ready.rb +27 -0
- data/lib/generators/cable_ready/templates/esbuild.config.mjs.tt +94 -0
- data/lib/install/action_cable.rb +144 -0
- data/lib/install/broadcaster.rb +109 -0
- data/lib/install/bundle.rb +54 -0
- data/lib/install/compression.rb +51 -0
- data/lib/install/config.rb +39 -0
- data/lib/install/development.rb +34 -0
- data/lib/install/esbuild.rb +101 -0
- data/lib/install/importmap.rb +96 -0
- data/lib/install/initializers.rb +15 -0
- data/lib/install/mrujs.rb +121 -0
- data/lib/install/npm_packages.rb +13 -0
- data/lib/install/shakapacker.rb +65 -0
- data/lib/install/spring.rb +54 -0
- data/lib/install/updatable.rb +34 -0
- data/lib/install/vite.rb +66 -0
- data/lib/install/webpacker.rb +93 -0
- data/lib/install/yarn.rb +56 -0
- data/lib/tasks/cable_ready/cable_ready.rake +247 -0
- data/package.json +42 -13
- data/rollup.config.mjs +57 -0
- data/web-test-runner.config.mjs +12 -0
- data/yarn.lock +3252 -327
- metadata +138 -9
- data/tags +0 -62
data/Gemfile.lock
CHANGED
|
@@ -1,215 +1,217 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
cable_ready (
|
|
5
|
-
|
|
4
|
+
cable_ready (5.0.0)
|
|
5
|
+
actionpack (>= 5.2)
|
|
6
|
+
actionview (>= 5.2)
|
|
7
|
+
activesupport (>= 5.2)
|
|
8
|
+
railties (>= 5.2)
|
|
6
9
|
thread-local (>= 1.1.0)
|
|
7
10
|
|
|
8
11
|
GEM
|
|
9
12
|
remote: https://rubygems.org/
|
|
10
13
|
specs:
|
|
11
|
-
actioncable (6.1.
|
|
12
|
-
actionpack (= 6.1.
|
|
13
|
-
activesupport (= 6.1.
|
|
14
|
+
actioncable (6.1.7.2)
|
|
15
|
+
actionpack (= 6.1.7.2)
|
|
16
|
+
activesupport (= 6.1.7.2)
|
|
14
17
|
nio4r (~> 2.0)
|
|
15
18
|
websocket-driver (>= 0.6.1)
|
|
16
|
-
actionmailbox (6.1.
|
|
17
|
-
actionpack (= 6.1.
|
|
18
|
-
activejob (= 6.1.
|
|
19
|
-
activerecord (= 6.1.
|
|
20
|
-
activestorage (= 6.1.
|
|
21
|
-
activesupport (= 6.1.
|
|
19
|
+
actionmailbox (6.1.7.2)
|
|
20
|
+
actionpack (= 6.1.7.2)
|
|
21
|
+
activejob (= 6.1.7.2)
|
|
22
|
+
activerecord (= 6.1.7.2)
|
|
23
|
+
activestorage (= 6.1.7.2)
|
|
24
|
+
activesupport (= 6.1.7.2)
|
|
22
25
|
mail (>= 2.7.1)
|
|
23
|
-
actionmailer (6.1.
|
|
24
|
-
actionpack (= 6.1.
|
|
25
|
-
actionview (= 6.1.
|
|
26
|
-
activejob (= 6.1.
|
|
27
|
-
activesupport (= 6.1.
|
|
26
|
+
actionmailer (6.1.7.2)
|
|
27
|
+
actionpack (= 6.1.7.2)
|
|
28
|
+
actionview (= 6.1.7.2)
|
|
29
|
+
activejob (= 6.1.7.2)
|
|
30
|
+
activesupport (= 6.1.7.2)
|
|
28
31
|
mail (~> 2.5, >= 2.5.4)
|
|
29
32
|
rails-dom-testing (~> 2.0)
|
|
30
|
-
actionpack (6.1.
|
|
31
|
-
actionview (= 6.1.
|
|
32
|
-
activesupport (= 6.1.
|
|
33
|
+
actionpack (6.1.7.2)
|
|
34
|
+
actionview (= 6.1.7.2)
|
|
35
|
+
activesupport (= 6.1.7.2)
|
|
33
36
|
rack (~> 2.0, >= 2.0.9)
|
|
34
37
|
rack-test (>= 0.6.3)
|
|
35
38
|
rails-dom-testing (~> 2.0)
|
|
36
39
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
37
|
-
actiontext (6.1.
|
|
38
|
-
actionpack (= 6.1.
|
|
39
|
-
activerecord (= 6.1.
|
|
40
|
-
activestorage (= 6.1.
|
|
41
|
-
activesupport (= 6.1.
|
|
40
|
+
actiontext (6.1.7.2)
|
|
41
|
+
actionpack (= 6.1.7.2)
|
|
42
|
+
activerecord (= 6.1.7.2)
|
|
43
|
+
activestorage (= 6.1.7.2)
|
|
44
|
+
activesupport (= 6.1.7.2)
|
|
42
45
|
nokogiri (>= 1.8.5)
|
|
43
|
-
actionview (6.1.
|
|
44
|
-
activesupport (= 6.1.
|
|
46
|
+
actionview (6.1.7.2)
|
|
47
|
+
activesupport (= 6.1.7.2)
|
|
45
48
|
builder (~> 3.1)
|
|
46
49
|
erubi (~> 1.4)
|
|
47
50
|
rails-dom-testing (~> 2.0)
|
|
48
51
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
49
|
-
activejob (6.1.
|
|
50
|
-
activesupport (= 6.1.
|
|
52
|
+
activejob (6.1.7.2)
|
|
53
|
+
activesupport (= 6.1.7.2)
|
|
51
54
|
globalid (>= 0.3.6)
|
|
52
|
-
activemodel (6.1.
|
|
53
|
-
activesupport (= 6.1.
|
|
54
|
-
activerecord (6.1.
|
|
55
|
-
activemodel (= 6.1.
|
|
56
|
-
activesupport (= 6.1.
|
|
57
|
-
activestorage (6.1.
|
|
58
|
-
actionpack (= 6.1.
|
|
59
|
-
activejob (= 6.1.
|
|
60
|
-
activerecord (= 6.1.
|
|
61
|
-
activesupport (= 6.1.
|
|
62
|
-
marcel (~> 0
|
|
63
|
-
|
|
64
|
-
activesupport (6.1.
|
|
55
|
+
activemodel (6.1.7.2)
|
|
56
|
+
activesupport (= 6.1.7.2)
|
|
57
|
+
activerecord (6.1.7.2)
|
|
58
|
+
activemodel (= 6.1.7.2)
|
|
59
|
+
activesupport (= 6.1.7.2)
|
|
60
|
+
activestorage (6.1.7.2)
|
|
61
|
+
actionpack (= 6.1.7.2)
|
|
62
|
+
activejob (= 6.1.7.2)
|
|
63
|
+
activerecord (= 6.1.7.2)
|
|
64
|
+
activesupport (= 6.1.7.2)
|
|
65
|
+
marcel (~> 1.0)
|
|
66
|
+
mini_mime (>= 1.1.0)
|
|
67
|
+
activesupport (6.1.7.2)
|
|
65
68
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
66
69
|
i18n (>= 1.6, < 2)
|
|
67
70
|
minitest (>= 5.1)
|
|
68
71
|
tzinfo (~> 2.0)
|
|
69
72
|
zeitwerk (~> 2.3)
|
|
70
|
-
addressable (2.7.0)
|
|
71
|
-
public_suffix (>= 2.0.2, < 5.0)
|
|
72
73
|
ast (2.4.2)
|
|
73
74
|
builder (3.2.4)
|
|
74
75
|
coderay (1.1.3)
|
|
75
|
-
concurrent-ruby (1.
|
|
76
|
+
concurrent-ruby (1.2.0)
|
|
76
77
|
crass (1.0.6)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
faraday-http-cache (2.2.0)
|
|
83
|
-
faraday (>= 0.8)
|
|
84
|
-
faraday-net_http (1.0.1)
|
|
85
|
-
github_changelog_generator (1.15.2)
|
|
86
|
-
activesupport
|
|
87
|
-
faraday-http-cache
|
|
88
|
-
multi_json
|
|
89
|
-
octokit (~> 4.6)
|
|
90
|
-
rainbow (>= 2.2.1)
|
|
91
|
-
rake (>= 10.0)
|
|
92
|
-
retriable (~> 3.0)
|
|
93
|
-
globalid (0.4.2)
|
|
94
|
-
activesupport (>= 4.2.0)
|
|
95
|
-
i18n (1.8.7)
|
|
78
|
+
date (3.3.3)
|
|
79
|
+
erubi (1.12.0)
|
|
80
|
+
globalid (1.1.0)
|
|
81
|
+
activesupport (>= 5.0)
|
|
82
|
+
i18n (1.12.0)
|
|
96
83
|
concurrent-ruby (~> 1.0)
|
|
97
|
-
|
|
84
|
+
json (2.6.3)
|
|
85
|
+
language_server-protocol (3.17.0.3)
|
|
86
|
+
loofah (2.19.1)
|
|
98
87
|
crass (~> 1.0.2)
|
|
99
88
|
nokogiri (>= 1.5.9)
|
|
100
89
|
magic_frozen_string_literal (1.2.0)
|
|
101
|
-
mail (2.
|
|
90
|
+
mail (2.8.1)
|
|
102
91
|
mini_mime (>= 0.1.1)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
92
|
+
net-imap
|
|
93
|
+
net-pop
|
|
94
|
+
net-smtp
|
|
95
|
+
marcel (1.0.2)
|
|
96
|
+
method_source (1.0.0)
|
|
97
|
+
mini_mime (1.1.2)
|
|
98
|
+
minitest (5.17.0)
|
|
99
|
+
mocha (2.0.2)
|
|
100
|
+
ruby2_keywords (>= 0.0.5)
|
|
101
|
+
net-imap (0.3.4)
|
|
102
|
+
date
|
|
103
|
+
net-protocol
|
|
104
|
+
net-pop (0.1.2)
|
|
105
|
+
net-protocol
|
|
106
|
+
net-protocol (0.2.1)
|
|
107
|
+
timeout
|
|
108
|
+
net-smtp (0.3.3)
|
|
109
|
+
net-protocol
|
|
110
|
+
nio4r (2.5.8)
|
|
111
|
+
nokogiri (1.14.2-x86_64-darwin)
|
|
112
|
+
racc (~> 1.4)
|
|
113
|
+
nokogiri (1.14.2-x86_64-linux)
|
|
113
114
|
racc (~> 1.4)
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
sawyer (~> 0.8.0, >= 0.5.3)
|
|
117
|
-
parallel (1.20.1)
|
|
118
|
-
parser (3.0.0.0)
|
|
115
|
+
parallel (1.22.1)
|
|
116
|
+
parser (3.2.1.0)
|
|
119
117
|
ast (~> 2.4.1)
|
|
120
|
-
pry (0.
|
|
121
|
-
coderay (~> 1.1
|
|
122
|
-
method_source (~>
|
|
123
|
-
pry-nav (0.
|
|
124
|
-
pry (>= 0.9.10, < 0.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
rack (2.2
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
activesupport (= 6.1.1)
|
|
118
|
+
pry (0.14.2)
|
|
119
|
+
coderay (~> 1.1)
|
|
120
|
+
method_source (~> 1.0)
|
|
121
|
+
pry-nav (1.0.0)
|
|
122
|
+
pry (>= 0.9.10, < 0.15)
|
|
123
|
+
racc (1.6.2)
|
|
124
|
+
rack (2.2.6.4)
|
|
125
|
+
rack-test (2.0.2)
|
|
126
|
+
rack (>= 1.3)
|
|
127
|
+
rails (6.1.7.2)
|
|
128
|
+
actioncable (= 6.1.7.2)
|
|
129
|
+
actionmailbox (= 6.1.7.2)
|
|
130
|
+
actionmailer (= 6.1.7.2)
|
|
131
|
+
actionpack (= 6.1.7.2)
|
|
132
|
+
actiontext (= 6.1.7.2)
|
|
133
|
+
actionview (= 6.1.7.2)
|
|
134
|
+
activejob (= 6.1.7.2)
|
|
135
|
+
activemodel (= 6.1.7.2)
|
|
136
|
+
activerecord (= 6.1.7.2)
|
|
137
|
+
activestorage (= 6.1.7.2)
|
|
138
|
+
activesupport (= 6.1.7.2)
|
|
142
139
|
bundler (>= 1.15.0)
|
|
143
|
-
railties (= 6.1.
|
|
140
|
+
railties (= 6.1.7.2)
|
|
144
141
|
sprockets-rails (>= 2.0.0)
|
|
145
142
|
rails-dom-testing (2.0.3)
|
|
146
143
|
activesupport (>= 4.2.0)
|
|
147
144
|
nokogiri (>= 1.6)
|
|
148
|
-
rails-html-sanitizer (1.
|
|
149
|
-
loofah (~> 2.
|
|
150
|
-
railties (6.1.
|
|
151
|
-
actionpack (= 6.1.
|
|
152
|
-
activesupport (= 6.1.
|
|
145
|
+
rails-html-sanitizer (1.5.0)
|
|
146
|
+
loofah (~> 2.19, >= 2.19.1)
|
|
147
|
+
railties (6.1.7.2)
|
|
148
|
+
actionpack (= 6.1.7.2)
|
|
149
|
+
activesupport (= 6.1.7.2)
|
|
153
150
|
method_source
|
|
154
|
-
rake (>=
|
|
151
|
+
rake (>= 12.2)
|
|
155
152
|
thor (~> 1.0)
|
|
156
|
-
rainbow (3.
|
|
157
|
-
rake (13.0.
|
|
158
|
-
regexp_parser (2.0
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
153
|
+
rainbow (3.1.1)
|
|
154
|
+
rake (13.0.6)
|
|
155
|
+
regexp_parser (2.7.0)
|
|
156
|
+
rexml (3.2.5)
|
|
157
|
+
rubocop (1.39.0)
|
|
158
|
+
json (~> 2.3)
|
|
162
159
|
parallel (~> 1.10)
|
|
163
|
-
parser (>= 2.
|
|
160
|
+
parser (>= 3.1.2.1)
|
|
164
161
|
rainbow (>= 2.2.2, < 4.0)
|
|
165
162
|
regexp_parser (>= 1.8, < 3.0)
|
|
166
|
-
rexml
|
|
167
|
-
rubocop-ast (>= 1.
|
|
163
|
+
rexml (>= 3.2.5, < 4.0)
|
|
164
|
+
rubocop-ast (>= 1.23.0, < 2.0)
|
|
168
165
|
ruby-progressbar (~> 1.7)
|
|
169
|
-
unicode-display_width (>= 1.4.0, <
|
|
170
|
-
rubocop-ast (1.
|
|
171
|
-
parser (>= 2.
|
|
172
|
-
rubocop-performance (1.
|
|
173
|
-
rubocop (>=
|
|
166
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
|
167
|
+
rubocop-ast (1.26.0)
|
|
168
|
+
parser (>= 3.2.1.0)
|
|
169
|
+
rubocop-performance (1.15.1)
|
|
170
|
+
rubocop (>= 1.7.0, < 2.0)
|
|
174
171
|
rubocop-ast (>= 0.4.0)
|
|
175
172
|
ruby-progressbar (1.11.0)
|
|
176
|
-
ruby2_keywords (0.0.
|
|
177
|
-
|
|
178
|
-
addressable (>= 2.3.5)
|
|
179
|
-
faraday (> 0.8, < 2.0)
|
|
180
|
-
sprockets (4.0.2)
|
|
173
|
+
ruby2_keywords (0.0.5)
|
|
174
|
+
sprockets (4.2.0)
|
|
181
175
|
concurrent-ruby (~> 1.0)
|
|
182
|
-
rack (
|
|
183
|
-
sprockets-rails (3.
|
|
184
|
-
actionpack (>=
|
|
185
|
-
activesupport (>=
|
|
176
|
+
rack (>= 2.2.4, < 4)
|
|
177
|
+
sprockets-rails (3.4.2)
|
|
178
|
+
actionpack (>= 5.2)
|
|
179
|
+
activesupport (>= 5.2)
|
|
186
180
|
sprockets (>= 3.0.0)
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
181
|
+
sqlite3 (1.6.0-x86_64-darwin)
|
|
182
|
+
sqlite3 (1.6.0-x86_64-linux)
|
|
183
|
+
standard (1.19.1)
|
|
184
|
+
language_server-protocol (~> 3.17.0.2)
|
|
185
|
+
rubocop (= 1.39.0)
|
|
186
|
+
rubocop-performance (= 1.15.1)
|
|
187
|
+
standardrb (1.0.1)
|
|
191
188
|
standard
|
|
192
|
-
thor (1.1
|
|
189
|
+
thor (1.2.1)
|
|
193
190
|
thread-local (1.1.0)
|
|
194
|
-
|
|
191
|
+
timeout (0.3.1)
|
|
192
|
+
tzinfo (2.0.6)
|
|
195
193
|
concurrent-ruby (~> 1.0)
|
|
196
|
-
unicode-display_width (
|
|
197
|
-
websocket-driver (0.7.
|
|
194
|
+
unicode-display_width (2.4.2)
|
|
195
|
+
websocket-driver (0.7.5)
|
|
198
196
|
websocket-extensions (>= 0.1.0)
|
|
199
197
|
websocket-extensions (0.1.5)
|
|
200
|
-
zeitwerk (2.
|
|
198
|
+
zeitwerk (2.6.7)
|
|
201
199
|
|
|
202
200
|
PLATFORMS
|
|
203
|
-
|
|
201
|
+
x86_64-darwin-19
|
|
202
|
+
x86_64-linux
|
|
204
203
|
|
|
205
204
|
DEPENDENCIES
|
|
206
205
|
cable_ready!
|
|
207
|
-
github_changelog_generator
|
|
208
206
|
magic_frozen_string_literal
|
|
207
|
+
mocha
|
|
209
208
|
pry
|
|
210
209
|
pry-nav
|
|
210
|
+
rails (~> 6.1)
|
|
211
211
|
rake
|
|
212
|
+
sqlite3
|
|
213
|
+
standard (= 1.19.1)
|
|
212
214
|
standardrb
|
|
213
215
|
|
|
214
216
|
BUNDLED WITH
|
|
215
|
-
2.
|
|
217
|
+
2.3.24
|
data/README.md
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://
|
|
2
|
+
<img src="https://raw.githubusercontent.com/stimulusreflex/cable_ready/main/assets/cable-ready-logo-with-copy.svg" width="360" />
|
|
3
3
|
<h1 align="center">Welcome to CableReady 👋</h1>
|
|
4
4
|
<p align="center">
|
|
5
|
-
<
|
|
6
|
-
|
|
5
|
+
<a href="https://rubygems.org/gems/cable_ready">
|
|
6
|
+
<img src="https://img.shields.io/gem/v/cable_ready.svg?color=red" />
|
|
7
|
+
</a>
|
|
8
|
+
<a href="https://www.npmjs.com/package/cable_ready">
|
|
9
|
+
<img src="https://img.shields.io/npm/v/cable_ready.svg?color=blue" />
|
|
10
|
+
</a>
|
|
7
11
|
<a href="https://www.npmjs.com/package/cable_ready">
|
|
8
12
|
<img alt="downloads" src="https://img.shields.io/npm/dm/cable_ready.svg?color=blue" target="_blank" />
|
|
9
13
|
</a>
|
|
10
|
-
<a href="https://github.com/
|
|
14
|
+
<a href="https://github.com/stimulusreflex/cable_ready/blob/main/LICENSE">
|
|
11
15
|
<img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-brightgreen.svg" target="_blank" />
|
|
12
16
|
</a>
|
|
13
|
-
<a href="http://blog.codinghorror.com/the-best-code-is-no-code-at-all/" target="_blank">
|
|
14
|
-
<img alt="Lines of Code" src="https://img.shields.io/badge/lines_of_code-663-brightgreen.svg?style=flat" />
|
|
15
|
-
</a>
|
|
16
17
|
<a href="https://cableready.stimulusreflex.com" target="_blank">
|
|
17
18
|
<img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" />
|
|
18
19
|
</a>
|
|
@@ -27,14 +28,14 @@
|
|
|
27
28
|
<img alt="JavaScript Code Style" src="https://img.shields.io/badge/JavaScript_Code_Style-prettier_standard-ff69b4.svg" />
|
|
28
29
|
</a>
|
|
29
30
|
<br />
|
|
30
|
-
<a href="https://
|
|
31
|
-
<img
|
|
31
|
+
<a target="_blank" rel="noopener noreferrer" href="https://github.com/stimulusreflex/cable_ready/actions/workflows/prettier-standard.yml">
|
|
32
|
+
<img src="https://github.com/stimulusreflex/cable_ready/workflows/Prettier-Standard/badge.svg" alt="Prettier-Standard" style="max-width:100%;">
|
|
32
33
|
</a>
|
|
33
|
-
<a target="_blank" rel="noopener noreferrer" href="https://github.com/
|
|
34
|
-
<img src="https://github.com/
|
|
34
|
+
<a target="_blank" rel="noopener noreferrer" href="https://github.com/stimulusreflex/cable_ready/actions/workflows/standardrb.yml">
|
|
35
|
+
<img src="https://github.com/stimulusreflex/cable_ready/workflows/StandardRB/badge.svg" alt="StandardRB" style="max-width:100%;">
|
|
35
36
|
</a>
|
|
36
|
-
<a target="_blank" rel="noopener noreferrer" href="https://github.com/
|
|
37
|
-
<img src="https://github.com/
|
|
37
|
+
<a target="_blank" rel="noopener noreferrer" href="https://github.com/stimulusreflex/cable_ready/actions/workflows/tests.yml">
|
|
38
|
+
<img src="https://github.com/stimulusreflex/cable_ready/workflows/Tests/badge.svg" alt="Tests" style="max-width:100%;">
|
|
38
39
|
</a>
|
|
39
40
|
</p>
|
|
40
41
|
</p>
|
|
@@ -48,20 +49,49 @@ to learn more about ActionCable before proceeding.
|
|
|
48
49
|
## 📚 Docs
|
|
49
50
|
|
|
50
51
|
- [Official Documentation](https://cableready.stimulusreflex.com)
|
|
51
|
-
- [Documentation Source Code](https://github.com/
|
|
52
|
+
- [Documentation Source Code](https://github.com/stimulusreflex/cable_ready/tree/main/docs)
|
|
52
53
|
|
|
53
54
|
## 💙 Community
|
|
54
55
|
|
|
55
|
-
- [Discord](https://discord.gg/
|
|
56
|
+
- [Discord](https://discord.gg/stimulus-reflex) - primary support channel
|
|
56
57
|
|
|
57
58
|
## 🚀 Install
|
|
58
59
|
|
|
60
|
+
### Rubygem
|
|
61
|
+
|
|
59
62
|
```sh
|
|
60
|
-
bundle add cable_ready
|
|
63
|
+
bundle add cable_ready
|
|
61
64
|
```
|
|
62
65
|
|
|
63
|
-
|
|
66
|
+
### JavaScript
|
|
67
|
+
|
|
68
|
+
There are a few ways to install the CableReady JavaScript client, depending on your application setup.
|
|
69
|
+
|
|
70
|
+
#### ESBuild / Webpacker
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
yarn add cable_ready
|
|
74
|
+
```
|
|
64
75
|
|
|
76
|
+
#### Import maps:
|
|
77
|
+
|
|
78
|
+
```ruby
|
|
79
|
+
# config/importmap.rb
|
|
80
|
+
|
|
81
|
+
# ...
|
|
82
|
+
|
|
83
|
+
pin 'cable_ready', to: 'cable_ready.js', preload: true
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
#### Rails Asset pipeline (Sprockets):
|
|
87
|
+
|
|
88
|
+
```html+erb
|
|
89
|
+
<!-- app/views/layouts/application.html.erb -->
|
|
90
|
+
|
|
91
|
+
<%= javascript_include_tag "cable_ready.umd.js", "data-turbo-track": "reload" %>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Checkout the [documentation](https://cableready.stimulusreflex.com) to continue!
|
|
65
95
|
|
|
66
96
|
## 🙏 Contributing
|
|
67
97
|
|
|
@@ -78,11 +108,15 @@ Please run `./bin/standardize` prior submitting pull requests.
|
|
|
78
108
|
|
|
79
109
|
### 📦 Releasing
|
|
80
110
|
|
|
81
|
-
1.
|
|
82
|
-
1.
|
|
111
|
+
1. Make sure that you run `yarn` and `bundle` to pick up the latest.
|
|
112
|
+
1. Bump version number at `lib/cable_ready/version.rb`. Pre-release versions use `.preN`
|
|
113
|
+
1. Run `rake build` and `yarn build`
|
|
114
|
+
1. Commit and push changes to GitHub
|
|
83
115
|
1. Run `rake release`
|
|
84
116
|
1. Run `yarn publish --no-git-tag-version`
|
|
85
|
-
1.
|
|
117
|
+
1. Yarn will prompt you for the new version. Pre-release versions use `-preN`
|
|
118
|
+
1. Commit and push changes to GitHub
|
|
119
|
+
1. Create a new release on GitHub ([here](https://github.com/stimulusreflex/cable_ready/releases)) and generate the changelog for the stable release for it
|
|
86
120
|
|
|
87
121
|
## 📝 License
|
|
88
122
|
|
data/Rakefile
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "bundler/gem_tasks"
|
|
4
|
-
require "
|
|
4
|
+
require "rake/testtask"
|
|
5
|
+
require "pry"
|
|
5
6
|
|
|
6
7
|
task default: [:test]
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
config.project = "cable_ready"
|
|
9
|
+
Rake::TestTask.new(:test) do |t|
|
|
10
|
+
t.libs << "lib"
|
|
11
|
+
t.libs << "test"
|
|
12
|
+
t.pattern = "test/**/*_test.rb"
|
|
13
|
+
t.verbose = true
|
|
14
|
+
t.warning = false
|
|
15
15
|
end
|