stimulus_reflex 3.5.0.pre8 → 3.5.0.pre10

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of stimulus_reflex might be problematic. Click here for more details.

Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +2 -1218
  3. data/Gemfile +0 -1
  4. data/Gemfile.lock +145 -193
  5. data/README.md +48 -20
  6. data/Rakefile +0 -8
  7. data/app/assets/javascripts/stimulus_reflex.js +1174 -0
  8. data/app/assets/javascripts/stimulus_reflex.min.js +2 -0
  9. data/app/assets/javascripts/stimulus_reflex.min.js.map +1 -0
  10. data/app/assets/javascripts/stimulus_reflex.umd.js +1064 -0
  11. data/app/assets/javascripts/stimulus_reflex.umd.min.js +1065 -0
  12. data/app/assets/javascripts/stimulus_reflex.umd.min.js.map +1 -0
  13. data/app/channels/stimulus_reflex/channel.rb +28 -7
  14. data/bin/console +0 -2
  15. data/bin/standardize +2 -1
  16. data/lib/generators/stimulus_reflex/stimulus_reflex_generator.rb +72 -7
  17. data/lib/generators/stimulus_reflex/templates/app/controllers/examples_controller.rb.tt +9 -0
  18. data/lib/generators/stimulus_reflex/templates/app/javascript/channels/consumer.js.tt +6 -0
  19. data/lib/generators/stimulus_reflex/templates/app/javascript/channels/index.js.esbuild.tt +4 -0
  20. data/lib/generators/stimulus_reflex/templates/app/javascript/channels/index.js.importmap.tt +2 -0
  21. data/lib/generators/stimulus_reflex/templates/app/javascript/channels/index.js.shakapacker.tt +5 -0
  22. data/lib/generators/stimulus_reflex/templates/app/javascript/channels/index.js.vite.tt +1 -0
  23. data/lib/generators/stimulus_reflex/templates/app/javascript/channels/index.js.webpacker.tt +5 -0
  24. data/lib/generators/stimulus_reflex/templates/app/javascript/config/cable_ready.js.tt +4 -0
  25. data/lib/generators/stimulus_reflex/templates/app/javascript/config/index.js.tt +2 -0
  26. data/lib/generators/stimulus_reflex/templates/app/javascript/config/mrujs.js.tt +9 -0
  27. data/lib/generators/stimulus_reflex/templates/app/javascript/config/stimulus_reflex.js.tt +5 -0
  28. data/lib/generators/stimulus_reflex/templates/app/javascript/controllers/%file_name%_controller.js.tt +114 -74
  29. data/lib/generators/stimulus_reflex/templates/app/javascript/controllers/application.js.tt +11 -0
  30. data/lib/generators/stimulus_reflex/templates/app/javascript/controllers/application_controller.js.tt +49 -35
  31. data/lib/generators/stimulus_reflex/templates/app/javascript/controllers/index.js.esbuild.tt +7 -0
  32. data/lib/generators/stimulus_reflex/templates/app/javascript/controllers/index.js.importmap.tt +5 -0
  33. data/lib/generators/stimulus_reflex/templates/app/javascript/controllers/index.js.shakapacker.tt +5 -0
  34. data/lib/generators/stimulus_reflex/templates/app/javascript/controllers/index.js.vite.tt +5 -0
  35. data/lib/generators/stimulus_reflex/templates/app/javascript/controllers/index.js.webpacker.tt +5 -0
  36. data/lib/generators/stimulus_reflex/templates/app/reflexes/%file_name%_reflex.rb.tt +38 -7
  37. data/lib/generators/stimulus_reflex/templates/app/reflexes/application_reflex.rb.tt +10 -2
  38. data/lib/generators/stimulus_reflex/templates/app/views/examples/show.html.erb.tt +207 -0
  39. data/lib/generators/stimulus_reflex/templates/config/initializers/cable_ready.rb +22 -0
  40. data/lib/generators/stimulus_reflex/templates/config/initializers/stimulus_reflex.rb +18 -13
  41. data/lib/generators/stimulus_reflex/templates/esbuild.config.mjs.tt +94 -0
  42. data/lib/install/action_cable.rb +155 -0
  43. data/lib/install/broadcaster.rb +90 -0
  44. data/lib/install/bundle.rb +56 -0
  45. data/lib/install/compression.rb +41 -0
  46. data/lib/install/config.rb +87 -0
  47. data/lib/install/development.rb +110 -0
  48. data/lib/install/esbuild.rb +114 -0
  49. data/lib/install/example.rb +22 -0
  50. data/lib/install/importmap.rb +133 -0
  51. data/lib/install/initializers.rb +25 -0
  52. data/lib/install/mrujs.rb +133 -0
  53. data/lib/install/npm_packages.rb +25 -0
  54. data/lib/install/reflexes.rb +25 -0
  55. data/lib/install/shakapacker.rb +64 -0
  56. data/lib/install/spring.rb +54 -0
  57. data/lib/install/updatable.rb +34 -0
  58. data/lib/install/vite.rb +64 -0
  59. data/lib/install/webpacker.rb +90 -0
  60. data/lib/install/yarn.rb +55 -0
  61. data/lib/stimulus_reflex/broadcasters/broadcaster.rb +15 -8
  62. data/lib/stimulus_reflex/broadcasters/page_broadcaster.rb +7 -8
  63. data/lib/stimulus_reflex/broadcasters/selector_broadcaster.rb +10 -10
  64. data/lib/stimulus_reflex/broadcasters/update.rb +3 -0
  65. data/lib/stimulus_reflex/cable_readiness.rb +29 -0
  66. data/lib/stimulus_reflex/cable_ready_channels.rb +5 -5
  67. data/lib/stimulus_reflex/callbacks.rb +17 -1
  68. data/lib/stimulus_reflex/concern_enhancer.rb +6 -4
  69. data/lib/stimulus_reflex/configuration.rb +12 -2
  70. data/lib/stimulus_reflex/dataset.rb +11 -1
  71. data/lib/stimulus_reflex/engine.rb +40 -0
  72. data/lib/stimulus_reflex/html/document.rb +59 -0
  73. data/lib/stimulus_reflex/html/document_fragment.rb +13 -0
  74. data/lib/stimulus_reflex/importmap.rb +7 -0
  75. data/lib/stimulus_reflex/installer.rb +274 -0
  76. data/lib/stimulus_reflex/open_struct_fix.rb +31 -0
  77. data/lib/stimulus_reflex/reflex.rb +32 -25
  78. data/lib/stimulus_reflex/reflex_data.rb +18 -2
  79. data/lib/stimulus_reflex/reflex_factory.rb +6 -3
  80. data/lib/stimulus_reflex/request_parameters.rb +2 -0
  81. data/lib/stimulus_reflex/utils/logger.rb +12 -0
  82. data/lib/stimulus_reflex/utils/sanity_checker.rb +8 -106
  83. data/lib/stimulus_reflex/version.rb +1 -1
  84. data/lib/stimulus_reflex.rb +4 -6
  85. data/lib/tasks/stimulus_reflex/stimulus_reflex.rake +252 -0
  86. data/package.json +73 -0
  87. data/rollup.config.mjs +86 -0
  88. data/stimulus_reflex.gemspec +60 -0
  89. data/web-test-runner.config.mjs +12 -0
  90. data/yarn.lock +5098 -0
  91. metadata +191 -78
  92. data/LATEST +0 -1
  93. data/lib/generators/USAGE +0 -14
  94. data/lib/generators/stimulus_reflex/initializer_generator.rb +0 -14
  95. data/lib/tasks/stimulus_reflex/install.rake +0 -116
  96. data/test/broadcasters/broadcaster_test.rb +0 -11
  97. data/test/broadcasters/broadcaster_test_case.rb +0 -39
  98. data/test/broadcasters/nothing_broadcaster_test.rb +0 -30
  99. data/test/broadcasters/page_broadcaster_test.rb +0 -77
  100. data/test/broadcasters/selector_broadcaster_test.rb +0 -167
  101. data/test/callbacks_test.rb +0 -652
  102. data/test/concern_enhancer_test.rb +0 -54
  103. data/test/element_test.rb +0 -254
  104. data/test/generators/stimulus_reflex_generator_test.rb +0 -58
  105. data/test/reflex_test.rb +0 -43
  106. data/test/test_helper.rb +0 -71
  107. data/test/tmp/app/reflexes/application_reflex.rb +0 -19
  108. data/test/tmp/app/reflexes/demo_reflex.rb +0 -35
data/Gemfile CHANGED
@@ -4,5 +4,4 @@ source "https://rubygems.org"
4
4
 
5
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
6
 
7
- # Specify your gem's dependencies in stimulus_reflex.gemspec
8
7
  gemspec
data/Gemfile.lock CHANGED
@@ -1,264 +1,216 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stimulus_reflex (3.5.0.pre8)
5
- cable_ready (= 5.0.0.pre8)
6
- nokogiri
7
- rack
8
- rails (>= 5.2)
9
- redis
4
+ stimulus_reflex (3.5.0.pre10)
5
+ actioncable (>= 5.2, < 8)
6
+ actionpack (>= 5.2, < 8)
7
+ actionview (>= 5.2, < 8)
8
+ activesupport (>= 5.2, < 8)
9
+ cable_ready (>= 5.0.0.pre10)
10
+ nokogiri (~> 1.0)
11
+ rack (~> 2.0)
12
+ railties (>= 5.2, < 8)
13
+ redis (>= 4.0, < 6.0)
10
14
 
11
15
  GEM
12
16
  remote: https://rubygems.org/
13
17
  specs:
14
- actioncable (6.1.4.1)
15
- actionpack (= 6.1.4.1)
16
- activesupport (= 6.1.4.1)
18
+ actioncable (7.0.4.2)
19
+ actionpack (= 7.0.4.2)
20
+ activesupport (= 7.0.4.2)
17
21
  nio4r (~> 2.0)
18
22
  websocket-driver (>= 0.6.1)
19
- actionmailbox (6.1.4.1)
20
- actionpack (= 6.1.4.1)
21
- activejob (= 6.1.4.1)
22
- activerecord (= 6.1.4.1)
23
- activestorage (= 6.1.4.1)
24
- activesupport (= 6.1.4.1)
23
+ actionmailbox (7.0.4.2)
24
+ actionpack (= 7.0.4.2)
25
+ activejob (= 7.0.4.2)
26
+ activerecord (= 7.0.4.2)
27
+ activestorage (= 7.0.4.2)
28
+ activesupport (= 7.0.4.2)
25
29
  mail (>= 2.7.1)
26
- actionmailer (6.1.4.1)
27
- actionpack (= 6.1.4.1)
28
- actionview (= 6.1.4.1)
29
- activejob (= 6.1.4.1)
30
- activesupport (= 6.1.4.1)
30
+ net-imap
31
+ net-pop
32
+ net-smtp
33
+ actionmailer (7.0.4.2)
34
+ actionpack (= 7.0.4.2)
35
+ actionview (= 7.0.4.2)
36
+ activejob (= 7.0.4.2)
37
+ activesupport (= 7.0.4.2)
31
38
  mail (~> 2.5, >= 2.5.4)
39
+ net-imap
40
+ net-pop
41
+ net-smtp
32
42
  rails-dom-testing (~> 2.0)
33
- actionpack (6.1.4.1)
34
- actionview (= 6.1.4.1)
35
- activesupport (= 6.1.4.1)
36
- rack (~> 2.0, >= 2.0.9)
43
+ actionpack (7.0.4.2)
44
+ actionview (= 7.0.4.2)
45
+ activesupport (= 7.0.4.2)
46
+ rack (~> 2.0, >= 2.2.0)
37
47
  rack-test (>= 0.6.3)
38
48
  rails-dom-testing (~> 2.0)
39
49
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
40
- actiontext (6.1.4.1)
41
- actionpack (= 6.1.4.1)
42
- activerecord (= 6.1.4.1)
43
- activestorage (= 6.1.4.1)
44
- activesupport (= 6.1.4.1)
50
+ actiontext (7.0.4.2)
51
+ actionpack (= 7.0.4.2)
52
+ activerecord (= 7.0.4.2)
53
+ activestorage (= 7.0.4.2)
54
+ activesupport (= 7.0.4.2)
55
+ globalid (>= 0.6.0)
45
56
  nokogiri (>= 1.8.5)
46
- actionview (6.1.4.1)
47
- activesupport (= 6.1.4.1)
57
+ actionview (7.0.4.2)
58
+ activesupport (= 7.0.4.2)
48
59
  builder (~> 3.1)
49
60
  erubi (~> 1.4)
50
61
  rails-dom-testing (~> 2.0)
51
62
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
52
- activejob (6.1.4.1)
53
- activesupport (= 6.1.4.1)
63
+ activejob (7.0.4.2)
64
+ activesupport (= 7.0.4.2)
54
65
  globalid (>= 0.3.6)
55
- activemodel (6.1.4.1)
56
- activesupport (= 6.1.4.1)
57
- activerecord (6.1.4.1)
58
- activemodel (= 6.1.4.1)
59
- activesupport (= 6.1.4.1)
60
- activestorage (6.1.4.1)
61
- actionpack (= 6.1.4.1)
62
- activejob (= 6.1.4.1)
63
- activerecord (= 6.1.4.1)
64
- activesupport (= 6.1.4.1)
65
- marcel (~> 1.0.0)
66
+ activemodel (7.0.4.2)
67
+ activesupport (= 7.0.4.2)
68
+ activerecord (7.0.4.2)
69
+ activemodel (= 7.0.4.2)
70
+ activesupport (= 7.0.4.2)
71
+ activestorage (7.0.4.2)
72
+ actionpack (= 7.0.4.2)
73
+ activejob (= 7.0.4.2)
74
+ activerecord (= 7.0.4.2)
75
+ activesupport (= 7.0.4.2)
76
+ marcel (~> 1.0)
66
77
  mini_mime (>= 1.1.0)
67
- activesupport (6.1.4.1)
78
+ activesupport (7.0.4.2)
68
79
  concurrent-ruby (~> 1.0, >= 1.0.2)
69
80
  i18n (>= 1.6, < 2)
70
81
  minitest (>= 5.1)
71
82
  tzinfo (~> 2.0)
72
- zeitwerk (~> 2.3)
73
- addressable (2.8.0)
74
- public_suffix (>= 2.0.2, < 5.0)
75
83
  ast (2.4.2)
76
- async (1.30.1)
77
- console (~> 1.10)
78
- nio4r (~> 2.3)
79
- timers (~> 4.1)
80
- async-http (0.56.5)
81
- async (>= 1.25)
82
- async-io (>= 1.28)
83
- async-pool (>= 0.2)
84
- protocol-http (~> 0.22.0)
85
- protocol-http1 (~> 0.14.0)
86
- protocol-http2 (~> 0.14.0)
87
- async-http-faraday (0.11.0)
88
- async-http (~> 0.42)
89
- faraday
90
- async-io (1.32.2)
91
- async
92
- async-pool (0.3.9)
93
- async (>= 1.25)
94
84
  builder (3.2.4)
95
- cable_ready (5.0.0.pre8)
96
- rails (>= 5.2)
85
+ cable_ready (5.0.0.pre10)
86
+ actionpack (>= 5.2)
87
+ actionview (>= 5.2)
88
+ activesupport (>= 5.2)
89
+ railties (>= 5.2)
97
90
  thread-local (>= 1.1.0)
98
- coderay (1.1.3)
99
- concurrent-ruby (1.1.9)
100
- console (1.14.0)
101
- fiber-local
91
+ concurrent-ruby (1.2.0)
92
+ connection_pool (2.3.0)
102
93
  crass (1.0.6)
103
- erubi (1.10.0)
104
- faraday (1.8.0)
105
- faraday-em_http (~> 1.0)
106
- faraday-em_synchrony (~> 1.0)
107
- faraday-excon (~> 1.1)
108
- faraday-httpclient (~> 1.0.1)
109
- faraday-net_http (~> 1.0)
110
- faraday-net_http_persistent (~> 1.1)
111
- faraday-patron (~> 1.0)
112
- faraday-rack (~> 1.0)
113
- multipart-post (>= 1.2, < 3)
114
- ruby2_keywords (>= 0.0.4)
115
- faraday-em_http (1.0.0)
116
- faraday-em_synchrony (1.0.0)
117
- faraday-excon (1.1.0)
118
- faraday-http-cache (2.2.0)
119
- faraday (>= 0.8)
120
- faraday-httpclient (1.0.1)
121
- faraday-net_http (1.0.1)
122
- faraday-net_http_persistent (1.2.0)
123
- faraday-patron (1.0.0)
124
- faraday-rack (1.0.0)
125
- fiber-local (1.0.0)
126
- github_changelog_generator (1.16.4)
127
- activesupport
128
- async (>= 1.25.0)
129
- async-http-faraday
130
- faraday-http-cache
131
- multi_json
132
- octokit (~> 4.6)
133
- rainbow (>= 2.2.1)
134
- rake (>= 10.0)
135
- globalid (0.5.2)
94
+ date (3.3.3)
95
+ erubi (1.12.0)
96
+ globalid (1.1.0)
136
97
  activesupport (>= 5.0)
137
- i18n (1.8.11)
98
+ i18n (1.12.0)
138
99
  concurrent-ruby (~> 1.0)
139
- loofah (2.12.0)
100
+ json (2.6.3)
101
+ language_server-protocol (3.17.0.3)
102
+ loofah (2.19.1)
140
103
  crass (~> 1.0.2)
141
104
  nokogiri (>= 1.5.9)
142
- mail (2.7.1)
105
+ magic_frozen_string_literal (1.2.0)
106
+ mail (2.8.1)
143
107
  mini_mime (>= 0.1.1)
108
+ net-imap
109
+ net-pop
110
+ net-smtp
144
111
  marcel (1.0.2)
145
112
  method_source (1.0.0)
146
113
  mini_mime (1.1.2)
147
- minitest (5.14.4)
114
+ minitest (5.17.0)
148
115
  mocha (1.13.0)
149
- multi_json (1.15.0)
150
- multipart-post (2.1.1)
116
+ net-imap (0.3.4)
117
+ date
118
+ net-protocol
119
+ net-pop (0.1.2)
120
+ net-protocol
121
+ net-protocol (0.2.1)
122
+ timeout
123
+ net-smtp (0.3.3)
124
+ net-protocol
151
125
  nio4r (2.5.8)
152
- nokogiri (1.12.5-x86_64-linux)
126
+ nokogiri (1.14.2-x86_64-darwin)
127
+ racc (~> 1.4)
128
+ nokogiri (1.14.2-x86_64-linux)
153
129
  racc (~> 1.4)
154
- octokit (4.21.0)
155
- faraday (>= 0.9)
156
- sawyer (~> 0.8.0, >= 0.5.3)
157
- parallel (1.21.0)
158
- parser (3.0.2.0)
130
+ parallel (1.22.1)
131
+ parser (3.2.1.0)
159
132
  ast (~> 2.4.1)
160
- protocol-hpack (1.4.2)
161
- protocol-http (0.22.5)
162
- protocol-http1 (0.14.2)
163
- protocol-http (~> 0.22)
164
- protocol-http2 (0.14.2)
165
- protocol-hpack (~> 1.4)
166
- protocol-http (~> 0.18)
167
- pry (0.14.1)
168
- coderay (~> 1.1)
169
- method_source (~> 1.0)
170
- pry-nav (1.0.0)
171
- pry (>= 0.9.10, < 0.15)
172
- public_suffix (4.0.6)
173
- racc (1.6.0)
174
- rack (2.2.3)
175
- rack-test (1.1.0)
176
- rack (>= 1.0, < 3)
177
- rails (6.1.4.1)
178
- actioncable (= 6.1.4.1)
179
- actionmailbox (= 6.1.4.1)
180
- actionmailer (= 6.1.4.1)
181
- actionpack (= 6.1.4.1)
182
- actiontext (= 6.1.4.1)
183
- actionview (= 6.1.4.1)
184
- activejob (= 6.1.4.1)
185
- activemodel (= 6.1.4.1)
186
- activerecord (= 6.1.4.1)
187
- activestorage (= 6.1.4.1)
188
- activesupport (= 6.1.4.1)
133
+ racc (1.6.2)
134
+ rack (2.2.6.2)
135
+ rack-test (2.0.2)
136
+ rack (>= 1.3)
137
+ rails (7.0.4.2)
138
+ actioncable (= 7.0.4.2)
139
+ actionmailbox (= 7.0.4.2)
140
+ actionmailer (= 7.0.4.2)
141
+ actionpack (= 7.0.4.2)
142
+ actiontext (= 7.0.4.2)
143
+ actionview (= 7.0.4.2)
144
+ activejob (= 7.0.4.2)
145
+ activemodel (= 7.0.4.2)
146
+ activerecord (= 7.0.4.2)
147
+ activestorage (= 7.0.4.2)
148
+ activesupport (= 7.0.4.2)
189
149
  bundler (>= 1.15.0)
190
- railties (= 6.1.4.1)
191
- sprockets-rails (>= 2.0.0)
150
+ railties (= 7.0.4.2)
192
151
  rails-dom-testing (2.0.3)
193
152
  activesupport (>= 4.2.0)
194
153
  nokogiri (>= 1.6)
195
- rails-html-sanitizer (1.4.2)
196
- loofah (~> 2.3)
197
- railties (6.1.4.1)
198
- actionpack (= 6.1.4.1)
199
- activesupport (= 6.1.4.1)
154
+ rails-html-sanitizer (1.5.0)
155
+ loofah (~> 2.19, >= 2.19.1)
156
+ railties (7.0.4.2)
157
+ actionpack (= 7.0.4.2)
158
+ activesupport (= 7.0.4.2)
200
159
  method_source
201
- rake (>= 0.13)
160
+ rake (>= 12.2)
202
161
  thor (~> 1.0)
203
- rainbow (3.0.0)
162
+ zeitwerk (~> 2.5)
163
+ rainbow (3.1.1)
204
164
  rake (13.0.6)
205
- redis (4.5.1)
206
- regexp_parser (2.1.1)
165
+ redis (5.0.6)
166
+ redis-client (>= 0.9.0)
167
+ redis-client (0.12.2)
168
+ connection_pool
169
+ regexp_parser (2.7.0)
207
170
  rexml (3.2.5)
208
- rubocop (1.22.3)
171
+ rubocop (1.44.1)
172
+ json (~> 2.3)
209
173
  parallel (~> 1.10)
210
- parser (>= 3.0.0.0)
174
+ parser (>= 3.2.0.0)
211
175
  rainbow (>= 2.2.2, < 4.0)
212
176
  regexp_parser (>= 1.8, < 3.0)
213
- rexml
214
- rubocop-ast (>= 1.12.0, < 2.0)
177
+ rexml (>= 3.2.5, < 4.0)
178
+ rubocop-ast (>= 1.24.1, < 2.0)
215
179
  ruby-progressbar (~> 1.7)
216
- unicode-display_width (>= 1.4.0, < 3.0)
217
- rubocop-ast (1.13.0)
218
- parser (>= 3.0.1.1)
219
- rubocop-performance (1.11.5)
180
+ unicode-display_width (>= 2.4.0, < 3.0)
181
+ rubocop-ast (1.26.0)
182
+ parser (>= 3.2.1.0)
183
+ rubocop-performance (1.15.2)
220
184
  rubocop (>= 1.7.0, < 2.0)
221
185
  rubocop-ast (>= 0.4.0)
222
186
  ruby-progressbar (1.11.0)
223
- ruby2_keywords (0.0.5)
224
- sawyer (0.8.2)
225
- addressable (>= 2.3.5)
226
- faraday (> 0.8, < 2.0)
227
- sprockets (4.0.2)
228
- concurrent-ruby (~> 1.0)
229
- rack (> 1, < 3)
230
- sprockets-rails (3.4.0)
231
- actionpack (>= 5.2)
232
- activesupport (>= 5.2)
233
- sprockets (>= 3.0.0)
234
- standard (1.4.0)
235
- rubocop (= 1.22.3)
236
- rubocop-performance (= 1.11.5)
237
- standardrb (1.0.0)
238
- standard
239
- thor (1.1.0)
187
+ standard (1.24.3)
188
+ language_server-protocol (~> 3.17.0.2)
189
+ rubocop (= 1.44.1)
190
+ rubocop-performance (= 1.15.2)
191
+ thor (1.2.1)
240
192
  thread-local (1.1.0)
241
- timers (4.3.3)
242
- tzinfo (2.0.4)
193
+ timeout (0.3.2)
194
+ tzinfo (2.0.6)
243
195
  concurrent-ruby (~> 1.0)
244
- unicode-display_width (2.1.0)
196
+ unicode-display_width (2.4.2)
245
197
  websocket-driver (0.7.5)
246
198
  websocket-extensions (>= 0.1.0)
247
199
  websocket-extensions (0.1.5)
248
- zeitwerk (2.5.1)
200
+ zeitwerk (2.6.7)
249
201
 
250
202
  PLATFORMS
203
+ x86_64-darwin-19
251
204
  x86_64-linux
252
205
 
253
206
  DEPENDENCIES
254
207
  bundler (~> 2.0)
255
- github_changelog_generator
256
- mocha
257
- pry
258
- pry-nav
259
- rake
260
- standardrb (~> 1.0)
208
+ magic_frozen_string_literal (~> 1.2)
209
+ mocha (~> 1.13)
210
+ rails (>= 5.2, < 8)
211
+ rake (~> 13.0)
212
+ standard (~> 1.24)
261
213
  stimulus_reflex!
262
214
 
263
215
  BUNDLED WITH
264
- 2.2.31
216
+ 2.2.33
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="https://gitcdn.link/repo/hopsoft/stimulus_reflex/master/assets/stimulus-reflex-logo-with-copy.svg" width="360" />
2
+ <img src="https://github.com/stimulusreflex/stimulus_reflex/blob/main/assets/stimulus-reflex-logo-with-copy.png?raw=1" width="360" />
3
3
  <h1 align="center">Welcome to StimulusReflex 👋</h1>
4
4
  <p align="center">
5
5
  <img src="https://img.shields.io/gem/v/stimulus_reflex.svg?color=red" />
@@ -7,12 +7,9 @@
7
7
  <a href="https://www.npmjs.com/package/stimulus_reflex">
8
8
  <img alt="downloads" src="https://img.shields.io/npm/dm/stimulus_reflex.svg?color=blue" target="_blank" />
9
9
  </a>
10
- <a href="https://github.com/stimulusreflex/stimulus_reflex/blob/master/LICENSE">
10
+ <a href="https://github.com/stimulusreflex/stimulus_reflex/blob/main/LICENSE.txt">
11
11
  <img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-brightgreen.svg" target="_blank" />
12
12
  </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-2190-brightgreen.svg?style=flat" />
15
- </a>
16
13
  <a href="https://docs.stimulusreflex.com/" target="_blank">
17
14
  <img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" />
18
15
  </a>
@@ -27,16 +24,13 @@
27
24
  <img alt="JavaScript Code Style" src="https://img.shields.io/badge/JavaScript_Code_Style-prettier_standard-ff69b4.svg" />
28
25
  </a>
29
26
  <br />
30
- <a href="https://www.codacy.com/manual/hopsoft/stimulus_reflex/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=hopsoft/stimulus_reflex&amp;utm_campaign=Badge_Grade" target="_blank">
31
- <img alt="Code Quality" src="https://app.codacy.com/project/badge/Grade/d1d72a7060f5467b8696884351cf477f"/>
32
- </a>
33
- <a target="_blank" rel="noopener noreferrer" href="https://github.com/stimulusreflex/stimulus_reflex/workflows/Prettier-Standard/badge.svg">
27
+ <a target="_blank" rel="noopener noreferrer" href="https://github.com/stimulusreflex/stimulus_reflex/actions/workflows/prettier-standard.yml">
34
28
  <img src="https://github.com/stimulusreflex/stimulus_reflex/workflows/Prettier-Standard/badge.svg" alt="Prettier-Standard" style="max-width:100%;">
35
29
  </a>
36
- <a target="_blank" rel="noopener noreferrer" href="https://github.com/stimulusreflex/stimulus_reflex/workflows/StandardRB/badge.svg">
30
+ <a target="_blank" rel="noopener noreferrer" href="https://github.com/stimulusreflex/stimulus_reflex/actions/workflows/standardrb.yml">
37
31
  <img src="https://github.com/stimulusreflex/stimulus_reflex/workflows/StandardRB/badge.svg" alt="StandardRB" style="max-width:100%;">
38
32
  </a>
39
- <a target="_blank" rel="noopener noreferrer" href="https://github.com/stimulusreflex/stimulus_reflex/workflows/Tests/badge.svg">
33
+ <a target="_blank" rel="noopener noreferrer" href="https://github.com/stimulusreflex/stimulus_reflex/actions/workflows/tests.yml">
40
34
  <img src="https://github.com/stimulusreflex/stimulus_reflex/workflows/Tests/badge.svg" alt="Tests">
41
35
  </a>
42
36
  </p>
@@ -54,7 +48,7 @@ It works seamlessly with the Rails tooling you already know and love.
54
48
  - Server-rendered HTML, delivered in milliseconds over the wire via Websockets
55
49
  - ERB templates and partials, with first-class [ViewComponent](https://github.com/github/view_component) support
56
50
  - [Russian doll caching](https://edgeguides.rubyonrails.org/caching_with_rails.html#russian-doll-caching) and [ActiveJob](https://guides.rubyonrails.org/active_job_basics.html)
57
- - [StimulusJS](https://stimulusjs.org/) and [Turbolinks](https://www.youtube.com/watch?v=SWEts0rlezA)
51
+ - [StimulusJS](https://stimulus.hotwired.dev/) and [Turbolinks](https://www.youtube.com/watch?v=SWEts0rlezA)/[Turbo Drive](https://turbo.hotwired.dev/reference/drive)
58
52
  - Built with [CableReady](https://www.youtube.com/watch?v=dPzv2qsj5L8), our secret power-move
59
53
 
60
54
  **Our goal is to help small teams do big things with familiar tools.**
@@ -72,11 +66,11 @@ This project strives to live up to the vision outlined in [The Rails Doctrine](h
72
66
  - [Build a Twitter Clone in 10 Minutes](https://youtu.be/F5hA79vKE_E) (video)
73
67
  - [BeastMode](https://beastmode.leastbad.com/) - faceted search, with filtering, sorting and pagination
74
68
  - [StimulusReflex Patterns](https://www.stimulusreflexpatterns.com/patterns/) - single-file SR apps hosted on Glitch
75
- - [BoxDrop](https://dropbox-clone-rails.herokuapp.com/) - a Dropbox-inspired [concept demo](https://github.com/marcoroth/boxdrop/)
69
+ - [Boxdrop](https://www.boxdrop.io) - a Dropbox-inspired [concept demo](https://github.com/marcoroth/boxdrop/)
76
70
 
77
71
  ## 👩‍👩‍👧 Discord Community
78
72
 
79
- Please join over 1500 of us on [Discord](https://discord.gg/stimulus-reflex) for support getting started, as well as active discussions around Rails, StimulusJS and CableReady.
73
+ Please join over 2000 of us on [Discord](https://discord.gg/stimulus-reflex) for support getting started, as well as active discussions around Rails, Hotwire, Stimulus, Phlex and CableReady.
80
74
 
81
75
  ![](https://img.shields.io/discord/629472241427415060)
82
76
 
@@ -84,13 +78,47 @@ Stop by #newcomers and introduce yourselves!
84
78
 
85
79
  ## 💙 Support
86
80
 
87
- Your best bet is to ask for help on Discord before filing an issue on Github. We are happy to help, and we ask people who need help to come with all relevant code to look at. A git repo is preferred, but Gists are fine, too. If you need an MVCE template, try [this](https://github.com/leastbad/stimulus_reflex_harness).
81
+ Your best bet is to ask for help on Discord before filing an issue on GitHub. We are happy to help, and we ask people who need help to come with all relevant code to look at. A git repo is preferred, but Gists are fine, too. If you need a template for reproducing your issue, try [this](https://github.com/leastbad/stimulus_reflex_harness).
88
82
 
89
83
  Please note that we are not actively providing support on Stack Overflow. If you post there, we likely won't see it.
90
84
 
91
85
  ## 🚀 Installation and upgrading
92
86
 
93
- CLI and manual setup procedures are fully detailed in the [official docs](https://docs.stimulusreflex.com/setup). For information on upgrading existing projects to v3.4, read [this](https://docs.stimulusreflex.com/hello-world/setup#upgrading-to-v-3-4-0).
87
+ CLI and manual setup procedures are fully detailed in the [official docs](https://docs.stimulusreflex.com/setup).
88
+
89
+ ### Rubygem
90
+
91
+ ```sh
92
+ bundle add stimulus_reflex
93
+ ```
94
+
95
+ ### JavaScript
96
+
97
+ There are a few ways to install the StimulusReflex JavaScript client, depending on your application setup.
98
+
99
+ #### ESBuild / Webpacker
100
+
101
+ ```sh
102
+ yarn add stimulus_reflex
103
+ ```
104
+
105
+ #### Importmaps
106
+
107
+ ```ruby
108
+ # config/importmap.rb
109
+
110
+ # ...
111
+
112
+ pin 'stimulus_reflex', to: 'stimulus_reflex.min.js', preload: true
113
+ ```
114
+
115
+ #### Rails Asset pipeline (Sprockets):
116
+
117
+ ```html+erb
118
+ <!-- app/views/layouts/application.html.erb -->
119
+
120
+ <%= javascript_include_tag "stimulus_reflex.umd.min.js", "data-turbo-track": "reload" %>
121
+ ```
94
122
 
95
123
  ## 🙏 Contributing
96
124
 
@@ -113,14 +141,14 @@ View the [wiki](https://github.com/stimulusreflex/stimulus_reflex/wiki/Editor-Co
113
141
  1. Update the `cable_ready` dependency version in `stimulus_reflex.gemspec` and `package.json`
114
142
  1. Make sure that you run `yarn` and `bundle` to pick up the latest.
115
143
  1. Bump version number at `lib/stimulus_reflex/version.rb`. Pre-release versions use `.preN`
116
- 1. Run `rake build`
144
+ 1. Run `rake build` and `yarn build`
117
145
  1. Run `bin/standardize`
118
- 1. Commit and push changes to github
146
+ 1. Commit and push changes to GitHub
119
147
  1. Run `rake release`
120
148
  1. Run `yarn publish --no-git-tag-version`
121
149
  1. Yarn will prompt you for the new version. Pre-release versions use `-preN`
122
- 1. Run `GITHUB_CHANGELOG_GENERATOR_TOKEN=SECRET rake changelog`
123
- 1. Commit and push changes to github
150
+ 1. Commit and push changes to GitHub
151
+ 1. Create a new release on GitHub ([here](https://github.com/stimulusreflex/stimulus_reflex/releases)) and generate the changelog for the stable release for it
124
152
 
125
153
  ## 📝 License
126
154
 
data/Rakefile CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  require "bundler/gem_tasks"
4
4
  require "rails/test_unit/runner"
5
- require "github_changelog_generator/task"
6
5
 
7
6
  task :test_javascript do |task|
8
7
  system "yarn run test"
@@ -14,10 +13,3 @@ end
14
13
 
15
14
  task test: [:test_javascript, :test_ruby]
16
15
  task default: [:test]
17
-
18
- GitHubChangelogGenerator::RakeTask.new :changelog do |config|
19
- config.user = "stimulusreflex"
20
- config.project = "stimulus_reflex"
21
- config.exclude_labels = %w[duplicate question invalid wontfix nodoc]
22
- config.token = ENV["GITHUB_CHANGELOG_GENERATOR_TOKEN"]
23
- end