repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
bashly-framework/bashly | https://github.com/bashly-framework/bashly/blob/343e63e493a08b9d04e9b7a23912762a0270f8a8/lib/bashly/libraries/render/markdown/render.rb | lib/bashly/libraries/render/markdown/render.rb | # render script - markdown
require 'gtx'
# for previewing only (not needed for rendering)
require 'tty-markdown'
# Load the GTX template
template = "#{source}/markdown.gtx"
gtx = GTX.load_file template
# Render the file for the main command
save "#{target}/index.md", gtx.parse(command)
# Render a file for each subc... | ruby | MIT | 343e63e493a08b9d04e9b7a23912762a0270f8a8 | 2026-01-04T15:56:08.200657Z | false |
bashly-framework/bashly | https://github.com/bashly-framework/bashly/blob/343e63e493a08b9d04e9b7a23912762a0270f8a8/lib/bashly/refinements/compose_refinements.rb | lib/bashly/refinements/compose_refinements.rb | module Bashly
module ComposeRefinements
refine Hash do
def compose(keyword = 'import')
result = {}
each do |k, v|
if k.to_s == keyword
sub = safe_load_yaml(v).compose keyword
if sub.is_a? Array
result = sub
else
result... | ruby | MIT | 343e63e493a08b9d04e9b7a23912762a0270f8a8 | 2026-01-04T15:56:08.200657Z | false |
jhawthorn/discard | https://github.com/jhawthorn/discard/blob/a652b8c4cafc4459e7788abcc5afcb6c3bfe049e/spec/spec_helper.rb | spec/spec_helper.rb | $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'discard'
require 'database_cleaner'
require 'with_model'
DatabaseCleaner.strategy = :transaction
RSpec.configure do |config|
config.before :suite do
ActiveRecord::Base.establish_connection :adapter => 'sqlite3', database: ':memory:'
end
c... | ruby | MIT | a652b8c4cafc4459e7788abcc5afcb6c3bfe049e | 2026-01-04T15:56:15.258062Z | false |
jhawthorn/discard | https://github.com/jhawthorn/discard/blob/a652b8c4cafc4459e7788abcc5afcb6c3bfe049e/spec/discard/model_spec.rb | spec/discard/model_spec.rb | # frozen_string_literal: true
RSpec.describe Discard::Model do
context "with simple Post model" do
with_model :Post, scope: :all do
table do |t|
t.string :title
t.datetime :discarded_at
t.timestamps null: false
end
model do
include Discard::Model
end
e... | ruby | MIT | a652b8c4cafc4459e7788abcc5afcb6c3bfe049e | 2026-01-04T15:56:15.258062Z | false |
jhawthorn/discard | https://github.com/jhawthorn/discard/blob/a652b8c4cafc4459e7788abcc5afcb6c3bfe049e/lib/discard.rb | lib/discard.rb | # frozen_string_literal: true
require "active_record"
require "discard/version"
require "discard/errors"
require "discard/model"
| ruby | MIT | a652b8c4cafc4459e7788abcc5afcb6c3bfe049e | 2026-01-04T15:56:15.258062Z | false |
jhawthorn/discard | https://github.com/jhawthorn/discard/blob/a652b8c4cafc4459e7788abcc5afcb6c3bfe049e/lib/discard/version.rb | lib/discard/version.rb | # frozen_string_literal: true
module Discard
# Discard version
VERSION = "1.4.0".freeze
end
| ruby | MIT | a652b8c4cafc4459e7788abcc5afcb6c3bfe049e | 2026-01-04T15:56:15.258062Z | false |
jhawthorn/discard | https://github.com/jhawthorn/discard/blob/a652b8c4cafc4459e7788abcc5afcb6c3bfe049e/lib/discard/errors.rb | lib/discard/errors.rb | # frozen_string_literal: true
module Discard
# = Discard Errors
#
# Generic exception class.
class DiscardError < StandardError
end
# Raised by {Discard::Model#discard!}
class RecordNotDiscarded < DiscardError
attr_reader :record
def initialize(message = nil, record = nil)
@record = recor... | ruby | MIT | a652b8c4cafc4459e7788abcc5afcb6c3bfe049e | 2026-01-04T15:56:15.258062Z | false |
jhawthorn/discard | https://github.com/jhawthorn/discard/blob/a652b8c4cafc4459e7788abcc5afcb6c3bfe049e/lib/discard/model.rb | lib/discard/model.rb | # frozen_string_literal: true
module Discard
# Handles soft deletes of records.
#
# Options:
#
# - :discard_column - The columns used to track soft delete, defaults to `:discarded_at`.
module Model
extend ActiveSupport::Concern
included do
class_attribute :discard_column
self.discard_c... | ruby | MIT | a652b8c4cafc4459e7788abcc5afcb6c3bfe049e | 2026-01-04T15:56:15.258062Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/bug_report_template.rb | bug_report_template.rb | require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
gem "rails"
gem "propshaft"
gem "puma"
gem "sqlite3"
gem "turbo-rails"
gem "capybara"
gem "cuprite", require: "capybara/cuprite"
gem "minitest", "< 6"
end
ENV["DATABASE_URL"] = "sqlite3::memory:"
ENV["RAILS_ENV"] = "test"
req... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/jobs/turbo/streams/broadcast_job.rb | app/jobs/turbo/streams/broadcast_job.rb | # The job that powers the <tt>broadcast_render_later_to</tt> available in <tt>Turbo::Streams::Broadcasts</tt> for rendering
# turbo stream templates.
class Turbo::Streams::BroadcastJob < ActiveJob::Base
discard_on ActiveJob::DeserializationError
def perform(stream, **rendering)
Turbo::StreamsChannel.broadcast_... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/jobs/turbo/streams/broadcast_stream_job.rb | app/jobs/turbo/streams/broadcast_stream_job.rb | class Turbo::Streams::BroadcastStreamJob < ActiveJob::Base
discard_on ActiveJob::DeserializationError
def perform(stream, content:)
Turbo::StreamsChannel.broadcast_stream_to(stream, content: content)
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/jobs/turbo/streams/action_broadcast_job.rb | app/jobs/turbo/streams/action_broadcast_job.rb | # The job that powers all the <tt>broadcast_$action_later</tt> broadcasts available in <tt>Turbo::Streams::Broadcasts</tt>.
class Turbo::Streams::ActionBroadcastJob < ActiveJob::Base
discard_on ActiveJob::DeserializationError
def perform(stream, action:, target:, attributes: {}, **rendering)
Turbo::StreamsCh... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/helpers/turbo/streams_helper.rb | app/helpers/turbo/streams_helper.rb | module Turbo::StreamsHelper
# Returns a new <tt>Turbo::Streams::TagBuilder</tt> object that accepts stream actions and renders them as
# the template tags needed to send across the wire. This object is automatically yielded to turbo_stream.erb templates.
#
# When responding to HTTP requests, controllers can dec... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/helpers/turbo/drive_helper.rb | app/helpers/turbo/drive_helper.rb | # Helpers to configure Turbo Drive via meta directives. They come in two
# variants:
#
# The recommended option is to include +yield :head+ in the +<head>+ section
# of the layout. Then you can use the helpers in any view.
#
# ==== Example
#
# # app/views/application.html.erb
# <html><head><%= yield :head %></head>... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/helpers/turbo/includes_helper.rb | app/helpers/turbo/includes_helper.rb | module Turbo::IncludesHelper
# DEPRECATED: Just use <tt>javascript_include_tag "turbo", type: "module"</tt> directly if using Turbo alone, or
# javascript_include_tag "turbo", type: "module-shim" if together with Stimulus and importmaps.
def turbo_include_tags
javascript_include_tag("turbo", type: "module")
... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/helpers/turbo/frames_helper.rb | app/helpers/turbo/frames_helper.rb | module Turbo::FramesHelper
# Returns a frame tag that can either be used simply to encapsulate frame content or as a lazy-loading container that starts empty but
# fetches the URL supplied in the +src+ attribute.
#
# ==== Examples
#
# <%= turbo_frame_tag "tray", src: tray_path(tray) %>
# # => <turbo-f... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/helpers/turbo/streams/action_helper.rb | app/helpers/turbo/streams/action_helper.rb | module Turbo::Streams::ActionHelper
include ActionView::Helpers::TagHelper
# Creates a `turbo-stream` tag according to the passed parameters. Examples:
#
# turbo_stream_action_tag "remove", target: "message_1"
# # => <turbo-stream action="remove" target="message_1"></turbo-stream>
#
# turbo_stream_... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/controllers/turbo/native/navigation_controller.rb | app/controllers/turbo/native/navigation_controller.rb | class Turbo::Native::NavigationController < ActionController::Base
def recede
render html: "Going back…"
end
def refresh
render html: "Refreshing…"
end
def resume
render html: "Staying put…"
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/controllers/turbo/native/navigation.rb | app/controllers/turbo/native/navigation.rb | # Turbo is built to work with native navigation principles and present those alongside what's required for the web. When you
# have Hotwire Native clients running (see the Hotwire Native iOS and Hotwire Native Android projects for details),
# you can respond to native requests with three dedicated responses: <tt>recede... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/controllers/turbo/frames/frame_request.rb | app/controllers/turbo/frames/frame_request.rb | # Turbo frame requests are requests made from within a turbo frame with the intention of replacing the content of just
# that frame, not the whole page. They are automatically tagged as such by the Turbo Frame JavaScript, which adds a
# <tt>Turbo-Frame</tt> header to the request.
#
# When that header is detected by the... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/controllers/turbo/streams/turbo_streams_tag_builder.rb | app/controllers/turbo/streams/turbo_streams_tag_builder.rb | # Most turbo streams are rendered either asynchronously via <tt>Turbo::Broadcastable</tt>/<tt>Turbo::StreamsChannel</tt> or
# rendered in templates with the <tt>turbo_stream.erb</tt> extension. But it's also possible to render updates inline
# in controllers, like so:
#
# def destroy
# @user.destroy!
#
# resp... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/controllers/concerns/turbo/request_id_tracking.rb | app/controllers/concerns/turbo/request_id_tracking.rb | module Turbo::RequestIdTracking
extend ActiveSupport::Concern
included do
around_action :turbo_tracking_request_id
end
private
def turbo_tracking_request_id(&block)
Turbo.with_request_id(request.headers["X-Turbo-Request-Id"], &block)
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/models/turbo/debouncer.rb | app/models/turbo/debouncer.rb | class Turbo::Debouncer
attr_reader :delay, :scheduled_task
DEFAULT_DELAY = 0.5
def initialize(delay: DEFAULT_DELAY)
@delay = delay
@scheduled_task = nil
end
def debounce(&block)
scheduled_task&.cancel unless scheduled_task&.complete?
@scheduled_task = Concurrent::ScheduledTask.execute(delay... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/models/turbo/thread_debouncer.rb | app/models/turbo/thread_debouncer.rb | # A decorated debouncer that will store instances in the current thread clearing them
# after the debounced logic triggers.
class Turbo::ThreadDebouncer
delegate :wait, to: :debouncer
class_attribute :debouncer_class, default: Turbo::Debouncer
def self.for(key, delay: Turbo::Debouncer::DEFAULT_DELAY)
Thread... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/models/turbo/immediate_debouncer.rb | app/models/turbo/immediate_debouncer.rb | # A debouncer that executes immediately without delays or background threads.
# This doesn't debounce at all, but is safe to use in tests.
class Turbo::ImmediateDebouncer # :nodoc:
def initialize(delay: Turbo::Debouncer::DEFAULT_DELAY)
end
def debounce(&block)
block.call
end
def wait
end
def comple... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/models/turbo/streams/tag_builder.rb | app/models/turbo/streams/tag_builder.rb | # This tag builder is used both for inline controller turbo actions (see <tt>Turbo::Streams::TurboStreamsTagBuilder</tt>) and for
# turbo stream templates. This object plays together with any normal Ruby you'd run in an ERB template, so you can iterate, like:
#
# <% # app/views/postings/destroy.turbo_stream.erb %>
# ... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/models/concerns/turbo/broadcastable.rb | app/models/concerns/turbo/broadcastable.rb | # Turbo streams can be broadcasted directly from models that include this module (this is automatically done for Active Records if ActiveJob is loaded).
# This makes it convenient to execute both synchronous and asynchronous updates, and render directly from callbacks in models
# or from controllers or jobs that act on... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/channels/turbo/streams_channel.rb | app/channels/turbo/streams_channel.rb | # The streams channel delivers all the turbo-stream actions created (primarily) through <tt>Turbo::Broadcastable</tt>.
# A subscription to this channel is made for each individual stream that one wishes to listen for updates to.
# The subscription relies on being passed a <tt>signed_stream_name</tt> parameter generated... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/channels/turbo/streams/stream_name.rb | app/channels/turbo/streams/stream_name.rb | # Stream names are how we identify which updates should go to which users. All streams run over the same
# <tt>Turbo::StreamsChannel</tt>, but each with their own subscription. Since stream names are exposed directly to the user
# via the HTML stream subscription tags, we need to ensure that the name isn't tampered wit... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/app/channels/turbo/streams/broadcasts.rb | app/channels/turbo/streams/broadcasts.rb | # Provides the broadcast actions in synchronous and asynchronous form for the <tt>Turbo::StreamsChannel</tt>.
# See <tt>Turbo::Broadcastable</tt> for the user-facing API that invokes these methods with most of the paperwork filled out already.
#
# Can be used directly using something like <tt>Turbo::StreamsChannel.broa... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/current_request_id_test.rb | test/current_request_id_test.rb | require "test_helper"
require "action_cable"
class Turbo::CurrentRequestIdTest < ActiveSupport::TestCase
test "sets the current request id for a block of code" do
assert_nil Turbo.current_request_id
result = Turbo.with_request_id("123") do
assert_equal "123", Turbo.current_request_id
:the_result... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/application_system_test_case.rb | test/application_system_test_case.rb | require "test_helper"
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
driven_by :cuprite, using: :chrome, screen_size: [1400, 1400], options: { js_errors: true }
end
Capybara.configure do |config|
config.server = :puma, { Silent: true }
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/capybara_selectors_test.rb | test/capybara_selectors_test.rb | require "test_helper"
require "turbo/system_test_helper"
require "capybara/minitest"
class Turbo::CapybaraSelectorTestCase < ActionView::TestCase
include Capybara::Minitest::Assertions
attr_accessor :page
def render_html(html, **local_assigns)
render(inline: html, locals: local_assigns)
self.page = Ca... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/installer_test.rb | test/installer_test.rb | require 'app_helper'
class InstallerTest < ActiveSupport::TestCase
include RailsAppHelpers
include ActiveSupport::Testing::Isolation
test "installer" do
with_new_rails_app do
if Rails::VERSION::MAJOR >= 7 && File.read("Gemfile").match?(/importmap-rails/)
run_command("bin/rails", "importmap:ins... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/test_helper.rb | test/test_helper.rb | # Configure Rails Environment
ENV["RAILS_ENV"] = "test"
require_relative "../test/dummy/config/environment"
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../test/dummy/db/migrate", __dir__)]
require "rails/test_help"
ActionCable.server.config.logger = Logger.new(STDOUT) if ENV["VERBOSE"]
module Action... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/app_helper.rb | test/app_helper.rb | require "rails"
require "rails/test_help"
require "fileutils"
if Gem::Version.new(Rails.version) < Gem::Version.new("7.1")
module Rails::Generators::AppName
private
def valid_const?
true
end
end
end
module RailsAppHelpers
private
def create_new_rails_app(app_dir, options=[])
requir... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/drive/drive_helper_test.rb | test/drive/drive_helper_test.rb | require "test_helper"
class Turbo::DriveHelperTest < ActionDispatch::IntegrationTest
test "opting out of the default cache" do
get trays_path
assert_match(/<meta name="turbo-cache-control" content="no-cache">/, @response.body)
end
test "requiring reload" do
get trays_path
assert_match(/<meta nam... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/refreshes/request_id_tracking_test.rb | test/refreshes/request_id_tracking_test.rb | require "test_helper"
class Turbo::RequestIdTrackingTest < ActionDispatch::IntegrationTest
test "set the current turbo request id from the value in the X-Turbo-Request-Id header" do
get request_id_path, headers: { "X-Turbo-Request-Id" => "123" }
assert_equal "123", JSON.parse(response.body)["turbo_frame_requ... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/initializers/helpers_test.rb | test/initializers/helpers_test.rb | require "test_helper"
class Turbo::HelpersInInitializersTest < ActionDispatch::IntegrationTest
test "AC::Base has the helpers in place when initializers run" do
assert_includes $dummy_ac_base_ancestors_in_initializers, Turbo::Streams::TurboStreamsTagBuilder
assert_includes $dummy_ac_base_helpers_in_initializ... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/system/form_submissions_test.rb | test/system/form_submissions_test.rb | require "application_system_test_case"
class FormSubmissionsTest < ApplicationSystemTestCase
test "form submission [method=get]" do
article = Article.create! body: "My article"
visit edit_article_path(article.id)
click_on "articles#index"
assert_text "Articles"
assert_text "My article"
end
... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/system/assertions_test.rb | test/system/assertions_test.rb | require "application_system_test_case"
class AssertionsTest < ApplicationSystemTestCase
test "#assert_turbo_cable_stream_source treats the locator as :signed_stream_name filter" do
message = Message.create!
visit message_path(message)
assert_turbo_cable_stream_source message, count: 1
assert_no_tur... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/system/broadcasts_test.rb | test/system/broadcasts_test.rb | require "application_system_test_case"
class BroadcastsTest < ApplicationSystemTestCase
include ActiveJob::TestHelper
extend Turbo::Streams::StreamName
test "Message broadcasts Turbo Streams" do
visit messages_path
assert_broadcasts_text "Message 1", to: :messages do |text, target|
Message.create... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/native/navigation_controller_test.rb | test/native/navigation_controller_test.rb | require "test_helper"
class Turbo::Native::NavigationControllerTest < ActionDispatch::IntegrationTest
test "recede, resume, or refresh when native or redirect when not" do
%w[ recede resume refresh ].each do |action|
post trays_path, params: { return_to: "#{action}_or_redirect" }
assert_redirected_to... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/broadcastable/test_helper_test.rb | test/broadcastable/test_helper_test.rb | require "test_helper"
class Turbo::Broadcastable::TestHelper::CaptureTurboStreamBroadcastsTest < ActiveSupport::TestCase
include Turbo::Broadcastable::TestHelper
test "#capture_turbo_stream_broadcasts returns <turbo-stream> elements broadcast on a stream name" do
message = Message.new(id: 1)
message.broa... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/jobs/application_job.rb | test/dummy/app/jobs/application_job.rb | class ApplicationJob < ActiveJob::Base
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/helpers/application_helper.rb | test/dummy/app/helpers/application_helper.rb | module ApplicationHelper
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/controllers/articles_controller.rb | test/dummy/app/controllers/articles_controller.rb | class ArticlesController < ApplicationController
before_action :assert_param_method!, only: [:update, :destroy]
def index
@articles = Article.all
end
def edit
@article = Article.find params[:id]
end
def update
@article = Article.find params[:id]
@article.update! article_params
redir... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/controllers/trays_controller.rb | test/dummy/app/controllers/trays_controller.rb | class TraysController < ApplicationController
def show
end
def create
case params[:return_to]
when "recede_or_redirect" then recede_or_redirect_to tray_url(id: 1)
when "resume_or_redirect" then resume_or_redirect_to tray_url(id: 1)
when "refresh_or_redirect" ... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/controllers/posts_controller.rb | test/dummy/app/controllers/posts_controller.rb | class PostsController < ApplicationController
def create
respond_to do |format|
format.turbo_stream { render :new }
end
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/controllers/notifications_controller.rb | test/dummy/app/controllers/notifications_controller.rb | class NotificationsController < ApplicationController
def create
respond_to do |format|
format.turbo_stream { render :new }
end
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/controllers/messages_controller.rb | test/dummy/app/controllers/messages_controller.rb | class MessagesController < ApplicationController
def show
@message = Message.find(params[:id])
if (other_id = params[:other_message])
@other_message = Message.find(other_id)
end
end
def index
@messages = Message.all
end
def section
end
def create
respond_to do |format|
... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/controllers/request_ids_controller.rb | test/dummy/app/controllers/request_ids_controller.rb | class RequestIdsController < ApplicationController
def show
render json: { turbo_frame_request_id: Turbo.current_request_id }
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/controllers/application_controller.rb | test/dummy/app/controllers/application_controller.rb | class ApplicationController < ActionController::Base
protect_from_forgery
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/controllers/admin/base_controller.rb | test/dummy/app/controllers/admin/base_controller.rb | class Admin::BaseController < ApplicationController
prepend_view_path 'app/views/admin'
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/controllers/admin/companies_controller.rb | test/dummy/app/controllers/admin/companies_controller.rb | class Admin::CompaniesController < Admin::BaseController
def show
@company = Company.new(id: 1, name: "Basecamp")
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/controllers/api/application_controller.rb | test/dummy/app/controllers/api/application_controller.rb | class Api::ApplicationController < ActionController::API
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/controllers/users/profiles_controller.rb | test/dummy/app/controllers/users/profiles_controller.rb | class Users::ProfilesController < ApplicationController
def show
@profile = Users::Profile.new(id: 1, name: "David")
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/components/message_component.rb | test/dummy/app/components/message_component.rb | class MessageComponent
def initialize(text)
@text = text
end
def render_in(view_context)
"<div class='test-message'>#{@text}</div>".html_safe
end
def format
:html
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/components/notification_component.rb | test/dummy/app/components/notification_component.rb | class NotificationComponent
def render_in(view_context, &block)
"<div class='notification'>#{view_context.capture(&block)}</div>".html_safe
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/models/board.rb | test/dummy/app/models/board.rb | class Board < ApplicationRecord
broadcasts_refreshes
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/models/article.rb | test/dummy/app/models/article.rb | class Article < ApplicationRecord
has_many :comments
validates :body, presence: true
broadcasts "overriden-stream", target: "overriden-target"
def to_gid_param
to_param
end
def to_param
body.parameterize
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/models/comment.rb | test/dummy/app/models/comment.rb | class Comment < ApplicationRecord
belongs_to :article
validates :body, presence: true
broadcasts_to ->(comment) { [comment.article, :comments] },
target: ->(comment) { "article_#{comment.article_id}_comments" },
partial: "comments/different_comment",
locals: { highlight: true }
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/models/message.rb | test/dummy/app/models/message.rb | class Message < ApplicationRecord
delegate :to_s, to: :content, allow_nil: true
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/models/application_record.rb | test/dummy/app/models/application_record.rb | class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/models/company.rb | test/dummy/app/models/company.rb | class Company
include ActiveModel::Model
attr_accessor :id, :name
def to_partial_path
"companies/company"
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/models/users/profile.rb | test/dummy/app/models/users/profile.rb | module Users
class Profile
include ActiveModel::Model
include Turbo::Broadcastable
attr_accessor :id, :name
def to_param
"users:profile:#{id}"
end
def to_partial_path
"users/profiles/profile"
end
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/channels/section_channel.rb | test/dummy/app/channels/section_channel.rb | class SectionChannel < ApplicationCable::Channel
extend Turbo::Streams::Broadcasts, Turbo::Streams::StreamName
include Turbo::Streams::StreamName::ClassMethods
def subscribed
stream_name = [ params[:section], verified_stream_name_from_params ].join("_")
stream_from stream_name
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/channels/application_cable/channel.rb | test/dummy/app/channels/application_cable/channel.rb | module ApplicationCable
class Channel < ActionCable::Channel::Base
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/app/channels/application_cable/connection.rb | test/dummy/app/channels/application_cable/connection.rb | module ApplicationCable
class Connection < ActionCable::Connection::Base
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/db/schema.rb | test/dummy/db/schema.rb | # This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# This file is the source Rails uses to define your schema when running `bin/rai... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/db/migrate/20210923150403_create_messages.rb | test/dummy/db/migrate/20210923150403_create_messages.rb | class CreateMessages < ActiveRecord::Migration[6.1]
def change
create_table :messages do |t|
t.text :content
t.timestamps
end
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/db/migrate/20210408163455_create_articles.rb | test/dummy/db/migrate/20210408163455_create_articles.rb | class CreateArticles < ActiveRecord::Migration[6.1]
def change
create_table :articles do |t|
t.text :body, null: false
t.timestamps
end
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/db/migrate/20231123180958_create_boards.rb | test/dummy/db/migrate/20231123180958_create_boards.rb | class CreateBoards < ActiveRecord::Migration[6.1]
def change
create_table :boards do |t|
t.string :name
t.timestamps
end
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/db/migrate/20210408163514_create_comments.rb | test/dummy/db/migrate/20210408163514_create_comments.rb | class CreateComments < ActiveRecord::Migration[6.1]
def change
create_table :comments do |t|
t.text :body, null: false
t.references :article, null: false, foreign_key: true
t.timestamps
end
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/application.rb | test/dummy/config/application.rb | require_relative 'boot'
require "action_controller/railtie"
require "action_cable/engine"
require "active_job/railtie"
require "active_model/railtie"
require "active_record/railtie"
require "sprockets/railtie"
Bundler.require(*Rails.groups)
module Dummy
class Application < Rails::Application
# Initialize confi... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/environment.rb | test/dummy/config/environment.rb | # Load the Rails application.
require_relative 'application'
# Initialize the Rails application.
Rails.application.initialize!
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/puma.rb | test/dummy/config/puma.rb | # Puma can serve each request in a thread from an internal thread pool.
# The `threads` method setting takes two numbers: a minimum and maximum.
# Any libraries that use thread pools should be configured to match
# the maximum value specified for Puma. Default is set to 5 threads for minimum
# and maximum; this matches... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/routes.rb | test/dummy/config/routes.rb | Rails.application.routes.draw do
resources :articles do
delete :destroy_all, on: :collection
end
resources :messages do
collection do
get :section
end
end
resources :trays
resources :posts
resources :notifications
namespace :users do
resources :profiles
end
namespace :admin do
... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/importmap.rb | test/dummy/config/importmap.rb | # Use direct uploads for Active Storage (remember to import "@rails/activestorage" in your application.js)
# pin "@rails/activestorage", to: "activestorage.esm.js"
# Use node modules from a JavaScript CDN by running ./bin/importmap
pin "application"
pin "@hotwired/turbo-rails", to: "turbo.js"
pin "@rails/actioncable"... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/spring.rb | test/dummy/config/spring.rb | %w[
.ruby-version
.rbenv-vars
tmp/restart.txt
tmp/caching-dev.txt
].each { |path| Spring.watch(path) }
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/boot.rb | test/dummy/config/boot.rb | # Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
$LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/initializers/content_security_policy.rb | test/dummy/config/initializers/content_security_policy.rb | # Be sure to restart your server when you modify this file.
# Define an application-wide content security policy
# For further information see the following documentation
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
# Rails.application.config.content_security_policy do |policy|
... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/initializers/filter_parameter_logging.rb | test/dummy/config/initializers/filter_parameter_logging.rb | # Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
Rails.application.config.filter_parameters += [:password]
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/initializers/inspect_helpers.rb | test/dummy/config/initializers/inspect_helpers.rb | ActionController::Base.class_eval do
$dummy_ac_base_ancestors_in_initializers = ancestors
$dummy_ac_base_helpers_in_initializers = _helpers.ancestors
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/initializers/application_controller_renderer.rb | test/dummy/config/initializers/application_controller_renderer.rb | # Be sure to restart your server when you modify this file.
# ActiveSupport::Reloader.to_prepare do
# ApplicationController.renderer.defaults.merge!(
# http_host: 'example.org',
# https: false
# )
# end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/initializers/turbo.rb | test/dummy/config/initializers/turbo.rb | ActiveSupport.on_load :turbo_streams_tag_builder do
def highlight(target)
action :highlight, target
end
def highlight_all(targets)
action_all :highlight, targets
end
end
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/initializers/wrap_parameters.rb | test/dummy/config/initializers/wrap_parameters.rb | # Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
wrap_parameters f... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/initializers/inflections.rb | test/dummy/config/initializers/inflections.rb | # Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflec... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/initializers/cookies_serializer.rb | test/dummy/config/initializers/cookies_serializer.rb | # Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.
# Valid options are :json, :marshal, and :hybrid.
Rails.application.config.action_dispatch.cookies_serializer = :json
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/initializers/assets.rb | test/dummy/config/initializers/assets.rb | # Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = '1.0'
# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
# Add Yarn node_modules ... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/initializers/backtrace_silencers.rb | test/dummy/config/initializers/backtrace_silencers.rb | # Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying to debug a probl... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/initializers/mime_types.rb | test/dummy/config/initializers/mime_types.rb | # Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
| ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/environments/test.rb | test/dummy/config/environments/test.rb | require "active_support/core_ext/numeric/time"
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your te... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/environments/development.rb | test/dummy/config/environments/development.rb | Rails.application.configure do
# Verifies that versions and hashed value of the package contents in the project's package.json
# config.webpacker.check_yarn_integrity = true
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's c... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/dummy/config/environments/production.rb | test/dummy/config/environments/production.rb | Rails.application.configure do
# Verifies that versions and hashed value of the package contents in the project's package.json
config.webpacker.check_yarn_integrity = false
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.ca... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/frames/frames_helper_test.rb | test/frames/frames_helper_test.rb | require "test_helper"
class Turbo::FramesHelperTest < ActionView::TestCase
test "frame with src" do
assert_dom_equal %(<turbo-frame src="/trays/1" id="tray"></turbo-frame>), turbo_frame_tag("tray", src: "/trays/1")
end
test "frame with model src" do
record = Message.create(id: "1", content: "ignored")
... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/frames/frame_request_controller_test.rb | test/frames/frame_request_controller_test.rb | require "test_helper"
class Turbo::FrameRequestControllerTest < ActionDispatch::IntegrationTest
test "frame requests are rendered with a minimal layout" do
get tray_path(id: 1)
assert_select "title", count: 1
get tray_path(id: 1), headers: { "Turbo-Frame" => "true" }
assert_select "title", count: 0
... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/streams/broadcastable_test.rb | test/streams/broadcastable_test.rb | require "test_helper"
require "action_cable"
require "minitest/mock"
class Turbo::BroadcastableTest < ActionCable::Channel::TestCase
include ActiveJob::TestHelper, Turbo::Streams::ActionHelper
class MessageThatRendersError < Message
def to_partial_path
"messages/raises_error"
end
end
setup { @m... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/streams/streams_controller_test.rb | test/streams/streams_controller_test.rb | require "test_helper"
class Turbo::StreamsControllerTest < ActionDispatch::IntegrationTest
test "create with respond to" do
post messages_path
assert_redirected_to message_path(id: 1)
post messages_path, as: :turbo_stream
assert_no_turbo_stream status: :created, action: :update, target: "messages"
... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
hotwired/turbo-rails | https://github.com/hotwired/turbo-rails/blob/16f76133cbef0cfec65a3c8693d795670fb725ac/test/streams/streams_channel_test.rb | test/streams/streams_channel_test.rb | require "test_helper"
require "action_cable"
class Turbo::StreamsChannelTest < ActionCable::Channel::TestCase
include ActiveJob::TestHelper, Turbo::Streams::ActionHelper
test "verified stream name" do
assert_equal "stream", Turbo::StreamsChannel.verified_stream_name(Turbo::StreamsChannel.signed_stream_name("s... | ruby | MIT | 16f76133cbef0cfec65a3c8693d795670fb725ac | 2026-01-04T15:56:20.581696Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.