Skip to content

Commit

Permalink
Merge pull request #538 from seanpdoyle/import-stream-actions
Browse files Browse the repository at this point in the history
Fix System Tests in CI environment
  • Loading branch information
jorgemanrubia authored Dec 14, 2023
2 parents 4eb4e92 + 3011025 commit 75b25b5
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
strategy:
fail-fast: false
matrix:
rails: [ "6.1", "7.0" ]
rails: [ "6.1", "7.0", "7.1" ]
ruby: [ "2.7", "3.0", "3.1", "3.2" ]
allow-fail: [ false ]
include:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source 'https://rubygems.org'

gemspec

rails_version = ENV.fetch("RAILS_VERSION", "6.1")
rails_version = ENV.fetch("RAILS_VERSION", "7.1")

if rails_version == "main"
rails_constraint = { github: "rails/rails" }
Expand Down
6 changes: 4 additions & 2 deletions app/assets/javascripts/turbo.js
Original file line number Diff line number Diff line change
Expand Up @@ -4810,7 +4810,7 @@ window.Turbo = Turbo;

start();

var turbo_es2017Esm = Object.freeze({
var Turbo$1 = Object.freeze({
__proto__: null,
FetchEnctype: FetchEnctype,
FetchMethod: FetchMethod,
Expand Down Expand Up @@ -4979,6 +4979,8 @@ function isBodyInit(body) {
return body instanceof FormData || body instanceof URLSearchParams;
}

window.Turbo = Turbo$1;

addEventListener("turbo:before-fetch-request", encodeMethodIntoRequestBody);

var adapters = {
Expand Down Expand Up @@ -5514,4 +5516,4 @@ var index = Object.freeze({
getConfig: getConfig
});

export { turbo_es2017Esm as Turbo, cable };
export { Turbo$1 as Turbo, cable };
2 changes: 1 addition & 1 deletion app/assets/javascripts/turbo.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/javascripts/turbo.min.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions app/javascript/turbo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ export { cable }

import { encodeMethodIntoRequestBody } from "./fetch_requests"

window.Turbo = Turbo

addEventListener("turbo:before-fetch-request", encodeMethodIntoRequestBody)
2 changes: 1 addition & 1 deletion app/jobs/turbo/streams/broadcast_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# turbo stream templates.
class Turbo::Streams::BroadcastJob < ActiveJob::Base
discard_on ActiveJob::DeserializationError

def perform(stream, **rendering)
Turbo::StreamsChannel.broadcast_render_to stream, **rendering
end
Expand Down
4 changes: 1 addition & 3 deletions test/dummy/app/models/message.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
class Message < ApplicationRecord
def to_s
content
end
delegate :to_s, to: :content, allow_nil: true
end
7 changes: 6 additions & 1 deletion test/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
module Dummy
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 6.1
config.load_defaults (
case (rails_version = ENV["RAILS_VERSION"])
when "main", nil then 7.1
else rails_version.to_f
end
)

# Settings in config/environments/* take precedence over those specified here.
# Application configuration can go into files in config/initializers
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ hasown@^2.0.0:
dependencies:
function-bind "^1.1.2"

"idiomorph@git+https://github.com/basecamp/idiomorph.git#rollout-build":
"idiomorph@https://github.com/basecamp/idiomorph#rollout-build":
version "0.0.8"
resolved "git+https://github.com/basecamp/idiomorph.git#e906820368e4c9c52489a3336b8c3826b1bf6de5"
resolved "https://github.com/basecamp/idiomorph#e906820368e4c9c52489a3336b8c3826b1bf6de5"

is-core-module@^2.13.0:
version "2.13.1"
Expand Down

0 comments on commit 75b25b5

Please sign in to comment.