🎄

rails newの--skip-*はどのような差分を生じるのか

2022/12/08に公開約65,300字

Ruby on Rails Advent Calendar 2022の9日目の記事です。

Railsの新規プロジェクトを作成するrails newコマンドでは、不要な機能を除外するオプションを指定することができます。

例えば--skip-action-textオプションを指定すると、生成されるプロジェクトからAction Textに関する機能が除外されます。

rails newした時点では除外した機能を後から追加したくなったり、逆に最初は含めていた機能を後から除外したくなった場合にどうすればよいかというのが気になったため、--skip-*のオプションを指定すると生成されるファイルにどのような差分が生じるかを調査しました。

確認したバージョンは以下の通りです。

% ruby -v
ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin21]
% rails -v
Rails 7.0.4

以下の差分では、config/credentials.yml.encconfig/master.keyといった、オプション指定とは関係なく毎回中身が異なって生成されるファイルは除外しています。

--skip-action-cable

Action Cableを除外します。

diff -u -r -N ./plain/foo/Gemfile ./--skip-action-cable/foo/Gemfile
--- ./plain/foo/Gemfile	2022-12-06 10:07:21.000000000 +0900
+++ ./--skip-action-cable/foo/Gemfile	2022-12-06 10:07:22.000000000 +0900
@@ -27,9 +27,6 @@
 # Build JSON APIs with ease [https://github.com/rails/jbuilder]
 gem "jbuilder"
 
-# Use Redis adapter to run Action Cable in production
-# gem "redis", "~> 4.0"
-
 # Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
 # gem "kredis"
 
diff -u -r -N ./plain/foo/app/channels/application_cable/channel.rb ./--skip-action-cable/foo/app/channels/application_cable/channel.rb
--- ./plain/foo/app/channels/application_cable/channel.rb	2022-12-06 10:07:21.000000000 +0900
+++ ./--skip-action-cable/foo/app/channels/application_cable/channel.rb	1970-01-01 09:00:00.000000000 +0900
@@ -1,4 +0,0 @@
-module ApplicationCable
-  class Channel < ActionCable::Channel::Base
-  end
-end
diff -u -r -N ./plain/foo/app/channels/application_cable/connection.rb ./--skip-action-cable/foo/app/channels/application_cable/connection.rb
--- ./plain/foo/app/channels/application_cable/connection.rb	2022-12-06 10:07:21.000000000 +0900
+++ ./--skip-action-cable/foo/app/channels/application_cable/connection.rb	1970-01-01 09:00:00.000000000 +0900
@@ -1,4 +0,0 @@
-module ApplicationCable
-  class Connection < ActionCable::Connection::Base
-  end
-end
diff -u -r -N ./plain/foo/config/application.rb ./--skip-action-cable/foo/config/application.rb
--- ./plain/foo/config/application.rb	2022-12-06 10:07:21.000000000 +0900
+++ ./--skip-action-cable/foo/config/application.rb	2022-12-06 10:07:23.000000000 +0900
@@ -1,6 +1,18 @@
 require_relative "boot"
 
-require "rails/all"
+require "rails"
+# Pick the frameworks you want:
+require "active_model/railtie"
+require "active_job/railtie"
+require "active_record/railtie"
+require "active_storage/engine"
+require "action_controller/railtie"
+require "action_mailer/railtie"
+require "action_mailbox/engine"
+require "action_text/engine"
+require "action_view/railtie"
+# require "action_cable/engine"
+require "rails/test_unit/railtie"
 
 # Require the gems listed in Gemfile, including any gems
 # you've limited to :test, :development, or :production.
diff -u -r -N ./plain/foo/config/cable.yml ./--skip-action-cable/foo/config/cable.yml
--- ./plain/foo/config/cable.yml	2022-12-06 10:07:21.000000000 +0900
+++ ./--skip-action-cable/foo/config/cable.yml	1970-01-01 09:00:00.000000000 +0900
@@ -1,10 +0,0 @@
-development:
-  adapter: async
-
-test:
-  adapter: test
-
-production:
-  adapter: redis
-  url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
-  channel_prefix: foo_production
diff -u -r -N ./plain/foo/config/environments/production.rb ./--skip-action-cable/foo/config/environments/production.rb
--- ./plain/foo/config/environments/production.rb	2022-12-06 10:07:21.000000000 +0900
+++ ./--skip-action-cable/foo/config/environments/production.rb	2022-12-06 10:07:23.000000000 +0900
@@ -40,11 +40,6 @@
   # 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.*/ ]
-
   # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
   # config.force_ssl = true
 
diff -u -r -N ./plain/foo/test/channels/application_cable/connection_test.rb ./--skip-action-cable/foo/test/channels/application_cable/connection_test.rb
--- ./plain/foo/test/channels/application_cable/connection_test.rb	2022-12-06 10:07:21.000000000 +0900
+++ ./--skip-action-cable/foo/test/channels/application_cable/connection_test.rb	1970-01-01 09:00:00.000000000 +0900
@@ -1,11 +0,0 @@
-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

--skip-action-mailbox

Action Mailboxを除外します。

diff -u -r -N ./plain/foo/config/application.rb ./--skip-action-mailbox/foo/config/application.rb
--- ./plain/foo/config/application.rb	2022-12-06 10:07:21.000000000 +0900
+++ ./--skip-action-mailbox/foo/config/application.rb	2022-12-06 10:07:21.000000000 +0900
@@ -1,6 +1,18 @@
 require_relative "boot"
 
-require "rails/all"
+require "rails"
+# Pick the frameworks you want:
+require "active_model/railtie"
+require "active_job/railtie"
+require "active_record/railtie"
+require "active_storage/engine"
+require "action_controller/railtie"
+require "action_mailer/railtie"
+# require "action_mailbox/engine"
+require "action_text/engine"
+require "action_view/railtie"
+require "action_cable/engine"
+require "rails/test_unit/railtie"
 
 # Require the gems listed in Gemfile, including any gems
 # you've limited to :test, :development, or :production.

--skip-action-mailer

Action Mailerが除外されます。

diff -u -r -N ./plain/foo/app/mailers/application_mailer.rb ./--skip-action-mailer/foo/app/mailers/application_mailer.rb
--- ./plain/foo/app/mailers/application_mailer.rb	2022-12-06 10:07:21.000000000 +0900
+++ ./--skip-action-mailer/foo/app/mailers/application_mailer.rb	1970-01-01 09:00:00.000000000 +0900
@@ -1,4 +0,0 @@
-class ApplicationMailer < ActionMailer::Base
-  default from: "from@example.com"
-  layout "mailer"
-end
diff -u -r -N ./plain/foo/app/views/layouts/mailer.html.erb ./--skip-action-mailer/foo/app/views/layouts/mailer.html.erb
--- ./plain/foo/app/views/layouts/mailer.html.erb	2022-12-06 10:07:21.000000000 +0900
+++ ./--skip-action-mailer/foo/app/views/layouts/mailer.html.erb	1970-01-01 09:00:00.000000000 +0900
@@ -1,13 +0,0 @@
-<!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>
diff -u -r -N ./plain/foo/app/views/layouts/mailer.text.erb ./--skip-action-mailer/foo/app/views/layouts/mailer.text.erb
--- ./plain/foo/app/views/layouts/mailer.text.erb	2022-12-06 10:07:21.000000000 +0900
+++ ./--skip-action-mailer/foo/app/views/layouts/mailer.text.erb	1970-01-01 09:00:00.000000000 +0900
@@ -1 +0,0 @@
-<%= yield %>
diff -u -r -N ./plain/foo/config/application.rb ./--skip-action-mailer/foo/config/application.rb
--- ./plain/foo/config/application.rb	2022-12-06 10:07:21.000000000 +0900
+++ ./--skip-action-mailer/foo/config/application.rb	2022-12-06 10:07:21.000000000 +0900
@@ -1,6 +1,18 @@
 require_relative "boot"
 
-require "rails/all"
+require "rails"
+# Pick the frameworks you want:
+require "active_model/railtie"
+require "active_job/railtie"
+require "active_record/railtie"
+require "active_storage/engine"
+require "action_controller/railtie"
+# require "action_mailer/railtie"
+require "action_mailbox/engine"
+require "action_text/engine"
+require "action_view/railtie"
+require "action_cable/engine"
+require "rails/test_unit/railtie"
 
 # Require the gems listed in Gemfile, including any gems
 # you've limited to :test, :development, or :production.
diff -u -r -N ./plain/foo/config/environments/development.rb ./--skip-action-mailer/foo/config/environments/development.rb
--- ./plain/foo/config/environments/development.rb	2022-12-06 10:07:21.000000000 +0900
+++ ./--skip-action-mailer/foo/config/environments/development.rb	2022-12-06 10:07:21.000000000 +0900
@@ -36,11 +36,6 @@
   # 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
 
diff -u -r -N ./plain/foo/config/environments/production.rb ./--skip-action-mailer/foo/config/environments/production.rb
--- ./plain/foo/config/environments/production.rb	2022-12-06 10:07:21.000000000 +0900
+++ ./--skip-action-mailer/foo/config/environments/production.rb	2022-12-06 10:07:21.000000000 +0900
@@ -62,12 +62,6 @@
   # config.active_job.queue_adapter     = :resque
   # config.active_job.queue_name_prefix = "foo_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
diff -u -r -N ./plain/foo/config/environments/test.rb ./--skip-action-mailer/foo/config/environments/test.rb
--- ./plain/foo/config/environments/test.rb	2022-12-06 10:07:21.000000000 +0900
+++ ./--skip-action-mailer/foo/config/environments/test.rb	2022-12-06 10:07:21.000000000 +0900
@@ -36,13 +36,6 @@
   # 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

--skip-action-text

Action Textを除外します。

diff -u -r -N ./plain/foo/config/application.rb ./--skip-action-text/foo/config/application.rb
--- ./plain/foo/config/application.rb	2022-12-06 10:07:21.000000000 +0900
+++ ./--skip-action-text/foo/config/application.rb	2022-12-06 10:07:22.000000000 +0900
@@ -1,6 +1,18 @@
 require_relative "boot"
 
-require "rails/all"
+require "rails"
+# Pick the frameworks you want:
+require "active_model/railtie"
+require "active_job/railtie"
+require "active_record/railtie"
+require "active_storage/engine"
+require "action_controller/railtie"
+require "action_mailer/railtie"
+require "action_mailbox/engine"
+# require "action_text/engine"
+require "action_view/railtie"
+require "action_cable/engine"
+require "rails/test_unit/railtie"
 
 # Require the gems listed in Gemfile, including any gems
 # you've limited to :test, :development, or :production.

--skip-active-job

Active Jobを除外するオプションですが、Rails 7.0.4ではこのオプションを指定するとエラーが発生します。

既に修正はされているようですが、未リリースです。

https://github.com/rails/rails/issues/46295

--skip-active-record

Active Recordを除外します。

diff -u -r -N ./plain/foo/Gemfile ./--skip-active-record/foo/Gemfile
--- ./plain/foo/Gemfile	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-active-record/foo/Gemfile	2022-12-08 10:22:07.000000000 +0900
@@ -9,9 +9,6 @@
 # The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
 gem "sprockets-rails"
 
-# Use sqlite3 as the database for Active Record
-gem "sqlite3", "~> 1.4"
-
 # Use the Puma web server [https://github.com/puma/puma]
 gem "puma", "~> 5.0"
 
@@ -45,9 +42,6 @@
 # Use Sass to process CSS
 # gem "sassc-rails"
 
-# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
-# gem "image_processing", "~> 1.2"
-
 group :development, :test do
   # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
   gem "debug", platforms: %i[ mri mingw x64_mingw ]
diff -u -r -N ./plain/foo/Gemfile.lock ./--skip-active-record/foo/Gemfile.lock
--- ./plain/foo/Gemfile.lock	2022-12-08 10:21:51.000000000 +0900
+++ ./--skip-active-record/foo/Gemfile.lock	2022-12-08 10:22:08.000000000 +0900
@@ -175,7 +175,6 @@
       actionpack (>= 5.2)
       activesupport (>= 5.2)
       sprockets (>= 3.0.0)
-    sqlite3 (1.5.4-arm64-darwin)
     stimulus-rails (1.2.1)
       railties (>= 6.0.0)
     thor (1.2.1)
@@ -216,7 +215,6 @@
   rails (~> 7.0.4)
   selenium-webdriver
   sprockets-rails
-  sqlite3 (~> 1.4)
   stimulus-rails
   turbo-rails
   tzinfo-data
diff -u -r -N ./plain/foo/app/models/application_record.rb ./--skip-active-record/foo/app/models/application_record.rb
--- ./plain/foo/app/models/application_record.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-active-record/foo/app/models/application_record.rb	1970-01-01 09:00:00.000000000 +0900
@@ -1,3 +0,0 @@
-class ApplicationRecord < ActiveRecord::Base
-  primary_abstract_class
-end
diff -u -r -N ./plain/foo/bin/setup ./--skip-active-record/foo/bin/setup
--- ./plain/foo/bin/setup	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-active-record/foo/bin/setup	2022-12-08 10:22:07.000000000 +0900
@@ -17,14 +17,6 @@
   system! "gem install bundler --conservative"
   system("bundle check") || system!("bundle install")
 
-  # 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"
 
diff -u -r -N ./plain/foo/config/application.rb ./--skip-active-record/foo/config/application.rb
--- ./plain/foo/config/application.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-active-record/foo/config/application.rb	2022-12-08 10:22:07.000000000 +0900
@@ -1,6 +1,18 @@
 require_relative "boot"
 
-require "rails/all"
+require "rails"
+# Pick the frameworks you want:
+require "active_model/railtie"
+require "active_job/railtie"
+# require "active_record/railtie"
+# require "active_storage/engine"
+require "action_controller/railtie"
+require "action_mailer/railtie"
+# require "action_mailbox/engine"
+# require "action_text/engine"
+require "action_view/railtie"
+require "action_cable/engine"
+require "rails/test_unit/railtie"
 
 # Require the gems listed in Gemfile, including any gems
 # you've limited to :test, :development, or :production.
diff -u -r -N ./plain/foo/config/database.yml ./--skip-active-record/foo/config/database.yml
--- ./plain/foo/config/database.yml	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-active-record/foo/config/database.yml	1970-01-01 09:00:00.000000000 +0900
@@ -1,25 +0,0 @@
-# SQLite. Versions 3.8.0 and up are supported.
-#   gem install sqlite3
-#
-#   Ensure the SQLite 3 gem is defined in your Gemfile
-#   gem "sqlite3"
-#
-default: &default
-  adapter: sqlite3
-  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
-  timeout: 5000
-
-development:
-  <<: *default
-  database: db/development.sqlite3
-
-# Warning: The database defined as "test" will be erased and
-# re-generated from your development database when you run "rake".
-# Do not set this db to the same as development or production.
-test:
-  <<: *default
-  database: db/test.sqlite3
-
-production:
-  <<: *default
-  database: db/production.sqlite3
diff -u -r -N ./plain/foo/config/environments/development.rb ./--skip-active-record/foo/config/environments/development.rb
--- ./plain/foo/config/environments/development.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-active-record/foo/config/environments/development.rb	2022-12-08 10:22:07.000000000 +0900
@@ -33,9 +33,6 @@
     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
 
@@ -50,12 +47,6 @@
   # 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
-
   # Suppress logger output for asset requests.
   config.assets.quiet = true
 
diff -u -r -N ./plain/foo/config/environments/production.rb ./--skip-active-record/foo/config/environments/production.rb
--- ./plain/foo/config/environments/production.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-active-record/foo/config/environments/production.rb	2022-12-08 10:22:07.000000000 +0900
@@ -37,9 +37,6 @@
   # 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"
@@ -87,7 +84,4 @@
     logger.formatter = config.log_formatter
     config.logger    = ActiveSupport::TaggedLogging.new(logger)
   end
-
-  # Do not dump schema after migrations.
-  config.active_record.dump_schema_after_migration = false
 end
diff -u -r -N ./plain/foo/config/environments/test.rb ./--skip-active-record/foo/config/environments/test.rb
--- ./plain/foo/config/environments/test.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-active-record/foo/config/environments/test.rb	2022-12-08 10:22:07.000000000 +0900
@@ -33,9 +33,6 @@
   # 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.
diff -u -r -N ./plain/foo/config/storage.yml ./--skip-active-record/foo/config/storage.yml
--- ./plain/foo/config/storage.yml	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-active-record/foo/config/storage.yml	1970-01-01 09:00:00.000000000 +0900
@@ -1,34 +0,0 @@
-test:
-  service: Disk
-  root: <%= Rails.root.join("tmp/storage") %>
-
-local:
-  service: Disk
-  root: <%= Rails.root.join("storage") %>
-
-# Use bin/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-<%= Rails.env %>
-
-# 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-<%= Rails.env %>
-
-# Use bin/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-<%= Rails.env %>
-
-# mirror:
-#   service: Mirror
-#   primary: local
-#   mirrors: [ amazon, google, microsoft ]
diff -u -r -N ./plain/foo/db/seeds.rb ./--skip-active-record/foo/db/seeds.rb
--- ./plain/foo/db/seeds.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-active-record/foo/db/seeds.rb	1970-01-01 09:00:00.000000000 +0900
@@ -1,7 +0,0 @@
-# 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)
diff -u -r -N ./plain/foo/test/test_helper.rb ./--skip-active-record/foo/test/test_helper.rb
--- ./plain/foo/test/test_helper.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-active-record/foo/test/test_helper.rb	2022-12-08 10:22:07.000000000 +0900
@@ -6,8 +6,5 @@
   # 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

--skip-asset-pipeline

Asset Pipelineを除外します。

diff -u -r -N ./plain/foo/Gemfile ./--skip-asset-pipeline/foo/Gemfile
--- ./plain/foo/Gemfile	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-asset-pipeline/foo/Gemfile	2022-12-08 10:22:22.000000000 +0900
@@ -6,9 +6,6 @@
 # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
 gem "rails", "~> 7.0.4"
 
-# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
-gem "sprockets-rails"
-
 # Use sqlite3 as the database for Active Record
 gem "sqlite3", "~> 1.4"
 
@@ -42,9 +39,6 @@
 # Reduces boot times through caching; required in config/boot.rb
 gem "bootsnap", require: false
 
-# Use Sass to process CSS
-# gem "sassc-rails"
-
 # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
 # gem "image_processing", "~> 1.2"
 
diff -u -r -N ./plain/foo/Gemfile.lock ./--skip-asset-pipeline/foo/Gemfile.lock
--- ./plain/foo/Gemfile.lock	2022-12-08 10:21:51.000000000 +0900
+++ ./--skip-asset-pipeline/foo/Gemfile.lock	2022-12-08 10:22:24.000000000 +0900
@@ -168,13 +168,6 @@
       rexml (~> 3.2, >= 3.2.5)
       rubyzip (>= 1.2.2, < 3.0)
       websocket (~> 1.0)
-    sprockets (4.1.1)
-      concurrent-ruby (~> 1.0)
-      rack (> 1, < 3)
-    sprockets-rails (3.4.2)
-      actionpack (>= 5.2)
-      activesupport (>= 5.2)
-      sprockets (>= 3.0.0)
     sqlite3 (1.5.4-arm64-darwin)
     stimulus-rails (1.2.1)
       railties (>= 6.0.0)
@@ -215,7 +208,6 @@
   puma (~> 5.0)
   rails (~> 7.0.4)
   selenium-webdriver
-  sprockets-rails
   sqlite3 (~> 1.4)
   stimulus-rails
   turbo-rails
diff -u -r -N ./plain/foo/app/assets/config/manifest.js ./--skip-asset-pipeline/foo/app/assets/config/manifest.js
--- ./plain/foo/app/assets/config/manifest.js	2022-12-08 10:21:53.000000000 +0900
+++ ./--skip-asset-pipeline/foo/app/assets/config/manifest.js	1970-01-01 09:00:00.000000000 +0900
@@ -1,4 +0,0 @@
-//= link_tree ../images
-//= link_directory ../stylesheets .css
-//= link_tree ../../javascript .js
-//= link_tree ../../../vendor/javascript .js
diff -u -r -N ./plain/foo/app/assets/stylesheets/application.css ./--skip-asset-pipeline/foo/app/assets/stylesheets/application.css
--- ./plain/foo/app/assets/stylesheets/application.css	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-asset-pipeline/foo/app/assets/stylesheets/application.css	2022-12-08 10:22:22.000000000 +0900
@@ -1,15 +1 @@
-/*
- * This is a manifest file that'll be compiled into application.css, which will include all the files
- * listed below.
- *
- * Any CSS (and SCSS, if configured) 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
- * 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
- */
+/* Application styles */
diff -u -r -N ./plain/foo/config/environments/development.rb ./--skip-asset-pipeline/foo/config/environments/development.rb
--- ./plain/foo/config/environments/development.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-asset-pipeline/foo/config/environments/development.rb	2022-12-08 10:22:22.000000000 +0900
@@ -56,8 +56,6 @@
   # Highlight code that triggered database queries in logs.
   config.active_record.verbose_query_logs = true
 
-  # Suppress logger output for asset requests.
-  config.assets.quiet = true
 
   # Raises error for missing translations.
   # config.i18n.raise_on_missing_translations = true
diff -u -r -N ./plain/foo/config/environments/production.rb ./--skip-asset-pipeline/foo/config/environments/production.rb
--- ./plain/foo/config/environments/production.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-asset-pipeline/foo/config/environments/production.rb	2022-12-08 10:22:22.000000000 +0900
@@ -24,12 +24,6 @@
   # Apache or NGINX already handles this.
   config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
 
-  # Compress CSS using a preprocessor.
-  # config.assets.css_compressor = :sass
-
-  # Do not fallback 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"
 
diff -u -r -N ./plain/foo/config/initializers/assets.rb ./--skip-asset-pipeline/foo/config/initializers/assets.rb
--- ./plain/foo/config/initializers/assets.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-asset-pipeline/foo/config/initializers/assets.rb	1970-01-01 09:00:00.000000000 +0900
@@ -1,12 +0,0 @@
-# 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 )

--skip-bootsnap

bootsnapを除外します。

diff -u -r -N ./plain/foo/Gemfile ./--skip-bootsnap/foo/Gemfile
--- ./plain/foo/Gemfile	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-bootsnap/foo/Gemfile	2022-12-08 10:22:44.000000000 +0900
@@ -39,9 +39,6 @@
 # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
 gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
 
-# Reduces boot times through caching; required in config/boot.rb
-gem "bootsnap", require: false
-
 # Use Sass to process CSS
 # gem "sassc-rails"
 
diff -u -r -N ./plain/foo/Gemfile.lock ./--skip-bootsnap/foo/Gemfile.lock
--- ./plain/foo/Gemfile.lock	2022-12-08 10:21:51.000000000 +0900
+++ ./--skip-bootsnap/foo/Gemfile.lock	2022-12-08 10:22:45.000000000 +0900
@@ -69,8 +69,6 @@
     addressable (2.8.1)
       public_suffix (>= 2.0.2, < 6.0)
     bindex (0.8.1)
-    bootsnap (1.15.0)
-      msgpack (~> 1.2)
     builder (3.2.4)
     capybara (3.38.0)
       addressable
@@ -113,7 +111,6 @@
     method_source (1.0.0)
     mini_mime (1.1.2)
     minitest (5.16.3)
-    msgpack (1.6.0)
     net-imap (0.3.1)
       net-protocol
     net-pop (0.1.2)
@@ -207,7 +204,6 @@
   arm64-darwin-21
 
 DEPENDENCIES
-  bootsnap
   capybara
   debug
   importmap-rails
diff -u -r -N ./plain/foo/config/boot.rb ./--skip-bootsnap/foo/config/boot.rb
--- ./plain/foo/config/boot.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-bootsnap/foo/config/boot.rb	2022-12-08 10:22:44.000000000 +0900
@@ -1,4 +1,3 @@
 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.

--skip-hotwire

Hotwireを除外します。

diff -u -r -N ./plain/foo/Gemfile ./--skip-hotwire/foo/Gemfile
--- ./plain/foo/Gemfile	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-hotwire/foo/Gemfile	2022-12-08 10:22:28.000000000 +0900
@@ -18,12 +18,6 @@
 # Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
 gem "importmap-rails"
 
-# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
-gem "turbo-rails"
-
-# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
-gem "stimulus-rails"
-
 # Build JSON APIs with ease [https://github.com/rails/jbuilder]
 gem "jbuilder"
 
diff -u -r -N ./plain/foo/Gemfile.lock ./--skip-hotwire/foo/Gemfile.lock
--- ./plain/foo/Gemfile.lock	2022-12-08 10:21:51.000000000 +0900
+++ ./--skip-hotwire/foo/Gemfile.lock	2022-12-08 10:22:29.000000000 +0900
@@ -176,14 +176,8 @@
       activesupport (>= 5.2)
       sprockets (>= 3.0.0)
     sqlite3 (1.5.4-arm64-darwin)
-    stimulus-rails (1.2.1)
-      railties (>= 6.0.0)
     thor (1.2.1)
     timeout (0.3.1)
-    turbo-rails (1.3.2)
-      actionpack (>= 6.0.0)
-      activejob (>= 6.0.0)
-      railties (>= 6.0.0)
     tzinfo (2.0.5)
       concurrent-ruby (~> 1.0)
     web-console (4.2.0)
@@ -217,8 +211,6 @@
   selenium-webdriver
   sprockets-rails
   sqlite3 (~> 1.4)
-  stimulus-rails
-  turbo-rails
   tzinfo-data
   web-console
   webdrivers
diff -u -r -N ./plain/foo/app/javascript/application.js ./--skip-hotwire/foo/app/javascript/application.js
--- ./plain/foo/app/javascript/application.js	2022-12-08 10:21:54.000000000 +0900
+++ ./--skip-hotwire/foo/app/javascript/application.js	2022-12-08 10:22:31.000000000 +0900
@@ -1,3 +1 @@
 // Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
-import "@hotwired/turbo-rails"
-import "controllers"
diff -u -r -N ./plain/foo/app/javascript/controllers/application.js ./--skip-hotwire/foo/app/javascript/controllers/application.js
--- ./plain/foo/app/javascript/controllers/application.js	2022-12-08 10:21:54.000000000 +0900
+++ ./--skip-hotwire/foo/app/javascript/controllers/application.js	1970-01-01 09:00:00.000000000 +0900
@@ -1,9 +0,0 @@
-import { Application } from "@hotwired/stimulus"
-
-const application = Application.start()
-
-// Configure Stimulus development experience
-application.debug = false
-window.Stimulus   = application
-
-export { application }
diff -u -r -N ./plain/foo/app/javascript/controllers/hello_controller.js ./--skip-hotwire/foo/app/javascript/controllers/hello_controller.js
--- ./plain/foo/app/javascript/controllers/hello_controller.js	2022-12-08 10:21:54.000000000 +0900
+++ ./--skip-hotwire/foo/app/javascript/controllers/hello_controller.js	1970-01-01 09:00:00.000000000 +0900
@@ -1,7 +0,0 @@
-import { Controller } from "@hotwired/stimulus"
-
-export default class extends Controller {
-  connect() {
-    this.element.textContent = "Hello World!"
-  }
-}
diff -u -r -N ./plain/foo/app/javascript/controllers/index.js ./--skip-hotwire/foo/app/javascript/controllers/index.js
--- ./plain/foo/app/javascript/controllers/index.js	2022-12-08 10:21:54.000000000 +0900
+++ ./--skip-hotwire/foo/app/javascript/controllers/index.js	1970-01-01 09:00:00.000000000 +0900
@@ -1,11 +0,0 @@
-// 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)
diff -u -r -N ./plain/foo/app/views/layouts/application.html.erb ./--skip-hotwire/foo/app/views/layouts/application.html.erb
--- ./plain/foo/app/views/layouts/application.html.erb	2022-12-08 10:21:53.000000000 +0900
+++ ./--skip-hotwire/foo/app/views/layouts/application.html.erb	2022-12-08 10:22:31.000000000 +0900
@@ -6,7 +6,7 @@
     <%= csrf_meta_tags %>
     <%= csp_meta_tag %>
 
-    <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
+    <%= stylesheet_link_tag "application" %>
     <%= javascript_importmap_tags %>
   </head>
 
diff -u -r -N ./plain/foo/config/importmap.rb ./--skip-hotwire/foo/config/importmap.rb
--- ./plain/foo/config/importmap.rb	2022-12-08 10:21:54.000000000 +0900
+++ ./--skip-hotwire/foo/config/importmap.rb	2022-12-08 10:22:31.000000000 +0900
@@ -1,7 +1,3 @@
 # Pin npm packages by running ./bin/importmap
 
 pin "application", preload: true
-pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
-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"

--skip-javascript

JavaScriptファイルを除外します。

diff -u -r -N ./plain/foo/Gemfile ./--skip-javascript/foo/Gemfile
--- ./plain/foo/Gemfile	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-javascript/foo/Gemfile	2022-12-08 10:22:27.000000000 +0900
@@ -15,15 +15,6 @@
 # Use the Puma web server [https://github.com/puma/puma]
 gem "puma", "~> 5.0"
 
-# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
-gem "importmap-rails"
-
-# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
-gem "turbo-rails"
-
-# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
-gem "stimulus-rails"
-
 # Build JSON APIs with ease [https://github.com/rails/jbuilder]
 gem "jbuilder"
 
diff -u -r -N ./plain/foo/Gemfile.lock ./--skip-javascript/foo/Gemfile.lock
--- ./plain/foo/Gemfile.lock	2022-12-08 10:21:51.000000000 +0900
+++ ./--skip-javascript/foo/Gemfile.lock	2022-12-08 10:22:28.000000000 +0900
@@ -91,9 +91,6 @@
       activesupport (>= 5.0)
     i18n (1.12.0)
       concurrent-ruby (~> 1.0)
-    importmap-rails (1.1.5)
-      actionpack (>= 6.0.0)
-      railties (>= 6.0.0)
     io-console (0.5.11)
     irb (1.5.1)
       reline (>= 0.3.0)
@@ -176,14 +173,8 @@
       activesupport (>= 5.2)
       sprockets (>= 3.0.0)
     sqlite3 (1.5.4-arm64-darwin)
-    stimulus-rails (1.2.1)
-      railties (>= 6.0.0)
     thor (1.2.1)
     timeout (0.3.1)
-    turbo-rails (1.3.2)
-      actionpack (>= 6.0.0)
-      activejob (>= 6.0.0)
-      railties (>= 6.0.0)
     tzinfo (2.0.5)
       concurrent-ruby (~> 1.0)
     web-console (4.2.0)
@@ -210,15 +201,12 @@
   bootsnap
   capybara
   debug
-  importmap-rails
   jbuilder
   puma (~> 5.0)
   rails (~> 7.0.4)
   selenium-webdriver
   sprockets-rails
   sqlite3 (~> 1.4)
-  stimulus-rails
-  turbo-rails
   tzinfo-data
   web-console
   webdrivers
diff -u -r -N ./plain/foo/app/assets/config/manifest.js ./--skip-javascript/foo/app/assets/config/manifest.js
--- ./plain/foo/app/assets/config/manifest.js	2022-12-08 10:21:53.000000000 +0900
+++ ./--skip-javascript/foo/app/assets/config/manifest.js	2022-12-08 10:22:27.000000000 +0900
@@ -1,4 +1,2 @@
 //= link_tree ../images
 //= link_directory ../stylesheets .css
-//= link_tree ../../javascript .js
-//= link_tree ../../../vendor/javascript .js
diff -u -r -N ./plain/foo/app/javascript/application.js ./--skip-javascript/foo/app/javascript/application.js
--- ./plain/foo/app/javascript/application.js	2022-12-08 10:21:54.000000000 +0900
+++ ./--skip-javascript/foo/app/javascript/application.js	1970-01-01 09:00:00.000000000 +0900
@@ -1,3 +0,0 @@
-// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
-import "@hotwired/turbo-rails"
-import "controllers"
diff -u -r -N ./plain/foo/app/javascript/controllers/application.js ./--skip-javascript/foo/app/javascript/controllers/application.js
--- ./plain/foo/app/javascript/controllers/application.js	2022-12-08 10:21:54.000000000 +0900
+++ ./--skip-javascript/foo/app/javascript/controllers/application.js	1970-01-01 09:00:00.000000000 +0900
@@ -1,9 +0,0 @@
-import { Application } from "@hotwired/stimulus"
-
-const application = Application.start()
-
-// Configure Stimulus development experience
-application.debug = false
-window.Stimulus   = application
-
-export { application }
diff -u -r -N ./plain/foo/app/javascript/controllers/hello_controller.js ./--skip-javascript/foo/app/javascript/controllers/hello_controller.js
--- ./plain/foo/app/javascript/controllers/hello_controller.js	2022-12-08 10:21:54.000000000 +0900
+++ ./--skip-javascript/foo/app/javascript/controllers/hello_controller.js	1970-01-01 09:00:00.000000000 +0900
@@ -1,7 +0,0 @@
-import { Controller } from "@hotwired/stimulus"
-
-export default class extends Controller {
-  connect() {
-    this.element.textContent = "Hello World!"
-  }
-}
diff -u -r -N ./plain/foo/app/javascript/controllers/index.js ./--skip-javascript/foo/app/javascript/controllers/index.js
--- ./plain/foo/app/javascript/controllers/index.js	2022-12-08 10:21:54.000000000 +0900
+++ ./--skip-javascript/foo/app/javascript/controllers/index.js	1970-01-01 09:00:00.000000000 +0900
@@ -1,11 +0,0 @@
-// 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)
diff -u -r -N ./plain/foo/app/views/layouts/application.html.erb ./--skip-javascript/foo/app/views/layouts/application.html.erb
--- ./plain/foo/app/views/layouts/application.html.erb	2022-12-08 10:21:53.000000000 +0900
+++ ./--skip-javascript/foo/app/views/layouts/application.html.erb	2022-12-08 10:22:27.000000000 +0900
@@ -6,8 +6,7 @@
     <%= csrf_meta_tags %>
     <%= csp_meta_tag %>
 
-    <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
-    <%= javascript_importmap_tags %>
+    <%= stylesheet_link_tag "application" %>
   </head>
 
   <body>
diff -u -r -N ./plain/foo/bin/importmap ./--skip-javascript/foo/bin/importmap
--- ./plain/foo/bin/importmap	2022-12-08 10:21:53.000000000 +0900
+++ ./--skip-javascript/foo/bin/importmap	1970-01-01 09:00:00.000000000 +0900
@@ -1,4 +0,0 @@
-#!/usr/bin/env ruby
-
-require_relative "../config/application"
-require "importmap/commands"
diff -u -r -N ./plain/foo/config/importmap.rb ./--skip-javascript/foo/config/importmap.rb
--- ./plain/foo/config/importmap.rb	2022-12-08 10:21:54.000000000 +0900
+++ ./--skip-javascript/foo/config/importmap.rb	1970-01-01 09:00:00.000000000 +0900
@@ -1,7 +0,0 @@
-# Pin npm packages by running ./bin/importmap
-
-pin "application", preload: true
-pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
-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"

--skip-jbuilder

jbuilderを除外します。

diff -u -r -N ./plain/foo/Gemfile ./--skip-jbuilder/foo/Gemfile
--- ./plain/foo/Gemfile	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-jbuilder/foo/Gemfile	2022-12-08 10:22:31.000000000 +0900
@@ -24,9 +24,6 @@
 # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
 gem "stimulus-rails"
 
-# Build JSON APIs with ease [https://github.com/rails/jbuilder]
-gem "jbuilder"
-
 # Use Redis adapter to run Action Cable in production
 # gem "redis", "~> 4.0"
 
diff -u -r -N ./plain/foo/Gemfile.lock ./--skip-jbuilder/foo/Gemfile.lock
--- ./plain/foo/Gemfile.lock	2022-12-08 10:21:51.000000000 +0900
+++ ./--skip-jbuilder/foo/Gemfile.lock	2022-12-08 10:22:32.000000000 +0900
@@ -97,9 +97,6 @@
     io-console (0.5.11)
     irb (1.5.1)
       reline (>= 0.3.0)
-    jbuilder (2.11.5)
-      actionview (>= 5.0.0)
-      activesupport (>= 5.0.0)
     loofah (2.19.0)
       crass (~> 1.0.2)
       nokogiri (>= 1.5.9)
@@ -211,7 +208,6 @@
   capybara
   debug
   importmap-rails
-  jbuilder
   puma (~> 5.0)
   rails (~> 7.0.4)
   selenium-webdriver

--skip-system-test

システムテストを除外します。

diff -u -r -N ./plain/foo/Gemfile ./--skip-system-test/foo/Gemfile
--- ./plain/foo/Gemfile	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-system-test/foo/Gemfile	2022-12-08 10:22:40.000000000 +0900
@@ -64,9 +64,3 @@
   # gem "spring"
 end
 
-group :test do
-  # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
-  gem "capybara"
-  gem "selenium-webdriver"
-  gem "webdrivers"
-end
diff -u -r -N ./plain/foo/Gemfile.lock ./--skip-system-test/foo/Gemfile.lock
--- ./plain/foo/Gemfile.lock	2022-12-08 10:21:51.000000000 +0900
+++ ./--skip-system-test/foo/Gemfile.lock	2022-12-08 10:22:41.000000000 +0900
@@ -66,21 +66,10 @@
       i18n (>= 1.6, < 2)
       minitest (>= 5.1)
       tzinfo (~> 2.0)
-    addressable (2.8.1)
-      public_suffix (>= 2.0.2, < 6.0)
     bindex (0.8.1)
     bootsnap (1.15.0)
       msgpack (~> 1.2)
     builder (3.2.4)
-    capybara (3.38.0)
-      addressable
-      matrix
-      mini_mime (>= 0.1.3)
-      nokogiri (~> 1.8)
-      rack (>= 1.6.0)
-      rack-test (>= 0.6.3)
-      regexp_parser (>= 1.5, < 3.0)
-      xpath (~> 3.2)
     concurrent-ruby (1.1.10)
     crass (1.0.6)
     debug (1.7.0)
@@ -109,7 +98,6 @@
       net-pop
       net-smtp
     marcel (1.0.2)
-    matrix (0.4.2)
     method_source (1.0.0)
     mini_mime (1.1.2)
     minitest (5.16.3)
@@ -125,7 +113,6 @@
     nio4r (2.5.8)
     nokogiri (1.13.9-arm64-darwin)
       racc (~> 1.4)
-    public_suffix (5.0.1)
     puma (5.6.5)
       nio4r (~> 2.0)
     racc (1.6.1)
@@ -159,15 +146,8 @@
       thor (~> 1.0)
       zeitwerk (~> 2.5)
     rake (13.0.6)
-    regexp_parser (2.6.1)
     reline (0.3.1)
       io-console (~> 0.5)
-    rexml (3.2.5)
-    rubyzip (2.3.2)
-    selenium-webdriver (4.7.1)
-      rexml (~> 3.2, >= 3.2.5)
-      rubyzip (>= 1.2.2, < 3.0)
-      websocket (~> 1.0)
     sprockets (4.1.1)
       concurrent-ruby (~> 1.0)
       rack (> 1, < 3)
@@ -191,16 +171,9 @@
       activemodel (>= 6.0.0)
       bindex (>= 0.4.0)
       railties (>= 6.0.0)
-    webdrivers (5.2.0)
-      nokogiri (~> 1.6)
-      rubyzip (>= 1.3.0)
-      selenium-webdriver (~> 4.0)
-    websocket (1.2.9)
     websocket-driver (0.7.5)
       websocket-extensions (>= 0.1.0)
     websocket-extensions (0.1.5)
-    xpath (3.2.0)
-      nokogiri (~> 1.8)
     zeitwerk (2.6.6)
 
 PLATFORMS
@@ -208,20 +181,17 @@
 
 DEPENDENCIES
   bootsnap
-  capybara
   debug
   importmap-rails
   jbuilder
   puma (~> 5.0)
   rails (~> 7.0.4)
-  selenium-webdriver
   sprockets-rails
   sqlite3 (~> 1.4)
   stimulus-rails
   turbo-rails
   tzinfo-data
   web-console
-  webdrivers
 
 RUBY VERSION
    ruby 3.1.3p185
diff -u -r -N ./plain/foo/config/application.rb ./--skip-system-test/foo/config/application.rb
--- ./plain/foo/config/application.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-system-test/foo/config/application.rb	2022-12-08 10:22:40.000000000 +0900
@@ -18,5 +18,8 @@
     #
     # config.time_zone = "Central Time (US & Canada)"
     # config.eager_load_paths << Rails.root.join("extras")
+
+    # Don't generate system test files.
+    config.generators.system_tests = nil
   end
 end
diff -u -r -N ./plain/foo/test/application_system_test_case.rb ./--skip-system-test/foo/test/application_system_test_case.rb
--- ./plain/foo/test/application_system_test_case.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-system-test/foo/test/application_system_test_case.rb	1970-01-01 09:00:00.000000000 +0900
@@ -1,5 +0,0 @@
-require "test_helper"
-
-class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
-  driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
-end

--skip-test

テストを除外します。

diff -u -r -N ./plain/foo/Gemfile ./--skip-test/foo/Gemfile
--- ./plain/foo/Gemfile	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-test/foo/Gemfile	2022-12-08 10:22:36.000000000 +0900
@@ -64,9 +64,3 @@
   # gem "spring"
 end
 
-group :test do
-  # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
-  gem "capybara"
-  gem "selenium-webdriver"
-  gem "webdrivers"
-end
diff -u -r -N ./plain/foo/Gemfile.lock ./--skip-test/foo/Gemfile.lock
--- ./plain/foo/Gemfile.lock	2022-12-08 10:21:51.000000000 +0900
+++ ./--skip-test/foo/Gemfile.lock	2022-12-08 10:22:37.000000000 +0900
@@ -66,21 +66,10 @@
       i18n (>= 1.6, < 2)
       minitest (>= 5.1)
       tzinfo (~> 2.0)
-    addressable (2.8.1)
-      public_suffix (>= 2.0.2, < 6.0)
     bindex (0.8.1)
     bootsnap (1.15.0)
       msgpack (~> 1.2)
     builder (3.2.4)
-    capybara (3.38.0)
-      addressable
-      matrix
-      mini_mime (>= 0.1.3)
-      nokogiri (~> 1.8)
-      rack (>= 1.6.0)
-      rack-test (>= 0.6.3)
-      regexp_parser (>= 1.5, < 3.0)
-      xpath (~> 3.2)
     concurrent-ruby (1.1.10)
     crass (1.0.6)
     debug (1.7.0)
@@ -109,7 +98,6 @@
       net-pop
       net-smtp
     marcel (1.0.2)
-    matrix (0.4.2)
     method_source (1.0.0)
     mini_mime (1.1.2)
     minitest (5.16.3)
@@ -125,7 +113,6 @@
     nio4r (2.5.8)
     nokogiri (1.13.9-arm64-darwin)
       racc (~> 1.4)
-    public_suffix (5.0.1)
     puma (5.6.5)
       nio4r (~> 2.0)
     racc (1.6.1)
@@ -159,15 +146,8 @@
       thor (~> 1.0)
       zeitwerk (~> 2.5)
     rake (13.0.6)
-    regexp_parser (2.6.1)
     reline (0.3.1)
       io-console (~> 0.5)
-    rexml (3.2.5)
-    rubyzip (2.3.2)
-    selenium-webdriver (4.7.1)
-      rexml (~> 3.2, >= 3.2.5)
-      rubyzip (>= 1.2.2, < 3.0)
-      websocket (~> 1.0)
     sprockets (4.1.1)
       concurrent-ruby (~> 1.0)
       rack (> 1, < 3)
@@ -191,16 +171,9 @@
       activemodel (>= 6.0.0)
       bindex (>= 0.4.0)
       railties (>= 6.0.0)
-    webdrivers (5.2.0)
-      nokogiri (~> 1.6)
-      rubyzip (>= 1.3.0)
-      selenium-webdriver (~> 4.0)
-    websocket (1.2.9)
     websocket-driver (0.7.5)
       websocket-extensions (>= 0.1.0)
     websocket-extensions (0.1.5)
-    xpath (3.2.0)
-      nokogiri (~> 1.8)
     zeitwerk (2.6.6)
 
 PLATFORMS
@@ -208,20 +181,17 @@
 
 DEPENDENCIES
   bootsnap
-  capybara
   debug
   importmap-rails
   jbuilder
   puma (~> 5.0)
   rails (~> 7.0.4)
-  selenium-webdriver
   sprockets-rails
   sqlite3 (~> 1.4)
   stimulus-rails
   turbo-rails
   tzinfo-data
   web-console
-  webdrivers
 
 RUBY VERSION
    ruby 3.1.3p185
diff -u -r -N ./plain/foo/config/application.rb ./--skip-test/foo/config/application.rb
--- ./plain/foo/config/application.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-test/foo/config/application.rb	2022-12-08 10:22:36.000000000 +0900
@@ -1,6 +1,18 @@
 require_relative "boot"
 
-require "rails/all"
+require "rails"
+# Pick the frameworks you want:
+require "active_model/railtie"
+require "active_job/railtie"
+require "active_record/railtie"
+require "active_storage/engine"
+require "action_controller/railtie"
+require "action_mailer/railtie"
+require "action_mailbox/engine"
+require "action_text/engine"
+require "action_view/railtie"
+require "action_cable/engine"
+# require "rails/test_unit/railtie"
 
 # Require the gems listed in Gemfile, including any gems
 # you've limited to :test, :development, or :production.
@@ -18,5 +30,8 @@
     #
     # config.time_zone = "Central Time (US & Canada)"
     # config.eager_load_paths << Rails.root.join("extras")
+
+    # Don't generate system test files.
+    config.generators.system_tests = nil
   end
 end
diff -u -r -N ./plain/foo/test/application_system_test_case.rb ./--skip-test/foo/test/application_system_test_case.rb
--- ./plain/foo/test/application_system_test_case.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-test/foo/test/application_system_test_case.rb	1970-01-01 09:00:00.000000000 +0900
@@ -1,5 +0,0 @@
-require "test_helper"
-
-class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
-  driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
-end
diff -u -r -N ./plain/foo/test/channels/application_cable/connection_test.rb ./--skip-test/foo/test/channels/application_cable/connection_test.rb
--- ./plain/foo/test/channels/application_cable/connection_test.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-test/foo/test/channels/application_cable/connection_test.rb	1970-01-01 09:00:00.000000000 +0900
@@ -1,11 +0,0 @@
-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
diff -u -r -N ./plain/foo/test/test_helper.rb ./--skip-test/foo/test/test_helper.rb
--- ./plain/foo/test/test_helper.rb	2022-12-08 10:21:50.000000000 +0900
+++ ./--skip-test/foo/test/test_helper.rb	1970-01-01 09:00:00.000000000 +0900
@@ -1,13 +0,0 @@
-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

--skip-git

Git関係の処理をスキップします。

.gitattributes.gitignoreファイルと、.gitディレクトリおよびその中身が生成されなくなります。(.gitディレクトリの差分は省略)

diff -u -r -N ./plain/foo/.gitattributes ./--skip-git/foo/.gitattributes
--- ./plain/foo/.gitattributes  2022-12-08 11:01:27.000000000 +0900
+++ ./--skip-git/foo/.gitattributes     1970-01-01 09:00:00.000000000 +0900
@@ -1,7 +0,0 @@
-# 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 any vendored files as having been vendored.
-vendor/* linguist-vendored
diff -u -r -N ./plain/foo/.gitignore ./--skip-git/foo/.gitignore
--- ./plain/foo/.gitignore      2022-12-08 11:01:27.000000000 +0900
+++ ./--skip-git/foo/.gitignore 1970-01-01 09:00:00.000000000 +0900
@@ -1,35 +0,0 @@
-# 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
-/tmp/storage/*
-!/tmp/storage/
-!/tmp/storage/.keep
-
-/public/assets
-
-# Ignore master key for decrypting credentials and more.
-/config/master.key

--skip-bundle

bundle installしないようになるオプション……と思いきや、それに加えてJavaScriptファイルが生成されなくなります。

diff -u -r -N ./plain/foo/Gemfile.lock ./--skip-bundle/foo/Gemfile.lock
--- ./plain/foo/Gemfile.lock	2022-12-08 10:21:51.000000000 +0900
+++ ./--skip-bundle/foo/Gemfile.lock	1970-01-01 09:00:00.000000000 +0900
@@ -1,230 +0,0 @@
-GEM
-  remote: https://rubygems.org/
-  specs:
-    actioncable (7.0.4)
-      actionpack (= 7.0.4)
-      activesupport (= 7.0.4)
-      nio4r (~> 2.0)
-      websocket-driver (>= 0.6.1)
-    actionmailbox (7.0.4)
-      actionpack (= 7.0.4)
-      activejob (= 7.0.4)
-      activerecord (= 7.0.4)
-      activestorage (= 7.0.4)
-      activesupport (= 7.0.4)
-      mail (>= 2.7.1)
-      net-imap
-      net-pop
-      net-smtp
-    actionmailer (7.0.4)
-      actionpack (= 7.0.4)
-      actionview (= 7.0.4)
-      activejob (= 7.0.4)
-      activesupport (= 7.0.4)
-      mail (~> 2.5, >= 2.5.4)
-      net-imap
-      net-pop
-      net-smtp
-      rails-dom-testing (~> 2.0)
-    actionpack (7.0.4)
-      actionview (= 7.0.4)
-      activesupport (= 7.0.4)
-      rack (~> 2.0, >= 2.2.0)
-      rack-test (>= 0.6.3)
-      rails-dom-testing (~> 2.0)
-      rails-html-sanitizer (~> 1.0, >= 1.2.0)
-    actiontext (7.0.4)
-      actionpack (= 7.0.4)
-      activerecord (= 7.0.4)
-      activestorage (= 7.0.4)
-      activesupport (= 7.0.4)
-      globalid (>= 0.6.0)
-      nokogiri (>= 1.8.5)
-    actionview (7.0.4)
-      activesupport (= 7.0.4)
-      builder (~> 3.1)
-      erubi (~> 1.4)
-      rails-dom-testing (~> 2.0)
-      rails-html-sanitizer (~> 1.1, >= 1.2.0)
-    activejob (7.0.4)
-      activesupport (= 7.0.4)
-      globalid (>= 0.3.6)
-    activemodel (7.0.4)
-      activesupport (= 7.0.4)
-    activerecord (7.0.4)
-      activemodel (= 7.0.4)
-      activesupport (= 7.0.4)
-    activestorage (7.0.4)
-      actionpack (= 7.0.4)
-      activejob (= 7.0.4)
-      activerecord (= 7.0.4)
-      activesupport (= 7.0.4)
-      marcel (~> 1.0)
-      mini_mime (>= 1.1.0)
-    activesupport (7.0.4)
-      concurrent-ruby (~> 1.0, >= 1.0.2)
-      i18n (>= 1.6, < 2)
-      minitest (>= 5.1)
-      tzinfo (~> 2.0)
-    addressable (2.8.1)
-      public_suffix (>= 2.0.2, < 6.0)
-    bindex (0.8.1)
-    bootsnap (1.15.0)
-      msgpack (~> 1.2)
-    builder (3.2.4)
-    capybara (3.38.0)
-      addressable
-      matrix
-      mini_mime (>= 0.1.3)
-      nokogiri (~> 1.8)
-      rack (>= 1.6.0)
-      rack-test (>= 0.6.3)
-      regexp_parser (>= 1.5, < 3.0)
-      xpath (~> 3.2)
-    concurrent-ruby (1.1.10)
-    crass (1.0.6)
-    debug (1.7.0)
-      irb (>= 1.5.0)
-      reline (>= 0.3.1)
-    erubi (1.11.0)
-    globalid (1.0.0)
-      activesupport (>= 5.0)
-    i18n (1.12.0)
-      concurrent-ruby (~> 1.0)
-    importmap-rails (1.1.5)
-      actionpack (>= 6.0.0)
-      railties (>= 6.0.0)
-    io-console (0.5.11)
-    irb (1.5.1)
-      reline (>= 0.3.0)
-    jbuilder (2.11.5)
-      actionview (>= 5.0.0)
-      activesupport (>= 5.0.0)
-    loofah (2.19.0)
-      crass (~> 1.0.2)
-      nokogiri (>= 1.5.9)
-    mail (2.8.0)
-      mini_mime (>= 0.1.1)
-      net-imap
-      net-pop
-      net-smtp
-    marcel (1.0.2)
-    matrix (0.4.2)
-    method_source (1.0.0)
-    mini_mime (1.1.2)
-    minitest (5.16.3)
-    msgpack (1.6.0)
-    net-imap (0.3.1)
-      net-protocol
-    net-pop (0.1.2)
-      net-protocol
-    net-protocol (0.2.0)
-      timeout
-    net-smtp (0.3.3)
-      net-protocol
-    nio4r (2.5.8)
-    nokogiri (1.13.9-arm64-darwin)
-      racc (~> 1.4)
-    public_suffix (5.0.1)
-    puma (5.6.5)
-      nio4r (~> 2.0)
-    racc (1.6.1)
-    rack (2.2.4)
-    rack-test (2.0.2)
-      rack (>= 1.3)
-    rails (7.0.4)
-      actioncable (= 7.0.4)
-      actionmailbox (= 7.0.4)
-      actionmailer (= 7.0.4)
-      actionpack (= 7.0.4)
-      actiontext (= 7.0.4)
-      actionview (= 7.0.4)
-      activejob (= 7.0.4)
-      activemodel (= 7.0.4)
-      activerecord (= 7.0.4)
-      activestorage (= 7.0.4)
-      activesupport (= 7.0.4)
-      bundler (>= 1.15.0)
-      railties (= 7.0.4)
-    rails-dom-testing (2.0.3)
-      activesupport (>= 4.2.0)
-      nokogiri (>= 1.6)
-    rails-html-sanitizer (1.4.3)
-      loofah (~> 2.3)
-    railties (7.0.4)
-      actionpack (= 7.0.4)
-      activesupport (= 7.0.4)
-      method_source
-      rake (>= 12.2)
-      thor (~> 1.0)
-      zeitwerk (~> 2.5)
-    rake (13.0.6)
-    regexp_parser (2.6.1)
-    reline (0.3.1)
-      io-console (~> 0.5)
-    rexml (3.2.5)
-    rubyzip (2.3.2)
-    selenium-webdriver (4.7.1)
-      rexml (~> 3.2, >= 3.2.5)
-      rubyzip (>= 1.2.2, < 3.0)
-      websocket (~> 1.0)
-    sprockets (4.1.1)
-      concurrent-ruby (~> 1.0)
-      rack (> 1, < 3)
-    sprockets-rails (3.4.2)
-      actionpack (>= 5.2)
-      activesupport (>= 5.2)
-      sprockets (>= 3.0.0)
-    sqlite3 (1.5.4-arm64-darwin)
-    stimulus-rails (1.2.1)
-      railties (>= 6.0.0)
-    thor (1.2.1)
-    timeout (0.3.1)
-    turbo-rails (1.3.2)
-      actionpack (>= 6.0.0)
-      activejob (>= 6.0.0)
-      railties (>= 6.0.0)
-    tzinfo (2.0.5)
-      concurrent-ruby (~> 1.0)
-    web-console (4.2.0)
-      actionview (>= 6.0.0)
-      activemodel (>= 6.0.0)
-      bindex (>= 0.4.0)
-      railties (>= 6.0.0)
-    webdrivers (5.2.0)
-      nokogiri (~> 1.6)
-      rubyzip (>= 1.3.0)
-      selenium-webdriver (~> 4.0)
-    websocket (1.2.9)
-    websocket-driver (0.7.5)
-      websocket-extensions (>= 0.1.0)
-    websocket-extensions (0.1.5)
-    xpath (3.2.0)
-      nokogiri (~> 1.8)
-    zeitwerk (2.6.6)
-
-PLATFORMS
-  arm64-darwin-21
-
-DEPENDENCIES
-  bootsnap
-  capybara
-  debug
-  importmap-rails
-  jbuilder
-  puma (~> 5.0)
-  rails (~> 7.0.4)
-  selenium-webdriver
-  sprockets-rails
-  sqlite3 (~> 1.4)
-  stimulus-rails
-  turbo-rails
-  tzinfo-data
-  web-console
-  webdrivers
-
-RUBY VERSION
-   ruby 3.1.3p185
-
-BUNDLED WITH
-   2.3.26
diff -u -r -N ./plain/foo/app/assets/config/manifest.js ./--skip-bundle/foo/app/assets/config/manifest.js
--- ./plain/foo/app/assets/config/manifest.js	2022-12-08 10:21:53.000000000 +0900
+++ ./--skip-bundle/foo/app/assets/config/manifest.js	2022-12-08 11:09:15.000000000 +0900
@@ -1,4 +1,2 @@
 //= link_tree ../images
 //= link_directory ../stylesheets .css
-//= link_tree ../../javascript .js
-//= link_tree ../../../vendor/javascript .js
diff -u -r -N ./plain/foo/app/javascript/application.js ./--skip-bundle/foo/app/javascript/application.js
--- ./plain/foo/app/javascript/application.js	2022-12-08 10:21:54.000000000 +0900
+++ ./--skip-bundle/foo/app/javascript/application.js	1970-01-01 09:00:00.000000000 +0900
@@ -1,3 +0,0 @@
-// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
-import "@hotwired/turbo-rails"
-import "controllers"
diff -u -r -N ./plain/foo/app/javascript/controllers/application.js ./--skip-bundle/foo/app/javascript/controllers/application.js
--- ./plain/foo/app/javascript/controllers/application.js	2022-12-08 10:21:54.000000000 +0900
+++ ./--skip-bundle/foo/app/javascript/controllers/application.js	1970-01-01 09:00:00.000000000 +0900
@@ -1,9 +0,0 @@
-import { Application } from "@hotwired/stimulus"
-
-const application = Application.start()
-
-// Configure Stimulus development experience
-application.debug = false
-window.Stimulus   = application
-
-export { application }
diff -u -r -N ./plain/foo/app/javascript/controllers/hello_controller.js ./--skip-bundle/foo/app/javascript/controllers/hello_controller.js
--- ./plain/foo/app/javascript/controllers/hello_controller.js	2022-12-08 10:21:54.000000000 +0900
+++ ./--skip-bundle/foo/app/javascript/controllers/hello_controller.js	1970-01-01 09:00:00.000000000 +0900
@@ -1,7 +0,0 @@
-import { Controller } from "@hotwired/stimulus"
-
-export default class extends Controller {
-  connect() {
-    this.element.textContent = "Hello World!"
-  }
-}
diff -u -r -N ./plain/foo/app/javascript/controllers/index.js ./--skip-bundle/foo/app/javascript/controllers/index.js
--- ./plain/foo/app/javascript/controllers/index.js	2022-12-08 10:21:54.000000000 +0900
+++ ./--skip-bundle/foo/app/javascript/controllers/index.js	1970-01-01 09:00:00.000000000 +0900
@@ -1,11 +0,0 @@
-// 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)
diff -u -r -N ./plain/foo/app/views/layouts/application.html.erb ./--skip-bundle/foo/app/views/layouts/application.html.erb
--- ./plain/foo/app/views/layouts/application.html.erb	2022-12-08 10:21:53.000000000 +0900
+++ ./--skip-bundle/foo/app/views/layouts/application.html.erb	2022-12-08 11:09:15.000000000 +0900
@@ -7,7 +7,6 @@
     <%= csp_meta_tag %>
 
     <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
-    <%= javascript_importmap_tags %>
   </head>
 
   <body>
diff -u -r -N ./plain/foo/bin/bundle ./--skip-bundle/foo/bin/bundle
--- ./plain/foo/bin/bundle	2022-12-08 10:21:51.000000000 +0900
+++ ./--skip-bundle/foo/bin/bundle	1970-01-01 09:00:00.000000000 +0900
@@ -1,114 +0,0 @@
-#!/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", __dir__)
-  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_requirement
-    @bundler_requirement ||=
-      env_var_version || cli_arg_version ||
-        bundler_requirement_for(lockfile_version)
-  end
-
-  def bundler_requirement_for(version)
-    return "#{Gem::Requirement.default}.a" unless version
-
-    bundler_gem_version = Gem::Version.new(version)
-
-    requirement = bundler_gem_version.approximate_recommendation
-
-    return requirement unless Gem.rubygems_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
diff -u -r -N ./plain/foo/bin/importmap ./--skip-bundle/foo/bin/importmap
--- ./plain/foo/bin/importmap	2022-12-08 10:21:53.000000000 +0900
+++ ./--skip-bundle/foo/bin/importmap	1970-01-01 09:00:00.000000000 +0900
@@ -1,4 +0,0 @@
-#!/usr/bin/env ruby
-
-require_relative "../config/application"
-require "importmap/commands"
diff -u -r -N ./plain/foo/config/importmap.rb ./--skip-bundle/foo/config/importmap.rb
--- ./plain/foo/config/importmap.rb	2022-12-08 10:21:54.000000000 +0900
+++ ./--skip-bundle/foo/config/importmap.rb	1970-01-01 09:00:00.000000000 +0900
@@ -1,7 +0,0 @@
-# Pin npm packages by running ./bin/importmap
-
-pin "application", preload: true
-pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
-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"

Discussion

ログインするとコメントできます