turbo-rails 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/ci.yml +24 -0
  3. data/.gitignore +2 -0
  4. data/Gemfile +6 -0
  5. data/Gemfile.lock +147 -0
  6. data/MIT-LICENSE +20 -0
  7. data/README.md +66 -0
  8. data/Rakefile +11 -0
  9. data/app/assets/javascripts/turbo.js +3161 -0
  10. data/app/channels/turbo/streams/broadcasts.rb +66 -0
  11. data/app/channels/turbo/streams/stream_name.rb +24 -0
  12. data/app/channels/turbo/streams_channel.rb +17 -0
  13. data/app/controllers/turbo/frames/frame_request.rb +24 -0
  14. data/app/controllers/turbo/native/navigation.rb +49 -0
  15. data/app/controllers/turbo/native/navigation_controller.rb +13 -0
  16. data/app/controllers/turbo/streams/turbo_streams_tag_builder.rb +22 -0
  17. data/app/helpers/turbo/drive_helper.rb +16 -0
  18. data/app/helpers/turbo/frames_helper.rb +23 -0
  19. data/app/helpers/turbo/includes_helper.rb +5 -0
  20. data/app/helpers/turbo/streams/action_helper.rb +25 -0
  21. data/app/helpers/turbo/streams_helper.rb +22 -0
  22. data/app/javascript/turbo/cable.js +16 -0
  23. data/app/javascript/turbo/cable_stream_source_element.js +27 -0
  24. data/app/javascript/turbo/index.js +3 -0
  25. data/app/jobs/turbo/streams/action_broadcast_job.rb +6 -0
  26. data/app/jobs/turbo/streams/broadcast_job.rb +7 -0
  27. data/app/models/concerns/turbo/broadcastable.rb +236 -0
  28. data/app/models/turbo/streams/tag_builder.rb +127 -0
  29. data/config/routes.rb +6 -0
  30. data/lib/install/turbo.rb +11 -0
  31. data/lib/tasks/turbo_tasks.rake +6 -0
  32. data/lib/turbo-rails.rb +17 -0
  33. data/lib/turbo/engine.rb +65 -0
  34. data/lib/turbo/test_assertions.rb +22 -0
  35. data/lib/turbo/version.rb +3 -0
  36. data/package.json +42 -0
  37. data/rollup.config.js +23 -0
  38. data/test/drive/drive_helper_test.rb +8 -0
  39. data/test/dummy/.babelrc +18 -0
  40. data/test/dummy/.gitignore +3 -0
  41. data/test/dummy/.postcssrc.yml +3 -0
  42. data/test/dummy/Rakefile +6 -0
  43. data/test/dummy/app/assets/config/manifest.js +2 -0
  44. data/test/dummy/app/assets/images/.keep +0 -0
  45. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  46. data/test/dummy/app/assets/stylesheets/scaffold.css +80 -0
  47. data/test/dummy/app/channels/application_cable/channel.rb +4 -0
  48. data/test/dummy/app/channels/application_cable/connection.rb +4 -0
  49. data/test/dummy/app/controllers/application_controller.rb +2 -0
  50. data/test/dummy/app/controllers/concerns/.keep +0 -0
  51. data/test/dummy/app/controllers/messages_controller.rb +12 -0
  52. data/test/dummy/app/controllers/trays_controller.rb +17 -0
  53. data/test/dummy/app/helpers/application_helper.rb +2 -0
  54. data/test/dummy/app/javascript/packs/application.js +0 -0
  55. data/test/dummy/app/jobs/application_job.rb +2 -0
  56. data/test/dummy/app/mailboxes/application_mailbox.rb +2 -0
  57. data/test/dummy/app/mailboxes/messages_mailbox.rb +4 -0
  58. data/test/dummy/app/mailers/application_mailer.rb +4 -0
  59. data/test/dummy/app/models/application_record.rb +3 -0
  60. data/test/dummy/app/models/concerns/.keep +0 -0
  61. data/test/dummy/app/models/message.rb +29 -0
  62. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  63. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  64. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  65. data/test/dummy/app/views/messages/_message.html.erb +1 -0
  66. data/test/dummy/app/views/messages/_message.turbo_stream.erb +1 -0
  67. data/test/dummy/app/views/messages/show.turbo_stream.erb +9 -0
  68. data/test/dummy/app/views/trays/index.html.erb +3 -0
  69. data/test/dummy/app/views/trays/show.html.erb +3 -0
  70. data/test/dummy/bin/bundle +3 -0
  71. data/test/dummy/bin/rails +4 -0
  72. data/test/dummy/bin/rake +4 -0
  73. data/test/dummy/bin/setup +36 -0
  74. data/test/dummy/bin/update +31 -0
  75. data/test/dummy/bin/yarn +11 -0
  76. data/test/dummy/config.ru +5 -0
  77. data/test/dummy/config/application.rb +22 -0
  78. data/test/dummy/config/boot.rb +5 -0
  79. data/test/dummy/config/cable.yml +10 -0
  80. data/test/dummy/config/environment.rb +5 -0
  81. data/test/dummy/config/environments/development.rb +34 -0
  82. data/test/dummy/config/environments/production.rb +96 -0
  83. data/test/dummy/config/environments/test.rb +38 -0
  84. data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
  85. data/test/dummy/config/initializers/assets.rb +14 -0
  86. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  87. data/test/dummy/config/initializers/content_security_policy.rb +22 -0
  88. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  89. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  90. data/test/dummy/config/initializers/inflections.rb +16 -0
  91. data/test/dummy/config/initializers/mime_types.rb +4 -0
  92. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  93. data/test/dummy/config/locales/en.yml +33 -0
  94. data/test/dummy/config/puma.rb +34 -0
  95. data/test/dummy/config/routes.rb +4 -0
  96. data/test/dummy/config/spring.rb +6 -0
  97. data/test/dummy/config/webpack/development.js +3 -0
  98. data/test/dummy/config/webpack/environment.js +3 -0
  99. data/test/dummy/config/webpack/production.js +3 -0
  100. data/test/dummy/config/webpack/test.js +3 -0
  101. data/test/dummy/config/webpacker.yml +65 -0
  102. data/test/dummy/lib/assets/.keep +0 -0
  103. data/test/dummy/log/.keep +0 -0
  104. data/test/dummy/public/404.html +67 -0
  105. data/test/dummy/public/422.html +67 -0
  106. data/test/dummy/public/500.html +66 -0
  107. data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
  108. data/test/dummy/public/apple-touch-icon.png +0 -0
  109. data/test/dummy/public/favicon.ico +0 -0
  110. data/test/frames/frame_request_controller_test.rb +21 -0
  111. data/test/frames/frames_helper_test.rb +15 -0
  112. data/test/native/navigation_controller_test.rb +42 -0
  113. data/test/streams/broadcastable_test.rb +80 -0
  114. data/test/streams/streams_channel_test.rb +105 -0
  115. data/test/streams/streams_controller_test.rb +29 -0
  116. data/test/turbo_test.rb +10 -0
  117. data/turbo-rails.gemspec +16 -0
  118. data/yarn.lock +282 -0
  119. metadata +254 -0
metadata ADDED
@@ -0,0 +1,254 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: turbo-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.0
5
+ platform: ruby
6
+ authors:
7
+ - Sam Stephenson
8
+ - Javan Mahkmali
9
+ - David Heinemeier Hansson
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2020-12-22 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rails
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: 6.0.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: 6.0.0
29
+ description:
30
+ email: david@loudthinking.com
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - ".github/workflows/ci.yml"
36
+ - ".gitignore"
37
+ - Gemfile
38
+ - Gemfile.lock
39
+ - MIT-LICENSE
40
+ - README.md
41
+ - Rakefile
42
+ - app/assets/javascripts/turbo.js
43
+ - app/channels/turbo/streams/broadcasts.rb
44
+ - app/channels/turbo/streams/stream_name.rb
45
+ - app/channels/turbo/streams_channel.rb
46
+ - app/controllers/turbo/frames/frame_request.rb
47
+ - app/controllers/turbo/native/navigation.rb
48
+ - app/controllers/turbo/native/navigation_controller.rb
49
+ - app/controllers/turbo/streams/turbo_streams_tag_builder.rb
50
+ - app/helpers/turbo/drive_helper.rb
51
+ - app/helpers/turbo/frames_helper.rb
52
+ - app/helpers/turbo/includes_helper.rb
53
+ - app/helpers/turbo/streams/action_helper.rb
54
+ - app/helpers/turbo/streams_helper.rb
55
+ - app/javascript/turbo/cable.js
56
+ - app/javascript/turbo/cable_stream_source_element.js
57
+ - app/javascript/turbo/index.js
58
+ - app/jobs/turbo/streams/action_broadcast_job.rb
59
+ - app/jobs/turbo/streams/broadcast_job.rb
60
+ - app/models/concerns/turbo/broadcastable.rb
61
+ - app/models/turbo/streams/tag_builder.rb
62
+ - config/routes.rb
63
+ - lib/install/turbo.rb
64
+ - lib/tasks/turbo_tasks.rake
65
+ - lib/turbo-rails.rb
66
+ - lib/turbo/engine.rb
67
+ - lib/turbo/test_assertions.rb
68
+ - lib/turbo/version.rb
69
+ - package.json
70
+ - rollup.config.js
71
+ - test/drive/drive_helper_test.rb
72
+ - test/dummy/.babelrc
73
+ - test/dummy/.gitignore
74
+ - test/dummy/.postcssrc.yml
75
+ - test/dummy/Rakefile
76
+ - test/dummy/app/assets/config/manifest.js
77
+ - test/dummy/app/assets/images/.keep
78
+ - test/dummy/app/assets/stylesheets/application.css
79
+ - test/dummy/app/assets/stylesheets/scaffold.css
80
+ - test/dummy/app/channels/application_cable/channel.rb
81
+ - test/dummy/app/channels/application_cable/connection.rb
82
+ - test/dummy/app/controllers/application_controller.rb
83
+ - test/dummy/app/controllers/concerns/.keep
84
+ - test/dummy/app/controllers/messages_controller.rb
85
+ - test/dummy/app/controllers/trays_controller.rb
86
+ - test/dummy/app/helpers/application_helper.rb
87
+ - test/dummy/app/javascript/packs/application.js
88
+ - test/dummy/app/jobs/application_job.rb
89
+ - test/dummy/app/mailboxes/application_mailbox.rb
90
+ - test/dummy/app/mailboxes/messages_mailbox.rb
91
+ - test/dummy/app/mailers/application_mailer.rb
92
+ - test/dummy/app/models/application_record.rb
93
+ - test/dummy/app/models/concerns/.keep
94
+ - test/dummy/app/models/message.rb
95
+ - test/dummy/app/views/layouts/application.html.erb
96
+ - test/dummy/app/views/layouts/mailer.html.erb
97
+ - test/dummy/app/views/layouts/mailer.text.erb
98
+ - test/dummy/app/views/messages/_message.html.erb
99
+ - test/dummy/app/views/messages/_message.turbo_stream.erb
100
+ - test/dummy/app/views/messages/show.turbo_stream.erb
101
+ - test/dummy/app/views/trays/index.html.erb
102
+ - test/dummy/app/views/trays/show.html.erb
103
+ - test/dummy/bin/bundle
104
+ - test/dummy/bin/rails
105
+ - test/dummy/bin/rake
106
+ - test/dummy/bin/setup
107
+ - test/dummy/bin/update
108
+ - test/dummy/bin/yarn
109
+ - test/dummy/config.ru
110
+ - test/dummy/config/application.rb
111
+ - test/dummy/config/boot.rb
112
+ - test/dummy/config/cable.yml
113
+ - test/dummy/config/environment.rb
114
+ - test/dummy/config/environments/development.rb
115
+ - test/dummy/config/environments/production.rb
116
+ - test/dummy/config/environments/test.rb
117
+ - test/dummy/config/initializers/application_controller_renderer.rb
118
+ - test/dummy/config/initializers/assets.rb
119
+ - test/dummy/config/initializers/backtrace_silencers.rb
120
+ - test/dummy/config/initializers/content_security_policy.rb
121
+ - test/dummy/config/initializers/cookies_serializer.rb
122
+ - test/dummy/config/initializers/filter_parameter_logging.rb
123
+ - test/dummy/config/initializers/inflections.rb
124
+ - test/dummy/config/initializers/mime_types.rb
125
+ - test/dummy/config/initializers/wrap_parameters.rb
126
+ - test/dummy/config/locales/en.yml
127
+ - test/dummy/config/puma.rb
128
+ - test/dummy/config/routes.rb
129
+ - test/dummy/config/spring.rb
130
+ - test/dummy/config/webpack/development.js
131
+ - test/dummy/config/webpack/environment.js
132
+ - test/dummy/config/webpack/production.js
133
+ - test/dummy/config/webpack/test.js
134
+ - test/dummy/config/webpacker.yml
135
+ - test/dummy/lib/assets/.keep
136
+ - test/dummy/log/.keep
137
+ - test/dummy/public/404.html
138
+ - test/dummy/public/422.html
139
+ - test/dummy/public/500.html
140
+ - test/dummy/public/apple-touch-icon-precomposed.png
141
+ - test/dummy/public/apple-touch-icon.png
142
+ - test/dummy/public/favicon.ico
143
+ - test/frames/frame_request_controller_test.rb
144
+ - test/frames/frames_helper_test.rb
145
+ - test/native/navigation_controller_test.rb
146
+ - test/streams/broadcastable_test.rb
147
+ - test/streams/streams_channel_test.rb
148
+ - test/streams/streams_controller_test.rb
149
+ - test/turbo_test.rb
150
+ - turbo-rails.gemspec
151
+ - yarn.lock
152
+ homepage: https://github.com/hotwired/turbo-rails
153
+ licenses:
154
+ - MIT
155
+ metadata: {}
156
+ post_install_message:
157
+ rdoc_options: []
158
+ require_paths:
159
+ - lib
160
+ required_ruby_version: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - ">="
163
+ - !ruby/object:Gem::Version
164
+ version: '0'
165
+ required_rubygems_version: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - ">="
168
+ - !ruby/object:Gem::Version
169
+ version: '0'
170
+ requirements: []
171
+ rubygems_version: 3.1.2
172
+ signing_key:
173
+ specification_version: 4
174
+ summary: The speed of a single-page web application without having to write any JavaScript.
175
+ test_files:
176
+ - test/drive/drive_helper_test.rb
177
+ - test/dummy/.babelrc
178
+ - test/dummy/.gitignore
179
+ - test/dummy/.postcssrc.yml
180
+ - test/dummy/Rakefile
181
+ - test/dummy/app/assets/config/manifest.js
182
+ - test/dummy/app/assets/images/.keep
183
+ - test/dummy/app/assets/stylesheets/application.css
184
+ - test/dummy/app/assets/stylesheets/scaffold.css
185
+ - test/dummy/app/channels/application_cable/channel.rb
186
+ - test/dummy/app/channels/application_cable/connection.rb
187
+ - test/dummy/app/controllers/application_controller.rb
188
+ - test/dummy/app/controllers/concerns/.keep
189
+ - test/dummy/app/controllers/messages_controller.rb
190
+ - test/dummy/app/controllers/trays_controller.rb
191
+ - test/dummy/app/helpers/application_helper.rb
192
+ - test/dummy/app/javascript/packs/application.js
193
+ - test/dummy/app/jobs/application_job.rb
194
+ - test/dummy/app/mailboxes/application_mailbox.rb
195
+ - test/dummy/app/mailboxes/messages_mailbox.rb
196
+ - test/dummy/app/mailers/application_mailer.rb
197
+ - test/dummy/app/models/application_record.rb
198
+ - test/dummy/app/models/concerns/.keep
199
+ - test/dummy/app/models/message.rb
200
+ - test/dummy/app/views/layouts/application.html.erb
201
+ - test/dummy/app/views/layouts/mailer.html.erb
202
+ - test/dummy/app/views/layouts/mailer.text.erb
203
+ - test/dummy/app/views/messages/_message.html.erb
204
+ - test/dummy/app/views/messages/_message.turbo_stream.erb
205
+ - test/dummy/app/views/messages/show.turbo_stream.erb
206
+ - test/dummy/app/views/trays/index.html.erb
207
+ - test/dummy/app/views/trays/show.html.erb
208
+ - test/dummy/bin/bundle
209
+ - test/dummy/bin/rails
210
+ - test/dummy/bin/rake
211
+ - test/dummy/bin/setup
212
+ - test/dummy/bin/update
213
+ - test/dummy/bin/yarn
214
+ - test/dummy/config.ru
215
+ - test/dummy/config/application.rb
216
+ - test/dummy/config/boot.rb
217
+ - test/dummy/config/cable.yml
218
+ - test/dummy/config/environment.rb
219
+ - test/dummy/config/environments/development.rb
220
+ - test/dummy/config/environments/production.rb
221
+ - test/dummy/config/environments/test.rb
222
+ - test/dummy/config/initializers/application_controller_renderer.rb
223
+ - test/dummy/config/initializers/assets.rb
224
+ - test/dummy/config/initializers/backtrace_silencers.rb
225
+ - test/dummy/config/initializers/content_security_policy.rb
226
+ - test/dummy/config/initializers/cookies_serializer.rb
227
+ - test/dummy/config/initializers/filter_parameter_logging.rb
228
+ - test/dummy/config/initializers/inflections.rb
229
+ - test/dummy/config/initializers/mime_types.rb
230
+ - test/dummy/config/initializers/wrap_parameters.rb
231
+ - test/dummy/config/locales/en.yml
232
+ - test/dummy/config/puma.rb
233
+ - test/dummy/config/routes.rb
234
+ - test/dummy/config/spring.rb
235
+ - test/dummy/config/webpack/development.js
236
+ - test/dummy/config/webpack/environment.js
237
+ - test/dummy/config/webpack/production.js
238
+ - test/dummy/config/webpack/test.js
239
+ - test/dummy/config/webpacker.yml
240
+ - test/dummy/lib/assets/.keep
241
+ - test/dummy/log/.keep
242
+ - test/dummy/public/404.html
243
+ - test/dummy/public/422.html
244
+ - test/dummy/public/500.html
245
+ - test/dummy/public/apple-touch-icon-precomposed.png
246
+ - test/dummy/public/apple-touch-icon.png
247
+ - test/dummy/public/favicon.ico
248
+ - test/frames/frame_request_controller_test.rb
249
+ - test/frames/frames_helper_test.rb
250
+ - test/native/navigation_controller_test.rb
251
+ - test/streams/broadcastable_test.rb
252
+ - test/streams/streams_channel_test.rb
253
+ - test/streams/streams_controller_test.rb
254
+ - test/turbo_test.rb