Full Code of renuo/turbo-showcase for AI

main 9cfbc85aabf3 cached
123 files
86.0 KB
26.0k tokens
59 symbols
1 requests
Download .txt
Repository: renuo/turbo-showcase
Branch: main
Commit: 9cfbc85aabf3
Files: 123
Total size: 86.0 KB

Directory structure:
gitextract_3zdbyyi1/

├── .browserslistrc
├── .gitattributes
├── .gitignore
├── .ruby-version
├── .semaphore/
│   ├── main-deploy.yml
│   └── semaphore.yml
├── Gemfile
├── README.md
├── Rakefile
├── app/
│   ├── assets/
│   │   ├── config/
│   │   │   └── manifest.js
│   │   ├── images/
│   │   │   └── .keep
│   │   └── stylesheets/
│   │       └── application.scss
│   ├── channels/
│   │   └── application_cable/
│   │       ├── channel.rb
│   │       └── connection.rb
│   ├── components/
│   │   ├── editable_field_component.html.erb
│   │   └── editable_field_component.rb
│   ├── controllers/
│   │   ├── application_controller.rb
│   │   ├── concerns/
│   │   │   └── .keep
│   │   ├── home_controller.rb
│   │   ├── letters_controller.rb
│   │   └── training_controller.rb
│   ├── helpers/
│   │   └── application_helper.rb
│   ├── javascript/
│   │   ├── application.js
│   │   └── controllers/
│   │       ├── application.js
│   │       ├── editable_field_controller.js
│   │       ├── hello_controller.js
│   │       ├── index.js
│   │       └── url_updating_frame_controller.js
│   ├── jobs/
│   │   └── application_job.rb
│   ├── mailers/
│   │   └── application_mailer.rb
│   ├── models/
│   │   ├── application_record.rb
│   │   ├── concerns/
│   │   │   └── .keep
│   │   └── user.rb
│   └── views/
│       ├── home/
│       │   ├── forms.html.erb
│       │   ├── frames.html.erb
│       │   ├── inline_fields.html.erb
│       │   ├── issues.html.erb
│       │   ├── navigate_away.html.erb
│       │   ├── pagination.html.erb
│       │   ├── replace_external_frame.html.erb
│       │   ├── replace_form_frame.html.erb
│       │   ├── replace_update_me.html.erb
│       │   ├── replace_whole_page.html.erb
│       │   ├── show.html.erb
│       │   ├── slow.html.erb
│       │   ├── slow_frame.html.erb
│       │   └── streams.html.erb
│       ├── layouts/
│       │   ├── application.html.erb
│       │   ├── mailer.html.erb
│       │   └── mailer.text.erb
│       ├── letters/
│       │   └── show.html.erb
│       └── training/
│           ├── instructions.html.erb
│           └── show.html.erb
├── babel.config.js
├── bin/
│   ├── bundle
│   ├── check
│   ├── importmap
│   ├── rails
│   ├── rake
│   ├── setup
│   ├── spring
│   └── yarn
├── config/
│   ├── application.rb
│   ├── appsignal.yml
│   ├── boot.rb
│   ├── cable.yml
│   ├── credentials.yml.enc
│   ├── database.yml
│   ├── environment.rb
│   ├── environments/
│   │   ├── development.rb
│   │   ├── production.rb
│   │   └── test.rb
│   ├── importmap.rb
│   ├── initializers/
│   │   ├── application_controller_renderer.rb
│   │   ├── assets.rb
│   │   ├── backtrace_silencers.rb
│   │   ├── content_security_policy.rb
│   │   ├── cookies_serializer.rb
│   │   ├── filter_parameter_logging.rb
│   │   ├── inflections.rb
│   │   ├── mime_types.rb
│   │   ├── new_framework_defaults_7_1.rb
│   │   ├── permissions_policy.rb
│   │   └── wrap_parameters.rb
│   ├── locales/
│   │   └── en.yml
│   ├── puma.rb
│   ├── routes.rb
│   ├── spring.rb
│   ├── storage.yml
│   ├── webpack/
│   │   ├── development.js
│   │   ├── environment.js
│   │   ├── production.js
│   │   └── test.js
│   └── webpacker.yml
├── config.ru
├── db/
│   ├── cable_migrate/
│   │   ├── 20250529140703_create_solid_cable_message.solid_cable.rb
│   │   └── 20250529140704_index_channels.solid_cable.rb
│   ├── cable_schema.rb
│   ├── schema.rb
│   └── seeds.rb
├── lib/
│   ├── assets/
│   │   └── .keep
│   └── tasks/
│       └── .keep
├── log/
│   └── .keep
├── package.json
├── postcss.config.js
├── public/
│   ├── 404.html
│   ├── 422.html
│   ├── 500.html
│   └── robots.txt
├── storage/
│   └── .keep
├── test/
│   ├── application_system_test_case.rb
│   ├── channels/
│   │   └── application_cable/
│   │       └── connection_test.rb
│   ├── controllers/
│   │   └── .keep
│   ├── fixtures/
│   │   └── files/
│   │       └── .keep
│   ├── helpers/
│   │   └── .keep
│   ├── integration/
│   │   └── .keep
│   ├── mailers/
│   │   └── .keep
│   ├── models/
│   │   └── .keep
│   ├── system/
│   │   └── .keep
│   └── test_helper.rb
├── tmp/
│   └── .keep
└── vendor/
    ├── .keep
    └── javascript/
        └── .keep

================================================
FILE CONTENTS
================================================

================================================
FILE: .browserslistrc
================================================
defaults


================================================
FILE: .gitattributes
================================================
# See https://git-scm.com/docs/gitattributes for more about git attribute files.

# Mark the database schema as having been generated.
db/schema.rb linguist-generated

# Mark the yarn lockfile as having been generated.
yarn.lock linguist-generated

# Mark any vendored files as having been vendored.
vendor/* linguist-vendored


================================================
FILE: .gitignore
================================================
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
#   git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle

# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-*

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep

# Ignore uploaded files in development.
/storage/*
!/storage/.keep

/public/assets
.byebug_history

# Ignore master key for decrypting credentials and more.
/config/master.key

/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity


================================================
FILE: .ruby-version
================================================
3.2.2


================================================
FILE: .semaphore/main-deploy.yml
================================================
version: v1.0
name: main-deploy
agent:
  machine:
    type: e1-standard-2
    os_image: ubuntu2004

blocks:
  - name: main-deploy
    task:
      secrets:
        - name: heroku-http
      env_vars:
        - name: HEROKU_APP_NAME
          value: turbo-showcase
      jobs:
        - name: main-deploy
          commands:
            - checkout --use-cache
            - heroku git:remote -a $HEROKU_APP_NAME
            - git push heroku -f $SEMAPHORE_GIT_BRANCH:main


================================================
FILE: .semaphore/semaphore.yml
================================================
version: v1.0
name: main-deploy
agent:
  machine:
    type: e2-standard-2
    os_image: ubuntu2204

blocks:
  - name: main-deploy
    task:
      secrets:
        - name: turbo-showcase
        - name: hetzner
      env_vars:
        - name: DOKKU_APP_NAME
          value: turbo-showcase
      jobs:
        - name: main-deploy
          commands:
            - checkout --use-cache
            - git remote add dokku ssh://dokku@$DOKKU_SERVER_IP:22/$DOKKU_APP_NAME
            - chmod 600 /home/semaphore/.ssh/hetzner-github.key
            - GIT_SSH_COMMAND="ssh -i /home/semaphore/.ssh/hetzner-github.key -o StrictHostKeyChecking=no" git push dokku -f $SEMAPHORE_GIT_BRANCH:main


================================================
FILE: Gemfile
================================================
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby File.read(File.join(__dir__, ".ruby-version"))

gem "rails", "~> 7.1.0"
gem "sqlite3"
gem "solid_cable"

gem "puma"

gem "bootstrap"
gem "dartsass-sprockets"
gem "view_component"
gem "kaminari"
gem "bootstrap4-kaminari-views"
gem "importmap-rails"
gem "turbo-rails"
gem "stimulus-rails"

gem "method_source"

gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem "bootsnap", require: false

group :development, :test do
  gem "byebug", platforms: [:mri, :mingw, :x64_mingw]
  gem "standard"
end

group :development do
  gem "web-console", ">= 4.1.0"
  gem "listen", "~> 3.3"
end

group :test do
  gem "capybara", ">= 3.26"
  gem "selenium-webdriver"
  gem "webdrivers"
end

group :production do
  gem "appsignal"
end


================================================
FILE: README.md
================================================
# Turbo Showcase

This project contains the source code of https://turbo-showcase.renuoapp.ch.

Here you can look how stuff has been implemented and copy-paste it in your project.

At [Renuo](https://renuo.ch) we use it as kitchen sink and cheatsheet for everything that we did with Turbo and Stimulus.

We will progressively enhance and add more examples and components while we discover more.

You are also encouraged to do so and open Pull Request to provide more examples or Issues to ask for ones.

## Training

If you want to do the Training follow these steps:
1. Clone the repository
2. Run `bin/setup` to install dependencies
3. Run the project locally with `bin/rails server`
4. Open your browser and go to `http://turbo-showcase.localhost:3000/training`

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/renuo/turbo-showcase.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).


================================================
FILE: Rakefile
================================================
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require_relative "config/application"

Rails.application.load_tasks


================================================
FILE: app/assets/config/manifest.js
================================================
//= link_tree ../images
//= link_directory ../stylesheets .css
//= link_tree ../../javascript .js
//= link_tree ../../../vendor/javascript .js


================================================
FILE: app/assets/images/.keep
================================================


================================================
FILE: app/assets/stylesheets/application.scss
================================================
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *
 *= require_tree .
 *= require_self
 */

@import "bootstrap";

$renuo-green: #27d79d;

.renuo-green {
  color: $renuo-green;
}

turbo-frame {
  border: 3px dotted green;

  &.flexible {
    min-height: 100px;
    display: flex;
    padding: 1em;
  }
}

.fixed-height {
  height: 10em;
}

dl {
  display: flex;
  flex-wrap: wrap;
}

dt {
  vertical-align: middle;
  font-weight: normal !important;
  width: 30%;
}

dd {
  vertical-align: middle;
  font-weight: bold;
  width: 70%;
}

.fake-link {
  display: inline;
  cursor: pointer;

  .read-field {
    transition: box-shadow 150ms ease-in 0ms;
    border-radius: 2.01px;
    padding: 2px 5px 2px 0;
    display: inline;

    span {
      border-bottom: 1px dashed;
    }

    .edit-icon {
      transition: opacity 150ms ease-in 0ms;
      opacity: 0;
    }

    &:hover {
      box-shadow: 0 0 0 1px #ccc;

      .edit-icon {
        opacity: 1;
      }
    }
  }
}

.editable-input {
  vertical-align: top;
  display: inline-block;
  width: auto;
  white-space: normal;
  zoom: 1;
}

.editable-buttons {
  display: inline-block;
  vertical-align: top;
  margin-left: 7px;
  zoom: 1;
}

.btn-toggle-nav a {
  display: inline-flex;
  padding: 0.1875rem 0.5rem;
  margin-top: 0.125rem;
  margin-left: 1.25rem;
  text-decoration: none;
}

button {
  .show-when-disabled {
    display: none;
  }

  &[disabled] {
    .show-when-disabled {
      display: inline;
    }
  }

  .show-when-enabled {
    display: initial;
  }

  &[disabled] {
    .show-when-enabled {
      display: none;
    }
  }
}

body {
  font-size: 18px !important;
  min-height: 100%;
}

main {
  height: calc(100% - 60px);
}

.footer {
  background-color: #f6f6f6;
}


================================================
FILE: app/channels/application_cable/channel.rb
================================================
module ApplicationCable
  class Channel < ActionCable::Channel::Base
  end
end


================================================
FILE: app/channels/application_cable/connection.rb
================================================
module ApplicationCable
  class Connection < ActionCable::Connection::Base
  end
end


================================================
FILE: app/components/editable_field_component.html.erb
================================================
<%= turbo_frame_tag(frame_tag_id) do %>
  <% if can_edit? %>
    <div class="fake-link editable" data-controller="editable-field"
         data-editable-field-type="text"
         data-editable-field-value=<%= @model.public_send(@attribute) %>>
      <div class="read-field" data-action="click->editable-field#click" data-target="editable-field.readContainer">
        <span><%= display_value %></span>
        <i class="fas fa-edit ms-2 edit-icon"></i>
      </div>
      <div class="editable-container editable-inline" data-target="editable-field.writeContainer" style="display:none">
        <%= form_for @model, url: '/inline_form_submission', data: { target: 'editable-field.form' }, html: { class: 'd-inline' } do |f| %>
          <div class="form-group d-inline">
            <div class="editable-input" style="position: relative;">
              <%= f.text_field @attribute, data: { target: 'editable-field.input' }, class: 'form-control form-control-sm' %>
            </div>
            <div class="editable-buttons">
              <button class="btn btn-outline-primary btn-sm btn-xs" type="submit" data-disable-with="<%= spinner %>">
                <i class="fas fa-check fa-fw"></i>
              </button>
              <button class="btn btn-outline-secondary btn-sm btn-xs ms-1" data-action="click->editable-field#cancel" type="button">
                <i class="fas fa-times fa-fw"></i>
              </button>
            </div>
          </div>
        <% end %>
      </div>
    </div>
  <% else %>>
    <%= display_value %>
  <% end %>
<% end %>


================================================
FILE: app/components/editable_field_component.rb
================================================
class EditableFieldComponent < ViewComponent::Base
  include Turbo::FramesHelper
  include ActiveModel::AttributeAssignment

  attr_accessor :model, :attribute

  def initialize(attributes = {})
    super()
    assign_attributes(attributes) if attributes
  end

  def display_value
    @model.public_send(@attribute).presence || '<div class="text-muted">-</div>'.html_safe
  end

  def frame_tag_id
    "frame-#{dom_id(@model)}-#{@attribute}"
  end

  def can_edit?
    true
    # your logic. we use cancancan with `helpers.can? :update, @model`
  end

  def spinner
    '<i class="fas fa-spinner fa-spin"></i>'
  end
end


================================================
FILE: app/controllers/application_controller.rb
================================================
class ApplicationController < ActionController::Base
end


================================================
FILE: app/controllers/concerns/.keep
================================================


================================================
FILE: app/controllers/home_controller.rb
================================================
class HomeController < ApplicationController
  def show
  end

  def frames
  end

  def slow
  end

  def pagination
    @elements = Kaminari.paginate_array((0...36).map { |i| i.to_s 36 }).page(params[:page]).per(5)
  end

  def forms
    # https://www.youtube.com/watch?v=TBHKeRWKqN8
    @user = User.new(first_name: "Dino", last_name: "Megazord")
  end

  # we return some HTML that contains a turbo-frame with id 'update-me'
  def replace_update_me
  end

  def navigate_away
  end

  # we return some HTML that contains a turbo-frame with id 'external-frame'
  def replace_external_frame
  end

  # we return some HTML that contains a turbo-frame with id 'form-frame'
  def replace_form_frame
  end

  def slow_frame
    sleep 5
  end

  def inline_fields
    @user = User.new(first_name: "Dino", last_name: "Megazord")
  end

  def refresh_stream_title
    Turbo::StreamsChannel.broadcast_action_to("stream-id", action: :update,
      target: "stream-title",
      content: "Here is a random number: #{rand(1..100)}")
  end

  # here we save some content and then redirect back to the root page
  def form_submission
    # save stuff...
    sleep 0.5
    @user = User.new(first_name: params[:user][:first_name], last_name: params[:user][:last_name])
    Turbo::StreamsChannel.broadcast_append_to("users", target: "stream-list", html: "<li>#{params[:user][:first_name]} #{params[:user][:last_name]}</li>")
    render "forms"
  end

  def issues
    @user = User.new
  end

  def form_get_submission
    # save stuff...
    sleep 2
    @user = User.new
    render "issues"
  end

  def inline_form_submission
    # save stuff...
    sleep 1
    @user = User.new(first_name: params[:user][:first_name], last_name: params[:user][:last_name])
    render "inline_fields"
  end
end


================================================
FILE: app/controllers/letters_controller.rb
================================================
class LettersController < ApplicationController
  def show
    @letter = params[:letter]
  end

  def slow
    sleep 5
    @letter = params[:letter]
    render :show
  end
end


================================================
FILE: app/controllers/training_controller.rb
================================================
class TrainingController < ApplicationController
  def instructions
    @elements = (0...36).map { |i| i.to_s 36 }
    @user = User.new(first_name: "Dino", last_name: "Megazord")
  end

  def show
  end
end


================================================
FILE: app/helpers/application_helper.rb
================================================
module ApplicationHelper
  def spinner
    raw_spinner.html_safe
  end

  def raw_spinner
    '<span class="show-when-disabled"><i class="fas fa-spinner fa-spin"></i></span>'
  end
end


================================================
FILE: app/javascript/application.js
================================================
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails

import "@hotwired/turbo-rails"
import "controllers"
import "popper"
import "bootstrap"



================================================
FILE: app/javascript/controllers/application.js
================================================
import { Application } from "@hotwired/stimulus"

const application = Application.start()

// Configure Stimulus development experience
application.debug = false
window.Stimulus = application

export { application }


================================================
FILE: app/javascript/controllers/editable_field_controller.js
================================================
import { Controller } from "@hotwired/stimulus"

export default class extends Controller {
  static get targets() {
    return ['readContainer', 'writeContainer', 'form', 'input'];
  }

  connect() {
    this.type = this.data.get('type');
    this.value = this.data.get('value');

    this.formTarget.addEventListener('ajax:success', (event, data) => {
      this.readContainerTarget.textContent = this.inputTarget.value;
      this.cancel();
    });

    this.formTarget.addEventListener('ajax:error', (event, data) => {
      this.inputTarget.value = this.readContainerTarget.textContent;
      this.cancel();
    });
  }

  click() {
    this._show(this.writeContainerTarget);
    if (this.hasInputTarget) {
      this.inputTarget.focus();
    }
    this._hide(this.readContainerTarget);
  }

  cancel() {
    this._show(this.readContainerTarget);
    this._hide(this.writeContainerTarget);
  }

  _show(field, mode = 'inline') {
    field.style.setProperty('display', mode, 'important');
  }

  _hide(field) {
    field.style.setProperty('display', 'none', 'important');
  }
}


================================================
FILE: app/javascript/controllers/hello_controller.js
================================================
import { Controller } from "@hotwired/stimulus"

export default class extends Controller {
  connect() {
    this.element.textContent = "Hello World!"
  }
}


================================================
FILE: app/javascript/controllers/index.js
================================================
// Import and register all your controllers from the importmap under controllers/*

import { application } from "controllers/application"

// Eager load all controllers defined in the import map under controllers/**/*_controller
import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
eagerLoadControllersFrom("controllers", application)

// Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
// import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
// lazyLoadControllersFrom("controllers", application)


================================================
FILE: app/javascript/controllers/url_updating_frame_controller.js
================================================
import { Controller } from "@hotwired/stimulus"
import { Turbo } from '@hotwired/turbo-rails';

// this controller allows to update the URL even if only a frame content changed.
// this behaviour is currently not supported by turbo. see https://github.com/hotwired/turbo/issues/50

export default class extends Controller {
  connect() {
    this.observer = new MutationObserver((mutationsList) => {
      mutationsList.forEach((mutation) => {
        if (mutation.type === 'attributes' && mutation.attributeName === 'src') {
          window.history.pushState({ turbo_frame_history: true }, '', this.element.getAttribute('src'));
        }
      });
    });

    this.observer.observe(this.element, { attributes: true });

    this.popStateListener = ((event) => {
      if (event.state.turbo_frame_history) {
        Turbo.visit(window.location.href, { action: 'replace' });
      }
    });

    window.addEventListener('popstate', this.popStateListener);
  }

  disconnect() {
    this.observer.disconnect();
    window.removeEventListener('popstate', this.popStateListener);
  }
}


================================================
FILE: app/jobs/application_job.rb
================================================
class ApplicationJob < ActiveJob::Base
  # Automatically retry jobs that encountered a deadlock
  # retry_on ActiveRecord::Deadlocked

  # Most jobs are safe to ignore if the underlying records are no longer available
  # discard_on ActiveJob::DeserializationError
end


================================================
FILE: app/mailers/application_mailer.rb
================================================
class ApplicationMailer < ActionMailer::Base
  default from: "from@example.com"
  layout "mailer"
end


================================================
FILE: app/models/application_record.rb
================================================
class ApplicationRecord < ActiveRecord::Base
  self.abstract_class = true
end


================================================
FILE: app/models/concerns/.keep
================================================


================================================
FILE: app/models/user.rb
================================================
class User
  include ActiveModel::Model

  attr_accessor :first_name, :last_name
end


================================================
FILE: app/views/home/forms.html.erb
================================================
<h1><i class="fas fa-keyboard renuo-green"></i> Forms</h1>
<%= turbo_frame_tag 'form-frame', class: 'flexible flex-column' do %>
  <p>
    The controller will elaborate this submission as TURBO_STREAM.
    After submission, the controller will re-render the <code>form_frame</code> partial.
    Check the controller implementation.
    <strong><%= @user.first_name %> <%= @user.last_name %></strong>
  </p>
  <%= form_for @user, url: '/form_submission', remote: true do |f| %>
    <div class="mb-3">
      <%= f.text_field :first_name, placeholder: 'First name', class: 'form-control' %>
    </div>
    <div class="mb-3">
      <%= f.text_field :last_name, placeholder: 'Last name', class: 'form-control' %>
    </div>
    <div class="mb-3">
      <%= f.button class: 'btn btn-primary' do %>
        <%=spinner %>
        <span class="show-when-enabled">Submit</span>
      <% end %>
    </div>
  <% end %>
<% end %>

<%= turbo_stream_from 'users' %>
<div>
  <h2>Users list</h2>
  <ul id="stream-list">
  </ul>
</div>


================================================
FILE: app/views/home/frames.html.erb
================================================

<h1> <i class="fas fa-route renuo-green"></i> Navigation</h1>
<p>
  Let's start by learning basic turbo frame navigation.
  Please refer to the <a href="https://turbo.hotwire.dev/handbook/frames" target="_blank">Turbo Handbook</a> for more information.
</p>
<p>
  Knowing how to navigate with Turbo frames is the first step to building a Turbo application.
</p>

<h2 class="mt-5">Basic frame navigation</h2>

<%= turbo_frame_tag 'update-me', class: 'flexible flex-column' do %>
  <a href="/replace_update_me" class="btn btn-primary m-3">
    Replace only the content of this turbo-frame
  </a>
  <a href="/home/replace_whole_page" class="btn btn-primary m-3" data-turbo-frame="_top">
    Reload the whole page with `data-turbo-frame: '_top'`
  </a>
  <a href="/home/replace_whole_page" class="btn btn-primary m-3" target="_top">
    Reload the whole page with `target: '_top'`
  </a>

  <%= turbo_frame_tag 'target-top', target: '_top', class: 'flexible m-3' do %>
    <a href="/home/replace_whole_page" class="btn btn-primary m-3">
      Reload the whole page when the nearest wrapping turbo-frame has `target: '_top'`
    </a>
  <% end %>
<% end %>

<h2 class="mt-5">External frame navigation</h2>

<div class="row">
  <div class="col-md-6">
    <%= turbo_frame_tag 'update-external', class: 'flexible flex-column' do %>
      <p>
        You can also replace the content of another frame
      </p>

      <a href="/replace_external_frame" class="btn btn-primary m-3" data-turbo-frame="external-frame">
        Reload the content of `external-frame`
      </a>
    <% end %>
  </div>
  <div class="col-md-6">
    <%= turbo_frame_tag 'external-frame', class: 'flexible flex-column' do %>
      Hi 👋. I am called external-frame because my content gets replaced by some other frames.
      Somewhere there's a button that is able to replace my content. Look for it.
    <% end %>
  </div>
</div>


================================================
FILE: app/views/home/inline_fields.html.erb
================================================
<h1><i class="fas fa-barcode renuo-green"></i> Inline fields</h1>
<p>
  This is one of the first components we realised with Turbo + Stimulus.
  Here we provide to you a very minimized version of it, working only with text fields.
  Of course, we use a <a href="https://github.com/github/view_component">ViewComponent</a> for that. ❤️
</p>
<dl>
  <dt> <%= User.human_attribute_name(:first_name) %></dt>
  <dd> <%= render EditableFieldComponent.new(model: @user, attribute: :first_name) %></dd>
  <dt> <%= User.human_attribute_name(:last_name) %></dt>
  <dd> <%= render EditableFieldComponent.new(model: @user, attribute: :last_name) %></dd>
</dl>


================================================
FILE: app/views/home/issues.html.erb
================================================
<%= turbo_frame_tag 'form-frame', class: 'flexible flex-column' do %>
  <h5>Form with method GET</h5>

  <p>
    The data-disable-with does not work
  </p>
  <%= form_for @user, url: '/form_get_submission', method: :get do |f| %>
    <%= f.button 'Submit this form', class: 'btn btn-primary', data: { disable_with: spinner } %>
  <% end %>
<% end %>
<br><br>
<%= turbo_frame_tag 'form-frame', class: 'flexible flex-column' do %>
  <h5>Form with method POST</h5>

  <p>
    Same same but with POST
  </p>
  <%= form_for @user, url: '/form_get_submission', method: :post do |f| %>
    <%= f.button 'Submit this form', class: 'btn btn-primary', data: { disable_with: spinner } %>
  <% end %>
<% end %>


================================================
FILE: app/views/home/navigate_away.html.erb
================================================
<p>Now <%= link_to 'go back', :back%> and the pagination of the table will be persisted.</p>


================================================
FILE: app/views/home/pagination.html.erb
================================================
<h1><i class="fas fa-copy renuo-green"></i> Pagination</h1>

<%= turbo_frame_tag 'pagination-frame', data: { controller: 'url-updating-frame' }, class: 'flexible flex-column' do %>
  <p>
    I am a special frame: when my content is replaced, <strong>also the URL of the page is updated</strong>.
  </p>
  <p>
    This is not the default behaviour so, in order to do that, I need a
    <a href="https://github.com/renuo/turbo-showcase/blob/main/app/javascript/controllers/url_updating_frame_controller.js" target="_blank">stimulus
      controller</a>
    attached.
  </p>
  <p>
    This is particularly useful when paginating content, because now you can
    <a href="/navigate_away" target="_top">navigate away</a> and come back,
    and keep the pagination.
  </p>
  <table class="table table-striped">
    <% @elements.each do |el| %>
      <tr>
        <td><%= el %></td>
      </tr>
    <% end %>
  </table>
  <%= paginate @elements, theme: 'twitter-bootstrap-4', window: 2 %>
<% end %>


================================================
FILE: app/views/home/replace_external_frame.html.erb
================================================
<%= turbo_frame_tag 'external-frame' do %>
  I got replaced. I can reload the previous content by simply calling the root page.
  <a href="/frames" class="btn btn-primary">Restore original content</a>

  of course I can also replace the content of another frame!

  <a href="/replace_form_frame" class="btn btn-primary" data-turbo-frame="update-external">
    Replace the content of the form-frame
  </a>
<% end %>


================================================
FILE: app/views/home/replace_form_frame.html.erb
================================================
<%= turbo_frame_tag 'update-external' do %>
  And PUF! The form has disappeared!
  <a href="/frames">Restore it, please</a>
<% end %>


================================================
FILE: app/views/home/replace_update_me.html.erb
================================================
<%= turbo_frame_tag 'update-me' do %>
  I got replaced. I can reload the previous content by simply calling the root page.
  <a href="/frames" class="btn btn-primary">Restore original content</a>
<% end %>


================================================
FILE: app/views/home/replace_whole_page.html.erb
================================================
<p>
You see? Also the Browser URL has been updated.
</p>
<p>
This is one of the multiple options you have to replace the whole page.
</p>
<p>
But you have to choose one, otherwise only the content of the nearest frame is replaced.
</p>
<%=link_to 'Go back', :back %>


================================================
FILE: app/views/home/show.html.erb
================================================
<h1> Hello 👋, welcome to Turbo Showcase <i class="fas fa-rocket renuo-green"></i></h1>
<p class="mt-5">
  This is a <a href="https://turbo.hotwire.dev" target="_blank">Turbo</a> kitchen sink.
  We provide some Open Sourced example of what you can do with Turbo, with some explanations and links to help you.
</p>
<p>
  We highlighted all the turbo-frames with a green dotted border to make it uglier.
</p>
<p>
  You can inspect the source code of this page, and/or visit
  <a href="https://github.com/renuo/turbo-showcase" target="_blank">https://github.com/renuo/turbo-showcase</a>
  to see how we implemented stuff here.
</p>
<p>
  If you want to train yourself in using Turbo, we have a
  <%=link_to 'Training session', training_path %>
  where you can exercise. <i class="fas fa-dumbbell renuo-green"></i>
</p>
<p>
  Don't forget to give it a ⭐️
</p>
<a class="github-button" href="https://github.com/renuo/turbo-showcase" data-size="large" data-show-count="true" aria-label="Star renuo/turbo-showcase on GitHub">Star</a>
<div class="mb-3"></div>


================================================
FILE: app/views/home/slow.html.erb
================================================
<h1><i class="fas fa-clock renuo-green"></i> Slow frame</h1>
<p>
  Loading frame content asynchronously. You can do so by setting the `src` property of the turbo-frame tag.
  This frame will take 5 seconds to load.
</p>
<%= turbo_frame_tag 'slow-frame', src: '/slow_frame', class: 'flexible flex-column fixed-height' do %>

  <div class="text-center"><i class="fas fa-spinner fa-spin fa-3x"></i></div>
<% end %>


================================================
FILE: app/views/home/slow_frame.html.erb
================================================
<%= turbo_frame_tag 'slow-frame' do %>
  This took quite long! That's why it was loaded asynchronously.
  <div class="text-center"><i class="fas fa-check fa-3x"></i></div>
<% end %>


================================================
FILE: app/views/home/streams.html.erb
================================================
<h1><i class="fas fa-water renuo-green"></i> Streams</h1>

<div class="alert alert-warning">
  <i class="fas fa-exclamation-triangle"></i>
  <strong>Warning!</strong>
  Turbo Streams do not work with the ActionCable async adapter.
  Make sure you are using the Redis adapter by editing your cable.yml file.
</div>

<p>It's time to look at our first turbo-stream example.</p>
<p>
  We will use the
  <a href="https://github.com/hotwired/turbo-rails/blob/main/app/channels/turbo/streams_channel.rb" target="_blank">Turbo::StreamsChannel</a>
  API to show how this works rather than
  the
  <a href="https://github.com/hotwired/turbo-rails/blob/main/app/models/concerns/turbo/broadcastable.rb" target="_blank">Turbo::Broadcastable</a>
  concern which adds a further layer of complexity to the whole story.
</p>

<%= turbo_stream_from 'stream-id' %>
<%= turbo_frame_tag 'stream-title', class: 'flexible align-items-center justify-content-center' do %>
  I have some content
<% end %>

<p>
  The link below, will update the content above by using an ActionCable stream.
</p>
<p>
  Check the implementation in the
  <a href="https://github.com/renuo/turbo-showcase/blob/main/app/controllers/home_controller.rb#L43">#refresh_stream_title</a> action
  and <a href="https://github.com/renuo/turbo-showcase/blob/main/app/views/home/streams.html.erb#L12">the streams HTML page</a>.
</p>
<p>
  If you open multiple tabs, you will see that the content is replaced in all the tabs.
</p>
<p>
  🤫 If the number is changing, it means that someone else is refreshing it right now.
</p>

<%= button_to 'Click me', '/refresh_stream_title', remote: true, method: :post, class: 'btn btn-primary' %>



================================================
FILE: app/views/layouts/application.html.erb
================================================
<!DOCTYPE html>
<html class="h-100">
<head>
  <title>Turbo Showcase</title>
  <meta name="viewport" content="width=device-width,initial-scale=1">

  <%= csrf_meta_tags %>
  <%= csp_meta_tag %>

  <script src='https://kit.fontawesome.com/b63ecb5b6f.js' crossorigin='anonymous' defer='true'></script>
  <%= stylesheet_link_tag 'application', media: 'all', 'data-turbo-track': 'reload' %>
  <%= javascript_importmap_tags %>
</head>

<body class="d-flex flex-column">
<main class="d-flex flex-shrink-0">
  <div class="d-flex flex-column flex-shrink-0 p-3 bg-light h-100" style="width: 280px;">
    <a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto link-dark text-decoration-none">
    <span class="fs-4">
      <i class="fas fa-rocket renuo-green me-2"></i>
      Turbo Showcase
    </span>
    </a>
    <hr>
    <ul class="nav nav-pills flex-column mb-auto">
      <li class="nav-item">
        <a href="<%=root_path %>" class="nav-link link-dark <%=class_names(active: current_page?(root_path)) %>">
          <i class="fas fa-fw fa-home renuo-green"></i>
          Home
        </a>
      </li>
      <li class="nav-item">
        <a href="<%=frames_path %>" class="nav-link link-dark <%=class_names(active: current_page?(frames_path)) %>">
          <i class="fas fa-fw fa-route renuo-green"></i>
          Navigation
        </a>
      </li>
      <li class="nav-item">
        <a href="<%=slow_path %>" class="nav-link link-dark <%=class_names(active: current_page?(slow_path)) %>">
          <i class="fas fa-fw fa-clock renuo-green"></i>
          Slow frame
        </a>
      </li>
      <li class="nav-item">
        <a href="<%=pagination_path %>" class="nav-link link-dark <%=class_names(active: current_page?(pagination_path)) %>">
          <i class="fas fa-fw fa-copy renuo-green"></i>
          Pagination
        </a>
      </li>
      <li class="nav-item">
        <a href="<%=forms_path %>" class="nav-link link-dark <%=class_names(active: current_page?(forms_path)) %>">
          <i class="fas fa-fw fa-keyboard renuo-green"></i>
          Forms
        </a>
      </li>
      <li class="nav-item">
        <a href="<%=inline_fields_path %>" class="nav-link link-dark <%=class_names(active: current_page?(inline_fields_path)) %>">
          <i class="fas fa-fw fa-barcode renuo-green"></i>
          Inline fields
        </a>
      </li>
      <li class="nav-item">
        <a href="<%=streams_path %>" class="nav-link link-dark <%=class_names(active: current_page?(streams_path)) %>">
          <i class="fas fa-fw fa-water renuo-green"></i>
          Streams
        </a>
      </li>
      <hr>
      <li>
        <a href="<%=training_instructions_path %>" class="nav-link  link-dark <%=class_names(active: current_page?(training_instructions_path)) %>">
          <i class="fas fa-fw fa-dumbbell renuo-green"></i>
          Training
        </a>
      </li>
    </ul>
    <hr>
  </div>
  <div class="container mb-5 mt-5">
    <%= yield %>
  </div>
</main>

<div class="footer mt-auto py-3">
  <div class="container">
    This showcase has been realised by <a href="https://github.com/coorasse">Alessandro Rodi</a> and offered to you by
    <a href="https://renuo.ch">Renuo AG</a>.
  </div>
</div>
<script async defer src="https://buttons.github.io/buttons.js" data-turbo-track="reload"></script>
</body>
</html>


================================================
FILE: app/views/layouts/mailer.html.erb
================================================
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style>
      /* Email styles need to be inline */
    </style>
  </head>

  <body>
    <%= yield %>
  </body>
</html>


================================================
FILE: app/views/layouts/mailer.text.erb
================================================
<%= yield %>


================================================
FILE: app/views/letters/show.html.erb
================================================
<div style="font-size: 10rem"><%=@letter%></div>
<%=link_to "Nice letter. Go back", :back, class: 'btn btn-primary' %>


================================================
FILE: app/views/training/instructions.html.erb
================================================
<h1> Hello 👋, welcome to Turbo Training <i class="fas fa-dumbbell renuo-green"></i></h1>
<p>
  This is a <a href="https://turbo.hotwire.dev" target="_blank">Turbo</a> Training page.
  Each section will contain an exercise to solve using Turbo. It will progress in difficulty.
</p>
<p>
  The <a href="/">Homepage of the showcase</a> already provides you the solutions to most of these exercises.
  Don't look at them if you want to learn something...
</p>
<p>
  Start by cloning this repository and run it locally. <a href="https://github.com/renuo/turbo-showcase" target="_blank">Find the instructions on GitHub</a>
</p>
<p>
  All <code>turbo-frame</code> tags have an ugly dotted border so you can always see them.
</p>
<p>
  Have fun and don't forget to give it a ⭐️
</p>

<a class="github-button" href="https://github.com/renuo/turbo-showcase" data-size="large" data-show-count="true" aria-label="Star renuo/turbo-showcase on GitHub">Star</a>

<div class="mb-3"></div>

<div class="row">
  <div class="col-12">
    <div class="card mb-3">
      <div class="card-header">
        <h5>1. Frame 'update-me'</h5>
      </div>
      <div class="card-body">
        <code>
          In this exercise you need to implement a simple link that refreshes only the content of the
          frame in which is contained. The link displayes a page with a simple message "I got replaced.".
        </code>
        <video controls width="100%">
          <source src="/videos/exercise1.mp4" type="video/mp4">
        </video>
      </div>
    </div>
  </div>
</div>

<div class="row">
  <div class="col-12">
    <div class="card mb-3">
      <div class="card-header">
        <h5>2. Frame 'update-me' and back</h5>
      </div>
      <div class="card-body">
        <code>
          This exercise extends the previous one and gives the possibility to "go back".
          Once the frame is replaced, next to the "I got replaced message", there's a link that allows to go back,
          and see the video again.
        </code>
        <video controls width="100%">
          <source src="/videos/exercise2.mp4" type="video/mp4">
        </video>
      </div>
    </div>
  </div>
</div>

<div class="row">
  <div class="col-6">
    <div class="card mb-3">
      <div class="card-header">
        <h5>3. The external frame</h5>
      </div>
      <div class="card-body">
        <code>
          Implement a button that replaces the content of the frame on the right
        </code>
        <video controls width="100%">
          <source src="/videos/exercise3.mp4" type="video/mp4">
        </video>
      </div>
    </div>
  </div>
  <div class="col-6">
    <div class="card mb-3">
      <div class="card-header">
        <h5>Replace me</h5>
      </div>
      <div class="card-body">
        <turbo-frame id="replace_me_3">
          Do something to replace my content
        </turbo-frame>
      </div>
    </div>
  </div>
</div>

<div class="row">
  <div class="col-12">
    <div class="card mb-3">
      <div class="card-header">
        <h5>4. Pagination</h5>
      </div>
      <div class="card-body">
        <code>
          Quite boring right? Let's implement something useful. There are some @elements available in this page.
          This exercise consists in paginating them and also allow to click on them. When clicked they of course
          "escape the frame" and open on a new page.<br>
          You can paginate the array with:<br>
          @elements = Kaminari.paginate_array(@elements).page(params[:page]).per(5)<br>
          in the controller and use<br>
          paginate @elements, theme: 'twitter-bootstrap-4', window: 2<br>
          in the view.
        </code>
        <table class="table table-striped">
          <% @elements.each do |el| %>
            <tr>
              <td><a href="/letters/<%=el %>"><%= el %></a></td>
            </tr>
          <% end %>
        </table>
      </div>
    </div>
  </div>
</div>

<div class="row">
  <div class="col-12">
    <div class="card mb-3">
      <div class="card-header">
        <h5>5. Forms</h5>
      </div>
      <div class="card-body">
        <code>
          In this exercise you need to replace the name displayed, after submitting the form, without refreshing.
        </code>
        <video controls width="100%">
          <source src="/videos/exercise5.mp4" type="video/mp4">
        </video>
      </div>
    </div>
  </div>
</div>

<div class="row">
  <div class="col-12">
    <div class="card mb-3">
      <div class="card-header">
        <h5>6. Frames eager and lazy loading</h5>
      </div>
      <div class="card-body">
        <code>
          There's a frame here. Make it load the page /letters/a/slow both with eager and lazy loading.
          Bonus point if you display a loading indicator.<br>
          Bonus point if you actually display the content of the page... ;)
        </code>
        <turbo-frame id="to-be-defined"/>
      </div>
    </div>
  </div>
</div>


================================================
FILE: app/views/training/show.html.erb
================================================
<p>This is your training page...there's a code boilerplate to start with the first exercise:</p>

<code>
<pre>
  <code>
    &lt;turbo-frame id="update-me"&gt;
      &lt;h1&gt;This is the frame that will be replaced&lt;/h1&gt;
      &lt;a href="a_new_action_in_the_training_controller"&gt;Replace only the content of this turbo frame&lt;/a&gt;
    &lt;/turbo-frame&gt;
  </code>
</code>


================================================
FILE: babel.config.js
================================================
module.exports = function(api) {
  var validEnv = ['development', 'test', 'production']
  var currentEnv = api.env()
  var isDevelopmentEnv = api.env('development')
  var isProductionEnv = api.env('production')
  var isTestEnv = api.env('test')

  if (!validEnv.includes(currentEnv)) {
    throw new Error(
      'Please specify a valid `NODE_ENV` or ' +
        '`BABEL_ENV` environment variables. Valid values are "development", ' +
        '"test", and "production". Instead, received: ' +
        JSON.stringify(currentEnv) +
        '.'
    )
  }

  return {
    presets: [
      isTestEnv && [
        '@babel/preset-env',
        {
          targets: {
            node: 'current'
          }
        }
      ],
      (isProductionEnv || isDevelopmentEnv) && [
        '@babel/preset-env',
        {
          forceAllTransforms: true,
          useBuiltIns: 'entry',
          corejs: 3,
          modules: false,
          exclude: ['transform-typeof-symbol']
        }
      ]
    ].filter(Boolean),
    plugins: [
      'babel-plugin-macros',
      '@babel/plugin-syntax-dynamic-import',
      isTestEnv && 'babel-plugin-dynamic-import-node',
      '@babel/plugin-transform-destructuring',
      [
        '@babel/plugin-proposal-class-properties',
        {
          loose: true
        }
      ],
      [
        '@babel/plugin-proposal-object-rest-spread',
        {
          useBuiltIns: true
        }
      ],
      [
        '@babel/plugin-transform-runtime',
        {
          helpers: false
        }
      ],
      [
        '@babel/plugin-transform-regenerator',
        {
          async: false
        }
      ]
    ].filter(Boolean)
  }
}


================================================
FILE: bin/bundle
================================================
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'bundle' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require "rubygems"

m = Module.new do
  module_function

  def invoked_as_script?
    File.expand_path($0) == File.expand_path(__FILE__)
  end

  def env_var_version
    ENV["BUNDLER_VERSION"]
  end

  def cli_arg_version
    return unless invoked_as_script? # don't want to hijack other binstubs
    return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
    bundler_version = nil
    update_index = nil
    ARGV.each_with_index do |a, i|
      if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
        bundler_version = a
      end
      next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
      bundler_version = $1
      update_index = i
    end
    bundler_version
  end

  def gemfile
    gemfile = ENV["BUNDLE_GEMFILE"]
    return gemfile if gemfile && !gemfile.empty?

    File.expand_path("../../Gemfile", __FILE__)
  end

  def lockfile
    lockfile =
      case File.basename(gemfile)
      when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
      else "#{gemfile}.lock"
      end
    File.expand_path(lockfile)
  end

  def lockfile_version
    return unless File.file?(lockfile)
    lockfile_contents = File.read(lockfile)
    return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
    Regexp.last_match(1)
  end

  def bundler_version
    @bundler_version ||=
      env_var_version || cli_arg_version ||
        lockfile_version
  end

  def bundler_requirement
    return "#{Gem::Requirement.default}.a" unless bundler_version

    bundler_gem_version = Gem::Version.new(bundler_version)

    requirement = bundler_gem_version.approximate_recommendation

    return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0")

    requirement += ".a" if bundler_gem_version.prerelease?

    requirement
  end

  def load_bundler!
    ENV["BUNDLE_GEMFILE"] ||= gemfile

    activate_bundler
  end

  def activate_bundler
    gem_error = activation_error_handling do
      gem "bundler", bundler_requirement
    end
    return if gem_error.nil?
    require_error = activation_error_handling do
      require "bundler/version"
    end
    return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
    warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
    exit 42
  end

  def activation_error_handling
    yield
    nil
  rescue StandardError, LoadError => e
    e
  end
end

m.load_bundler!

if m.invoked_as_script?
  load Gem.bin_path("bundler", "bundle")
end


================================================
FILE: bin/check
================================================
#!/bin/sh

bundle exec standardrb

================================================
FILE: bin/importmap
================================================
#!/usr/bin/env ruby

require_relative "../config/application"
require "importmap/commands"


================================================
FILE: bin/rails
================================================
#!/usr/bin/env ruby
APP_PATH = File.expand_path("../config/application", __dir__)
require_relative "../config/boot"
require "rails/commands"


================================================
FILE: bin/rake
================================================
#!/usr/bin/env ruby
require_relative "../config/boot"
require "rake"
Rake.application.run


================================================
FILE: bin/setup
================================================
#!/usr/bin/env ruby
require "fileutils"

# path to your application root.
APP_ROOT = File.expand_path("..", __dir__)

def system!(*args)
  system(*args) || abort("\n== Command #{args} failed ==")
end

FileUtils.chdir APP_ROOT do
  # This script is a way to set up or update your development environment automatically.
  # This script is idempotent, so that you can run it at any time and get an expectable outcome.
  # Add necessary setup steps to this file.

  puts "== Installing dependencies =="
  system! "gem install bundler --conservative"
  system("bundle check") || system!("bundle install")

  # Install JavaScript dependencies
  system! "bin/yarn"

  # puts "\n== Copying sample files =="
  # unless File.exist?("config/database.yml")
  #   FileUtils.cp "config/database.yml.sample", "config/database.yml"
  # end

  puts "\n== Preparing database =="
  system! "bin/rails db:prepare"

  puts "\n== Removing old logs and tempfiles =="
  system! "bin/rails log:clear tmp:clear"

  puts "\n== Restarting application server =="
  system! "bin/rails restart"
end


================================================
FILE: bin/spring
================================================
#!/usr/bin/env ruby
if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"])
  gem "bundler"
  require "bundler"

  # Load Spring without loading other gems in the Gemfile, for speed.
  Bundler.locked_gems.specs.find { |spec| spec.name == "spring" }&.tap do |spring|
    Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
    gem "spring", spring.version
    require "spring/binstub"
  rescue Gem::LoadError
    # Ignore when Spring is not installed.
  end
end


================================================
FILE: bin/yarn
================================================
#!/usr/bin/env ruby
APP_ROOT = File.expand_path('..', __dir__)
Dir.chdir(APP_ROOT) do
  yarn = ENV["PATH"].split(File::PATH_SEPARATOR).
    select { |dir| File.expand_path(dir) != __dir__ }.
    product(["yarn", "yarn.exe"]).
    map { |dir, file| File.expand_path(file, dir) }.
    find { |file| File.executable?(file) }

  if yarn
    exec yarn, *ARGV
  else
    $stderr.puts "Yarn executable was not detected in the system."
    $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
    exit 1
  end
end


================================================
FILE: config/application.rb
================================================
require_relative "boot"

require "rails/all"

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module TurboShowcase
  class Application < Rails::Application
    # Initialize configuration defaults for originally generated Rails version.
    config.load_defaults 6.1

    # Please, add to the `ignore` list any other `lib` subdirectories that do
    # not contain `.rb` files, or that should not be reloaded or eager loaded.
    # Common ones are `templates`, `generators`, or `middleware`, for example.
    config.autoload_lib(ignore: %w[assets tasks])

    # Configuration for the application, engines, and railties goes here.
    #
    # These settings can be overridden in specific environments using the files
    # in config/environments, which are processed later.
    #
    # config.time_zone = "Central Time (US & Canada)"
    # config.eager_load_paths << Rails.root.join("extras")
  end
end


================================================
FILE: config/appsignal.yml
================================================
default: &default
  request_headers:
    - HTTP_ACCEPT
    - HTTP_ACCEPT_CHARSET
    - HTTP_ACCEPT_ENCODING
    - HTTP_ACCEPT_LANGUAGE
    - HTTP_CACHE_CONTROL
    - HTTP_CONNECTION
    - HTTP_REFERER
    - HTTP_USER_AGENT
    - HTTP_AUTHORIZATION
    - CONTENT_LENGTH
    - PATH_INFO
    - HTTP_RANGE
    - REQUEST_METHOD
    - REQUEST_URI
    - SERVER_NAME
    - SERVER_PORT
    - SERVER_PROTOCOL

main:
  <<: *default


================================================
FILE: config/boot.rb
================================================
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

require "bundler/setup" # Set up gems listed in the Gemfile.
require "bootsnap/setup" # Speed up boot time by caching expensive operations.


================================================
FILE: config/cable.yml
================================================
# Async adapter only works within the same process, so for manually triggering cable updates from a console,
# and seeing results in the browser, you must do so from the web console (running inside the dev process),
# not a terminal started via bin/rails console! Add "console" to any action or any ERB template view
# to make the web console appear.
development:
  adapter: solid_cable
  connects_to:
    database:
      writing: cable
  polling_interval: 0.1.seconds
  silence_polling: true
  message_retention: 1.day

test:
  adapter: solid_cable
  connects_to:
    database:
      writing: cable
  polling_interval: 0.1.seconds
  silence_polling: true
  message_retention: 1.day

production:
  adapter: solid_cable
  connects_to:
    database:
      writing: cable
  polling_interval: 0.1.seconds
  silence_polling: true
  message_retention: 1.day


================================================
FILE: config/credentials.yml.enc
================================================
UDKZIkITXaNXR2Q/kRMiFcwt4Pn7EvLMd0bJ//JMRjmMJQmc5ochpLzwGGRuspvN39Yk18lWsQ6vsu5/wArK5b3++idQO2DcljbDboNghu8oOAfgrdXh1cyWi1D8nwLscPCOdVVaqhz6ntRiqxTzIriIQMY8LFu+lh6W2zSHr1AyXr+jhUSwnTrMo6k2J/EEPwFtWDFucWBXKfMO1pZ96KatTY1KZ8K1m4N2Il0SA+YOj+4IPG63V4iD3xHCdaZxK1ct6pviCP7s3LCeE8EMkjcHb51TsYqT2w75jtmqoaQeXmZHgT12PVRADb4g1fzPGX1ux1OY4dRghC6nu0IVm8VYRZv9pZhY1XIy7cxSIW8J4nDTGrrVFj7ugMxgMrO4gUuzpOHuB4uafTa4ECrrx1OK//1SwwHbdtPt--i/KiquvapbUWk4QT--pl+x6hMCBZUOf6KoAt6C4g==

================================================
FILE: config/database.yml
================================================
default: &default
  adapter: sqlite3
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  timeout: 5000

development:
  primary:
    <<: *default
    database: storage/turbo-showcase-development.sqlite3
  cable:
    <<: *default
    database: storage/turbo-showcase-development-cable.sqlite3
    migrations_paths: db/cable_migrate

test:
  primary:
    <<: *default
    database: storage/turbo-showcase-test.sqlite3
  cable:
    <<: *default
    database: storage/turbo-showcase-test-cable.sqlite3
    migrations_paths: db/cable_migrate

production:
  primary:
    <<: *default
    database: storage/turbo-showcase-production.sqlite3
  cable:
    <<: *default
    database: storage/turbo-showcase-production-cable.sqlite3
    migrations_paths: db/cable_migrate


================================================
FILE: config/environment.rb
================================================
# Load the Rails application.
require_relative "application"

# Initialize the Rails application.
Rails.application.initialize!


================================================
FILE: config/environments/development.rb
================================================
require "active_support/core_ext/integer/time"

Rails.application.configure do
  # Settings specified here will take precedence over those in config/application.rb.

  # In the development environment your application's code is reloaded any time
  # it changes. This slows down response time but is perfect for development
  # since you don't have to restart the web server when you make code changes.
  config.enable_reloading = true

  # Do not eager load code on boot.
  config.eager_load = false

  # Show full error reports.
  config.consider_all_requests_local = true

  # Enable server timing
  config.server_timing = true

  # Enable/disable caching. By default caching is disabled.
  # Run rails dev:cache to toggle caching.
  if Rails.root.join("tmp/caching-dev.txt").exist?
    config.action_controller.perform_caching = true
    config.action_controller.enable_fragment_cache_logging = true

    config.cache_store = :memory_store
    config.public_file_server.headers = {
      "Cache-Control" => "public, max-age=#{2.days.to_i}"
    }
  else
    config.action_controller.perform_caching = false

    config.cache_store = :null_store
  end

  # Store uploaded files on the local file system (see config/storage.yml for options).
  config.active_storage.service = :local

  # Don't care if the mailer can't send.
  config.action_mailer.raise_delivery_errors = false

  config.action_mailer.perform_caching = false

  # Print deprecation notices to the Rails logger.
  config.active_support.deprecation = :log

  # Raise exceptions for disallowed deprecations.
  config.active_support.disallowed_deprecation = :raise

  # Tell Active Support which deprecation messages to disallow.
  config.active_support.disallowed_deprecation_warnings = []

  # Raise an error on page load if there are pending migrations.
  config.active_record.migration_error = :page_load

  # Highlight code that triggered database queries in logs.
  config.active_record.verbose_query_logs = true

  # Highlight code that enqueued background job in logs.
  config.active_job.verbose_enqueue_logs = true

  # Suppress logger output for asset requests.
  config.assets.quiet = true

  # Raises error for missing translations.
  # config.i18n.raise_on_missing_translations = true

  # Annotate rendered view with file names.
  # config.action_view.annotate_rendered_view_with_filenames = true

  # Uncomment if you wish to allow Action Cable access from any origin.
  # config.action_cable.disable_request_forgery_protection = true

  # Raise error when a before_action's only/except options reference missing actions
  config.action_controller.raise_on_missing_callback_actions = true
end


================================================
FILE: config/environments/production.rb
================================================
require "active_support/core_ext/integer/time"

Rails.application.configure do
  # Settings specified here will take precedence over those in config/application.rb.

  # Code is not reloaded between requests.
  config.enable_reloading = false

  # Eager load code on boot. This eager loads most of Rails and
  # your application in memory, allowing both threaded web servers
  # and those relying on copy on write to perform better.
  # Rake tasks automatically ignore this option for performance.
  config.eager_load = true

  # Full error reports are disabled and caching is turned on.
  config.consider_all_requests_local = false
  config.action_controller.perform_caching = true

  # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment
  # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files).
  # config.require_master_key = true

  # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
  # config.public_file_server.enabled = false

  # Compress CSS using a preprocessor.
  # config.assets.css_compressor = :sass

  # Do not fall back to assets pipeline if a precompiled asset is missed.
  config.assets.compile = false

  # Enable serving of images, stylesheets, and JavaScripts from an asset server.
  # config.asset_host = "http://assets.example.com"

  # Specifies the header that your server uses for sending files.
  # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
  # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX

  # Store uploaded files on the local file system (see config/storage.yml for options).
  config.active_storage.service = :local

  # Mount Action Cable outside main process or domain.
  # config.action_cable.mount_path = nil
  # config.action_cable.url = "wss://example.com/cable"
  # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]

  # Assume all access to the app is happening through a SSL-terminating reverse proxy.
  # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies.
  # config.assume_ssl = true

  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
  config.force_ssl = true

  # Log to STDOUT by default
  config.logger = ActiveSupport::Logger.new($stdout)
    .tap { |logger| logger.formatter = ::Logger::Formatter.new }
    .then { |logger| ActiveSupport::TaggedLogging.new(logger) }

  # Prepend all log lines with the following tags.
  config.log_tags = [:request_id]

  # "info" includes generic and useful information about system operation, but avoids logging too much
  # information to avoid inadvertent exposure of personally identifiable information (PII). If you
  # want to log everything, set the level to "debug".
  config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")

  # Use a different cache store in production.
  # config.cache_store = :mem_cache_store

  # Use a real queuing backend for Active Job (and separate queues per environment).
  # config.active_job.queue_adapter = :resque
  # config.active_job.queue_name_prefix = "turbo_showcase_production"

  config.action_mailer.perform_caching = false

  # Ignore bad email addresses and do not raise email delivery errors.
  # Set this to true and configure the email server for immediate delivery to raise delivery errors.
  # config.action_mailer.raise_delivery_errors = false

  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
  # the I18n.default_locale when a translation cannot be found).
  config.i18n.fallbacks = true

  # Don't log any deprecations.
  config.active_support.report_deprecations = false

  # Do not dump schema after migrations.
  config.active_record.dump_schema_after_migration = false

  # Enable DNS rebinding protection and other `Host` header attacks.
  # config.hosts = [
  #   "example.com",     # Allow requests from example.com
  #   /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
  # ]
  # Skip DNS rebinding protection for the default health check endpoint.
  # config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
end


================================================
FILE: config/environments/test.rb
================================================
require "active_support/core_ext/integer/time"

# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!

Rails.application.configure do
  # Settings specified here will take precedence over those in config/application.rb.

  # While tests run files are not watched, reloading is not necessary.
  config.enable_reloading = false

  # Eager loading loads your entire application. When running a single test locally,
  # this is usually not necessary, and can slow down your test suite. However, it's
  # recommended that you enable it in continuous integration systems to ensure eager
  # loading is working properly before deploying your code.
  config.eager_load = ENV["CI"].present?

  # Configure public file server for tests with Cache-Control for performance.
  config.public_file_server.enabled = true
  config.public_file_server.headers = {
    "Cache-Control" => "public, max-age=#{1.hour.to_i}"
  }

  # Show full error reports and disable caching.
  config.consider_all_requests_local = true
  config.action_controller.perform_caching = false
  config.cache_store = :null_store

  # Render exception templates for rescuable exceptions and raise for other exceptions.
  config.action_dispatch.show_exceptions = :rescuable

  # Disable request forgery protection in test environment.
  config.action_controller.allow_forgery_protection = false

  # Store uploaded files on the local file system in a temporary directory.
  config.active_storage.service = :test

  config.action_mailer.perform_caching = false

  # Tell Action Mailer not to deliver emails to the real world.
  # The :test delivery method accumulates sent emails in the
  # ActionMailer::Base.deliveries array.
  config.action_mailer.delivery_method = :test

  # Print deprecation notices to the stderr.
  config.active_support.deprecation = :stderr

  # Raise exceptions for disallowed deprecations.
  config.active_support.disallowed_deprecation = :raise

  # Tell Active Support which deprecation messages to disallow.
  config.active_support.disallowed_deprecation_warnings = []

  # Raises error for missing translations.
  # config.i18n.raise_on_missing_translations = true

  # Annotate rendered view with file names.
  # config.action_view.annotate_rendered_view_with_filenames = true

  # Raise error when a before_action's only/except options reference missing actions
  config.action_controller.raise_on_missing_callback_actions = true
end


================================================
FILE: config/importmap.rb
================================================
# Pin npm packages by running ./bin/importmap

pin "application", preload: true
pin "popper", to: "popper.js", preload: true
pin "bootstrap", to: "bootstrap.min.js", preload: true

pin "@hotwired/turbo-rails", to: "turbo.js"
pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true

pin_all_from "app/javascript/controllers", under: "controllers"


================================================
FILE: 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


================================================
FILE: 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

# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
Rails.application.config.assets.precompile += %w[bootstrap.min.js popper.js]


================================================
FILE: 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| /my_noisy_library/.match?(line) }

# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code
# by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'".
Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"]


================================================
FILE: config/initializers/content_security_policy.rb
================================================
# Be sure to restart your server when you modify this file.

# Define an application-wide content security policy.
# See the Securing Rails Applications Guide for more information:
# https://guides.rubyonrails.org/security.html#content-security-policy-header

# Rails.application.configure do
#   config.content_security_policy do |policy|
#     policy.default_src :self, :https
#     policy.font_src    :self, :https, :data
#     policy.img_src     :self, :https, :data
#     policy.object_src  :none
#     policy.script_src  :self, :https
#     policy.style_src   :self, :https
#     # Specify URI for violation reports
#     # policy.report_uri "/csp-violation-report-endpoint"
#   end
#
#   # Generate session nonces for permitted importmap, inline scripts, and inline styles.
#   config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
#   config.content_security_policy_nonce_directives = %w(script-src style-src)
#
#   # Report violations without enforcing the policy.
#   # config.content_security_policy_report_only = true
# end


================================================
FILE: 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


================================================
FILE: config/initializers/filter_parameter_logging.rb
================================================
# Be sure to restart your server when you modify this file.

# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
# Use this to limit dissemination of sensitive information.
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
Rails.application.config.filter_parameters += [
  :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
]


================================================
FILE: 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 |inflect|
#   inflect.plural /^(ox)$/i, "\\1en"
#   inflect.singular /^(ox)en/i, "\\1"
#   inflect.irregular "person", "people"
#   inflect.uncountable %w( fish sheep )
# end

# These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
#   inflect.acronym "RESTful"
# end


================================================
FILE: 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


================================================
FILE: config/initializers/new_framework_defaults_7_1.rb
================================================
# Be sure to restart your server when you modify this file.
#
# This file eases your Rails 7.1 framework defaults upgrade.
#
# Uncomment each configuration one by one to switch to the new default.
# Once your application is ready to run with all new defaults, you can remove
# this file and set the `config.load_defaults` to `7.1`.
#
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html

###
# No longer add autoloaded paths into `$LOAD_PATH`. This means that you won't be able
# to manually require files that are managed by the autoloader, which you shouldn't do anyway.
#
# This will reduce the size of the load path, making `require` faster if you don't use bootsnap, or reduce the size
# of the bootsnap cache if you use it.
#
# To set this configuration, add the following line to `config/application.rb` (NOT this file):
#   config.add_autoload_paths_to_load_path = false

###
# Remove the default X-Download-Options headers since it is used only by Internet Explorer.
# If you need to support Internet Explorer, add back `"X-Download-Options" => "noopen"`.
#++
# Rails.application.config.action_dispatch.default_headers = {
#   "X-Frame-Options" => "SAMEORIGIN",
#   "X-XSS-Protection" => "0",
#   "X-Content-Type-Options" => "nosniff",
#   "X-Permitted-Cross-Domain-Policies" => "none",
#   "Referrer-Policy" => "strict-origin-when-cross-origin"
# }

###
# Do not treat an `ActionController::Parameters` instance
# as equal to an equivalent `Hash` by default.
#++
# Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality = false

###
# Active Record Encryption now uses SHA-256 as its hash digest algorithm.
#
# There are 3 scenarios to consider.
#
# 1. If you have data encrypted with previous Rails versions, and you have
# +config.active_support.key_generator_hash_digest_class+ configured as SHA1 (the default
# before Rails 7.0), you need to configure SHA-1 for Active Record Encryption too:
#++
# Rails.application.config.active_record.encryption.hash_digest_class = OpenSSL::Digest::SHA1
#
# 2. If you have +config.active_support.key_generator_hash_digest_class+ configured as SHA256 (the new default
# in 7.0), then you need to configure SHA-256 for Active Record Encryption:
#++
# Rails.application.config.active_record.encryption.hash_digest_class = OpenSSL::Digest::SHA256
#
# 3. If you don't currently have data encrypted with Active Record encryption, you can disable this setting to
# configure the default behavior starting 7.1+:
#++
# Rails.application.config.active_record.encryption.support_sha1_for_non_deterministic_encryption = false

###
# No longer run after_commit callbacks on the first of multiple Active Record
# instances to save changes to the same database row within a transaction.
# Instead, run these callbacks on the instance most likely to have internal
# state which matches what was committed to the database, typically the last
# instance to save.
#++
# Rails.application.config.active_record.run_commit_callbacks_on_first_saved_instances_in_transaction = false

###
# Configures SQLite with a strict strings mode, which disables double-quoted string literals.
#
# SQLite has some quirks around double-quoted string literals.
# It first tries to consider double-quoted strings as identifier names, but if they don't exist
# it then considers them as string literals. Because of this, typos can silently go unnoticed.
# For example, it is possible to create an index for a non existing column.
# See https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted for more details.
#++
# Rails.application.config.active_record.sqlite3_adapter_strict_strings_by_default = true

###
# Disable deprecated singular associations names.
#++
# Rails.application.config.active_record.allow_deprecated_singular_associations_name = false

###
# Enable the Active Job `BigDecimal` argument serializer, which guarantees
# roundtripping. Without this serializer, some queue adapters may serialize
# `BigDecimal` arguments as simple (non-roundtrippable) strings.
#
# When deploying an application with multiple replicas, old (pre-Rails 7.1)
# replicas will not be able to deserialize `BigDecimal` arguments from this
# serializer. Therefore, this setting should only be enabled after all replicas
# have been successfully upgraded to Rails 7.1.
#++
# Rails.application.config.active_job.use_big_decimal_serializer = true

###
# Specify if an `ArgumentError` should be raised if `Rails.cache` `fetch` or
# `write` are given an invalid `expires_at` or `expires_in` time.
# Options are `true`, and `false`. If `false`, the exception will be reported
# as `handled` and logged instead.
#++
# Rails.application.config.active_support.raise_on_invalid_cache_expiration_time = true

###
# Specify whether Query Logs will format tags using the SQLCommenter format
# (https://open-telemetry.github.io/opentelemetry-sqlcommenter/), or using the legacy format.
# Options are `:legacy` and `:sqlcommenter`.
#++
# Rails.application.config.active_record.query_log_tags_format = :sqlcommenter

###
# Specify the default serializer used by `MessageEncryptor` and `MessageVerifier`
# instances.
#
# The legacy default is `:marshal`, which is a potential vector for
# deserialization attacks in cases where a message signing secret has been
# leaked.
#
# In Rails 7.1, the new default is `:json_allow_marshal` which serializes and
# deserializes with `ActiveSupport::JSON`, but can fall back to deserializing
# with `Marshal` so that legacy messages can still be read.
#
# In Rails 7.2, the default will become `:json` which serializes and
# deserializes with `ActiveSupport::JSON` only.
#
# Alternatively, you can choose `:message_pack` or `:message_pack_allow_marshal`,
# which serialize with `ActiveSupport::MessagePack`. `ActiveSupport::MessagePack`
# can roundtrip some Ruby types that are not supported by JSON, and may provide
# improved performance, but it requires the `msgpack` gem.
#
# For more information, see
# https://guides.rubyonrails.org/v7.1/configuring.html#config-active-support-message-serializer
#
# If you are performing a rolling deploy of a Rails 7.1 upgrade, wherein servers
# that have not yet been upgraded must be able to read messages from upgraded
# servers, first deploy without changing the serializer, then set the serializer
# in a subsequent deploy.
#++
# Rails.application.config.active_support.message_serializer = :json_allow_marshal

###
# Enable a performance optimization that serializes message data and metadata
# together. This changes the message format, so messages serialized this way
# cannot be read by older versions of Rails. However, messages that use the old
# format can still be read, regardless of whether this optimization is enabled.
#
# To perform a rolling deploy of a Rails 7.1 upgrade, wherein servers that have
# not yet been upgraded must be able to read messages from upgraded servers,
# leave this optimization off on the first deploy, then enable it on a
# subsequent deploy.
#++
# Rails.application.config.active_support.use_message_serializer_for_metadata = true

###
# Set the maximum size for Rails log files.
#
# `config.load_defaults 7.1` does not set this value for environments other than
# development and test.
#++
# if Rails.env.local?
#   Rails.application.config.log_file_size = 100 * 1024 * 1024
# end

###
# Enable raising on assignment to attr_readonly attributes. The previous
# behavior would allow assignment but silently not persist changes to the
# database.
#++
# Rails.application.config.active_record.raise_on_assign_to_attr_readonly = true

###
# Enable validating only parent-related columns for presence when the parent is mandatory.
# The previous behavior was to validate the presence of the parent record, which performed an extra query
# to get the parent every time the child record was updated, even when parent has not changed.
#++
# Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false

###
# Enable precompilation of `config.filter_parameters`. Precompilation can
# improve filtering performance, depending on the quantity and types of filters.
#++
# Rails.application.config.precompile_filter_parameters = true

###
# Enable before_committed! callbacks on all enrolled records in a transaction.
# The previous behavior was to only run the callbacks on the first copy of a record
# if there were multiple copies of the same record enrolled in the transaction.
#++
# Rails.application.config.active_record.before_committed_on_all_records = true

###
# Disable automatic column serialization into YAML.
# To keep the historic behavior, you can set it to `YAML`, however it is
# recommended to explicitly define the serialization method for each column
# rather than to rely on a global default.
#++
# Rails.application.config.active_record.default_column_serializer = nil

###
# Enable a performance optimization that serializes Active Record models
# in a faster and more compact way.
#
# To perform a rolling deploy of a Rails 7.1 upgrade, wherein servers that have
# not yet been upgraded must be able to read caches from upgraded servers,
# leave this optimization off on the first deploy, then enable it on a
# subsequent deploy.
#++
# Rails.application.config.active_record.marshalling_format_version = 7.1

###
# Run `after_commit` and `after_*_commit` callbacks in the order they are defined in a model.
# This matches the behaviour of all other callbacks.
# In previous versions of Rails, they ran in the inverse order.
#++
# Rails.application.config.active_record.run_after_transaction_callbacks_in_order_defined = true

###
# Whether a `transaction` block is committed or rolled back when exited via `return`, `break` or `throw`.
#++
# Rails.application.config.active_record.commit_transaction_on_non_local_return = true

###
# Controls when to generate a value for <tt>has_secure_token</tt> declarations.
#++
# Rails.application.config.active_record.generate_secure_token_on = :initialize

###
# ** Please read carefully, this must be configured in config/application.rb **
#
# Change the format of the cache entry.
#
# Changing this default means that all new cache entries added to the cache
# will have a different format that is not supported by Rails 7.0
# applications.
#
# Only change this value after your application is fully deployed to Rails 7.1
# and you have no plans to rollback.
# When you're ready to change format, add this to `config/application.rb` (NOT
# this file):
#   config.active_support.cache_format_version = 7.1

###
# Configure Action View to use HTML5 standards-compliant sanitizers when they are supported on your
# platform.
#
# `Rails::HTML::Sanitizer.best_supported_vendor` will cause Action View to use HTML5-compliant
# sanitizers if they are supported, else fall back to HTML4 sanitizers.
#
# In previous versions of Rails, Action View always used `Rails::HTML4::Sanitizer` as its vendor.
#++
# Rails.application.config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor

###
# Configure Action Text to use an HTML5 standards-compliant sanitizer when it is supported on your
# platform.
#
# `Rails::HTML::Sanitizer.best_supported_vendor` will cause Action Text to use HTML5-compliant
# sanitizers if they are supported, else fall back to HTML4 sanitizers.
#
# In previous versions of Rails, Action Text always used `Rails::HTML4::Sanitizer` as its vendor.
#++
# Rails.application.config.action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor

###
# Configure the log level used by the DebugExceptions middleware when logging
# uncaught exceptions during requests.
#++
# Rails.application.config.action_dispatch.debug_exception_log_level = :error

###
# Configure the test helpers in Action View, Action Dispatch, and rails-dom-testing to use HTML5
# parsers.
#
# Nokogiri::HTML5 isn't supported on JRuby, so JRuby applications must set this to :html4.
#
# In previous versions of Rails, these test helpers always used an HTML4 parser.
#++
# Rails.application.config.dom_testing_default_html_version = :html5


================================================
FILE: config/initializers/permissions_policy.rb
================================================
# Be sure to restart your server when you modify this file.

# Define an application-wide HTTP permissions policy. For further
# information see: https://developers.google.com/web/updates/2018/06/feature-policy

# Rails.application.config.permissions_policy do |policy|
#   policy.camera      :none
#   policy.gyroscope   :none
#   policy.microphone  :none
#   policy.usb         :none
#   policy.fullscreen  :self
#   policy.payment     :self, "https://secure.example.com"
# end


================================================
FILE: 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 format: [:json]
end

# To enable root element in JSON for ActiveRecord objects.
# ActiveSupport.on_load(:active_record) do
#   self.include_root_in_json = true
# end


================================================
FILE: config/locales/en.yml
================================================
en:
  views:
    pagination:
      first: "&laquo;"
      last: "&raquo;"
      next: "&rsaquo;"
      previous: "&lsaquo;"
      truncate: "&hellip;"


================================================
FILE: 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 the default thread size of Active Record.
#
max_threads_count = ENV.fetch("RAILS_MAX_THREADS", 5)
min_threads_count = ENV.fetch("RAILS_MIN_THREADS", max_threads_count)
threads min_threads_count, max_threads_count

# Specifies the `worker_timeout` threshold that Puma will use to wait before
# terminating a worker in development environments.
#
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"

# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
#
port ENV.fetch("PORT", 3000)

# Specifies the `environment` that Puma will run in.
#
environment ENV.fetch("RAILS_ENV") { "development" }

# Specifies the `pidfile` that Puma will use.
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }

# Specifies the number of `workers` to boot in clustered mode.
# Workers are forked web server processes. If using threads and workers together
# the concurrency of the application would be max `threads` * `workers`.
# Workers do not work on JRuby or Windows (both of which do not support
# processes).
#
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }

# Use the `preload_app!` method when specifying a `workers` number.
# This directive tells Puma to first boot the application and load code
# before forking the application. This takes advantage of Copy On Write
# process behavior so workers use less memory.
#
# preload_app!

# Allow puma to be restarted by `rails restart` command.
plugin :tmp_restart


================================================
FILE: config/routes.rb
================================================
Rails.application.routes.draw do
  root "home#show"

  get "/frames", to: "home#frames"
  get "/slow", to: "home#slow"
  get "/pagination", to: "home#pagination"
  get "/forms", to: "home#forms"
  get "/replace_update_me", to: "home#replace_update_me"
  get "/navigate_away", to: "home#navigate_away"
  get "/replace_external_frame", to: "home#replace_external_frame"
  get "/replace_form_frame", to: "home#replace_form_frame"
  get "/slow_frame", to: "home#slow_frame"
  get "/inline_fields", to: "home#inline_fields"
  post "/refresh_stream_title", to: "home#refresh_stream_title"
  post "/form_submission", to: "home#form_submission"
  get "/inline_form_submission", to: "home#inline_form_submission"
  get "/issues", to: "home#issues"
  get "/form_get_submission", to: "home#form_get_submission"
  post "/form_get_submission", to: "home#form_get_submission"

  get "/streams", to: "home#streams"

  get "/training", to: "training#show"
  get "/training/instructions", to: "training#instructions"
  get "/letters/:letter", to: "letters#show"
  get "/letters/:letter/slow", to: "letters#slow"
end


================================================
FILE: config/spring.rb
================================================
Spring.watch(
  ".ruby-version",
  ".rbenv-vars",
  "tmp/restart.txt",
  "tmp/caching-dev.txt"
)


================================================
FILE: config/storage.yml
================================================
test:
  service: Disk
  root: <%= Rails.root.join("tmp/storage") %>

local:
  service: Disk
  root: <%= Rails.root.join("storage") %>

# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
# amazon:
#   service: S3
#   access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
#   secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
#   region: us-east-1
#   bucket: your_own_bucket

# Remember not to checkin your GCS keyfile to a repository
# google:
#   service: GCS
#   project: your_project
#   credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
#   bucket: your_own_bucket

# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
# microsoft:
#   service: AzureStorage
#   storage_account_name: your_account_name
#   storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
#   container: your_container_name

# mirror:
#   service: Mirror
#   primary: local
#   mirrors: [ amazon, google, microsoft ]


================================================
FILE: config/webpack/development.js
================================================
process.env.NODE_ENV = process.env.NODE_ENV || 'development'

const environment = require('./environment')

module.exports = environment.toWebpackConfig()


================================================
FILE: config/webpack/environment.js
================================================
const { environment } = require('@rails/webpacker')

module.exports = environment


================================================
FILE: config/webpack/production.js
================================================
process.env.NODE_ENV = process.env.NODE_ENV || 'production'

const environment = require('./environment')

module.exports = environment.toWebpackConfig()


================================================
FILE: config/webpack/test.js
================================================
process.env.NODE_ENV = process.env.NODE_ENV || 'development'

const environment = require('./environment')

module.exports = environment.toWebpackConfig()


================================================
FILE: config/webpacker.yml
================================================
# Note: You must restart bin/webpack-dev-server for changes to take effect

default: &default
  source_path: app/javascript
  source_entry_path: packs
  public_root_path: public
  public_output_path: packs
  cache_path: tmp/cache/webpacker
  webpack_compile_output: true

  # Additional paths webpack should lookup modules
  # ['app/assets', 'engine/foo/app/assets']
  additional_paths: []

  # Reload manifest.json on all requests so we reload latest compiled packs
  cache_manifest: false

  # Extract and emit a css file
  extract_css: false

  static_assets_extensions:
    - .jpg
    - .jpeg
    - .png
    - .gif
    - .tiff
    - .ico
    - .svg
    - .eot
    - .otf
    - .ttf
    - .woff
    - .woff2

  extensions:
    - .mjs
    - .js
    - .sass
    - .scss
    - .css
    - .module.sass
    - .module.scss
    - .module.css
    - .png
    - .svg
    - .gif
    - .jpeg
    - .jpg

development:
  <<: *default
  compile: true

  # Reference: https://webpack.js.org/configuration/dev-server/
  dev_server:
    https: false
    host: localhost
    port: 3035
    public: localhost:3035
    hmr: false
    # Inline should be set to true if using HMR
    inline: true
    overlay: true
    compress: true
    disable_host_check: true
    use_local_ip: false
    quiet: false
    pretty: false
    headers:
      'Access-Control-Allow-Origin': '*'
    watch_options:
      ignored: '**/node_modules/**'


test:
  <<: *default
  compile: true

  # Compile test packs to a separate directory
  public_output_path: packs-test

production:
  <<: *default

  # Production depends on precompilation of packs prior to booting for performance.
  compile: false

  # Extract and emit a css file
  extract_css: true

  # Cache manifest.json for performance
  cache_manifest: true


================================================
FILE: config.ru
================================================
# This file is used by Rack-based servers to start the application.

require_relative "config/environment"

run Rails.application
Rails.application.load_server


================================================
FILE: db/cable_migrate/20250529140703_create_solid_cable_message.solid_cable.rb
================================================
# frozen_string_literal: true

# This migration comes from solid_cable (originally 20240103034713)
class CreateSolidCableMessage < ActiveRecord::Migration[7.1]
  def change
    create_table :solid_cable_messages, if_not_exists: true do |t|
      t.text :channel
      t.text :payload

      t.timestamps

      t.index :created_at
    end
  end
end


================================================
FILE: db/cable_migrate/20250529140704_index_channels.solid_cable.rb
================================================
# frozen_string_literal: true

# This migration comes from solid_cable (originally 20240607184711)
class IndexChannels < ActiveRecord::Migration[7.1]
  def change
    add_index :solid_cable_messages, :channel, length: 500
  end
end


================================================
FILE: db/cable_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/rails
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.1].define(version: 2025_05_29_140704) do
  create_table "solid_cable_messages", force: :cascade do |t|
    t.text "channel"
    t.text "payload"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["channel"], name: "index_solid_cable_messages_on_channel"
    t.index ["created_at"], name: "index_solid_cable_messages_on_created_at"
  end
end


================================================
FILE: 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/rails
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.1].define(version: 0) do
end


================================================
FILE: db/seeds.rb
================================================
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
#   movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
#   Character.create(name: 'Luke', movie: movies.first)


================================================
FILE: lib/assets/.keep
================================================


================================================
FILE: lib/tasks/.keep
================================================


================================================
FILE: log/.keep
================================================


================================================
FILE: package.json
================================================
{
  "name": "turbo-showcase",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
  }
}


================================================
FILE: postcss.config.js
================================================
module.exports = {
  plugins: [
    require('postcss-import'),
    require('postcss-flexbugs-fixes'),
    require('postcss-preset-env')({
      autoprefixer: {
        flexbox: 'no-2009'
      },
      stage: 3
    })
  ]
}


================================================
FILE: public/404.html
================================================
<!DOCTYPE html>
<html>
<head>
  <title>The page you were looking for doesn't exist (404)</title>
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <style>
  .rails-default-error-page {
    background-color: #EFEFEF;
    color: #2E2F30;
    text-align: center;
    font-family: arial, sans-serif;
    margin: 0;
  }

  .rails-default-error-page div.dialog {
    width: 95%;
    max-width: 33em;
    margin: 4em auto 0;
  }

  .rails-default-error-page div.dialog > div {
    border: 1px solid #CCC;
    border-right-color: #999;
    border-left-color: #999;
    border-bottom-color: #BBB;
    border-top: #B00100 solid 4px;
    border-top-left-radius: 9px;
    border-top-right-radius: 9px;
    background-color: white;
    padding: 7px 12% 0;
    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
  }

  .rails-default-error-page h1 {
    font-size: 100%;
    color: #730E15;
    line-height: 1.5em;
  }

  .rails-default-error-page div.dialog > p {
    margin: 0 0 1em;
    padding: 1em;
    background-color: #F7F7F7;
    border: 1px solid #CCC;
    border-right-color: #999;
    border-left-color: #999;
    border-bottom-color: #999;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    border-top-color: #DADADA;
    color: #666;
    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
  }
  </style>
</head>

<body class="rails-default-error-page">
  <!-- This file lives in public/404.html -->
  <div class="dialog">
    <div>
      <h1>The page you were looking for doesn't exist.</h1>
      <p>You may have mistyped the address or the page may have moved.</p>
    </div>
    <p>If you are the application owner check the logs for more information.</p>
  </div>
</body>
</html>


================================================
FILE: public/422.html
================================================
<!DOCTYPE html>
<html>
<head>
  <title>The change you wanted was rejected (422)</title>
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <style>
  .rails-default-error-page {
    background-color: #EFEFEF;
    color: #2E2F30;
    text-align: center;
    font-family: arial, sans-serif;
    margin: 0;
  }

  .rails-default-error-page div.dialog {
    width: 95%;
    max-width: 33em;
    margin: 4em auto 0;
  }

  .rails-default-error-page div.dialog > div {
    border: 1px solid #CCC;
    border-right-color: #999;
    border-left-color: #999;
    border-bottom-color: #BBB;
    border-top: #B00100 solid 4px;
    border-top-left-radius: 9px;
    border-top-right-radius: 9px;
    background-color: white;
    padding: 7px 12% 0;
    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
  }

  .rails-default-error-page h1 {
    font-size: 100%;
    color: #730E15;
    line-height: 1.5em;
  }

  .rails-default-error-page div.dialog > p {
    margin: 0 0 1em;
    padding: 1em;
    background-color: #F7F7F7;
    border: 1px solid #CCC;
    border-right-color: #999;
    border-left-color: #999;
    border-bottom-color: #999;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    border-top-color: #DADADA;
    color: #666;
    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
  }
  </style>
</head>

<body class="rails-default-error-page">
  <!-- This file lives in public/422.html -->
  <div class="dialog">
    <div>
      <h1>The change you wanted was rejected.</h1>
      <p>Maybe you tried to change something you didn't have access to.</p>
    </div>
    <p>If you are the application owner check the logs for more information.</p>
  </div>
</body>
</html>


================================================
FILE: public/500.html
================================================
<!DOCTYPE html>
<html>
<head>
  <title>We're sorry, but something went wrong (500)</title>
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <style>
  .rails-default-error-page {
    background-color: #EFEFEF;
    color: #2E2F30;
    text-align: center;
    font-family: arial, sans-serif;
    margin: 0;
  }

  .rails-default-error-page div.dialog {
    width: 95%;
    max-width: 33em;
    margin: 4em auto 0;
  }

  .rails-default-error-page div.dialog > div {
    border: 1px solid #CCC;
    border-right-color: #999;
    border-left-color: #999;
    border-bottom-color: #BBB;
    border-top: #B00100 solid 4px;
    border-top-left-radius: 9px;
    border-top-right-radius: 9px;
    background-color: white;
    padding: 7px 12% 0;
    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
  }

  .rails-default-error-page h1 {
    font-size: 100%;
    color: #730E15;
    line-height: 1.5em;
  }

  .rails-default-error-page div.dialog > p {
    margin: 0 0 1em;
    padding: 1em;
    background-color: #F7F7F7;
    border: 1px solid #CCC;
    border-right-color: #999;
    border-left-color: #999;
    border-bottom-color: #999;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    border-top-color: #DADADA;
    color: #666;
    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
  }
  </style>
</head>

<body class="rails-default-error-page">
  <!-- This file lives in public/500.html -->
  <div class="dialog">
    <div>
      <h1>We're sorry, but something went wrong.</h1>
    </div>
    <p>If you are the application owner check the logs for more information.</p>
  </div>
</body>
</html>


================================================
FILE: public/robots.txt
================================================
# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file


================================================
FILE: storage/.keep
================================================


================================================
FILE: test/application_system_test_case.rb
================================================
require "test_helper"

class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
  driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
end


================================================
FILE: test/channels/application_cable/connection_test.rb
================================================
require "test_helper"

class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase
  # test "connects with cookies" do
  #   cookies.signed[:user_id] = 42
  #
  #   connect
  #
  #   assert_equal connection.user_id, "42"
  # end
end


================================================
FILE: test/controllers/.keep
================================================


================================================
FILE: test/fixtures/files/.keep
================================================


================================================
FILE: test/helpers/.keep
================================================


================================================
FILE: test/integration/.keep
================================================


================================================
FILE: test/mailers/.keep
================================================


================================================
FILE: test/models/.keep
================================================


================================================
FILE: test/system/.keep
================================================


================================================
FILE: test/test_helper.rb
================================================
ENV["RAILS_ENV"] ||= "test"
require_relative "../config/environment"
require "rails/test_help"

class ActiveSupport::TestCase
  # Run tests in parallel with specified workers
  parallelize(workers: :number_of_processors)

  # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
  fixtures :all

  # Add more helper methods to be used by all tests here...
end


================================================
FILE: tmp/.keep
================================================


================================================
FILE: vendor/.keep
================================================


================================================
FILE: vendor/javascript/.keep
================================================
Download .txt
gitextract_3zdbyyi1/

├── .browserslistrc
├── .gitattributes
├── .gitignore
├── .ruby-version
├── .semaphore/
│   ├── main-deploy.yml
│   └── semaphore.yml
├── Gemfile
├── README.md
├── Rakefile
├── app/
│   ├── assets/
│   │   ├── config/
│   │   │   └── manifest.js
│   │   ├── images/
│   │   │   └── .keep
│   │   └── stylesheets/
│   │       └── application.scss
│   ├── channels/
│   │   └── application_cable/
│   │       ├── channel.rb
│   │       └── connection.rb
│   ├── components/
│   │   ├── editable_field_component.html.erb
│   │   └── editable_field_component.rb
│   ├── controllers/
│   │   ├── application_controller.rb
│   │   ├── concerns/
│   │   │   └── .keep
│   │   ├── home_controller.rb
│   │   ├── letters_controller.rb
│   │   └── training_controller.rb
│   ├── helpers/
│   │   └── application_helper.rb
│   ├── javascript/
│   │   ├── application.js
│   │   └── controllers/
│   │       ├── application.js
│   │       ├── editable_field_controller.js
│   │       ├── hello_controller.js
│   │       ├── index.js
│   │       └── url_updating_frame_controller.js
│   ├── jobs/
│   │   └── application_job.rb
│   ├── mailers/
│   │   └── application_mailer.rb
│   ├── models/
│   │   ├── application_record.rb
│   │   ├── concerns/
│   │   │   └── .keep
│   │   └── user.rb
│   └── views/
│       ├── home/
│       │   ├── forms.html.erb
│       │   ├── frames.html.erb
│       │   ├── inline_fields.html.erb
│       │   ├── issues.html.erb
│       │   ├── navigate_away.html.erb
│       │   ├── pagination.html.erb
│       │   ├── replace_external_frame.html.erb
│       │   ├── replace_form_frame.html.erb
│       │   ├── replace_update_me.html.erb
│       │   ├── replace_whole_page.html.erb
│       │   ├── show.html.erb
│       │   ├── slow.html.erb
│       │   ├── slow_frame.html.erb
│       │   └── streams.html.erb
│       ├── layouts/
│       │   ├── application.html.erb
│       │   ├── mailer.html.erb
│       │   └── mailer.text.erb
│       ├── letters/
│       │   └── show.html.erb
│       └── training/
│           ├── instructions.html.erb
│           └── show.html.erb
├── babel.config.js
├── bin/
│   ├── bundle
│   ├── check
│   ├── importmap
│   ├── rails
│   ├── rake
│   ├── setup
│   ├── spring
│   └── yarn
├── config/
│   ├── application.rb
│   ├── appsignal.yml
│   ├── boot.rb
│   ├── cable.yml
│   ├── credentials.yml.enc
│   ├── database.yml
│   ├── environment.rb
│   ├── environments/
│   │   ├── development.rb
│   │   ├── production.rb
│   │   └── test.rb
│   ├── importmap.rb
│   ├── initializers/
│   │   ├── application_controller_renderer.rb
│   │   ├── assets.rb
│   │   ├── backtrace_silencers.rb
│   │   ├── content_security_policy.rb
│   │   ├── cookies_serializer.rb
│   │   ├── filter_parameter_logging.rb
│   │   ├── inflections.rb
│   │   ├── mime_types.rb
│   │   ├── new_framework_defaults_7_1.rb
│   │   ├── permissions_policy.rb
│   │   └── wrap_parameters.rb
│   ├── locales/
│   │   └── en.yml
│   ├── puma.rb
│   ├── routes.rb
│   ├── spring.rb
│   ├── storage.yml
│   ├── webpack/
│   │   ├── development.js
│   │   ├── environment.js
│   │   ├── production.js
│   │   └── test.js
│   └── webpacker.yml
├── config.ru
├── db/
│   ├── cable_migrate/
│   │   ├── 20250529140703_create_solid_cable_message.solid_cable.rb
│   │   └── 20250529140704_index_channels.solid_cable.rb
│   ├── cable_schema.rb
│   ├── schema.rb
│   └── seeds.rb
├── lib/
│   ├── assets/
│   │   └── .keep
│   └── tasks/
│       └── .keep
├── log/
│   └── .keep
├── package.json
├── postcss.config.js
├── public/
│   ├── 404.html
│   ├── 422.html
│   ├── 500.html
│   └── robots.txt
├── storage/
│   └── .keep
├── test/
│   ├── application_system_test_case.rb
│   ├── channels/
│   │   └── application_cable/
│   │       └── connection_test.rb
│   ├── controllers/
│   │   └── .keep
│   ├── fixtures/
│   │   └── files/
│   │       └── .keep
│   ├── helpers/
│   │   └── .keep
│   ├── integration/
│   │   └── .keep
│   ├── mailers/
│   │   └── .keep
│   ├── models/
│   │   └── .keep
│   ├── system/
│   │   └── .keep
│   └── test_helper.rb
├── tmp/
│   └── .keep
└── vendor/
    ├── .keep
    └── javascript/
        └── .keep
Download .txt
SYMBOL INDEX (59 symbols across 21 files)

FILE: app/channels/application_cable/channel.rb
  type ApplicationCable (line 1) | module ApplicationCable
    class Channel (line 2) | class Channel < ActionCable::Channel::Base

FILE: app/channels/application_cable/connection.rb
  type ApplicationCable (line 1) | module ApplicationCable
    class Connection (line 2) | class Connection < ActionCable::Connection::Base

FILE: app/components/editable_field_component.rb
  class EditableFieldComponent (line 1) | class EditableFieldComponent < ViewComponent::Base
    method initialize (line 7) | def initialize(attributes = {})
    method display_value (line 12) | def display_value
    method frame_tag_id (line 16) | def frame_tag_id
    method can_edit? (line 20) | def can_edit?
    method spinner (line 25) | def spinner

FILE: app/controllers/application_controller.rb
  class ApplicationController (line 1) | class ApplicationController < ActionController::Base

FILE: app/controllers/home_controller.rb
  class HomeController (line 1) | class HomeController < ApplicationController
    method show (line 2) | def show
    method frames (line 5) | def frames
    method slow (line 8) | def slow
    method pagination (line 11) | def pagination
    method forms (line 15) | def forms
    method replace_update_me (line 21) | def replace_update_me
    method navigate_away (line 24) | def navigate_away
    method replace_external_frame (line 28) | def replace_external_frame
    method replace_form_frame (line 32) | def replace_form_frame
    method slow_frame (line 35) | def slow_frame
    method inline_fields (line 39) | def inline_fields
    method refresh_stream_title (line 43) | def refresh_stream_title
    method form_submission (line 50) | def form_submission
    method issues (line 58) | def issues
    method form_get_submission (line 62) | def form_get_submission
    method inline_form_submission (line 69) | def inline_form_submission

FILE: app/controllers/letters_controller.rb
  class LettersController (line 1) | class LettersController < ApplicationController
    method show (line 2) | def show
    method slow (line 6) | def slow

FILE: app/controllers/training_controller.rb
  class TrainingController (line 1) | class TrainingController < ApplicationController
    method instructions (line 2) | def instructions
    method show (line 7) | def show

FILE: app/helpers/application_helper.rb
  type ApplicationHelper (line 1) | module ApplicationHelper
    function spinner (line 2) | def spinner
    function raw_spinner (line 6) | def raw_spinner

FILE: app/javascript/controllers/editable_field_controller.js
  method targets (line 4) | static get targets() {
  method connect (line 8) | connect() {
  method click (line 23) | click() {
  method cancel (line 31) | cancel() {
  method _show (line 36) | _show(field, mode = 'inline') {
  method _hide (line 40) | _hide(field) {

FILE: app/javascript/controllers/hello_controller.js
  method connect (line 4) | connect() {

FILE: app/javascript/controllers/url_updating_frame_controller.js
  method connect (line 8) | connect() {
  method disconnect (line 28) | disconnect() {

FILE: app/jobs/application_job.rb
  class ApplicationJob (line 1) | class ApplicationJob < ActiveJob::Base

FILE: app/mailers/application_mailer.rb
  class ApplicationMailer (line 1) | class ApplicationMailer < ActionMailer::Base

FILE: app/models/application_record.rb
  class ApplicationRecord (line 1) | class ApplicationRecord < ActiveRecord::Base

FILE: app/models/user.rb
  class User (line 1) | class User

FILE: config/application.rb
  type TurboShowcase (line 9) | module TurboShowcase
    class Application (line 10) | class Application < Rails::Application

FILE: db/cable_migrate/20250529140703_create_solid_cable_message.solid_cable.rb
  class CreateSolidCableMessage (line 4) | class CreateSolidCableMessage < ActiveRecord::Migration[7.1]
    method change (line 5) | def change

FILE: db/cable_migrate/20250529140704_index_channels.solid_cable.rb
  class IndexChannels (line 4) | class IndexChannels < ActiveRecord::Migration[7.1]
    method change (line 5) | def change

FILE: test/application_system_test_case.rb
  class ApplicationSystemTestCase (line 3) | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase

FILE: test/channels/application_cable/connection_test.rb
  class ApplicationCable::ConnectionTest (line 3) | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase

FILE: test/test_helper.rb
  class ActiveSupport::TestCase (line 5) | class ActiveSupport::TestCase
Condensed preview — 123 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (99K chars).
[
  {
    "path": ".browserslistrc",
    "chars": 9,
    "preview": "defaults\n"
  },
  {
    "path": ".gitattributes",
    "chars": 327,
    "preview": "# See https://git-scm.com/docs/gitattributes for more about git attribute files.\n\n# Mark the database schema as having b"
  },
  {
    "path": ".gitignore",
    "chars": 840,
    "preview": "# See https://help.github.com/articles/ignoring-files for more about ignoring files.\n#\n# If you find yourself ignoring t"
  },
  {
    "path": ".ruby-version",
    "chars": 6,
    "preview": "3.2.2\n"
  },
  {
    "path": ".semaphore/main-deploy.yml",
    "chars": 470,
    "preview": "version: v1.0\nname: main-deploy\nagent:\n  machine:\n    type: e1-standard-2\n    os_image: ubuntu2004\n\nblocks:\n  - name: ma"
  },
  {
    "path": ".semaphore/semaphore.yml",
    "chars": 683,
    "preview": "version: v1.0\nname: main-deploy\nagent:\n  machine:\n    type: e2-standard-2\n    os_image: ubuntu2204\n\nblocks:\n  - name: ma"
  },
  {
    "path": "Gemfile",
    "chars": 835,
    "preview": "source \"https://rubygems.org\"\ngit_source(:github) { |repo| \"https://github.com/#{repo}.git\" }\n\nruby File.read(File.join("
  },
  {
    "path": "README.md",
    "chars": 1003,
    "preview": "# Turbo Showcase\n\nThis project contains the source code of https://turbo-showcase.renuoapp.ch.\n\nHere you can look how st"
  },
  {
    "path": "Rakefile",
    "chars": 227,
    "preview": "# Add your own tasks in files placed in lib/tasks ending in .rake,\n# for example lib/tasks/capistrano.rake, and they wil"
  },
  {
    "path": "app/assets/config/manifest.js",
    "chars": 143,
    "preview": "//= link_tree ../images\n//= link_directory ../stylesheets .css\n//= link_tree ../../javascript .js\n//= link_tree ../../.."
  },
  {
    "path": "app/assets/images/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "app/assets/stylesheets/application.scss",
    "chars": 2357,
    "preview": "/*\n * This is a manifest file that'll be compiled into application.css, which will include all the files\n * listed below"
  },
  {
    "path": "app/channels/application_cable/channel.rb",
    "chars": 79,
    "preview": "module ApplicationCable\n  class Channel < ActionCable::Channel::Base\n  end\nend\n"
  },
  {
    "path": "app/channels/application_cable/connection.rb",
    "chars": 85,
    "preview": "module ApplicationCable\n  class Connection < ActionCable::Connection::Base\n  end\nend\n"
  },
  {
    "path": "app/components/editable_field_component.html.erb",
    "chars": 1568,
    "preview": "<%= turbo_frame_tag(frame_tag_id) do %>\n  <% if can_edit? %>\n    <div class=\"fake-link editable\" data-controller=\"editab"
  },
  {
    "path": "app/components/editable_field_component.rb",
    "chars": 622,
    "preview": "class EditableFieldComponent < ViewComponent::Base\n  include Turbo::FramesHelper\n  include ActiveModel::AttributeAssignm"
  },
  {
    "path": "app/controllers/application_controller.rb",
    "chars": 57,
    "preview": "class ApplicationController < ActionController::Base\nend\n"
  },
  {
    "path": "app/controllers/concerns/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "app/controllers/home_controller.rb",
    "chars": 1781,
    "preview": "class HomeController < ApplicationController\n  def show\n  end\n\n  def frames\n  end\n\n  def slow\n  end\n\n  def pagination\n  "
  },
  {
    "path": "app/controllers/letters_controller.rb",
    "chars": 176,
    "preview": "class LettersController < ApplicationController\n  def show\n    @letter = params[:letter]\n  end\n\n  def slow\n    sleep 5\n "
  },
  {
    "path": "app/controllers/training_controller.rb",
    "chars": 207,
    "preview": "class TrainingController < ApplicationController\n  def instructions\n    @elements = (0...36).map { |i| i.to_s 36 }\n    @"
  },
  {
    "path": "app/helpers/application_helper.rb",
    "chars": 185,
    "preview": "module ApplicationHelper\n  def spinner\n    raw_spinner.html_safe\n  end\n\n  def raw_spinner\n    '<span class=\"show-when-di"
  },
  {
    "path": "app/javascript/application.js",
    "chars": 194,
    "preview": "// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails\n\nimport \"@hotwi"
  },
  {
    "path": "app/javascript/controllers/application.js",
    "chars": 216,
    "preview": "import { Application } from \"@hotwired/stimulus\"\n\nconst application = Application.start()\n\n// Configure Stimulus develop"
  },
  {
    "path": "app/javascript/controllers/editable_field_controller.js",
    "chars": 1081,
    "preview": "import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n  static get targets() {\n    "
  },
  {
    "path": "app/javascript/controllers/hello_controller.js",
    "chars": 157,
    "preview": "import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n  connect() {\n    this.elemen"
  },
  {
    "path": "app/javascript/controllers/index.js",
    "chars": 584,
    "preview": "// Import and register all your controllers from the importmap under controllers/*\n\nimport { application } from \"control"
  },
  {
    "path": "app/javascript/controllers/url_updating_frame_controller.js",
    "chars": 1085,
    "preview": "import { Controller } from \"@hotwired/stimulus\"\nimport { Turbo } from '@hotwired/turbo-rails';\n\n// this controller allow"
  },
  {
    "path": "app/jobs/application_job.rb",
    "chars": 269,
    "preview": "class ApplicationJob < ActiveJob::Base\n  # Automatically retry jobs that encountered a deadlock\n  # retry_on ActiveRecor"
  },
  {
    "path": "app/mailers/application_mailer.rb",
    "chars": 102,
    "preview": "class ApplicationMailer < ActionMailer::Base\n  default from: \"from@example.com\"\n  layout \"mailer\"\nend\n"
  },
  {
    "path": "app/models/application_record.rb",
    "chars": 78,
    "preview": "class ApplicationRecord < ActiveRecord::Base\n  self.abstract_class = true\nend\n"
  },
  {
    "path": "app/models/concerns/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "app/models/user.rb",
    "chars": 85,
    "preview": "class User\n  include ActiveModel::Model\n\n  attr_accessor :first_name, :last_name\nend\n"
  },
  {
    "path": "app/views/home/forms.html.erb",
    "chars": 1018,
    "preview": "<h1><i class=\"fas fa-keyboard renuo-green\"></i> Forms</h1>\n<%= turbo_frame_tag 'form-frame', class: 'flexible flex-colum"
  },
  {
    "path": "app/views/home/frames.html.erb",
    "chars": 1897,
    "preview": "\n<h1> <i class=\"fas fa-route renuo-green\"></i> Navigation</h1>\n<p>\n  Let's start by learning basic turbo frame navigatio"
  },
  {
    "path": "app/views/home/inline_fields.html.erb",
    "chars": 647,
    "preview": "<h1><i class=\"fas fa-barcode renuo-green\"></i> Inline fields</h1>\n<p>\n  This is one of the first components we realised "
  },
  {
    "path": "app/views/home/issues.html.erb",
    "chars": 699,
    "preview": "<%= turbo_frame_tag 'form-frame', class: 'flexible flex-column' do %>\n  <h5>Form with method GET</h5>\n\n  <p>\n    The dat"
  },
  {
    "path": "app/views/home/navigate_away.html.erb",
    "chars": 93,
    "preview": "<p>Now <%= link_to 'go back', :back%> and the pagination of the table will be persisted.</p>\n"
  },
  {
    "path": "app/views/home/pagination.html.erb",
    "chars": 992,
    "preview": "<h1><i class=\"fas fa-copy renuo-green\"></i> Pagination</h1>\n\n<%= turbo_frame_tag 'pagination-frame', data: { controller:"
  },
  {
    "path": "app/views/home/replace_external_frame.html.erb",
    "chars": 415,
    "preview": "<%= turbo_frame_tag 'external-frame' do %>\n  I got replaced. I can reload the previous content by simply calling the roo"
  },
  {
    "path": "app/views/home/replace_form_frame.html.erb",
    "chars": 134,
    "preview": "<%= turbo_frame_tag 'update-external' do %>\n  And PUF! The form has disappeared!\n  <a href=\"/frames\">Restore it, please<"
  },
  {
    "path": "app/views/home/replace_update_me.html.erb",
    "chars": 206,
    "preview": "<%= turbo_frame_tag 'update-me' do %>\n  I got replaced. I can reload the previous content by simply calling the root pag"
  },
  {
    "path": "app/views/home/replace_whole_page.html.erb",
    "chars": 267,
    "preview": "<p>\nYou see? Also the Browser URL has been updated.\n</p>\n<p>\nThis is one of the multiple options you have to replace the"
  },
  {
    "path": "app/views/home/show.html.erb",
    "chars": 1051,
    "preview": "<h1> Hello 👋, welcome to Turbo Showcase <i class=\"fas fa-rocket renuo-green\"></i></h1>\n<p class=\"mt-5\">\n  This is a <a h"
  },
  {
    "path": "app/views/home/slow.html.erb",
    "chars": 412,
    "preview": "<h1><i class=\"fas fa-clock renuo-green\"></i> Slow frame</h1>\n<p>\n  Loading frame content asynchronously. You can do so b"
  },
  {
    "path": "app/views/home/slow_frame.html.erb",
    "chars": 182,
    "preview": "<%= turbo_frame_tag 'slow-frame' do %>\n  This took quite long! That's why it was loaded asynchronously.\n  <div class=\"te"
  },
  {
    "path": "app/views/home/streams.html.erb",
    "chars": 1678,
    "preview": "<h1><i class=\"fas fa-water renuo-green\"></i> Streams</h1>\n\n<div class=\"alert alert-warning\">\n  <i class=\"fas fa-exclamat"
  },
  {
    "path": "app/views/layouts/application.html.erb",
    "chars": 3353,
    "preview": "<!DOCTYPE html>\n<html class=\"h-100\">\n<head>\n  <title>Turbo Showcase</title>\n  <meta name=\"viewport\" content=\"width=devic"
  },
  {
    "path": "app/views/layouts/mailer.html.erb",
    "chars": 229,
    "preview": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <style>\n  "
  },
  {
    "path": "app/views/layouts/mailer.text.erb",
    "chars": 13,
    "preview": "<%= yield %>\n"
  },
  {
    "path": "app/views/letters/show.html.erb",
    "chars": 119,
    "preview": "<div style=\"font-size: 10rem\"><%=@letter%></div>\n<%=link_to \"Nice letter. Go back\", :back, class: 'btn btn-primary' %>\n"
  },
  {
    "path": "app/views/training/instructions.html.erb",
    "chars": 4969,
    "preview": "<h1> Hello 👋, welcome to Turbo Training <i class=\"fas fa-dumbbell renuo-green\"></i></h1>\n<p>\n  This is a <a href=\"https:"
  },
  {
    "path": "app/views/training/show.html.erb",
    "chars": 386,
    "preview": "<p>This is your training page...there's a code boilerplate to start with the first exercise:</p>\n\n<code>\n<pre>\n  <code>\n"
  },
  {
    "path": "babel.config.js",
    "chars": 1668,
    "preview": "module.exports = function(api) {\n  var validEnv = ['development', 'test', 'production']\n  var currentEnv = api.env()\n  v"
  },
  {
    "path": "bin/bundle",
    "chars": 2945,
    "preview": "#!/usr/bin/env ruby\n# frozen_string_literal: true\n\n#\n# This file was generated by Bundler.\n#\n# The application 'bundle' "
  },
  {
    "path": "bin/check",
    "chars": 33,
    "preview": "#!/bin/sh\n\nbundle exec standardrb"
  },
  {
    "path": "bin/importmap",
    "chars": 91,
    "preview": "#!/usr/bin/env ruby\n\nrequire_relative \"../config/application\"\nrequire \"importmap/commands\"\n"
  },
  {
    "path": "bin/rails",
    "chars": 141,
    "preview": "#!/usr/bin/env ruby\nAPP_PATH = File.expand_path(\"../config/application\", __dir__)\nrequire_relative \"../config/boot\"\nrequ"
  },
  {
    "path": "bin/rake",
    "chars": 90,
    "preview": "#!/usr/bin/env ruby\nrequire_relative \"../config/boot\"\nrequire \"rake\"\nRake.application.run\n"
  },
  {
    "path": "bin/setup",
    "chars": 1068,
    "preview": "#!/usr/bin/env ruby\nrequire \"fileutils\"\n\n# path to your application root.\nAPP_ROOT = File.expand_path(\"..\", __dir__)\n\nde"
  },
  {
    "path": "bin/spring",
    "chars": 492,
    "preview": "#!/usr/bin/env ruby\nif !defined?(Spring) && [nil, \"development\", \"test\"].include?(ENV[\"RAILS_ENV\"])\n  gem \"bundler\"\n  re"
  },
  {
    "path": "bin/yarn",
    "chars": 521,
    "preview": "#!/usr/bin/env ruby\nAPP_ROOT = File.expand_path('..', __dir__)\nDir.chdir(APP_ROOT) do\n  yarn = ENV[\"PATH\"].split(File::P"
  },
  {
    "path": "config/application.rb",
    "chars": 997,
    "preview": "require_relative \"boot\"\n\nrequire \"rails/all\"\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited "
  },
  {
    "path": "config/appsignal.yml",
    "chars": 421,
    "preview": "default: &default\n  request_headers:\n    - HTTP_ACCEPT\n    - HTTP_ACCEPT_CHARSET\n    - HTTP_ACCEPT_ENCODING\n    - HTTP_A"
  },
  {
    "path": "config/boot.rb",
    "chars": 207,
    "preview": "ENV[\"BUNDLE_GEMFILE\"] ||= File.expand_path(\"../Gemfile\", __dir__)\n\nrequire \"bundler/setup\" # Set up gems listed in the G"
  },
  {
    "path": "config/cable.yml",
    "chars": 852,
    "preview": "# Async adapter only works within the same process, so for manually triggering cable updates from a console,\n# and seein"
  },
  {
    "path": "config/credentials.yml.enc",
    "chars": 464,
    "preview": "UDKZIkITXaNXR2Q/kRMiFcwt4Pn7EvLMd0bJ//JMRjmMJQmc5ochpLzwGGRuspvN39Yk18lWsQ6vsu5/wArK5b3++idQO2DcljbDboNghu8oOAfgrdXh1cyW"
  },
  {
    "path": "config/database.yml",
    "chars": 762,
    "preview": "default: &default\n  adapter: sqlite3\n  pool: <%= ENV.fetch(\"RAILS_MAX_THREADS\") { 5 } %>\n  timeout: 5000\n\ndevelopment:\n "
  },
  {
    "path": "config/environment.rb",
    "chars": 128,
    "preview": "# Load the Rails application.\nrequire_relative \"application\"\n\n# Initialize the Rails application.\nRails.application.init"
  },
  {
    "path": "config/environments/development.rb",
    "chars": 2672,
    "preview": "require \"active_support/core_ext/integer/time\"\n\nRails.application.configure do\n  # Settings specified here will take pre"
  },
  {
    "path": "config/environments/production.rb",
    "chars": 4297,
    "preview": "require \"active_support/core_ext/integer/time\"\n\nRails.application.configure do\n  # Settings specified here will take pre"
  },
  {
    "path": "config/environments/test.rb",
    "chars": 2643,
    "preview": "require \"active_support/core_ext/integer/time\"\n\n# The test environment is used exclusively to run your application's\n# t"
  },
  {
    "path": "config/importmap.rb",
    "chars": 428,
    "preview": "# Pin npm packages by running ./bin/importmap\n\npin \"application\", preload: true\npin \"popper\", to: \"popper.js\", preload: "
  },
  {
    "path": "config/initializers/application_controller_renderer.rb",
    "chars": 216,
    "preview": "# Be sure to restart your server when you modify this file.\n\n# ActiveSupport::Reloader.to_prepare do\n#   ApplicationCont"
  },
  {
    "path": "config/initializers/assets.rb",
    "chars": 579,
    "preview": "# Be sure to restart your server when you modify this file.\n\n# Version of your assets, change this if you want to expire"
  },
  {
    "path": "config/initializers/backtrace_silencers.rb",
    "chars": 540,
    "preview": "# Be sure to restart your server when you modify this file.\n\n# You can add backtrace silencers for libraries that you're"
  },
  {
    "path": "config/initializers/content_security_policy.rb",
    "chars": 1071,
    "preview": "# Be sure to restart your server when you modify this file.\n\n# Define an application-wide content security policy.\n# See"
  },
  {
    "path": "config/initializers/cookies_serializer.rb",
    "chars": 244,
    "preview": "# Be sure to restart your server when you modify this file.\n\n# Specify a serializer for the signed and encrypted cookie "
  },
  {
    "path": "config/initializers/filter_parameter_logging.rb",
    "chars": 448,
    "preview": "# Be sure to restart your server when you modify this file.\n\n# Configure parameters to be partially matched (e.g. passw "
  },
  {
    "path": "config/initializers/inflections.rb",
    "chars": 649,
    "preview": "# Be sure to restart your server when you modify this file.\n\n# Add new inflection rules using the following format. Infl"
  },
  {
    "path": "config/initializers/mime_types.rb",
    "chars": 156,
    "preview": "# Be sure to restart your server when you modify this file.\n\n# Add new mime types for use in respond_to blocks:\n# Mime::"
  },
  {
    "path": "config/initializers/new_framework_defaults_7_1.rb",
    "chars": 12183,
    "preview": "# Be sure to restart your server when you modify this file.\n#\n# This file eases your Rails 7.1 framework defaults upgrad"
  },
  {
    "path": "config/initializers/permissions_policy.rb",
    "chars": 480,
    "preview": "# Be sure to restart your server when you modify this file.\n\n# Define an application-wide HTTP permissions policy. For f"
  },
  {
    "path": "config/initializers/wrap_parameters.rb",
    "chars": 485,
    "preview": "# Be sure to restart your server when you modify this file.\n\n# This file contains settings for ActionController::ParamsW"
  },
  {
    "path": "config/locales/en.yml",
    "chars": 151,
    "preview": "en:\n  views:\n    pagination:\n      first: \"&laquo;\"\n      last: \"&raquo;\"\n      next: \"&rsaquo;\"\n      previous: \"&lsaqu"
  },
  {
    "path": "config/puma.rb",
    "chars": 1779,
    "preview": "# Puma can serve each request in a thread from an internal thread pool.\n# The `threads` method setting takes two numbers"
  },
  {
    "path": "config/routes.rb",
    "chars": 1099,
    "preview": "Rails.application.routes.draw do\n  root \"home#show\"\n\n  get \"/frames\", to: \"home#frames\"\n  get \"/slow\", to: \"home#slow\"\n "
  },
  {
    "path": "config/spring.rb",
    "chars": 97,
    "preview": "Spring.watch(\n  \".ruby-version\",\n  \".rbenv-vars\",\n  \"tmp/restart.txt\",\n  \"tmp/caching-dev.txt\"\n)\n"
  },
  {
    "path": "config/storage.yml",
    "chars": 1093,
    "preview": "test:\n  service: Disk\n  root: <%= Rails.root.join(\"tmp/storage\") %>\n\nlocal:\n  service: Disk\n  root: <%= Rails.root.join("
  },
  {
    "path": "config/webpack/development.js",
    "chars": 155,
    "preview": "process.env.NODE_ENV = process.env.NODE_ENV || 'development'\n\nconst environment = require('./environment')\n\nmodule.expor"
  },
  {
    "path": "config/webpack/environment.js",
    "chars": 82,
    "preview": "const { environment } = require('@rails/webpacker')\n\nmodule.exports = environment\n"
  },
  {
    "path": "config/webpack/production.js",
    "chars": 154,
    "preview": "process.env.NODE_ENV = process.env.NODE_ENV || 'production'\n\nconst environment = require('./environment')\n\nmodule.export"
  },
  {
    "path": "config/webpack/test.js",
    "chars": 155,
    "preview": "process.env.NODE_ENV = process.env.NODE_ENV || 'development'\n\nconst environment = require('./environment')\n\nmodule.expor"
  },
  {
    "path": "config/webpacker.yml",
    "chars": 1778,
    "preview": "# Note: You must restart bin/webpack-dev-server for changes to take effect\n\ndefault: &default\n  source_path: app/javascr"
  },
  {
    "path": "config.ru",
    "chars": 160,
    "preview": "# This file is used by Rack-based servers to start the application.\n\nrequire_relative \"config/environment\"\n\nrun Rails.ap"
  },
  {
    "path": "db/cable_migrate/20250529140703_create_solid_cable_message.solid_cable.rb",
    "chars": 349,
    "preview": "# frozen_string_literal: true\n\n# This migration comes from solid_cable (originally 20240103034713)\nclass CreateSolidCabl"
  },
  {
    "path": "db/cable_migrate/20250529140704_index_channels.solid_cable.rb",
    "chars": 232,
    "preview": "# frozen_string_literal: true\n\n# This migration comes from solid_cable (originally 20240607184711)\nclass IndexChannels <"
  },
  {
    "path": "db/cable_schema.rb",
    "chars": 1118,
    "preview": "# This file is auto-generated from the current state of the database. Instead\n# of editing this file, please use the mig"
  },
  {
    "path": "db/schema.rb",
    "chars": 762,
    "preview": "# This file is auto-generated from the current state of the database. Instead\n# of editing this file, please use the mig"
  },
  {
    "path": "db/seeds.rb",
    "chars": 374,
    "preview": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can t"
  },
  {
    "path": "lib/assets/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "lib/tasks/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "log/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "package.json",
    "chars": 97,
    "preview": "{\n  \"name\": \"turbo-showcase\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"dependencies\": {\n  }\n}\n"
  },
  {
    "path": "postcss.config.js",
    "chars": 224,
    "preview": "module.exports = {\n  plugins: [\n    require('postcss-import'),\n    require('postcss-flexbugs-fixes'),\n    require('postc"
  },
  {
    "path": "public/404.html",
    "chars": 1722,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <title>The page you were looking for doesn't exist (404)</title>\n  <meta name=\"viewport\""
  },
  {
    "path": "public/422.html",
    "chars": 1705,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <title>The change you wanted was rejected (422)</title>\n  <meta name=\"viewport\" content="
  },
  {
    "path": "public/500.html",
    "chars": 1635,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <title>We're sorry, but something went wrong (500)</title>\n  <meta name=\"viewport\" conte"
  },
  {
    "path": "public/robots.txt",
    "chars": 99,
    "preview": "# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file\n"
  },
  {
    "path": "storage/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "test/application_system_test_case.rb",
    "chars": 157,
    "preview": "require \"test_helper\"\n\nclass ApplicationSystemTestCase < ActionDispatch::SystemTestCase\n  driven_by :selenium, using: :c"
  },
  {
    "path": "test/channels/application_cable/connection_test.rb",
    "chars": 248,
    "preview": "require \"test_helper\"\n\nclass ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase\n  # test \"connects wit"
  },
  {
    "path": "test/controllers/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "test/fixtures/files/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "test/helpers/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "test/integration/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "test/mailers/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "test/models/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "test/system/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "test/test_helper.rb",
    "chars": 386,
    "preview": "ENV[\"RAILS_ENV\"] ||= \"test\"\nrequire_relative \"../config/environment\"\nrequire \"rails/test_help\"\n\nclass ActiveSupport::Tes"
  },
  {
    "path": "tmp/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "vendor/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "vendor/javascript/.keep",
    "chars": 0,
    "preview": ""
  }
]

About this extraction

This page contains the full source code of the renuo/turbo-showcase GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 123 files (86.0 KB), approximately 26.0k tokens, and a symbol index with 59 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!