cable_ready 4.4.0.pre2 → 4.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +53 -4
- data/Gemfile.lock +72 -70
- data/README.md +4 -7
- data/bin/standardize +1 -1
- data/cable_ready.gemspec +2 -0
- data/lib/cable_ready/channel.rb +12 -3
- data/lib/cable_ready/channels.rb +3 -3
- data/lib/cable_ready/version.rb +1 -1
- data/package.json +36 -0
- data/tags +8 -5
- data/yarn.lock +2552 -0
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d8a5869e532577a273e312f83e5f61eb576c6d873758a0b96588a0aafb903ba
|
4
|
+
data.tar.gz: 8f945cd61299c9bee1f2bd8d4d3b4310dd8ccd99e309ee84473265c4d7b48dd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce5561230f04527527d20e945face070adf1171727bc454e2dcf4fe603ad9cb1eec9f91b62068b5db989633341f4333b80db3b97e96e10c9af7d3320e2f0f898
|
7
|
+
data.tar.gz: b4ff356e41e4cb04d93a2af3a9742c85cab968fb4726ef2e9d5ed859af2b5cf4fb3fec61f83ab8f5d604dd72744948af947952afbd4a175c8ed2ea0802c0d3c4
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,56 @@
|
|
2
2
|
|
3
3
|
## [Unreleased](https://github.com/hopsoft/cable_ready/tree/HEAD)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/hopsoft/cable_ready/compare/v4.4.
|
5
|
+
[Full Changelog](https://github.com/hopsoft/cable_ready/compare/v4.4.2...HEAD)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Fix bug related to channel calling broadcast on the singleton [\#82](https://github.com/hopsoft/cable_ready/pull/82) ([hopsoft](https://github.com/hopsoft))
|
10
|
+
|
11
|
+
## [v4.4.2](https://github.com/hopsoft/cable_ready/tree/v4.4.2) (2020-11-30)
|
12
|
+
|
13
|
+
[Full Changelog](https://github.com/hopsoft/cable_ready/compare/v4.4.1...v4.4.2)
|
14
|
+
|
15
|
+
## [v4.4.1](https://github.com/hopsoft/cable_ready/tree/v4.4.1) (2020-11-28)
|
16
|
+
|
17
|
+
[Full Changelog](https://github.com/hopsoft/cable_ready/compare/v4.4.0...v4.4.1)
|
18
|
+
|
19
|
+
**Merged pull requests:**
|
20
|
+
|
21
|
+
- Apply setFocus behavior to more element mutations [\#81](https://github.com/hopsoft/cable_ready/pull/81) ([hopsoft](https://github.com/hopsoft))
|
22
|
+
|
23
|
+
## [v4.4.0](https://github.com/hopsoft/cable_ready/tree/v4.4.0) (2020-11-24)
|
24
|
+
|
25
|
+
[Full Changelog](https://github.com/hopsoft/cable_ready/compare/v4.4.0.pre4...v4.4.0)
|
26
|
+
|
27
|
+
## [v4.4.0.pre4](https://github.com/hopsoft/cable_ready/tree/v4.4.0.pre4) (2020-11-22)
|
28
|
+
|
29
|
+
[Full Changelog](https://github.com/hopsoft/cable_ready/compare/v4.4.0.pre3...v4.4.0.pre4)
|
30
|
+
|
31
|
+
**Fixed bugs:**
|
32
|
+
|
33
|
+
- only compare isEqualNode for non-inputs [\#80](https://github.com/hopsoft/cable_ready/pull/80) ([leastbad](https://github.com/leastbad))
|
34
|
+
|
35
|
+
## [v4.4.0.pre3](https://github.com/hopsoft/cable_ready/tree/v4.4.0.pre3) (2020-11-13)
|
36
|
+
|
37
|
+
[Full Changelog](https://github.com/hopsoft/cable_ready/compare/v4.4.0.pre2...v4.4.0.pre3)
|
38
|
+
|
39
|
+
**Closed issues:**
|
40
|
+
|
41
|
+
- CableReady detected an error in insertAdjacentHtml. Object doesn't support this action - IE11 only [\#76](https://github.com/hopsoft/cable_ready/issues/76)
|
42
|
+
- shouldMorph doesn't work well with some form elements [\#70](https://github.com/hopsoft/cable_ready/issues/70)
|
43
|
+
- Operations go missing before broadcasting [\#64](https://github.com/hopsoft/cable_ready/issues/64)
|
44
|
+
|
45
|
+
**Merged pull requests:**
|
46
|
+
|
47
|
+
- Move package.json to root and prepare for v4.4.0.pre3 [\#79](https://github.com/hopsoft/cable_ready/pull/79) ([hopsoft](https://github.com/hopsoft))
|
48
|
+
- method chaining [\#78](https://github.com/hopsoft/cable_ready/pull/78) ([leastbad](https://github.com/leastbad))
|
49
|
+
- jquery support [\#75](https://github.com/hopsoft/cable_ready/pull/75) ([leastbad](https://github.com/leastbad))
|
50
|
+
- Removed isEqualNode comparison [\#71](https://github.com/hopsoft/cable_ready/pull/71) ([adank92](https://github.com/adank92))
|
51
|
+
|
52
|
+
## [v4.4.0.pre2](https://github.com/hopsoft/cable_ready/tree/v4.4.0.pre2) (2020-11-02)
|
53
|
+
|
54
|
+
[Full Changelog](https://github.com/hopsoft/cable_ready/compare/v4.4.0.pre1...v4.4.0.pre2)
|
6
55
|
|
7
56
|
**Merged pull requests:**
|
8
57
|
|
@@ -92,8 +141,6 @@
|
|
92
141
|
- Make morph emit after event [\#48](https://github.com/hopsoft/cable_ready/pull/48) ([julianrubisch](https://github.com/julianrubisch))
|
93
142
|
- Customize operations via initializer [\#47](https://github.com/hopsoft/cable_ready/pull/47) ([leastbad](https://github.com/leastbad))
|
94
143
|
- Correct method 'outerHtml' to 'outer\_html' in documentation [\#39](https://github.com/hopsoft/cable_ready/pull/39) ([pskarlas](https://github.com/pskarlas))
|
95
|
-
- Add setStyles [\#37](https://github.com/hopsoft/cable_ready/pull/37) ([excid3](https://github.com/excid3))
|
96
|
-
- Fix typo in method name outerHTML -\> outer\_html [\#35](https://github.com/hopsoft/cable_ready/pull/35) ([back2war](https://github.com/back2war))
|
97
144
|
|
98
145
|
## [v4.2.0](https://github.com/hopsoft/cable_ready/tree/v4.2.0) (2020-06-02)
|
99
146
|
|
@@ -128,6 +175,7 @@
|
|
128
175
|
|
129
176
|
**Merged pull requests:**
|
130
177
|
|
178
|
+
- Fix typo in method name outerHTML -\> outer\_html [\#35](https://github.com/hopsoft/cable_ready/pull/35) ([back2war](https://github.com/back2war))
|
131
179
|
- Add funding file [\#31](https://github.com/hopsoft/cable_ready/pull/31) ([andrewmcodes](https://github.com/andrewmcodes))
|
132
180
|
- update README and package.json [\#30](https://github.com/hopsoft/cable_ready/pull/30) ([andrewmcodes](https://github.com/andrewmcodes))
|
133
181
|
|
@@ -137,11 +185,12 @@
|
|
137
185
|
|
138
186
|
**Merged pull requests:**
|
139
187
|
|
188
|
+
- Add setStyles [\#37](https://github.com/hopsoft/cable_ready/pull/37) ([excid3](https://github.com/excid3))
|
140
189
|
- Bump acorn from 7.1.0 to 7.1.1 in /javascript [\#29](https://github.com/hopsoft/cable_ready/pull/29) ([dependabot[bot]](https://github.com/apps/dependabot))
|
141
190
|
- Set cookie support [\#28](https://github.com/hopsoft/cable_ready/pull/28) ([hopsoft](https://github.com/hopsoft))
|
142
191
|
- README.md: Fix typo [\#27](https://github.com/hopsoft/cable_ready/pull/27) ([henrik](https://github.com/henrik))
|
143
192
|
- Update event-dispatch.md [\#25](https://github.com/hopsoft/cable_ready/pull/25) ([leastbad](https://github.com/leastbad))
|
144
|
-
- Fix typo on Remove Css Class methods [\#24](https://github.com/hopsoft/cable_ready/pull/24) ([
|
193
|
+
- Fix typo on Remove Css Class methods [\#24](https://github.com/hopsoft/cable_ready/pull/24) ([dark88888](https://github.com/dark88888))
|
145
194
|
|
146
195
|
## [v4.0.9](https://github.com/hopsoft/cable_ready/tree/v4.0.9) (2020-01-27)
|
147
196
|
|
data/Gemfile.lock
CHANGED
@@ -1,62 +1,62 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cable_ready (4.4.
|
4
|
+
cable_ready (4.4.3)
|
5
5
|
rails (>= 5.2)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actioncable (6.0.3.
|
11
|
-
actionpack (= 6.0.3.
|
10
|
+
actioncable (6.0.3.4)
|
11
|
+
actionpack (= 6.0.3.4)
|
12
12
|
nio4r (~> 2.0)
|
13
13
|
websocket-driver (>= 0.6.1)
|
14
|
-
actionmailbox (6.0.3.
|
15
|
-
actionpack (= 6.0.3.
|
16
|
-
activejob (= 6.0.3.
|
17
|
-
activerecord (= 6.0.3.
|
18
|
-
activestorage (= 6.0.3.
|
19
|
-
activesupport (= 6.0.3.
|
14
|
+
actionmailbox (6.0.3.4)
|
15
|
+
actionpack (= 6.0.3.4)
|
16
|
+
activejob (= 6.0.3.4)
|
17
|
+
activerecord (= 6.0.3.4)
|
18
|
+
activestorage (= 6.0.3.4)
|
19
|
+
activesupport (= 6.0.3.4)
|
20
20
|
mail (>= 2.7.1)
|
21
|
-
actionmailer (6.0.3.
|
22
|
-
actionpack (= 6.0.3.
|
23
|
-
actionview (= 6.0.3.
|
24
|
-
activejob (= 6.0.3.
|
21
|
+
actionmailer (6.0.3.4)
|
22
|
+
actionpack (= 6.0.3.4)
|
23
|
+
actionview (= 6.0.3.4)
|
24
|
+
activejob (= 6.0.3.4)
|
25
25
|
mail (~> 2.5, >= 2.5.4)
|
26
26
|
rails-dom-testing (~> 2.0)
|
27
|
-
actionpack (6.0.3.
|
28
|
-
actionview (= 6.0.3.
|
29
|
-
activesupport (= 6.0.3.
|
27
|
+
actionpack (6.0.3.4)
|
28
|
+
actionview (= 6.0.3.4)
|
29
|
+
activesupport (= 6.0.3.4)
|
30
30
|
rack (~> 2.0, >= 2.0.8)
|
31
31
|
rack-test (>= 0.6.3)
|
32
32
|
rails-dom-testing (~> 2.0)
|
33
33
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
34
|
-
actiontext (6.0.3.
|
35
|
-
actionpack (= 6.0.3.
|
36
|
-
activerecord (= 6.0.3.
|
37
|
-
activestorage (= 6.0.3.
|
38
|
-
activesupport (= 6.0.3.
|
34
|
+
actiontext (6.0.3.4)
|
35
|
+
actionpack (= 6.0.3.4)
|
36
|
+
activerecord (= 6.0.3.4)
|
37
|
+
activestorage (= 6.0.3.4)
|
38
|
+
activesupport (= 6.0.3.4)
|
39
39
|
nokogiri (>= 1.8.5)
|
40
|
-
actionview (6.0.3.
|
41
|
-
activesupport (= 6.0.3.
|
40
|
+
actionview (6.0.3.4)
|
41
|
+
activesupport (= 6.0.3.4)
|
42
42
|
builder (~> 3.1)
|
43
43
|
erubi (~> 1.4)
|
44
44
|
rails-dom-testing (~> 2.0)
|
45
45
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
46
|
-
activejob (6.0.3.
|
47
|
-
activesupport (= 6.0.3.
|
46
|
+
activejob (6.0.3.4)
|
47
|
+
activesupport (= 6.0.3.4)
|
48
48
|
globalid (>= 0.3.6)
|
49
|
-
activemodel (6.0.3.
|
50
|
-
activesupport (= 6.0.3.
|
51
|
-
activerecord (6.0.3.
|
52
|
-
activemodel (= 6.0.3.
|
53
|
-
activesupport (= 6.0.3.
|
54
|
-
activestorage (6.0.3.
|
55
|
-
actionpack (= 6.0.3.
|
56
|
-
activejob (= 6.0.3.
|
57
|
-
activerecord (= 6.0.3.
|
49
|
+
activemodel (6.0.3.4)
|
50
|
+
activesupport (= 6.0.3.4)
|
51
|
+
activerecord (6.0.3.4)
|
52
|
+
activemodel (= 6.0.3.4)
|
53
|
+
activesupport (= 6.0.3.4)
|
54
|
+
activestorage (6.0.3.4)
|
55
|
+
actionpack (= 6.0.3.4)
|
56
|
+
activejob (= 6.0.3.4)
|
57
|
+
activerecord (= 6.0.3.4)
|
58
58
|
marcel (~> 0.3.1)
|
59
|
-
activesupport (6.0.3.
|
59
|
+
activesupport (6.0.3.4)
|
60
60
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
61
61
|
i18n (>= 0.7, < 2)
|
62
62
|
minitest (~> 5.1)
|
@@ -69,9 +69,10 @@ GEM
|
|
69
69
|
coderay (1.1.3)
|
70
70
|
concurrent-ruby (1.1.7)
|
71
71
|
crass (1.0.6)
|
72
|
-
erubi (1.
|
73
|
-
faraday (1.0
|
72
|
+
erubi (1.10.0)
|
73
|
+
faraday (1.1.0)
|
74
74
|
multipart-post (>= 1.2, < 3)
|
75
|
+
ruby2_keywords
|
75
76
|
faraday-http-cache (2.2.0)
|
76
77
|
faraday (>= 0.8)
|
77
78
|
github_changelog_generator (1.15.2)
|
@@ -86,10 +87,10 @@ GEM
|
|
86
87
|
activesupport (>= 4.2.0)
|
87
88
|
i18n (1.8.5)
|
88
89
|
concurrent-ruby (~> 1.0)
|
89
|
-
loofah (2.
|
90
|
+
loofah (2.8.0)
|
90
91
|
crass (~> 1.0.2)
|
91
92
|
nokogiri (>= 1.5.9)
|
92
|
-
magic_frozen_string_literal (1.
|
93
|
+
magic_frozen_string_literal (1.2.0)
|
93
94
|
mail (2.7.1)
|
94
95
|
mini_mime (>= 0.1.1)
|
95
96
|
marcel (0.3.3)
|
@@ -104,11 +105,11 @@ GEM
|
|
104
105
|
nio4r (2.5.4)
|
105
106
|
nokogiri (1.10.10)
|
106
107
|
mini_portile2 (~> 2.4.0)
|
107
|
-
octokit (4.
|
108
|
+
octokit (4.19.0)
|
108
109
|
faraday (>= 0.9)
|
109
110
|
sawyer (~> 0.8.0, >= 0.5.3)
|
110
|
-
parallel (1.
|
111
|
-
parser (2.7.
|
111
|
+
parallel (1.20.1)
|
112
|
+
parser (2.7.2.0)
|
112
113
|
ast (~> 2.4.1)
|
113
114
|
pry (0.12.2)
|
114
115
|
coderay (~> 1.1.0)
|
@@ -119,52 +120,53 @@ GEM
|
|
119
120
|
rack (2.2.3)
|
120
121
|
rack-test (1.1.0)
|
121
122
|
rack (>= 1.0, < 3)
|
122
|
-
rails (6.0.3.
|
123
|
-
actioncable (= 6.0.3.
|
124
|
-
actionmailbox (= 6.0.3.
|
125
|
-
actionmailer (= 6.0.3.
|
126
|
-
actionpack (= 6.0.3.
|
127
|
-
actiontext (= 6.0.3.
|
128
|
-
actionview (= 6.0.3.
|
129
|
-
activejob (= 6.0.3.
|
130
|
-
activemodel (= 6.0.3.
|
131
|
-
activerecord (= 6.0.3.
|
132
|
-
activestorage (= 6.0.3.
|
133
|
-
activesupport (= 6.0.3.
|
123
|
+
rails (6.0.3.4)
|
124
|
+
actioncable (= 6.0.3.4)
|
125
|
+
actionmailbox (= 6.0.3.4)
|
126
|
+
actionmailer (= 6.0.3.4)
|
127
|
+
actionpack (= 6.0.3.4)
|
128
|
+
actiontext (= 6.0.3.4)
|
129
|
+
actionview (= 6.0.3.4)
|
130
|
+
activejob (= 6.0.3.4)
|
131
|
+
activemodel (= 6.0.3.4)
|
132
|
+
activerecord (= 6.0.3.4)
|
133
|
+
activestorage (= 6.0.3.4)
|
134
|
+
activesupport (= 6.0.3.4)
|
134
135
|
bundler (>= 1.3.0)
|
135
|
-
railties (= 6.0.3.
|
136
|
+
railties (= 6.0.3.4)
|
136
137
|
sprockets-rails (>= 2.0.0)
|
137
138
|
rails-dom-testing (2.0.3)
|
138
139
|
activesupport (>= 4.2.0)
|
139
140
|
nokogiri (>= 1.6)
|
140
141
|
rails-html-sanitizer (1.3.0)
|
141
142
|
loofah (~> 2.3)
|
142
|
-
railties (6.0.3.
|
143
|
-
actionpack (= 6.0.3.
|
144
|
-
activesupport (= 6.0.3.
|
143
|
+
railties (6.0.3.4)
|
144
|
+
actionpack (= 6.0.3.4)
|
145
|
+
activesupport (= 6.0.3.4)
|
145
146
|
method_source
|
146
147
|
rake (>= 0.8.7)
|
147
148
|
thor (>= 0.20.3, < 2.0)
|
148
149
|
rainbow (3.0.0)
|
149
150
|
rake (13.0.1)
|
150
|
-
regexp_parser (
|
151
|
+
regexp_parser (2.0.0)
|
151
152
|
retriable (3.1.2)
|
152
153
|
rexml (3.2.4)
|
153
|
-
rubocop (
|
154
|
+
rubocop (1.4.2)
|
154
155
|
parallel (~> 1.10)
|
155
156
|
parser (>= 2.7.1.5)
|
156
157
|
rainbow (>= 2.2.2, < 4.0)
|
157
|
-
regexp_parser (>= 1.
|
158
|
+
regexp_parser (>= 1.8)
|
158
159
|
rexml
|
159
|
-
rubocop-ast (>=
|
160
|
+
rubocop-ast (>= 1.1.1)
|
160
161
|
ruby-progressbar (~> 1.7)
|
161
162
|
unicode-display_width (>= 1.4.0, < 2.0)
|
162
|
-
rubocop-ast (
|
163
|
+
rubocop-ast (1.2.0)
|
163
164
|
parser (>= 2.7.1.5)
|
164
|
-
rubocop-performance (1.
|
165
|
-
rubocop (>= 0.
|
165
|
+
rubocop-performance (1.9.1)
|
166
|
+
rubocop (>= 0.90.0, < 2.0)
|
166
167
|
rubocop-ast (>= 0.4.0)
|
167
168
|
ruby-progressbar (1.10.1)
|
169
|
+
ruby2_keywords (0.0.2)
|
168
170
|
sawyer (0.8.2)
|
169
171
|
addressable (>= 2.3.5)
|
170
172
|
faraday (> 0.8, < 2.0)
|
@@ -175,20 +177,20 @@ GEM
|
|
175
177
|
actionpack (>= 4.0)
|
176
178
|
activesupport (>= 4.0)
|
177
179
|
sprockets (>= 3.0.0)
|
178
|
-
standard (0.
|
179
|
-
rubocop (=
|
180
|
-
rubocop-performance (= 1.
|
180
|
+
standard (0.10.1)
|
181
|
+
rubocop (= 1.4.2)
|
182
|
+
rubocop-performance (= 1.9.1)
|
181
183
|
standardrb (1.0.0)
|
182
184
|
standard
|
183
185
|
thor (1.0.1)
|
184
186
|
thread_safe (0.3.6)
|
185
|
-
tzinfo (1.2.
|
187
|
+
tzinfo (1.2.8)
|
186
188
|
thread_safe (~> 0.1)
|
187
189
|
unicode-display_width (1.7.0)
|
188
190
|
websocket-driver (0.7.3)
|
189
191
|
websocket-extensions (>= 0.1.0)
|
190
192
|
websocket-extensions (0.1.5)
|
191
|
-
zeitwerk (2.4.
|
193
|
+
zeitwerk (2.4.2)
|
192
194
|
|
193
195
|
PLATFORMS
|
194
196
|
ruby
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<p align="center">
|
2
|
-
<img src="assets/cable-ready-logo-with-copy.svg" width="360" />
|
2
|
+
<img src="https://gitcdn.link/repo/hopsoft/cable_ready/master/assets/cable-ready-logo-with-copy.svg" width="360" />
|
3
3
|
<h1 align="center">Welcome to CableReady 👋</h1>
|
4
4
|
<p align="center">
|
5
5
|
<img src="https://img.shields.io/gem/v/cable_ready.svg?color=red" />
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-brightgreen.svg" target="_blank" />
|
12
12
|
</a>
|
13
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-
|
14
|
+
<img alt="Lines of Code" src="https://img.shields.io/badge/lines_of_code-427-brightgreen.svg?style=flat" />
|
15
15
|
</a>
|
16
16
|
<a href="https://cableready.stimulusreflex.com" target="_blank">
|
17
17
|
<img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" />
|
@@ -30,9 +30,6 @@
|
|
30
30
|
<a href="https://www.codacy.com/manual/hopsoft/cable_ready/dashboard?utm_source=github.com&utm_medium=referral&utm_content=hopsoft/cable_ready&utm_campaign=Badge_Grade" target="_blank">
|
31
31
|
<img alt="Code Quality" src="https://app.codacy.com/project/badge/Grade/8e6971e3410347eaaa16be2555160b9c"/>
|
32
32
|
</a>
|
33
|
-
<a href="https://codeclimate.com/github/hopsoft/cable_ready/maintainability" target="_blank">
|
34
|
-
<img alt="Maintainability" src="https://api.codeclimate.com/v1/badges/83ddf1fee4af7e51a681/maintainability" />
|
35
|
-
</a>
|
36
33
|
<a target="_blank" rel="noopener noreferrer" href="https://github.com/hopsoft/cable_ready/workflows/Prettier-Standard/badge.svg">
|
37
34
|
<img src="https://github.com/hopsoft/cable_ready/workflows/Prettier-Standard/badge.svg" alt="Prettier-Standard" style="max-width:100%;">
|
38
35
|
</a>
|
@@ -84,8 +81,8 @@ Please run `./bin/standardize` prior submitting pull requests.
|
|
84
81
|
1. Bump version number at `lib/cable_ready/version.rb`
|
85
82
|
1. Run `rake build`
|
86
83
|
1. Run `rake release`
|
87
|
-
1.
|
88
|
-
1.
|
84
|
+
1. Run `yarn publish --no-git-tag-version`
|
85
|
+
1. Commit and push changes to the `package.json` file
|
89
86
|
|
90
87
|
## 📝 License
|
91
88
|
|
data/bin/standardize
CHANGED
data/cable_ready.gemspec
CHANGED
data/lib/cable_ready/channel.rb
CHANGED
@@ -13,24 +13,33 @@ module CableReady
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
def
|
16
|
+
def channel_broadcast(clear)
|
17
17
|
operations.select! { |_, list| list.present? }
|
18
18
|
operations.deep_transform_keys! { |key| key.to_s.camelize(:lower) }
|
19
19
|
ActionCable.server.broadcast identifier, {"cableReady" => true, "operations" => operations}
|
20
20
|
reset if clear
|
21
21
|
end
|
22
22
|
|
23
|
-
def
|
23
|
+
def channel_broadcast_to(model, clear)
|
24
24
|
operations.select! { |_, list| list.present? }
|
25
25
|
operations.deep_transform_keys! { |key| key.to_s.camelize(:lower) }
|
26
26
|
identifier.broadcast_to model, {"cableReady" => true, "operations" => operations}
|
27
27
|
reset if clear
|
28
28
|
end
|
29
29
|
|
30
|
+
def broadcast(clear = true)
|
31
|
+
CableReady::Channels.instance.broadcast(identifier, clear: clear)
|
32
|
+
end
|
33
|
+
|
34
|
+
def broadcast_to(model, clear = true)
|
35
|
+
CableReady::Channels.instance.broadcast_to(model, identifier, clear: clear)
|
36
|
+
end
|
37
|
+
|
30
38
|
private
|
31
39
|
|
32
|
-
def
|
40
|
+
def enqueue_operation(key, options)
|
33
41
|
operations[key] << options
|
42
|
+
self
|
34
43
|
end
|
35
44
|
|
36
45
|
def reset
|
data/lib/cable_ready/channels.rb
CHANGED
@@ -43,7 +43,7 @@ module CableReady
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def add_operation(operation, &implementation)
|
46
|
-
@operations[operation] = implementation || ->(options = {}) {
|
46
|
+
@operations[operation] = implementation || ->(options = {}) { enqueue_operation(operation, options) }
|
47
47
|
end
|
48
48
|
|
49
49
|
def [](identifier)
|
@@ -56,7 +56,7 @@ module CableReady
|
|
56
56
|
.reject { |channel| identifiers.any? && identifiers.exclude?(channel.identifier) }
|
57
57
|
.select { |channel| channel.identifier.is_a?(String) }
|
58
58
|
.tap do |channels|
|
59
|
-
channels.each { |channel| @channels[channel.identifier].
|
59
|
+
channels.each { |channel| @channels[channel.identifier].channel_broadcast(clear) }
|
60
60
|
channels.each { |channel| @channels.except!(channel.identifier) if clear }
|
61
61
|
end
|
62
62
|
end
|
@@ -68,7 +68,7 @@ module CableReady
|
|
68
68
|
.reject { |channel| identifiers.any? && identifiers.exclude?(channel.identifier) }
|
69
69
|
.reject { |channel| channel.identifier.is_a?(String) }
|
70
70
|
.tap do |channels|
|
71
|
-
channels.each { |channel| @channels[channel.identifier].
|
71
|
+
channels.each { |channel| @channels[channel.identifier].channel_broadcast_to(model, clear) }
|
72
72
|
channels.each { |channel| @channels.except!(channel.identifier) if clear }
|
73
73
|
end
|
74
74
|
end
|