cable_ready 4.4.0.pre2 → 4.4.2

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: 336dc16eec4f5d8fef87d25319d07bbc2381ac552c384a2066387c209efa4782
4
- data.tar.gz: 782e97d08ef9d7adf559d1e69808adb779af99f54fbabe0c40091138fbe04cb9
3
+ metadata.gz: 64895c6447df06af809371d7ba71c6c4cbd0408760b2ba70dd86d10be099214e
4
+ data.tar.gz: 897d7f9508615894e134aa32324843ab02034a833b4d31d913f862ef8a155a3d
5
5
  SHA512:
6
- metadata.gz: f59b24c3691502cf20f6c0b0b9d665adba7b5dab021b6dc411a790579040f97483766a0e97f3ad37d288f22c64869b0eaa8c8d9bee376b433b773974132d16bf
7
- data.tar.gz: 066c91020558f7ac188fcc11fbd86c182cb2f7a527608c6ec1ecc84f50014f515224e4fd60c45d625dbe9236c631c38f3c84e8b6f83bd899b0101f9442df2a75
6
+ metadata.gz: da41b6c7511d67f111d9fb0c041d94b3edc197c0c8b84e121c13a6f086b30a5530a65de23cd857e07c7d4ec1d68ee35e752fde44d1228c1ae4f4e0a981ed90a5
7
+ data.tar.gz: 77e8bfd9b4b105bc87e4d7a392b8c6b319afa46a6ea080ccaec9b6ecbd002416be1856252d8bf6cd69a15c5df5712784030158ee1010b24a8dfe1a878aecf304
@@ -1,8 +1,45 @@
1
1
  # Changelog
2
2
 
3
- ## [Unreleased](https://github.com/hopsoft/cable_ready/tree/HEAD)
3
+ ## [v4.4.1](https://github.com/hopsoft/cable_ready/tree/v4.4.1) (2020-11-28)
4
4
 
5
- [Full Changelog](https://github.com/hopsoft/cable_ready/compare/v4.4.0.pre1...HEAD)
5
+ [Full Changelog](https://github.com/hopsoft/cable_ready/compare/v4.4.0...v4.4.1)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Apply setFocus behavior to more element mutations [\#81](https://github.com/hopsoft/cable_ready/pull/81) ([hopsoft](https://github.com/hopsoft))
10
+
11
+ ## [v4.4.0](https://github.com/hopsoft/cable_ready/tree/v4.4.0) (2020-11-24)
12
+
13
+ [Full Changelog](https://github.com/hopsoft/cable_ready/compare/v4.4.0.pre4...v4.4.0)
14
+
15
+ ## [v4.4.0.pre4](https://github.com/hopsoft/cable_ready/tree/v4.4.0.pre4) (2020-11-22)
16
+
17
+ [Full Changelog](https://github.com/hopsoft/cable_ready/compare/v4.4.0.pre3...v4.4.0.pre4)
18
+
19
+ **Fixed bugs:**
20
+
21
+ - only compare isEqualNode for non-inputs [\#80](https://github.com/hopsoft/cable_ready/pull/80) ([leastbad](https://github.com/leastbad))
22
+
23
+ ## [v4.4.0.pre3](https://github.com/hopsoft/cable_ready/tree/v4.4.0.pre3) (2020-11-13)
24
+
25
+ [Full Changelog](https://github.com/hopsoft/cable_ready/compare/v4.4.0.pre2...v4.4.0.pre3)
26
+
27
+ **Closed issues:**
28
+
29
+ - CableReady detected an error in insertAdjacentHtml. Object doesn't support this action - IE11 only [\#76](https://github.com/hopsoft/cable_ready/issues/76)
30
+ - shouldMorph doesn't work well with some form elements [\#70](https://github.com/hopsoft/cable_ready/issues/70)
31
+ - Operations go missing before broadcasting [\#64](https://github.com/hopsoft/cable_ready/issues/64)
32
+
33
+ **Merged pull requests:**
34
+
35
+ - 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))
36
+ - method chaining [\#78](https://github.com/hopsoft/cable_ready/pull/78) ([leastbad](https://github.com/leastbad))
37
+ - jquery support [\#75](https://github.com/hopsoft/cable_ready/pull/75) ([leastbad](https://github.com/leastbad))
38
+ - Removed isEqualNode comparison [\#71](https://github.com/hopsoft/cable_ready/pull/71) ([adank92](https://github.com/adank92))
39
+
40
+ ## [v4.4.0.pre2](https://github.com/hopsoft/cable_ready/tree/v4.4.0.pre2) (2020-11-02)
41
+
42
+ [Full Changelog](https://github.com/hopsoft/cable_ready/compare/v4.4.0.pre1...v4.4.0.pre2)
6
43
 
7
44
  **Merged pull requests:**
8
45
 
@@ -141,7 +178,7 @@
141
178
  - Set cookie support [\#28](https://github.com/hopsoft/cable_ready/pull/28) ([hopsoft](https://github.com/hopsoft))
142
179
  - README.md: Fix typo [\#27](https://github.com/hopsoft/cable_ready/pull/27) ([henrik](https://github.com/henrik))
143
180
  - 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) ([darkrubyist](https://github.com/darkrubyist))
181
+ - Fix typo on Remove Css Class methods [\#24](https://github.com/hopsoft/cable_ready/pull/24) ([dark88888](https://github.com/dark88888))
145
182
 
146
183
  ## [v4.0.9](https://github.com/hopsoft/cable_ready/tree/v4.0.9) (2020-01-27)
147
184
 
@@ -1,62 +1,62 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cable_ready (4.4.0.pre2)
4
+ cable_ready (4.4.2)
5
5
  rails (>= 5.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actioncable (6.0.3.3)
11
- actionpack (= 6.0.3.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.3)
15
- actionpack (= 6.0.3.3)
16
- activejob (= 6.0.3.3)
17
- activerecord (= 6.0.3.3)
18
- activestorage (= 6.0.3.3)
19
- activesupport (= 6.0.3.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.3)
22
- actionpack (= 6.0.3.3)
23
- actionview (= 6.0.3.3)
24
- activejob (= 6.0.3.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.3)
28
- actionview (= 6.0.3.3)
29
- activesupport (= 6.0.3.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.3)
35
- actionpack (= 6.0.3.3)
36
- activerecord (= 6.0.3.3)
37
- activestorage (= 6.0.3.3)
38
- activesupport (= 6.0.3.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.3)
41
- activesupport (= 6.0.3.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.3)
47
- activesupport (= 6.0.3.3)
46
+ activejob (6.0.3.4)
47
+ activesupport (= 6.0.3.4)
48
48
  globalid (>= 0.3.6)
49
- activemodel (6.0.3.3)
50
- activesupport (= 6.0.3.3)
51
- activerecord (6.0.3.3)
52
- activemodel (= 6.0.3.3)
53
- activesupport (= 6.0.3.3)
54
- activestorage (6.0.3.3)
55
- actionpack (= 6.0.3.3)
56
- activejob (= 6.0.3.3)
57
- activerecord (= 6.0.3.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.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.9.0)
73
- faraday (1.0.1)
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.7.0)
90
+ loofah (2.8.0)
90
91
  crass (~> 1.0.2)
91
92
  nokogiri (>= 1.5.9)
92
- magic_frozen_string_literal (1.1.0)
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.18.0)
108
+ octokit (4.19.0)
108
109
  faraday (>= 0.9)
109
110
  sawyer (~> 0.8.0, >= 0.5.3)
110
- parallel (1.19.2)
111
- parser (2.7.1.5)
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.3)
123
- actioncable (= 6.0.3.3)
124
- actionmailbox (= 6.0.3.3)
125
- actionmailer (= 6.0.3.3)
126
- actionpack (= 6.0.3.3)
127
- actiontext (= 6.0.3.3)
128
- actionview (= 6.0.3.3)
129
- activejob (= 6.0.3.3)
130
- activemodel (= 6.0.3.3)
131
- activerecord (= 6.0.3.3)
132
- activestorage (= 6.0.3.3)
133
- activesupport (= 6.0.3.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.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.3)
143
- actionpack (= 6.0.3.3)
144
- activesupport (= 6.0.3.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 (1.8.0)
151
+ regexp_parser (2.0.0)
151
152
  retriable (3.1.2)
152
153
  rexml (3.2.4)
153
- rubocop (0.92.0)
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.7)
158
+ regexp_parser (>= 1.8)
158
159
  rexml
159
- rubocop-ast (>= 0.5.0)
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 (0.5.1)
163
+ rubocop-ast (1.2.0)
163
164
  parser (>= 2.7.1.5)
164
- rubocop-performance (1.8.1)
165
- rubocop (>= 0.87.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.7)
179
- rubocop (= 0.92)
180
- rubocop-performance (= 1.8.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.7)
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.0)
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-409-brightgreen.svg?style=flat" />
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&amp;utm_medium=referral&amp;utm_content=hopsoft/cable_ready&amp;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. Change directories `cd ./javascript`
88
- 1. Run `yarn publish` - NOTE: this will throw a fatal error because the tag already exists but the package will still publish
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
 
@@ -2,4 +2,4 @@
2
2
 
3
3
  bundle exec magic_frozen_string_literal
4
4
  bundle exec standardrb --fix
5
- cd ./javascript && yarn run prettier-standard cable_ready.js
5
+ yarn run prettier-standard ./javascript/*.js
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require File.expand_path("../lib/cable_ready/version", __FILE__)
2
4
 
3
5
  Gem::Specification.new do |gem|
@@ -13,24 +13,33 @@ module CableReady
13
13
  end
14
14
  end
15
15
 
16
- def broadcast(clear)
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 broadcast_to(model, clear)
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)
32
+ end
33
+
34
+ def broadcast_to(model, clear = true)
35
+ CableReady::Channels.instance.broadcast_to(model, identifier, clear)
36
+ end
37
+
30
38
  private
31
39
 
32
- def add_operation(key, options)
40
+ def enqueue_operation(key, options)
33
41
  operations[key] << options
42
+ self
34
43
  end
35
44
 
36
45
  def reset
@@ -43,7 +43,7 @@ module CableReady
43
43
  end
44
44
 
45
45
  def add_operation(operation, &implementation)
46
- @operations[operation] = implementation || ->(options = {}) { add_operation(operation, 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].broadcast(clear) }
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].broadcast_to(model, clear) }
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CableReady
4
- VERSION = "4.4.0.pre2"
4
+ VERSION = "4.4.2"
5
5
  end
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "cable_ready",
3
+ "version": "4.4.1",
4
+ "description": "CableReady helps you create great real-time user experiences by making it simple to trigger client-side DOM changes from server-side Ruby.",
5
+ "keywords": [
6
+ "ruby",
7
+ "rails",
8
+ "websockets",
9
+ "actioncable",
10
+ "cable",
11
+ "ssr",
12
+ "stimulus_reflex",
13
+ "client-side",
14
+ "dom"
15
+ ],
16
+ "homepage": "https://cableready.stimulusreflex.com/",
17
+ "bugs": {
18
+ "url": "https://github.com/hopsoft/cable_ready/issues"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com:hopsoft/cable_ready.git"
23
+ },
24
+ "license": "MIT",
25
+ "author": "Nathan Hopkins <natehop@gmail.com>",
26
+ "main": "./javascript/cable_ready.js",
27
+ "scripts": {
28
+ "prettier-standard-check": "yarn run prettier-standard --check ./javascript/**/*.js"
29
+ },
30
+ "dependencies": {
31
+ "morphdom": "^2.6.1"
32
+ },
33
+ "devDependencies": {
34
+ "prettier-standard": "^16.1.0"
35
+ }
36
+ }