turbo-rails 0.5.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +113 -18
  3. data/Rakefile +19 -2
  4. data/app/assets/javascripts/turbo.js +4143 -1431
  5. data/app/assets/javascripts/turbo.min.js +29 -0
  6. data/app/assets/javascripts/turbo.min.js.map +1 -0
  7. data/app/channels/turbo/streams/broadcasts.rb +58 -22
  8. data/app/channels/turbo/streams/stream_name.rb +7 -0
  9. data/app/channels/turbo/streams_channel.rb +30 -2
  10. data/app/controllers/concerns/turbo/request_id_tracking.rb +12 -0
  11. data/app/controllers/turbo/frames/frame_request.rb +22 -8
  12. data/app/controllers/turbo/native/navigation.rb +19 -9
  13. data/app/helpers/turbo/drive_helper.rb +75 -3
  14. data/app/helpers/turbo/frames_helper.rb +21 -2
  15. data/app/helpers/turbo/includes_helper.rb +2 -0
  16. data/app/helpers/turbo/streams/action_helper.rb +34 -9
  17. data/app/helpers/turbo/streams_helper.rb +20 -7
  18. data/app/javascript/turbo/cable.js +6 -3
  19. data/app/javascript/turbo/cable_stream_source_element.js +19 -3
  20. data/app/javascript/turbo/fetch_requests.js +59 -0
  21. data/app/javascript/turbo/index.js +6 -0
  22. data/app/javascript/turbo/snakeize.js +31 -0
  23. data/app/jobs/turbo/streams/action_broadcast_job.rb +4 -2
  24. data/app/jobs/turbo/streams/broadcast_job.rb +2 -0
  25. data/app/jobs/turbo/streams/broadcast_stream_job.rb +7 -0
  26. data/app/models/concerns/turbo/broadcastable.rb +246 -38
  27. data/app/models/turbo/debouncer.rb +24 -0
  28. data/app/models/turbo/streams/tag_builder.rb +163 -21
  29. data/app/models/turbo/thread_debouncer.rb +28 -0
  30. data/app/views/layouts/turbo_rails/frame.html.erb +8 -0
  31. data/config/routes.rb +1 -2
  32. data/lib/install/turbo_needs_redis.rb +20 -0
  33. data/lib/install/turbo_with_bun.rb +9 -0
  34. data/lib/install/turbo_with_importmap.rb +5 -0
  35. data/lib/install/turbo_with_node.rb +9 -0
  36. data/lib/tasks/turbo_tasks.rake +50 -8
  37. data/lib/turbo/broadcastable/test_helper.rb +172 -0
  38. data/lib/turbo/engine.rb +40 -6
  39. data/lib/turbo/test_assertions/integration_test_assertions.rb +76 -0
  40. data/lib/turbo/test_assertions.rb +69 -8
  41. data/lib/turbo/version.rb +1 -1
  42. data/lib/turbo-rails.rb +12 -0
  43. metadata +48 -173
  44. data/.github/workflows/ci.yml +0 -30
  45. data/.gitignore +0 -2
  46. data/Gemfile +0 -6
  47. data/Gemfile.lock +0 -147
  48. data/lib/install/turbo_with_asset_pipeline.rb +0 -20
  49. data/lib/install/turbo_with_webpacker.rb +0 -24
  50. data/package.json +0 -47
  51. data/rollup.config.js +0 -23
  52. data/test/drive/drive_helper_test.rb +0 -8
  53. data/test/dummy/.babelrc +0 -18
  54. data/test/dummy/.gitignore +0 -3
  55. data/test/dummy/.postcssrc.yml +0 -3
  56. data/test/dummy/Rakefile +0 -6
  57. data/test/dummy/app/assets/config/manifest.js +0 -2
  58. data/test/dummy/app/assets/images/.keep +0 -0
  59. data/test/dummy/app/assets/stylesheets/application.css +0 -15
  60. data/test/dummy/app/assets/stylesheets/scaffold.css +0 -80
  61. data/test/dummy/app/channels/application_cable/channel.rb +0 -4
  62. data/test/dummy/app/channels/application_cable/connection.rb +0 -4
  63. data/test/dummy/app/controllers/application_controller.rb +0 -2
  64. data/test/dummy/app/controllers/concerns/.keep +0 -0
  65. data/test/dummy/app/controllers/messages_controller.rb +0 -12
  66. data/test/dummy/app/controllers/trays_controller.rb +0 -17
  67. data/test/dummy/app/helpers/application_helper.rb +0 -2
  68. data/test/dummy/app/javascript/packs/application.js +0 -0
  69. data/test/dummy/app/jobs/application_job.rb +0 -2
  70. data/test/dummy/app/mailboxes/application_mailbox.rb +0 -2
  71. data/test/dummy/app/mailboxes/messages_mailbox.rb +0 -4
  72. data/test/dummy/app/mailers/application_mailer.rb +0 -4
  73. data/test/dummy/app/models/application_record.rb +0 -3
  74. data/test/dummy/app/models/concerns/.keep +0 -0
  75. data/test/dummy/app/models/message.rb +0 -29
  76. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  77. data/test/dummy/app/views/layouts/mailer.html.erb +0 -13
  78. data/test/dummy/app/views/layouts/mailer.text.erb +0 -1
  79. data/test/dummy/app/views/messages/_message.html.erb +0 -1
  80. data/test/dummy/app/views/messages/_message.turbo_stream.erb +0 -1
  81. data/test/dummy/app/views/messages/show.turbo_stream.erb +0 -9
  82. data/test/dummy/app/views/trays/index.html.erb +0 -3
  83. data/test/dummy/app/views/trays/show.html.erb +0 -3
  84. data/test/dummy/bin/bundle +0 -3
  85. data/test/dummy/bin/rails +0 -4
  86. data/test/dummy/bin/rake +0 -4
  87. data/test/dummy/bin/setup +0 -36
  88. data/test/dummy/bin/update +0 -31
  89. data/test/dummy/bin/yarn +0 -11
  90. data/test/dummy/config/application.rb +0 -22
  91. data/test/dummy/config/boot.rb +0 -5
  92. data/test/dummy/config/cable.yml +0 -10
  93. data/test/dummy/config/environment.rb +0 -5
  94. data/test/dummy/config/environments/development.rb +0 -34
  95. data/test/dummy/config/environments/production.rb +0 -96
  96. data/test/dummy/config/environments/test.rb +0 -38
  97. data/test/dummy/config/initializers/application_controller_renderer.rb +0 -8
  98. data/test/dummy/config/initializers/assets.rb +0 -14
  99. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  100. data/test/dummy/config/initializers/content_security_policy.rb +0 -22
  101. data/test/dummy/config/initializers/cookies_serializer.rb +0 -5
  102. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  103. data/test/dummy/config/initializers/inflections.rb +0 -16
  104. data/test/dummy/config/initializers/mime_types.rb +0 -4
  105. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  106. data/test/dummy/config/locales/en.yml +0 -33
  107. data/test/dummy/config/puma.rb +0 -34
  108. data/test/dummy/config/routes.rb +0 -4
  109. data/test/dummy/config/spring.rb +0 -6
  110. data/test/dummy/config/webpack/development.js +0 -3
  111. data/test/dummy/config/webpack/environment.js +0 -3
  112. data/test/dummy/config/webpack/production.js +0 -3
  113. data/test/dummy/config/webpack/test.js +0 -3
  114. data/test/dummy/config/webpacker.yml +0 -65
  115. data/test/dummy/config.ru +0 -5
  116. data/test/dummy/lib/assets/.keep +0 -0
  117. data/test/dummy/log/.keep +0 -0
  118. data/test/dummy/public/404.html +0 -67
  119. data/test/dummy/public/422.html +0 -67
  120. data/test/dummy/public/500.html +0 -66
  121. data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
  122. data/test/dummy/public/apple-touch-icon.png +0 -0
  123. data/test/dummy/public/favicon.ico +0 -0
  124. data/test/frames/frame_request_controller_test.rb +0 -21
  125. data/test/frames/frames_helper_test.rb +0 -21
  126. data/test/native/navigation_controller_test.rb +0 -42
  127. data/test/streams/broadcastable_test.rb +0 -80
  128. data/test/streams/streams_channel_test.rb +0 -105
  129. data/test/streams/streams_controller_test.rb +0 -29
  130. data/test/turbo_test.rb +0 -10
  131. data/turbo-rails.gemspec +0 -17
  132. data/yarn.lock +0 -283

There are too many changes on this page to be displayed.


The amount of changes on this page would crash your brower.

You can still verify the content by downloading the gem file manually.