stimulus_reflex 2.1.5 → 2.1.6
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/Gemfile.lock +67 -67
- data/README.md +3 -11
- data/lib/stimulus_reflex/channel.rb +8 -2
- data/lib/stimulus_reflex/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9c50e78b9a8b062de4ba60f8a8e88443f15b3bab6f358f0630404c182b437637
|
|
4
|
+
data.tar.gz: adbde92dcb054bcd58bc8a8744a2d41c202d8e7692b85fdef1321a7df9d392c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aaaffe8eff72bbc991b450485304055a7bfda5fee5ce06e91859d14998ba4d45b1b3ba23cdc1f9466861ceccc71189613e9895c568b8ea9b637cd4e3387f6ee9
|
|
7
|
+
data.tar.gz: d22df6b0a4e31e59f09ee83c236a5881b7804e6e0ae66467764ce2fb4ef1000b2dcfc7dfec0b70efe75ce35c18a8e5020bc1789c57b8f130252fb6502f08af19
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
stimulus_reflex (2.1.
|
|
4
|
+
stimulus_reflex (2.1.6)
|
|
5
5
|
cable_ready (>= 4.0)
|
|
6
6
|
nokogiri
|
|
7
7
|
rack
|
|
@@ -10,63 +10,63 @@ PATH
|
|
|
10
10
|
GEM
|
|
11
11
|
remote: https://rubygems.org/
|
|
12
12
|
specs:
|
|
13
|
-
actioncable (6.0.
|
|
14
|
-
actionpack (= 6.0.
|
|
13
|
+
actioncable (6.0.2.1)
|
|
14
|
+
actionpack (= 6.0.2.1)
|
|
15
15
|
nio4r (~> 2.0)
|
|
16
16
|
websocket-driver (>= 0.6.1)
|
|
17
|
-
actionmailbox (6.0.
|
|
18
|
-
actionpack (= 6.0.
|
|
19
|
-
activejob (= 6.0.
|
|
20
|
-
activerecord (= 6.0.
|
|
21
|
-
activestorage (= 6.0.
|
|
22
|
-
activesupport (= 6.0.
|
|
17
|
+
actionmailbox (6.0.2.1)
|
|
18
|
+
actionpack (= 6.0.2.1)
|
|
19
|
+
activejob (= 6.0.2.1)
|
|
20
|
+
activerecord (= 6.0.2.1)
|
|
21
|
+
activestorage (= 6.0.2.1)
|
|
22
|
+
activesupport (= 6.0.2.1)
|
|
23
23
|
mail (>= 2.7.1)
|
|
24
|
-
actionmailer (6.0.
|
|
25
|
-
actionpack (= 6.0.
|
|
26
|
-
actionview (= 6.0.
|
|
27
|
-
activejob (= 6.0.
|
|
24
|
+
actionmailer (6.0.2.1)
|
|
25
|
+
actionpack (= 6.0.2.1)
|
|
26
|
+
actionview (= 6.0.2.1)
|
|
27
|
+
activejob (= 6.0.2.1)
|
|
28
28
|
mail (~> 2.5, >= 2.5.4)
|
|
29
29
|
rails-dom-testing (~> 2.0)
|
|
30
|
-
actionpack (6.0.
|
|
31
|
-
actionview (= 6.0.
|
|
32
|
-
activesupport (= 6.0.
|
|
33
|
-
rack (~> 2.0)
|
|
30
|
+
actionpack (6.0.2.1)
|
|
31
|
+
actionview (= 6.0.2.1)
|
|
32
|
+
activesupport (= 6.0.2.1)
|
|
33
|
+
rack (~> 2.0, >= 2.0.8)
|
|
34
34
|
rack-test (>= 0.6.3)
|
|
35
35
|
rails-dom-testing (~> 2.0)
|
|
36
36
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
37
|
-
actiontext (6.0.
|
|
38
|
-
actionpack (= 6.0.
|
|
39
|
-
activerecord (= 6.0.
|
|
40
|
-
activestorage (= 6.0.
|
|
41
|
-
activesupport (= 6.0.
|
|
37
|
+
actiontext (6.0.2.1)
|
|
38
|
+
actionpack (= 6.0.2.1)
|
|
39
|
+
activerecord (= 6.0.2.1)
|
|
40
|
+
activestorage (= 6.0.2.1)
|
|
41
|
+
activesupport (= 6.0.2.1)
|
|
42
42
|
nokogiri (>= 1.8.5)
|
|
43
|
-
actionview (6.0.
|
|
44
|
-
activesupport (= 6.0.
|
|
43
|
+
actionview (6.0.2.1)
|
|
44
|
+
activesupport (= 6.0.2.1)
|
|
45
45
|
builder (~> 3.1)
|
|
46
46
|
erubi (~> 1.4)
|
|
47
47
|
rails-dom-testing (~> 2.0)
|
|
48
48
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
49
|
-
activejob (6.0.
|
|
50
|
-
activesupport (= 6.0.
|
|
49
|
+
activejob (6.0.2.1)
|
|
50
|
+
activesupport (= 6.0.2.1)
|
|
51
51
|
globalid (>= 0.3.6)
|
|
52
|
-
activemodel (6.0.
|
|
53
|
-
activesupport (= 6.0.
|
|
54
|
-
activerecord (6.0.
|
|
55
|
-
activemodel (= 6.0.
|
|
56
|
-
activesupport (= 6.0.
|
|
57
|
-
activestorage (6.0.
|
|
58
|
-
actionpack (= 6.0.
|
|
59
|
-
activejob (= 6.0.
|
|
60
|
-
activerecord (= 6.0.
|
|
52
|
+
activemodel (6.0.2.1)
|
|
53
|
+
activesupport (= 6.0.2.1)
|
|
54
|
+
activerecord (6.0.2.1)
|
|
55
|
+
activemodel (= 6.0.2.1)
|
|
56
|
+
activesupport (= 6.0.2.1)
|
|
57
|
+
activestorage (6.0.2.1)
|
|
58
|
+
actionpack (= 6.0.2.1)
|
|
59
|
+
activejob (= 6.0.2.1)
|
|
60
|
+
activerecord (= 6.0.2.1)
|
|
61
61
|
marcel (~> 0.3.1)
|
|
62
|
-
activesupport (6.0.
|
|
62
|
+
activesupport (6.0.2.1)
|
|
63
63
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
64
64
|
i18n (>= 0.7, < 2)
|
|
65
65
|
minitest (~> 5.1)
|
|
66
66
|
tzinfo (~> 1.1)
|
|
67
|
-
zeitwerk (~> 2.
|
|
67
|
+
zeitwerk (~> 2.2)
|
|
68
68
|
ast (2.4.0)
|
|
69
|
-
builder (3.2.
|
|
69
|
+
builder (3.2.4)
|
|
70
70
|
cable_ready (4.0.8)
|
|
71
71
|
rails (>= 5.2)
|
|
72
72
|
coderay (1.1.2)
|
|
@@ -78,7 +78,7 @@ GEM
|
|
|
78
78
|
i18n (1.7.0)
|
|
79
79
|
concurrent-ruby (~> 1.0)
|
|
80
80
|
jaro_winkler (1.5.4)
|
|
81
|
-
loofah (2.
|
|
81
|
+
loofah (2.4.0)
|
|
82
82
|
crass (~> 1.0.2)
|
|
83
83
|
nokogiri (>= 1.5.9)
|
|
84
84
|
mail (2.7.1)
|
|
@@ -91,9 +91,9 @@ GEM
|
|
|
91
91
|
mini_portile2 (2.4.0)
|
|
92
92
|
minitest (5.13.0)
|
|
93
93
|
nio4r (2.5.2)
|
|
94
|
-
nokogiri (1.10.
|
|
94
|
+
nokogiri (1.10.7)
|
|
95
95
|
mini_portile2 (~> 2.4.0)
|
|
96
|
-
parallel (1.
|
|
96
|
+
parallel (1.19.1)
|
|
97
97
|
parser (2.6.5.0)
|
|
98
98
|
ast (~> 2.4.0)
|
|
99
99
|
pry (0.12.2)
|
|
@@ -101,45 +101,45 @@ GEM
|
|
|
101
101
|
method_source (~> 0.9.0)
|
|
102
102
|
pry-nav (0.3.0)
|
|
103
103
|
pry (>= 0.9.10, < 0.13.0)
|
|
104
|
-
rack (2.0.
|
|
104
|
+
rack (2.0.8)
|
|
105
105
|
rack-test (1.1.0)
|
|
106
106
|
rack (>= 1.0, < 3)
|
|
107
|
-
rails (6.0.
|
|
108
|
-
actioncable (= 6.0.
|
|
109
|
-
actionmailbox (= 6.0.
|
|
110
|
-
actionmailer (= 6.0.
|
|
111
|
-
actionpack (= 6.0.
|
|
112
|
-
actiontext (= 6.0.
|
|
113
|
-
actionview (= 6.0.
|
|
114
|
-
activejob (= 6.0.
|
|
115
|
-
activemodel (= 6.0.
|
|
116
|
-
activerecord (= 6.0.
|
|
117
|
-
activestorage (= 6.0.
|
|
118
|
-
activesupport (= 6.0.
|
|
107
|
+
rails (6.0.2.1)
|
|
108
|
+
actioncable (= 6.0.2.1)
|
|
109
|
+
actionmailbox (= 6.0.2.1)
|
|
110
|
+
actionmailer (= 6.0.2.1)
|
|
111
|
+
actionpack (= 6.0.2.1)
|
|
112
|
+
actiontext (= 6.0.2.1)
|
|
113
|
+
actionview (= 6.0.2.1)
|
|
114
|
+
activejob (= 6.0.2.1)
|
|
115
|
+
activemodel (= 6.0.2.1)
|
|
116
|
+
activerecord (= 6.0.2.1)
|
|
117
|
+
activestorage (= 6.0.2.1)
|
|
118
|
+
activesupport (= 6.0.2.1)
|
|
119
119
|
bundler (>= 1.3.0)
|
|
120
|
-
railties (= 6.0.
|
|
120
|
+
railties (= 6.0.2.1)
|
|
121
121
|
sprockets-rails (>= 2.0.0)
|
|
122
122
|
rails-dom-testing (2.0.3)
|
|
123
123
|
activesupport (>= 4.2.0)
|
|
124
124
|
nokogiri (>= 1.6)
|
|
125
125
|
rails-html-sanitizer (1.3.0)
|
|
126
126
|
loofah (~> 2.3)
|
|
127
|
-
railties (6.0.
|
|
128
|
-
actionpack (= 6.0.
|
|
129
|
-
activesupport (= 6.0.
|
|
127
|
+
railties (6.0.2.1)
|
|
128
|
+
actionpack (= 6.0.2.1)
|
|
129
|
+
activesupport (= 6.0.2.1)
|
|
130
130
|
method_source
|
|
131
131
|
rake (>= 0.8.7)
|
|
132
132
|
thor (>= 0.20.3, < 2.0)
|
|
133
133
|
rainbow (3.0.0)
|
|
134
|
-
rake (13.0.
|
|
135
|
-
rubocop (0.
|
|
134
|
+
rake (13.0.1)
|
|
135
|
+
rubocop (0.77.0)
|
|
136
136
|
jaro_winkler (~> 1.5.1)
|
|
137
137
|
parallel (~> 1.10)
|
|
138
138
|
parser (>= 2.6)
|
|
139
139
|
rainbow (>= 2.2.2, < 4.0)
|
|
140
140
|
ruby-progressbar (~> 1.7)
|
|
141
141
|
unicode-display_width (>= 1.4.0, < 1.7)
|
|
142
|
-
rubocop-performance (1.5.
|
|
142
|
+
rubocop-performance (1.5.1)
|
|
143
143
|
rubocop (>= 0.71.0)
|
|
144
144
|
ruby-progressbar (1.10.1)
|
|
145
145
|
sprockets (4.0.0)
|
|
@@ -149,12 +149,12 @@ GEM
|
|
|
149
149
|
actionpack (>= 4.0)
|
|
150
150
|
activesupport (>= 4.0)
|
|
151
151
|
sprockets (>= 3.0.0)
|
|
152
|
-
standard (0.1.
|
|
153
|
-
rubocop (~> 0.
|
|
154
|
-
rubocop-performance (~> 1.5.
|
|
152
|
+
standard (0.1.7)
|
|
153
|
+
rubocop (~> 0.77.0)
|
|
154
|
+
rubocop-performance (~> 1.5.1)
|
|
155
155
|
standardrb (1.0.0)
|
|
156
156
|
standard
|
|
157
|
-
thor (0.
|
|
157
|
+
thor (1.0.1)
|
|
158
158
|
thread_safe (0.3.6)
|
|
159
159
|
tzinfo (1.2.5)
|
|
160
160
|
thread_safe (~> 0.1)
|
|
@@ -162,7 +162,7 @@ GEM
|
|
|
162
162
|
websocket-driver (0.7.1)
|
|
163
163
|
websocket-extensions (>= 0.1.0)
|
|
164
164
|
websocket-extensions (0.1.4)
|
|
165
|
-
zeitwerk (2.2.
|
|
165
|
+
zeitwerk (2.2.2)
|
|
166
166
|
|
|
167
167
|
PLATFORMS
|
|
168
168
|
ruby
|
|
@@ -176,4 +176,4 @@ DEPENDENCIES
|
|
|
176
176
|
stimulus_reflex!
|
|
177
177
|
|
|
178
178
|
BUNDLED WITH
|
|
179
|
-
2.
|
|
179
|
+
2.1.1
|
data/README.md
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
<img src="https://raw.githubusercontent.com/hopsoft/stimulus_reflex/master/assets/stimulus-reflex-logo.svg?sanitize=true" height="100" />
|
|
3
|
-
</p>
|
|
4
|
-
<p align="center">
|
|
5
|
-
<a href="https://codefund.io/properties/525/visit-sponsor">
|
|
6
|
-
<img src="https://codefund.io/properties/525/sponsor" />
|
|
7
|
-
</a>
|
|
8
|
-
</p>
|
|
9
|
-
|
|
10
|
-
[](http://blog.codinghorror.com/the-best-code-is-no-code-at-all/)
|
|
1
|
+
[](http://blog.codinghorror.com/the-best-code-is-no-code-at-all/)
|
|
11
2
|
[](https://codeclimate.com/github/hopsoft/stimulus_reflex/maintainability)
|
|
12
3
|

|
|
13
4
|

|
|
14
5
|

|
|
15
6
|
[](https://stimulus-reflex.discourse.group)
|
|
7
|
+
[](https://discord.gg/XveN625)
|
|
16
8
|
|
|
17
9
|
# StimulusReflex
|
|
18
10
|
|
|
@@ -34,7 +26,7 @@ _Inspired by [Phoenix LiveView](https://youtu.be/Z2DU0qLfPIY?t=670)._ 🙌
|
|
|
34
26
|
|
|
35
27
|
### Code of Conduct
|
|
36
28
|
|
|
37
|
-
Everyone interacting with StimulusReflex is expected to follow the [Code of Conduct](CODE_OF_CONDUCT.md)
|
|
29
|
+
Everyone interacting with the StimulusReflex project’s codebases, issue trackers, chat rooms and forum is expected to follow the [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
38
30
|
|
|
39
31
|
### Coding Standards
|
|
40
32
|
|
|
@@ -32,13 +32,15 @@ class StimulusReflex::Channel < ActionCable::Channel::Base
|
|
|
32
32
|
reflex = reflex_class.new(self, url: url, element: element, selectors: selectors)
|
|
33
33
|
delegate_call_to_reflex reflex, method_name, arguments
|
|
34
34
|
rescue => invoke_error
|
|
35
|
-
|
|
35
|
+
message = exception_message_with_backtrace(invoke_error)
|
|
36
|
+
return broadcast_error("StimulusReflex::Channel Failed to invoke #{target}! #{url} #{message}", data)
|
|
36
37
|
end
|
|
37
38
|
|
|
38
39
|
begin
|
|
39
40
|
render_page_and_broadcast_morph url, reflex, selectors, data
|
|
40
41
|
rescue => render_error
|
|
41
|
-
|
|
42
|
+
message = exception_message_with_backtrace(render_error)
|
|
43
|
+
broadcast_error "StimulusReflex::Channel Failed to re-render #{url} #{message}", data
|
|
42
44
|
end
|
|
43
45
|
end
|
|
44
46
|
|
|
@@ -121,4 +123,8 @@ class StimulusReflex::Channel < ActionCable::Channel::Base
|
|
|
121
123
|
)
|
|
122
124
|
cable_ready.broadcast
|
|
123
125
|
end
|
|
126
|
+
|
|
127
|
+
def exception_message_with_backtrace(exception)
|
|
128
|
+
"#{exception} #{exception.backtrace.first}"
|
|
129
|
+
end
|
|
124
130
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stimulus_reflex
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nathan Hopkins
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-12-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rack
|