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
data/lib/turbo/engine.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require "rails/engine"
2
- require "turbo/test_assertions"
3
2
 
4
3
  module Turbo
5
4
  class Engine < Rails::Engine
@@ -16,19 +15,43 @@ module Turbo
16
15
  #{root}/app/jobs
17
16
  )
18
17
 
18
+ initializer "turbo.no_action_cable", before: :set_eager_load_paths do
19
+ config.eager_load_paths.delete("#{root}/app/channels") unless defined?(ActionCable)
20
+ end
21
+
22
+ # If you don't want to precompile Turbo's assets (eg. because you're using webpack),
23
+ # you can do this in an intiailzer:
24
+ #
25
+ # config.after_initialize do
26
+ # config.assets.precompile -= Turbo::Engine::PRECOMPILE_ASSETS
27
+ # end
28
+ PRECOMPILE_ASSETS = %w( turbo.js turbo.min.js turbo.min.js.map )
29
+
19
30
  initializer "turbo.assets" do
20
31
  if Rails.application.config.respond_to?(:assets)
21
- Rails.application.config.assets.precompile += %w( turbo )
32
+ Rails.application.config.assets.precompile += PRECOMPILE_ASSETS
33
+ end
34
+ end
35
+
36
+ initializer "turbo.configs" do
37
+ config.after_initialize do |app|
38
+ Turbo.draw_routes = app.config.turbo.draw_routes != false
22
39
  end
23
40
  end
24
41
 
25
- initializer "turbo.helpers" do
42
+ initializer "turbo.helpers", before: :load_config_initializers do
26
43
  ActiveSupport.on_load(:action_controller_base) do
27
44
  include Turbo::Streams::TurboStreamsTagBuilder, Turbo::Frames::FrameRequest, Turbo::Native::Navigation
28
45
  helper Turbo::Engine.helpers
29
46
  end
30
47
  end
31
48
 
49
+ initializer "turbo.request_id_tracking" do
50
+ ActiveSupport.on_load(:action_controller) do
51
+ include Turbo::RequestIdTracking
52
+ end
53
+ end
54
+
32
55
  initializer "turbo.broadcastable" do
33
56
  ActiveSupport.on_load(:active_record) do
34
57
  include Turbo::Broadcastable
@@ -36,7 +59,7 @@ module Turbo
36
59
  end
37
60
 
38
61
  initializer "turbo.mimetype" do
39
- Mime::Type.register "text/html; turbo-stream", :turbo_stream
62
+ Mime::Type.register "text/vnd.turbo-stream.html", :turbo_stream
40
63
  end
41
64
 
42
65
  initializer "turbo.renderer" do
@@ -49,14 +72,25 @@ module Turbo
49
72
  end
50
73
 
51
74
  initializer "turbo.signed_stream_verifier_key" do
52
- Turbo.signed_stream_verifier_key = config.turbo.signed_stream_verifier_key ||
53
- Rails.application.key_generator.generate_key("turbo/signed_stream_verifier_key")
75
+ config.after_initialize do
76
+ Turbo.signed_stream_verifier_key = config.turbo.signed_stream_verifier_key ||
77
+ Rails.application.key_generator.generate_key("turbo/signed_stream_verifier_key")
78
+ end
54
79
  end
55
80
 
56
81
  initializer "turbo.test_assertions" do
57
82
  ActiveSupport.on_load(:active_support_test_case) do
83
+ require "turbo/test_assertions"
84
+ require "turbo/broadcastable/test_helper"
85
+
58
86
  include Turbo::TestAssertions
59
87
  end
88
+
89
+ ActiveSupport.on_load(:action_dispatch_integration_test) do
90
+ require "turbo/test_assertions/integration_test_assertions"
91
+
92
+ include Turbo::TestAssertions::IntegrationTestAssertions
93
+ end
60
94
  end
61
95
 
62
96
  initializer "turbo.integration_test_request_encoding" do
@@ -0,0 +1,76 @@
1
+ module Turbo
2
+ module TestAssertions
3
+ module IntegrationTestAssertions
4
+ # Assert that the Turbo Stream request's response body's HTML contains a
5
+ # `<turbo-stream>` element.
6
+ #
7
+ # === Options
8
+ #
9
+ # * <tt>:status</tt> [Integer, Symbol] the HTTP response status
10
+ # * <tt>:action</tt> [String] matches the element's <tt>[action]</tt>
11
+ # attribute
12
+ # * <tt>:target</tt> [String, #to_key] matches the element's
13
+ # <tt>[target]</tt> attribute. If the value responds to <tt>#to_key</tt>,
14
+ # the value will be transformed by calling <tt>dom_id</tt>
15
+ # * <tt>:targets</tt> [String] matches the element's <tt>[targets]</tt>
16
+ # attribute
17
+ #
18
+ # Given the following HTML response body:
19
+ #
20
+ # <turbo-stream action="remove" target="message_1"></turbo-stream>
21
+ #
22
+ # The following assertion would pass:
23
+ #
24
+ # assert_turbo_stream action: "remove", target: "message_1"
25
+ #
26
+ # You can also pass a block make assertions about the contents of the
27
+ # element. Given the following HTML response body:
28
+ #
29
+ # <turbo-stream action="replace" target="message_1">
30
+ # <template>
31
+ # <p>Hello!</p>
32
+ # <template>
33
+ # </turbo-stream>
34
+ #
35
+ # The following assertion would pass:
36
+ #
37
+ # assert_turbo_stream action: "replace", target: "message_1" do
38
+ # assert_select "template p", text: "Hello!"
39
+ # end
40
+ #
41
+ def assert_turbo_stream(status: :ok, **attributes, &block)
42
+ assert_response status
43
+ assert_equal Mime[:turbo_stream], response.media_type
44
+ super(**attributes, &block)
45
+ end
46
+
47
+ # Assert that the Turbo Stream request's response body's HTML does not
48
+ # contain a `<turbo-stream>` element.
49
+ #
50
+ # === Options
51
+ #
52
+ # * <tt>:status</tt> [Integer, Symbol] the HTTP response status
53
+ # * <tt>:action</tt> [String] matches the element's <tt>[action]</tt>
54
+ # attribute
55
+ # * <tt>:target</tt> [String, #to_key] matches the element's
56
+ # <tt>[target]</tt> attribute. If the value responds to <tt>#to_key</tt>,
57
+ # the value will be transformed by calling <tt>dom_id</tt>
58
+ # * <tt>:targets</tt> [String] matches the element's <tt>[targets]</tt>
59
+ # attribute
60
+ #
61
+ # Given the following HTML response body:
62
+ #
63
+ # <turbo-stream action="remove" target="message_1"></turbo-stream>
64
+ #
65
+ # The following assertion would fail:
66
+ #
67
+ # assert_no_turbo_stream action: "remove", target: "message_1"
68
+ #
69
+ def assert_no_turbo_stream(status: :ok, **attributes)
70
+ assert_response status
71
+ assert_equal Mime[:turbo_stream], response.media_type
72
+ super(**attributes)
73
+ end
74
+ end
75
+ end
76
+ end
@@ -7,16 +7,77 @@ module Turbo
7
7
  delegate :dom_id, :dom_class, to: ActionView::RecordIdentifier
8
8
  end
9
9
 
10
- def assert_turbo_stream(action:, target: nil, &block)
11
- assert_response :ok
12
- assert_equal Mime[:turbo_stream], response.media_type
13
- assert_select %(turbo-stream[action="#{action}"][target="#{target.respond_to?(:to_key) ? dom_id(target) : target}"]), count: 1, &block
10
+ # Assert that the rendered fragment of HTML contains a `<turbo-stream>`
11
+ # element.
12
+ #
13
+ # === Options
14
+ #
15
+ # * <tt>:action</tt> [String] matches the element's <tt>[action]</tt>
16
+ # attribute
17
+ # * <tt>:target</tt> [String, #to_key] matches the element's
18
+ # <tt>[target]</tt> attribute. If the value responds to <tt>#to_key</tt>,
19
+ # the value will be transformed by calling <tt>dom_id</tt>
20
+ # * <tt>:targets</tt> [String] matches the element's <tt>[targets]</tt>
21
+ # attribute
22
+ # * <tt>:count</tt> [Integer] indicates how many turbo streams are expected.
23
+ # Defaults to <tt>1</tt>.
24
+ #
25
+ # Given the following HTML fragment:
26
+ #
27
+ # <turbo-stream action="remove" target="message_1"></turbo-stream>
28
+ #
29
+ # The following assertion would pass:
30
+ #
31
+ # assert_turbo_stream action: "remove", target: "message_1"
32
+ #
33
+ # You can also pass a block make assertions about the contents of the
34
+ # element. Given the following HTML fragment:
35
+ #
36
+ # <turbo-stream action="replace" target="message_1">
37
+ # <template>
38
+ # <p>Hello!</p>
39
+ # <template>
40
+ # </turbo-stream>
41
+ #
42
+ # The following assertion would pass:
43
+ #
44
+ # assert_turbo_stream action: "replace", target: "message_1" do
45
+ # assert_select "template p", text: "Hello!"
46
+ # end
47
+ #
48
+ def assert_turbo_stream(action:, target: nil, targets: nil, count: 1, &block)
49
+ selector = %(turbo-stream[action="#{action}"])
50
+ selector << %([target="#{target.respond_to?(:to_key) ? dom_id(target) : target}"]) if target
51
+ selector << %([targets="#{targets}"]) if targets
52
+ assert_select selector, count: count, &block
14
53
  end
15
54
 
16
- def assert_no_turbo_stream(action:, target: nil)
17
- assert_response :ok
18
- assert_equal Mime[:turbo_stream], response.media_type
19
- assert_select %(turbo-stream[action="#{action}"][target="#{target.respond_to?(:to_key) ? dom_id(target) : target}"]), count: 0
55
+ # Assert that the rendered fragment of HTML does not contain a `<turbo-stream>`
56
+ # element.
57
+ #
58
+ # === Options
59
+ #
60
+ # * <tt>:action</tt> [String] matches the element's <tt>[action]</tt>
61
+ # attribute
62
+ # * <tt>:target</tt> [String, #to_key] matches the element's
63
+ # <tt>[target]</tt> attribute. If the value responds to <tt>#to_key</tt>,
64
+ # the value will be transformed by calling <tt>dom_id</tt>
65
+ # * <tt>:targets</tt> [String] matches the element's <tt>[targets]</tt>
66
+ # attribute
67
+ #
68
+ # Given the following HTML fragment:
69
+ #
70
+ # <turbo-stream action="remove" target="message_1"></turbo-stream>
71
+ #
72
+ # The following assertion would fail:
73
+ #
74
+ # assert_no_turbo_stream action: "remove", target: "message_1"
75
+ #
76
+ def assert_no_turbo_stream(action:, target: nil, targets: nil)
77
+ selector = %(turbo-stream[action="#{action}"])
78
+ selector << %([target="#{target.respond_to?(:to_key) ? dom_id(target) : target}"]) if target
79
+ selector << %([targets="#{targets}"]) if targets
80
+ assert_select selector, count: 0
20
81
  end
21
82
  end
22
83
  end
data/lib/turbo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Turbo
2
- VERSION = "0.5.2"
2
+ VERSION = "2.0.0"
3
3
  end
data/lib/turbo-rails.rb CHANGED
@@ -1,8 +1,13 @@
1
1
  require "turbo/engine"
2
+ require "active_support/core_ext/module/attribute_accessors_per_thread"
2
3
 
3
4
  module Turbo
4
5
  extend ActiveSupport::Autoload
5
6
 
7
+ mattr_accessor :draw_routes, default: true
8
+
9
+ thread_mattr_accessor :current_request_id
10
+
6
11
  class << self
7
12
  attr_writer :signed_stream_verifier_key
8
13
 
@@ -13,5 +18,12 @@ module Turbo
13
18
  def signed_stream_verifier_key
14
19
  @signed_stream_verifier_key or raise ArgumentError, "Turbo requires a signed_stream_verifier_key"
15
20
  end
21
+
22
+ def with_request_id(request_id)
23
+ old_request_id, self.current_request_id = self.current_request_id, request_id
24
+ yield
25
+ ensure
26
+ self.current_request_id = old_request_id
27
+ end
16
28
  end
17
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbo-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Stephenson
@@ -10,10 +10,38 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-12-30 00:00:00.000000000 Z
13
+ date: 2024-02-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: rails
16
+ name: activejob
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
+ - !ruby/object:Gem::Dependency
30
+ name: actionpack
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: 6.0.0
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 6.0.0
43
+ - !ruby/object:Gem::Dependency
44
+ name: railties
17
45
  requirement: !ruby/object:Gem::Requirement
18
46
  requirements:
19
47
  - - ">="
@@ -32,17 +60,16 @@ executables: []
32
60
  extensions: []
33
61
  extra_rdoc_files: []
34
62
  files:
35
- - ".github/workflows/ci.yml"
36
- - ".gitignore"
37
- - Gemfile
38
- - Gemfile.lock
39
63
  - MIT-LICENSE
40
64
  - README.md
41
65
  - Rakefile
42
66
  - app/assets/javascripts/turbo.js
67
+ - app/assets/javascripts/turbo.min.js
68
+ - app/assets/javascripts/turbo.min.js.map
43
69
  - app/channels/turbo/streams/broadcasts.rb
44
70
  - app/channels/turbo/streams/stream_name.rb
45
71
  - app/channels/turbo/streams_channel.rb
72
+ - app/controllers/concerns/turbo/request_id_tracking.rb
46
73
  - app/controllers/turbo/frames/frame_request.rb
47
74
  - app/controllers/turbo/native/navigation.rb
48
75
  - app/controllers/turbo/native/navigation_controller.rb
@@ -54,102 +81,29 @@ files:
54
81
  - app/helpers/turbo/streams_helper.rb
55
82
  - app/javascript/turbo/cable.js
56
83
  - app/javascript/turbo/cable_stream_source_element.js
84
+ - app/javascript/turbo/fetch_requests.js
57
85
  - app/javascript/turbo/index.js
86
+ - app/javascript/turbo/snakeize.js
58
87
  - app/jobs/turbo/streams/action_broadcast_job.rb
59
88
  - app/jobs/turbo/streams/broadcast_job.rb
89
+ - app/jobs/turbo/streams/broadcast_stream_job.rb
60
90
  - app/models/concerns/turbo/broadcastable.rb
91
+ - app/models/turbo/debouncer.rb
61
92
  - app/models/turbo/streams/tag_builder.rb
93
+ - app/models/turbo/thread_debouncer.rb
94
+ - app/views/layouts/turbo_rails/frame.html.erb
62
95
  - config/routes.rb
63
- - lib/install/turbo_with_asset_pipeline.rb
64
- - lib/install/turbo_with_webpacker.rb
96
+ - lib/install/turbo_needs_redis.rb
97
+ - lib/install/turbo_with_bun.rb
98
+ - lib/install/turbo_with_importmap.rb
99
+ - lib/install/turbo_with_node.rb
65
100
  - lib/tasks/turbo_tasks.rake
66
101
  - lib/turbo-rails.rb
102
+ - lib/turbo/broadcastable/test_helper.rb
67
103
  - lib/turbo/engine.rb
68
104
  - lib/turbo/test_assertions.rb
105
+ - lib/turbo/test_assertions/integration_test_assertions.rb
69
106
  - lib/turbo/version.rb
70
- - package.json
71
- - rollup.config.js
72
- - test/drive/drive_helper_test.rb
73
- - test/dummy/.babelrc
74
- - test/dummy/.gitignore
75
- - test/dummy/.postcssrc.yml
76
- - test/dummy/Rakefile
77
- - test/dummy/app/assets/config/manifest.js
78
- - test/dummy/app/assets/images/.keep
79
- - test/dummy/app/assets/stylesheets/application.css
80
- - test/dummy/app/assets/stylesheets/scaffold.css
81
- - test/dummy/app/channels/application_cable/channel.rb
82
- - test/dummy/app/channels/application_cable/connection.rb
83
- - test/dummy/app/controllers/application_controller.rb
84
- - test/dummy/app/controllers/concerns/.keep
85
- - test/dummy/app/controllers/messages_controller.rb
86
- - test/dummy/app/controllers/trays_controller.rb
87
- - test/dummy/app/helpers/application_helper.rb
88
- - test/dummy/app/javascript/packs/application.js
89
- - test/dummy/app/jobs/application_job.rb
90
- - test/dummy/app/mailboxes/application_mailbox.rb
91
- - test/dummy/app/mailboxes/messages_mailbox.rb
92
- - test/dummy/app/mailers/application_mailer.rb
93
- - test/dummy/app/models/application_record.rb
94
- - test/dummy/app/models/concerns/.keep
95
- - test/dummy/app/models/message.rb
96
- - test/dummy/app/views/layouts/application.html.erb
97
- - test/dummy/app/views/layouts/mailer.html.erb
98
- - test/dummy/app/views/layouts/mailer.text.erb
99
- - test/dummy/app/views/messages/_message.html.erb
100
- - test/dummy/app/views/messages/_message.turbo_stream.erb
101
- - test/dummy/app/views/messages/show.turbo_stream.erb
102
- - test/dummy/app/views/trays/index.html.erb
103
- - test/dummy/app/views/trays/show.html.erb
104
- - test/dummy/bin/bundle
105
- - test/dummy/bin/rails
106
- - test/dummy/bin/rake
107
- - test/dummy/bin/setup
108
- - test/dummy/bin/update
109
- - test/dummy/bin/yarn
110
- - test/dummy/config.ru
111
- - test/dummy/config/application.rb
112
- - test/dummy/config/boot.rb
113
- - test/dummy/config/cable.yml
114
- - test/dummy/config/environment.rb
115
- - test/dummy/config/environments/development.rb
116
- - test/dummy/config/environments/production.rb
117
- - test/dummy/config/environments/test.rb
118
- - test/dummy/config/initializers/application_controller_renderer.rb
119
- - test/dummy/config/initializers/assets.rb
120
- - test/dummy/config/initializers/backtrace_silencers.rb
121
- - test/dummy/config/initializers/content_security_policy.rb
122
- - test/dummy/config/initializers/cookies_serializer.rb
123
- - test/dummy/config/initializers/filter_parameter_logging.rb
124
- - test/dummy/config/initializers/inflections.rb
125
- - test/dummy/config/initializers/mime_types.rb
126
- - test/dummy/config/initializers/wrap_parameters.rb
127
- - test/dummy/config/locales/en.yml
128
- - test/dummy/config/puma.rb
129
- - test/dummy/config/routes.rb
130
- - test/dummy/config/spring.rb
131
- - test/dummy/config/webpack/development.js
132
- - test/dummy/config/webpack/environment.js
133
- - test/dummy/config/webpack/production.js
134
- - test/dummy/config/webpack/test.js
135
- - test/dummy/config/webpacker.yml
136
- - test/dummy/lib/assets/.keep
137
- - test/dummy/log/.keep
138
- - test/dummy/public/404.html
139
- - test/dummy/public/422.html
140
- - test/dummy/public/500.html
141
- - test/dummy/public/apple-touch-icon-precomposed.png
142
- - test/dummy/public/apple-touch-icon.png
143
- - test/dummy/public/favicon.ico
144
- - test/frames/frame_request_controller_test.rb
145
- - test/frames/frames_helper_test.rb
146
- - test/native/navigation_controller_test.rb
147
- - test/streams/broadcastable_test.rb
148
- - test/streams/streams_channel_test.rb
149
- - test/streams/streams_controller_test.rb
150
- - test/turbo_test.rb
151
- - turbo-rails.gemspec
152
- - yarn.lock
153
107
  homepage: https://github.com/hotwired/turbo-rails
154
108
  licenses:
155
109
  - MIT
@@ -169,87 +123,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
123
  - !ruby/object:Gem::Version
170
124
  version: '0'
171
125
  requirements: []
172
- rubygems_version: 3.1.2
126
+ rubygems_version: 3.4.15
173
127
  signing_key:
174
128
  specification_version: 4
175
129
  summary: The speed of a single-page web application without having to write any JavaScript.
176
- test_files:
177
- - test/drive/drive_helper_test.rb
178
- - test/dummy/.babelrc
179
- - test/dummy/.gitignore
180
- - test/dummy/.postcssrc.yml
181
- - test/dummy/Rakefile
182
- - test/dummy/app/assets/config/manifest.js
183
- - test/dummy/app/assets/images/.keep
184
- - test/dummy/app/assets/stylesheets/application.css
185
- - test/dummy/app/assets/stylesheets/scaffold.css
186
- - test/dummy/app/channels/application_cable/channel.rb
187
- - test/dummy/app/channels/application_cable/connection.rb
188
- - test/dummy/app/controllers/application_controller.rb
189
- - test/dummy/app/controllers/concerns/.keep
190
- - test/dummy/app/controllers/messages_controller.rb
191
- - test/dummy/app/controllers/trays_controller.rb
192
- - test/dummy/app/helpers/application_helper.rb
193
- - test/dummy/app/javascript/packs/application.js
194
- - test/dummy/app/jobs/application_job.rb
195
- - test/dummy/app/mailboxes/application_mailbox.rb
196
- - test/dummy/app/mailboxes/messages_mailbox.rb
197
- - test/dummy/app/mailers/application_mailer.rb
198
- - test/dummy/app/models/application_record.rb
199
- - test/dummy/app/models/concerns/.keep
200
- - test/dummy/app/models/message.rb
201
- - test/dummy/app/views/layouts/application.html.erb
202
- - test/dummy/app/views/layouts/mailer.html.erb
203
- - test/dummy/app/views/layouts/mailer.text.erb
204
- - test/dummy/app/views/messages/_message.html.erb
205
- - test/dummy/app/views/messages/_message.turbo_stream.erb
206
- - test/dummy/app/views/messages/show.turbo_stream.erb
207
- - test/dummy/app/views/trays/index.html.erb
208
- - test/dummy/app/views/trays/show.html.erb
209
- - test/dummy/bin/bundle
210
- - test/dummy/bin/rails
211
- - test/dummy/bin/rake
212
- - test/dummy/bin/setup
213
- - test/dummy/bin/update
214
- - test/dummy/bin/yarn
215
- - test/dummy/config.ru
216
- - test/dummy/config/application.rb
217
- - test/dummy/config/boot.rb
218
- - test/dummy/config/cable.yml
219
- - test/dummy/config/environment.rb
220
- - test/dummy/config/environments/development.rb
221
- - test/dummy/config/environments/production.rb
222
- - test/dummy/config/environments/test.rb
223
- - test/dummy/config/initializers/application_controller_renderer.rb
224
- - test/dummy/config/initializers/assets.rb
225
- - test/dummy/config/initializers/backtrace_silencers.rb
226
- - test/dummy/config/initializers/content_security_policy.rb
227
- - test/dummy/config/initializers/cookies_serializer.rb
228
- - test/dummy/config/initializers/filter_parameter_logging.rb
229
- - test/dummy/config/initializers/inflections.rb
230
- - test/dummy/config/initializers/mime_types.rb
231
- - test/dummy/config/initializers/wrap_parameters.rb
232
- - test/dummy/config/locales/en.yml
233
- - test/dummy/config/puma.rb
234
- - test/dummy/config/routes.rb
235
- - test/dummy/config/spring.rb
236
- - test/dummy/config/webpack/development.js
237
- - test/dummy/config/webpack/environment.js
238
- - test/dummy/config/webpack/production.js
239
- - test/dummy/config/webpack/test.js
240
- - test/dummy/config/webpacker.yml
241
- - test/dummy/lib/assets/.keep
242
- - test/dummy/log/.keep
243
- - test/dummy/public/404.html
244
- - test/dummy/public/422.html
245
- - test/dummy/public/500.html
246
- - test/dummy/public/apple-touch-icon-precomposed.png
247
- - test/dummy/public/apple-touch-icon.png
248
- - test/dummy/public/favicon.ico
249
- - test/frames/frame_request_controller_test.rb
250
- - test/frames/frames_helper_test.rb
251
- - test/native/navigation_controller_test.rb
252
- - test/streams/broadcastable_test.rb
253
- - test/streams/streams_channel_test.rb
254
- - test/streams/streams_controller_test.rb
255
- - test/turbo_test.rb
130
+ test_files: []
@@ -1,30 +0,0 @@
1
- name: CI
2
- on: [push, pull_request]
3
- jobs:
4
- tests:
5
- strategy:
6
- matrix:
7
- ruby-version:
8
- - "2.7"
9
- - "3.0"
10
- continue-on-error: [ false ]
11
-
12
- include:
13
- - ruby-version: head
14
- continue-on-error: true
15
-
16
- name: ${{ format('Tests (Ruby {0})', matrix.ruby-version) }}
17
- runs-on: ubuntu-latest
18
- continue-on-error: ${{ matrix.continue-on-error }}
19
-
20
- steps:
21
- - uses: actions/checkout@v1
22
-
23
- - name: Install Ruby
24
- uses: ruby/setup-ruby@v1
25
- with:
26
- ruby-version: ${{ matrix.ruby-version }}
27
- bundler-cache: true
28
-
29
- - name: Run tests
30
- run: bundle exec rake
data/.gitignore DELETED
@@ -1,2 +0,0 @@
1
- *.gem
2
- /node_modules
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- gem 'rake'
6
- gem 'byebug'