aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails.rb1
-rw-r--r--railties/lib/rails/all.rb1
-rw-r--r--railties/lib/rails/api/generator.rb1
-rw-r--r--railties/lib/rails/api/task.rb1
-rw-r--r--railties/lib/rails/app_loader.rb1
-rw-r--r--railties/lib/rails/application.rb1
-rw-r--r--railties/lib/rails/application/bootstrap.rb1
-rw-r--r--railties/lib/rails/application/configuration.rb1
-rw-r--r--railties/lib/rails/application/default_middleware_stack.rb1
-rw-r--r--railties/lib/rails/application/finisher.rb1
-rw-r--r--railties/lib/rails/application/routes_reloader.rb1
-rw-r--r--railties/lib/rails/application_controller.rb1
-rw-r--r--railties/lib/rails/backtrace_cleaner.rb1
-rw-r--r--railties/lib/rails/cli.rb1
-rw-r--r--railties/lib/rails/code_statistics.rb1
-rw-r--r--railties/lib/rails/code_statistics_calculator.rb1
-rw-r--r--railties/lib/rails/command.rb1
-rw-r--r--railties/lib/rails/command/actions.rb1
-rw-r--r--railties/lib/rails/command/base.rb1
-rw-r--r--railties/lib/rails/command/behavior.rb1
-rw-r--r--railties/lib/rails/command/environment_argument.rb1
-rw-r--r--railties/lib/rails/commands.rb1
-rw-r--r--railties/lib/rails/commands/application/application_command.rb1
-rw-r--r--railties/lib/rails/commands/console/console_command.rb1
-rw-r--r--railties/lib/rails/commands/dbconsole/dbconsole_command.rb1
-rw-r--r--railties/lib/rails/commands/destroy/destroy_command.rb1
-rw-r--r--railties/lib/rails/commands/generate/generate_command.rb1
-rw-r--r--railties/lib/rails/commands/help/help_command.rb1
-rw-r--r--railties/lib/rails/commands/new/new_command.rb1
-rw-r--r--railties/lib/rails/commands/plugin/plugin_command.rb1
-rw-r--r--railties/lib/rails/commands/rake/rake_command.rb1
-rw-r--r--railties/lib/rails/commands/runner/runner_command.rb1
-rw-r--r--railties/lib/rails/commands/secrets/secrets_command.rb1
-rw-r--r--railties/lib/rails/commands/server/server_command.rb1
-rw-r--r--railties/lib/rails/commands/test/test_command.rb1
-rw-r--r--railties/lib/rails/commands/version/version_command.rb1
-rw-r--r--railties/lib/rails/configuration.rb1
-rw-r--r--railties/lib/rails/console/app.rb1
-rw-r--r--railties/lib/rails/console/helpers.rb1
-rw-r--r--railties/lib/rails/dev_caching.rb1
-rw-r--r--railties/lib/rails/engine.rb1
-rw-r--r--railties/lib/rails/engine/commands.rb1
-rw-r--r--railties/lib/rails/engine/configuration.rb1
-rw-r--r--railties/lib/rails/engine/railties.rb1
-rw-r--r--railties/lib/rails/engine/updater.rb1
-rw-r--r--railties/lib/rails/gem_version.rb1
-rw-r--r--railties/lib/rails/generators.rb1
-rw-r--r--railties/lib/rails/generators/actions.rb1
-rw-r--r--railties/lib/rails/generators/actions/create_migration.rb1
-rw-r--r--railties/lib/rails/generators/active_model.rb1
-rw-r--r--railties/lib/rails/generators/app_base.rb1
-rw-r--r--railties/lib/rails/generators/base.rb1
-rw-r--r--railties/lib/rails/generators/css/assets/assets_generator.rb1
-rw-r--r--railties/lib/rails/generators/css/scaffold/scaffold_generator.rb1
-rw-r--r--railties/lib/rails/generators/erb.rb1
-rw-r--r--railties/lib/rails/generators/erb/controller/controller_generator.rb1
-rw-r--r--railties/lib/rails/generators/erb/mailer/mailer_generator.rb1
-rw-r--r--railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb1
-rw-r--r--railties/lib/rails/generators/generated_attribute.rb1
-rw-r--r--railties/lib/rails/generators/js/assets/assets_generator.rb1
-rw-r--r--railties/lib/rails/generators/migration.rb1
-rw-r--r--railties/lib/rails/generators/model_helpers.rb1
-rw-r--r--railties/lib/rails/generators/named_base.rb1
-rw-r--r--railties/lib/rails/generators/rails/app/app_generator.rb1
-rw-r--r--railties/lib/rails/generators/rails/assets/assets_generator.rb1
-rw-r--r--railties/lib/rails/generators/rails/controller/controller_generator.rb1
-rw-r--r--railties/lib/rails/generators/rails/encrypted_secrets/encrypted_secrets_generator.rb1
-rw-r--r--railties/lib/rails/generators/rails/generator/generator_generator.rb1
-rw-r--r--railties/lib/rails/generators/rails/helper/helper_generator.rb1
-rw-r--r--railties/lib/rails/generators/rails/integration_test/integration_test_generator.rb1
-rw-r--r--railties/lib/rails/generators/rails/migration/migration_generator.rb1
-rw-r--r--railties/lib/rails/generators/rails/model/model_generator.rb1
-rw-r--r--railties/lib/rails/generators/rails/plugin/plugin_generator.rb1
-rw-r--r--railties/lib/rails/generators/rails/resource/resource_generator.rb1
-rw-r--r--railties/lib/rails/generators/rails/resource_route/resource_route_generator.rb1
-rw-r--r--railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb1
-rw-r--r--railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb1
-rw-r--r--railties/lib/rails/generators/rails/system_test/system_test_generator.rb1
-rw-r--r--railties/lib/rails/generators/rails/task/task_generator.rb1
-rw-r--r--railties/lib/rails/generators/resource_helpers.rb1
-rw-r--r--railties/lib/rails/generators/test_case.rb1
-rw-r--r--railties/lib/rails/generators/test_unit.rb1
-rw-r--r--railties/lib/rails/generators/test_unit/controller/controller_generator.rb1
-rw-r--r--railties/lib/rails/generators/test_unit/generator/generator_generator.rb1
-rw-r--r--railties/lib/rails/generators/test_unit/helper/helper_generator.rb1
-rw-r--r--railties/lib/rails/generators/test_unit/integration/integration_generator.rb1
-rw-r--r--railties/lib/rails/generators/test_unit/job/job_generator.rb1
-rw-r--r--railties/lib/rails/generators/test_unit/mailer/mailer_generator.rb1
-rw-r--r--railties/lib/rails/generators/test_unit/model/model_generator.rb1
-rw-r--r--railties/lib/rails/generators/test_unit/plugin/plugin_generator.rb1
-rw-r--r--railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb1
-rw-r--r--railties/lib/rails/generators/test_unit/system/system_generator.rb1
-rw-r--r--railties/lib/rails/generators/testing/assertions.rb1
-rw-r--r--railties/lib/rails/generators/testing/behaviour.rb1
-rw-r--r--railties/lib/rails/generators/testing/setup_and_teardown.rb1
-rw-r--r--railties/lib/rails/info.rb1
-rw-r--r--railties/lib/rails/info_controller.rb1
-rw-r--r--railties/lib/rails/initializable.rb1
-rw-r--r--railties/lib/rails/mailers_controller.rb1
-rw-r--r--railties/lib/rails/paths.rb1
-rw-r--r--railties/lib/rails/plugin/test.rb1
-rw-r--r--railties/lib/rails/rack.rb1
-rw-r--r--railties/lib/rails/rack/logger.rb1
-rw-r--r--railties/lib/rails/railtie.rb1
-rw-r--r--railties/lib/rails/railtie/configurable.rb1
-rw-r--r--railties/lib/rails/railtie/configuration.rb1
-rw-r--r--railties/lib/rails/ruby_version_check.rb1
-rw-r--r--railties/lib/rails/secrets.rb1
-rw-r--r--railties/lib/rails/source_annotation_extractor.rb1
-rw-r--r--railties/lib/rails/tasks.rb1
-rw-r--r--railties/lib/rails/tasks/annotations.rake1
-rw-r--r--railties/lib/rails/tasks/dev.rake1
-rw-r--r--railties/lib/rails/tasks/engine.rake1
-rw-r--r--railties/lib/rails/tasks/framework.rake1
-rw-r--r--railties/lib/rails/tasks/initializers.rake1
-rw-r--r--railties/lib/rails/tasks/log.rake1
-rw-r--r--railties/lib/rails/tasks/middleware.rake1
-rw-r--r--railties/lib/rails/tasks/misc.rake1
-rw-r--r--railties/lib/rails/tasks/restart.rake1
-rw-r--r--railties/lib/rails/tasks/routes.rake1
-rw-r--r--railties/lib/rails/tasks/statistics.rake1
-rw-r--r--railties/lib/rails/tasks/tmp.rake1
-rw-r--r--railties/lib/rails/tasks/yarn.rake1
-rw-r--r--railties/lib/rails/test_help.rb1
-rw-r--r--railties/lib/rails/test_unit/line_filtering.rb1
-rw-r--r--railties/lib/rails/test_unit/minitest_plugin.rb1
-rw-r--r--railties/lib/rails/test_unit/railtie.rb1
-rw-r--r--railties/lib/rails/test_unit/reporter.rb1
-rw-r--r--railties/lib/rails/test_unit/test_requirer.rb1
-rw-r--r--railties/lib/rails/test_unit/testing.rake1
-rw-r--r--railties/lib/rails/version.rb1
-rw-r--r--railties/lib/rails/welcome_controller.rb1
132 files changed, 132 insertions, 0 deletions
diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb
index 6d8bf28943..168722a16f 100644
--- a/railties/lib/rails.rb
+++ b/railties/lib/rails.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/ruby_version_check"
require "pathname"
diff --git a/railties/lib/rails/all.rb b/railties/lib/rails/all.rb
index 7606ea0e46..d46c78dc7d 100644
--- a/railties/lib/rails/all.rb
+++ b/railties/lib/rails/all.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails"
%w(
diff --git a/railties/lib/rails/api/generator.rb b/railties/lib/rails/api/generator.rb
index dcc491783c..27aaf1b96d 100644
--- a/railties/lib/rails/api/generator.rb
+++ b/railties/lib/rails/api/generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "sdoc"
class RDoc::Generator::API < RDoc::Generator::SDoc # :nodoc:
diff --git a/railties/lib/rails/api/task.rb b/railties/lib/rails/api/task.rb
index 49267c2329..27936d3182 100644
--- a/railties/lib/rails/api/task.rb
+++ b/railties/lib/rails/api/task.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rdoc/task"
require_relative "generator"
diff --git a/railties/lib/rails/app_loader.rb b/railties/lib/rails/app_loader.rb
index 525d5f0161..20e10c9c55 100644
--- a/railties/lib/rails/app_loader.rb
+++ b/railties/lib/rails/app_loader.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "pathname"
require "rails/version"
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb
index 39ca2db8e1..b00351738e 100644
--- a/railties/lib/rails/application.rb
+++ b/railties/lib/rails/application.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "yaml"
require "active_support/core_ext/hash/keys"
require "active_support/core_ext/object/blank"
diff --git a/railties/lib/rails/application/bootstrap.rb b/railties/lib/rails/application/bootstrap.rb
index dc0491035d..ea4c6014b6 100644
--- a/railties/lib/rails/application/bootstrap.rb
+++ b/railties/lib/rails/application/bootstrap.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "fileutils"
require "active_support/notifications"
require "active_support/dependencies"
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb
index fb635c6ae8..164fcfb282 100644
--- a/railties/lib/rails/application/configuration.rb
+++ b/railties/lib/rails/application/configuration.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support/core_ext/kernel/reporting"
require "active_support/file_update_checker"
require "rails/engine/configuration"
diff --git a/railties/lib/rails/application/default_middleware_stack.rb b/railties/lib/rails/application/default_middleware_stack.rb
index 63300ffef3..c8c13210d8 100644
--- a/railties/lib/rails/application/default_middleware_stack.rb
+++ b/railties/lib/rails/application/default_middleware_stack.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
class Application
class DefaultMiddlewareStack
diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb
index c027d06663..0c7598e561 100644
--- a/railties/lib/rails/application/finisher.rb
+++ b/railties/lib/rails/application/finisher.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
class Application
module Finisher
diff --git a/railties/lib/rails/application/routes_reloader.rb b/railties/lib/rails/application/routes_reloader.rb
index e02ef629f2..32dc74db43 100644
--- a/railties/lib/rails/application/routes_reloader.rb
+++ b/railties/lib/rails/application/routes_reloader.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support/core_ext/module/delegation"
module Rails
diff --git a/railties/lib/rails/application_controller.rb b/railties/lib/rails/application_controller.rb
index f7d112900a..4ca1e7dcbd 100644
--- a/railties/lib/rails/application_controller.rb
+++ b/railties/lib/rails/application_controller.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
class Rails::ApplicationController < ActionController::Base # :nodoc:
self.view_paths = File.expand_path("templates", __dir__)
layout "application"
diff --git a/railties/lib/rails/backtrace_cleaner.rb b/railties/lib/rails/backtrace_cleaner.rb
index 3bd18ebfb5..abc8a93414 100644
--- a/railties/lib/rails/backtrace_cleaner.rb
+++ b/railties/lib/rails/backtrace_cleaner.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support/backtrace_cleaner"
module Rails
diff --git a/railties/lib/rails/cli.rb b/railties/lib/rails/cli.rb
index 973b746068..f262d2f6a1 100644
--- a/railties/lib/rails/cli.rb
+++ b/railties/lib/rails/cli.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/app_loader"
# If we are inside a Rails application this method performs an exec and thus
diff --git a/railties/lib/rails/code_statistics.rb b/railties/lib/rails/code_statistics.rb
index 70dce268f1..50394cbd51 100644
--- a/railties/lib/rails/code_statistics.rb
+++ b/railties/lib/rails/code_statistics.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/code_statistics_calculator"
require "active_support/core_ext/enumerable"
diff --git a/railties/lib/rails/code_statistics_calculator.rb b/railties/lib/rails/code_statistics_calculator.rb
index d0194af197..94decda164 100644
--- a/railties/lib/rails/code_statistics_calculator.rb
+++ b/railties/lib/rails/code_statistics_calculator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
class CodeStatisticsCalculator #:nodoc:
attr_reader :lines, :code_lines, :classes, :methods
diff --git a/railties/lib/rails/command.rb b/railties/lib/rails/command.rb
index ee020b58f9..a929b660df 100644
--- a/railties/lib/rails/command.rb
+++ b/railties/lib/rails/command.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support"
require "active_support/dependencies/autoload"
require "active_support/core_ext/enumerable"
diff --git a/railties/lib/rails/command/actions.rb b/railties/lib/rails/command/actions.rb
index a00e58997c..90978ef59c 100644
--- a/railties/lib/rails/command/actions.rb
+++ b/railties/lib/rails/command/actions.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Command
module Actions
diff --git a/railties/lib/rails/command/base.rb b/railties/lib/rails/command/base.rb
index 4f074df473..eed2e0a991 100644
--- a/railties/lib/rails/command/base.rb
+++ b/railties/lib/rails/command/base.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "thor"
require "erb"
diff --git a/railties/lib/rails/command/behavior.rb b/railties/lib/rails/command/behavior.rb
index 4a92f72f16..af93bf53ca 100644
--- a/railties/lib/rails/command/behavior.rb
+++ b/railties/lib/rails/command/behavior.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support"
module Rails
diff --git a/railties/lib/rails/command/environment_argument.rb b/railties/lib/rails/command/environment_argument.rb
index 05eac34155..5304132757 100644
--- a/railties/lib/rails/command/environment_argument.rb
+++ b/railties/lib/rails/command/environment_argument.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support"
module Rails
diff --git a/railties/lib/rails/commands.rb b/railties/lib/rails/commands.rb
index fff0119c65..9bdb2398c0 100644
--- a/railties/lib/rails/commands.rb
+++ b/railties/lib/rails/commands.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/command"
aliases = {
diff --git a/railties/lib/rails/commands/application/application_command.rb b/railties/lib/rails/commands/application/application_command.rb
index 7675d3b3d1..217ac5979a 100644
--- a/railties/lib/rails/commands/application/application_command.rb
+++ b/railties/lib/rails/commands/application/application_command.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators"
require "rails/generators/rails/app/app_generator"
diff --git a/railties/lib/rails/commands/console/console_command.rb b/railties/lib/rails/commands/console/console_command.rb
index ec58540923..8bb88d267f 100644
--- a/railties/lib/rails/commands/console/console_command.rb
+++ b/railties/lib/rails/commands/console/console_command.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "irb"
require "irb/completion"
diff --git a/railties/lib/rails/commands/dbconsole/dbconsole_command.rb b/railties/lib/rails/commands/dbconsole/dbconsole_command.rb
index 5bfbe58d97..cd4de73f5c 100644
--- a/railties/lib/rails/commands/dbconsole/dbconsole_command.rb
+++ b/railties/lib/rails/commands/dbconsole/dbconsole_command.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/command/environment_argument"
module Rails
diff --git a/railties/lib/rails/commands/destroy/destroy_command.rb b/railties/lib/rails/commands/destroy/destroy_command.rb
index 281732a936..61ef408996 100644
--- a/railties/lib/rails/commands/destroy/destroy_command.rb
+++ b/railties/lib/rails/commands/destroy/destroy_command.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators"
module Rails
diff --git a/railties/lib/rails/commands/generate/generate_command.rb b/railties/lib/rails/commands/generate/generate_command.rb
index 9dd7ad1012..5e1062f0bc 100644
--- a/railties/lib/rails/commands/generate/generate_command.rb
+++ b/railties/lib/rails/commands/generate/generate_command.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators"
module Rails
diff --git a/railties/lib/rails/commands/help/help_command.rb b/railties/lib/rails/commands/help/help_command.rb
index 90d37217fc..68ca9f1c01 100644
--- a/railties/lib/rails/commands/help/help_command.rb
+++ b/railties/lib/rails/commands/help/help_command.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Command
class HelpCommand < Base # :nodoc:
diff --git a/railties/lib/rails/commands/new/new_command.rb b/railties/lib/rails/commands/new/new_command.rb
index 207dd5d995..07e17a439f 100644
--- a/railties/lib/rails/commands/new/new_command.rb
+++ b/railties/lib/rails/commands/new/new_command.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Command
class NewCommand < Base # :nodoc:
diff --git a/railties/lib/rails/commands/plugin/plugin_command.rb b/railties/lib/rails/commands/plugin/plugin_command.rb
index b40ab006af..b342b9bd4f 100644
--- a/railties/lib/rails/commands/plugin/plugin_command.rb
+++ b/railties/lib/rails/commands/plugin/plugin_command.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Command
class PluginCommand < Base # :nodoc:
diff --git a/railties/lib/rails/commands/rake/rake_command.rb b/railties/lib/rails/commands/rake/rake_command.rb
index 075b1fd23d..7e57355fe5 100644
--- a/railties/lib/rails/commands/rake/rake_command.rb
+++ b/railties/lib/rails/commands/rake/rake_command.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Command
class RakeCommand < Base # :nodoc:
diff --git a/railties/lib/rails/commands/runner/runner_command.rb b/railties/lib/rails/commands/runner/runner_command.rb
index 6864a9726b..e2f41032ee 100644
--- a/railties/lib/rails/commands/runner/runner_command.rb
+++ b/railties/lib/rails/commands/runner/runner_command.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Command
class RunnerCommand < Base # :nodoc:
diff --git a/railties/lib/rails/commands/secrets/secrets_command.rb b/railties/lib/rails/commands/secrets/secrets_command.rb
index 5f077a5bcb..bdc4059c7b 100644
--- a/railties/lib/rails/commands/secrets/secrets_command.rb
+++ b/railties/lib/rails/commands/secrets/secrets_command.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support"
require "rails/secrets"
diff --git a/railties/lib/rails/commands/server/server_command.rb b/railties/lib/rails/commands/server/server_command.rb
index ebb4ae795a..a4985a0e6c 100644
--- a/railties/lib/rails/commands/server/server_command.rb
+++ b/railties/lib/rails/commands/server/server_command.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "fileutils"
require "optparse"
require "action_dispatch"
diff --git a/railties/lib/rails/commands/test/test_command.rb b/railties/lib/rails/commands/test/test_command.rb
index dce85cf12d..6243813ff8 100644
--- a/railties/lib/rails/commands/test/test_command.rb
+++ b/railties/lib/rails/commands/test/test_command.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/command"
require "rails/test_unit/minitest_plugin"
diff --git a/railties/lib/rails/commands/version/version_command.rb b/railties/lib/rails/commands/version/version_command.rb
index ac745594ee..f8057ffabe 100644
--- a/railties/lib/rails/commands/version/version_command.rb
+++ b/railties/lib/rails/commands/version/version_command.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Command
class VersionCommand < Base # :nodoc:
diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb
index fc7d4909f6..088fb6fe0d 100644
--- a/railties/lib/rails/configuration.rb
+++ b/railties/lib/rails/configuration.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support/ordered_options"
require "active_support/core_ext/object"
require "rails/paths"
diff --git a/railties/lib/rails/console/app.rb b/railties/lib/rails/console/app.rb
index affadc8e09..b9d349b24f 100644
--- a/railties/lib/rails/console/app.rb
+++ b/railties/lib/rails/console/app.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support/all"
require "action_controller"
diff --git a/railties/lib/rails/console/helpers.rb b/railties/lib/rails/console/helpers.rb
index a33f71dc5b..19b6632dbc 100644
--- a/railties/lib/rails/console/helpers.rb
+++ b/railties/lib/rails/console/helpers.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module ConsoleMethods
# Gets the helper methods available to the controller.
diff --git a/railties/lib/rails/dev_caching.rb b/railties/lib/rails/dev_caching.rb
index f69275a34a..a8169e53a0 100644
--- a/railties/lib/rails/dev_caching.rb
+++ b/railties/lib/rails/dev_caching.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "fileutils"
module Rails
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb
index 2732485c5a..6ed55aafa0 100644
--- a/railties/lib/rails/engine.rb
+++ b/railties/lib/rails/engine.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/railtie"
require "rails/engine/railties"
require "active_support/core_ext/module/delegation"
diff --git a/railties/lib/rails/engine/commands.rb b/railties/lib/rails/engine/commands.rb
index b9ef63243a..493b6988a5 100644
--- a/railties/lib/rails/engine/commands.rb
+++ b/railties/lib/rails/engine/commands.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
unless defined?(APP_PATH)
if File.exist?(File.expand_path("test/dummy/config/application.rb", ENGINE_ROOT))
APP_PATH = File.expand_path("test/dummy/config/application", ENGINE_ROOT)
diff --git a/railties/lib/rails/engine/configuration.rb b/railties/lib/rails/engine/configuration.rb
index 0c40173c38..40bafc4078 100644
--- a/railties/lib/rails/engine/configuration.rb
+++ b/railties/lib/rails/engine/configuration.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/railtie/configuration"
module Rails
diff --git a/railties/lib/rails/engine/railties.rb b/railties/lib/rails/engine/railties.rb
index 9969a1475d..f34a46db89 100644
--- a/railties/lib/rails/engine/railties.rb
+++ b/railties/lib/rails/engine/railties.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
class Engine < Railtie
class Railties
diff --git a/railties/lib/rails/engine/updater.rb b/railties/lib/rails/engine/updater.rb
index 2ecf994a5c..0ee72a83f0 100644
--- a/railties/lib/rails/engine/updater.rb
+++ b/railties/lib/rails/engine/updater.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators"
require "rails/generators/rails/plugin/plugin_generator"
diff --git a/railties/lib/rails/gem_version.rb b/railties/lib/rails/gem_version.rb
index 7bacf2e0ba..68af9946e5 100644
--- a/railties/lib/rails/gem_version.rb
+++ b/railties/lib/rails/gem_version.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
# Returns the version of the currently loaded Rails as a <tt>Gem::Version</tt>
def self.gem_version
diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb
index 8f15f3a594..796d7c4af1 100644
--- a/railties/lib/rails/generators.rb
+++ b/railties/lib/rails/generators.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
activesupport_path = File.expand_path("../../../activesupport/lib", __dir__)
$:.unshift(activesupport_path) if File.directory?(activesupport_path) && !$:.include?(activesupport_path)
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb
index 5cf0985050..e8bc76c69a 100644
--- a/railties/lib/rails/generators/actions.rb
+++ b/railties/lib/rails/generators/actions.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Generators
module Actions
diff --git a/railties/lib/rails/generators/actions/create_migration.rb b/railties/lib/rails/generators/actions/create_migration.rb
index d06609e91e..5f18368f45 100644
--- a/railties/lib/rails/generators/actions/create_migration.rb
+++ b/railties/lib/rails/generators/actions/create_migration.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "fileutils"
require "thor/actions"
diff --git a/railties/lib/rails/generators/active_model.rb b/railties/lib/rails/generators/active_model.rb
index 2679d06fe4..6f61a7a041 100644
--- a/railties/lib/rails/generators/active_model.rb
+++ b/railties/lib/rails/generators/active_model.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Generators
# ActiveModel is a class to be implemented by each ORM to allow Rails to
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index 8429b6c7b8..dc5c5c12f3 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "fileutils"
require "digest/md5"
require "active_support/core_ext/string/strip"
diff --git a/railties/lib/rails/generators/base.rb b/railties/lib/rails/generators/base.rb
index e7f51dba99..c0e9e1c751 100644
--- a/railties/lib/rails/generators/base.rb
+++ b/railties/lib/rails/generators/base.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
begin
require "thor/group"
rescue LoadError
diff --git a/railties/lib/rails/generators/css/assets/assets_generator.rb b/railties/lib/rails/generators/css/assets/assets_generator.rb
index af7b5cf609..7ceee5a12a 100644
--- a/railties/lib/rails/generators/css/assets/assets_generator.rb
+++ b/railties/lib/rails/generators/css/assets/assets_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/named_base"
module Css # :nodoc:
diff --git a/railties/lib/rails/generators/css/scaffold/scaffold_generator.rb b/railties/lib/rails/generators/css/scaffold/scaffold_generator.rb
index cf534030f9..868a5b3645 100644
--- a/railties/lib/rails/generators/css/scaffold/scaffold_generator.rb
+++ b/railties/lib/rails/generators/css/scaffold/scaffold_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/named_base"
module Css # :nodoc:
diff --git a/railties/lib/rails/generators/erb.rb b/railties/lib/rails/generators/erb.rb
index 97d9ab29d4..ce2c482eb5 100644
--- a/railties/lib/rails/generators/erb.rb
+++ b/railties/lib/rails/generators/erb.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/named_base"
module Erb # :nodoc:
diff --git a/railties/lib/rails/generators/erb/controller/controller_generator.rb b/railties/lib/rails/generators/erb/controller/controller_generator.rb
index 36ecfea09b..bedf1d40a1 100644
--- a/railties/lib/rails/generators/erb/controller/controller_generator.rb
+++ b/railties/lib/rails/generators/erb/controller/controller_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/erb"
module Erb # :nodoc:
diff --git a/railties/lib/rails/generators/erb/mailer/mailer_generator.rb b/railties/lib/rails/generators/erb/mailer/mailer_generator.rb
index 3f1d9932f6..bfac10184e 100644
--- a/railties/lib/rails/generators/erb/mailer/mailer_generator.rb
+++ b/railties/lib/rails/generators/erb/mailer/mailer_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/erb"
module Erb # :nodoc:
diff --git a/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb b/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb
index 0d77ef21da..3b3567b16c 100644
--- a/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb
+++ b/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/erb"
require "rails/generators/resource_helpers"
diff --git a/railties/lib/rails/generators/generated_attribute.rb b/railties/lib/rails/generators/generated_attribute.rb
index baed7bf1e3..c906457661 100644
--- a/railties/lib/rails/generators/generated_attribute.rb
+++ b/railties/lib/rails/generators/generated_attribute.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support/time"
module Rails
diff --git a/railties/lib/rails/generators/js/assets/assets_generator.rb b/railties/lib/rails/generators/js/assets/assets_generator.rb
index 52a71b58cd..c2d35be576 100644
--- a/railties/lib/rails/generators/js/assets/assets_generator.rb
+++ b/railties/lib/rails/generators/js/assets/assets_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/named_base"
module Js # :nodoc:
diff --git a/railties/lib/rails/generators/migration.rb b/railties/lib/rails/generators/migration.rb
index 82481169c3..7246cf3af7 100644
--- a/railties/lib/rails/generators/migration.rb
+++ b/railties/lib/rails/generators/migration.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support/concern"
require "rails/generators/actions/create_migration"
diff --git a/railties/lib/rails/generators/model_helpers.rb b/railties/lib/rails/generators/model_helpers.rb
index 6f87a18660..e25290b323 100644
--- a/railties/lib/rails/generators/model_helpers.rb
+++ b/railties/lib/rails/generators/model_helpers.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/active_model"
module Rails
diff --git a/railties/lib/rails/generators/named_base.rb b/railties/lib/rails/generators/named_base.rb
index aef66adb64..e54240b86f 100644
--- a/railties/lib/rails/generators/named_base.rb
+++ b/railties/lib/rails/generators/named_base.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support/core_ext/module/introspection"
require "rails/generators/base"
require "rails/generators/generated_attribute"
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb
index 45b9e7bdff..03411d2822 100644
--- a/railties/lib/rails/generators/rails/app/app_generator.rb
+++ b/railties/lib/rails/generators/rails/app/app_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/app_base"
module Rails
diff --git a/railties/lib/rails/generators/rails/assets/assets_generator.rb b/railties/lib/rails/generators/rails/assets/assets_generator.rb
index 95d00c2d39..ab98224199 100644
--- a/railties/lib/rails/generators/rails/assets/assets_generator.rb
+++ b/railties/lib/rails/generators/rails/assets/assets_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Generators
class AssetsGenerator < NamedBase # :nodoc:
diff --git a/railties/lib/rails/generators/rails/controller/controller_generator.rb b/railties/lib/rails/generators/rails/controller/controller_generator.rb
index 06bdb8b5ce..993ef27e8c 100644
--- a/railties/lib/rails/generators/rails/controller/controller_generator.rb
+++ b/railties/lib/rails/generators/rails/controller/controller_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Generators
class ControllerGenerator < NamedBase # :nodoc:
diff --git a/railties/lib/rails/generators/rails/encrypted_secrets/encrypted_secrets_generator.rb b/railties/lib/rails/generators/rails/encrypted_secrets/encrypted_secrets_generator.rb
index 1da2fbc1a5..1c8da5df8b 100644
--- a/railties/lib/rails/generators/rails/encrypted_secrets/encrypted_secrets_generator.rb
+++ b/railties/lib/rails/generators/rails/encrypted_secrets/encrypted_secrets_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/base"
require "rails/secrets"
diff --git a/railties/lib/rails/generators/rails/generator/generator_generator.rb b/railties/lib/rails/generators/rails/generator/generator_generator.rb
index 299a7da5f1..4a71cdca89 100644
--- a/railties/lib/rails/generators/rails/generator/generator_generator.rb
+++ b/railties/lib/rails/generators/rails/generator/generator_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Generators
class GeneratorGenerator < NamedBase # :nodoc:
diff --git a/railties/lib/rails/generators/rails/helper/helper_generator.rb b/railties/lib/rails/generators/rails/helper/helper_generator.rb
index e48b1b6fb3..62230008ad 100644
--- a/railties/lib/rails/generators/rails/helper/helper_generator.rb
+++ b/railties/lib/rails/generators/rails/helper/helper_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Generators
class HelperGenerator < NamedBase # :nodoc:
diff --git a/railties/lib/rails/generators/rails/integration_test/integration_test_generator.rb b/railties/lib/rails/generators/rails/integration_test/integration_test_generator.rb
index 70770ddcb8..56c4b36134 100644
--- a/railties/lib/rails/generators/rails/integration_test/integration_test_generator.rb
+++ b/railties/lib/rails/generators/rails/integration_test/integration_test_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Generators
class IntegrationTestGenerator < NamedBase # :nodoc:
diff --git a/railties/lib/rails/generators/rails/migration/migration_generator.rb b/railties/lib/rails/generators/rails/migration/migration_generator.rb
index fca2a8fef4..c294c932b0 100644
--- a/railties/lib/rails/generators/rails/migration/migration_generator.rb
+++ b/railties/lib/rails/generators/rails/migration/migration_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Generators
class MigrationGenerator < NamedBase # :nodoc:
diff --git a/railties/lib/rails/generators/rails/model/model_generator.rb b/railties/lib/rails/generators/rails/model/model_generator.rb
index c32a8a079a..ffa04cc029 100644
--- a/railties/lib/rails/generators/rails/model/model_generator.rb
+++ b/railties/lib/rails/generators/rails/model/model_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/model_helpers"
module Rails
diff --git a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb
index 445235852d..f60b1099a8 100644
--- a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb
+++ b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support/core_ext/hash/slice"
require "rails/generators/rails/app/app_generator"
require "date"
diff --git a/railties/lib/rails/generators/rails/resource/resource_generator.rb b/railties/lib/rails/generators/rails/resource/resource_generator.rb
index 5ac5164af0..a36e2cedc0 100644
--- a/railties/lib/rails/generators/rails/resource/resource_generator.rb
+++ b/railties/lib/rails/generators/rails/resource/resource_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/resource_helpers"
require "rails/generators/rails/model/model_generator"
diff --git a/railties/lib/rails/generators/rails/resource_route/resource_route_generator.rb b/railties/lib/rails/generators/rails/resource_route/resource_route_generator.rb
index 42705107ae..66e5e6e4db 100644
--- a/railties/lib/rails/generators/rails/resource_route/resource_route_generator.rb
+++ b/railties/lib/rails/generators/rails/resource_route/resource_route_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Generators
class ResourceRouteGenerator < NamedBase # :nodoc:
diff --git a/railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb b/railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb
index 12d6bc85b2..b78a12f926 100644
--- a/railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb
+++ b/railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/rails/resource/resource_generator"
module Rails
diff --git a/railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb b/railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb
index cf97c22160..44ac488665 100644
--- a/railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb
+++ b/railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/resource_helpers"
module Rails
diff --git a/railties/lib/rails/generators/rails/system_test/system_test_generator.rb b/railties/lib/rails/generators/rails/system_test/system_test_generator.rb
index 901120e892..382d33252f 100644
--- a/railties/lib/rails/generators/rails/system_test/system_test_generator.rb
+++ b/railties/lib/rails/generators/rails/system_test/system_test_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Generators
class SystemTestGenerator < NamedBase # :nodoc:
diff --git a/railties/lib/rails/generators/rails/task/task_generator.rb b/railties/lib/rails/generators/rails/task/task_generator.rb
index bb96bdf0dd..f93b325844 100644
--- a/railties/lib/rails/generators/rails/task/task_generator.rb
+++ b/railties/lib/rails/generators/rails/task/task_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Generators
class TaskGenerator < NamedBase # :nodoc:
diff --git a/railties/lib/rails/generators/resource_helpers.rb b/railties/lib/rails/generators/resource_helpers.rb
index e7cb722473..41511b49a2 100644
--- a/railties/lib/rails/generators/resource_helpers.rb
+++ b/railties/lib/rails/generators/resource_helpers.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/active_model"
require "rails/generators/model_helpers"
diff --git a/railties/lib/rails/generators/test_case.rb b/railties/lib/rails/generators/test_case.rb
index 575af80303..e851854ae7 100644
--- a/railties/lib/rails/generators/test_case.rb
+++ b/railties/lib/rails/generators/test_case.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators"
require "rails/generators/testing/behaviour"
require "rails/generators/testing/setup_and_teardown"
diff --git a/railties/lib/rails/generators/test_unit.rb b/railties/lib/rails/generators/test_unit.rb
index 722efcf492..ef4ed0e53e 100644
--- a/railties/lib/rails/generators/test_unit.rb
+++ b/railties/lib/rails/generators/test_unit.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/named_base"
module TestUnit # :nodoc:
diff --git a/railties/lib/rails/generators/test_unit/controller/controller_generator.rb b/railties/lib/rails/generators/test_unit/controller/controller_generator.rb
index ac528d94f1..b136bc740f 100644
--- a/railties/lib/rails/generators/test_unit/controller/controller_generator.rb
+++ b/railties/lib/rails/generators/test_unit/controller/controller_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/test_unit"
module TestUnit # :nodoc:
diff --git a/railties/lib/rails/generators/test_unit/generator/generator_generator.rb b/railties/lib/rails/generators/test_unit/generator/generator_generator.rb
index 6b6e094453..1cb60481a4 100644
--- a/railties/lib/rails/generators/test_unit/generator/generator_generator.rb
+++ b/railties/lib/rails/generators/test_unit/generator/generator_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/test_unit"
module TestUnit # :nodoc:
diff --git a/railties/lib/rails/generators/test_unit/helper/helper_generator.rb b/railties/lib/rails/generators/test_unit/helper/helper_generator.rb
index 6674a15fa3..506dda4e62 100644
--- a/railties/lib/rails/generators/test_unit/helper/helper_generator.rb
+++ b/railties/lib/rails/generators/test_unit/helper/helper_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/test_unit"
module TestUnit # :nodoc:
diff --git a/railties/lib/rails/generators/test_unit/integration/integration_generator.rb b/railties/lib/rails/generators/test_unit/integration/integration_generator.rb
index 9d065c1297..4810986f83 100644
--- a/railties/lib/rails/generators/test_unit/integration/integration_generator.rb
+++ b/railties/lib/rails/generators/test_unit/integration/integration_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/test_unit"
module TestUnit # :nodoc:
diff --git a/railties/lib/rails/generators/test_unit/job/job_generator.rb b/railties/lib/rails/generators/test_unit/job/job_generator.rb
index 6975252b99..c35fd258a0 100644
--- a/railties/lib/rails/generators/test_unit/job/job_generator.rb
+++ b/railties/lib/rails/generators/test_unit/job/job_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/test_unit"
module TestUnit # :nodoc:
diff --git a/railties/lib/rails/generators/test_unit/mailer/mailer_generator.rb b/railties/lib/rails/generators/test_unit/mailer/mailer_generator.rb
index 67bff8e4f9..60954d02c7 100644
--- a/railties/lib/rails/generators/test_unit/mailer/mailer_generator.rb
+++ b/railties/lib/rails/generators/test_unit/mailer/mailer_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/test_unit"
module TestUnit # :nodoc:
diff --git a/railties/lib/rails/generators/test_unit/model/model_generator.rb b/railties/lib/rails/generators/test_unit/model/model_generator.rb
index 99495d5247..f4327c0c35 100644
--- a/railties/lib/rails/generators/test_unit/model/model_generator.rb
+++ b/railties/lib/rails/generators/test_unit/model/model_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/test_unit"
module TestUnit # :nodoc:
diff --git a/railties/lib/rails/generators/test_unit/plugin/plugin_generator.rb b/railties/lib/rails/generators/test_unit/plugin/plugin_generator.rb
index f1c9b6da5b..2f02efca23 100644
--- a/railties/lib/rails/generators/test_unit/plugin/plugin_generator.rb
+++ b/railties/lib/rails/generators/test_unit/plugin/plugin_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/test_unit"
module TestUnit # :nodoc:
diff --git a/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb b/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb
index 292db35121..72ba5ce650 100644
--- a/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb
+++ b/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/test_unit"
require "rails/generators/resource_helpers"
diff --git a/railties/lib/rails/generators/test_unit/system/system_generator.rb b/railties/lib/rails/generators/test_unit/system/system_generator.rb
index 0514957d9c..7242bc0d0d 100644
--- a/railties/lib/rails/generators/test_unit/system/system_generator.rb
+++ b/railties/lib/rails/generators/test_unit/system/system_generator.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/generators/test_unit"
module TestUnit # :nodoc:
diff --git a/railties/lib/rails/generators/testing/assertions.rb b/railties/lib/rails/generators/testing/assertions.rb
index 1cabf4e28c..abfa3340ae 100644
--- a/railties/lib/rails/generators/testing/assertions.rb
+++ b/railties/lib/rails/generators/testing/assertions.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Generators
module Testing
diff --git a/railties/lib/rails/generators/testing/behaviour.rb b/railties/lib/rails/generators/testing/behaviour.rb
index ce0e42e60d..e66d7dc64f 100644
--- a/railties/lib/rails/generators/testing/behaviour.rb
+++ b/railties/lib/rails/generators/testing/behaviour.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support/core_ext/class/attribute"
require "active_support/core_ext/module/delegation"
require "active_support/core_ext/hash/reverse_merge"
diff --git a/railties/lib/rails/generators/testing/setup_and_teardown.rb b/railties/lib/rails/generators/testing/setup_and_teardown.rb
index 73102a283f..ca2ad244b5 100644
--- a/railties/lib/rails/generators/testing/setup_and_teardown.rb
+++ b/railties/lib/rails/generators/testing/setup_and_teardown.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Generators
module Testing
diff --git a/railties/lib/rails/info.rb b/railties/lib/rails/info.rb
index db08d578c0..2641f778ea 100644
--- a/railties/lib/rails/info.rb
+++ b/railties/lib/rails/info.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "cgi"
module Rails
diff --git a/railties/lib/rails/info_controller.rb b/railties/lib/rails/info_controller.rb
index 8b553aea79..172b2ad172 100644
--- a/railties/lib/rails/info_controller.rb
+++ b/railties/lib/rails/info_controller.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/application_controller"
require "action_dispatch/routing/inspector"
diff --git a/railties/lib/rails/initializable.rb b/railties/lib/rails/initializable.rb
index a2615d5efd..c25b0912f6 100644
--- a/railties/lib/rails/initializable.rb
+++ b/railties/lib/rails/initializable.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "tsort"
module Rails
diff --git a/railties/lib/rails/mailers_controller.rb b/railties/lib/rails/mailers_controller.rb
index 7ff55ef5bf..0e0ecf0944 100644
--- a/railties/lib/rails/mailers_controller.rb
+++ b/railties/lib/rails/mailers_controller.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/application_controller"
class Rails::MailersController < Rails::ApplicationController # :nodoc:
diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb
index 6bdb673215..d6a06d1aa7 100644
--- a/railties/lib/rails/paths.rb
+++ b/railties/lib/rails/paths.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Paths
# This object is an extended hash that behaves as root of the <tt>Rails::Paths</tt> system.
diff --git a/railties/lib/rails/plugin/test.rb b/railties/lib/rails/plugin/test.rb
index ff043b488e..88a24d4a4c 100644
--- a/railties/lib/rails/plugin/test.rb
+++ b/railties/lib/rails/plugin/test.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/test_unit/minitest_plugin"
Rails::TestUnitReporter.executable = "bin/test"
diff --git a/railties/lib/rails/rack.rb b/railties/lib/rails/rack.rb
index a4c4527a72..ce08a23e2f 100644
--- a/railties/lib/rails/rack.rb
+++ b/railties/lib/rails/rack.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Rails
module Rack
autoload :Logger, "rails/rack/logger"
diff --git a/railties/lib/rails/rack/logger.rb b/railties/lib/rails/rack/logger.rb
index 853fc26051..577182c609 100644
--- a/railties/lib/rails/rack/logger.rb
+++ b/railties/lib/rails/rack/logger.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support/core_ext/time/conversions"
require "active_support/core_ext/object/blank"
require "active_support/log_subscriber"
diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb
index eca8335559..910f9b5d09 100644
--- a/railties/lib/rails/railtie.rb
+++ b/railties/lib/rails/railtie.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/initializable"
require "active_support/inflector"
require "active_support/core_ext/module/introspection"
diff --git a/railties/lib/rails/railtie/configurable.rb b/railties/lib/rails/railtie/configurable.rb
index 2a8295426e..e58586cfa8 100644
--- a/railties/lib/rails/railtie/configurable.rb
+++ b/railties/lib/rails/railtie/configurable.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support/concern"
module Rails
diff --git a/railties/lib/rails/railtie/configuration.rb b/railties/lib/rails/railtie/configuration.rb
index aecc81c491..f5702f8b9e 100644
--- a/railties/lib/rails/railtie/configuration.rb
+++ b/railties/lib/rails/railtie/configuration.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/configuration"
module Rails
diff --git a/railties/lib/rails/ruby_version_check.rb b/railties/lib/rails/ruby_version_check.rb
index b212835df7..f99767c97c 100644
--- a/railties/lib/rails/ruby_version_check.rb
+++ b/railties/lib/rails/ruby_version_check.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
if RUBY_VERSION < "2.2.2" && RUBY_ENGINE == "ruby"
desc = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE})"
abort <<-end_message
diff --git a/railties/lib/rails/secrets.rb b/railties/lib/rails/secrets.rb
index c7a8676d7b..c9524a643c 100644
--- a/railties/lib/rails/secrets.rb
+++ b/railties/lib/rails/secrets.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "yaml"
require "active_support/message_encryptor"
require "active_support/core_ext/string/strip"
diff --git a/railties/lib/rails/source_annotation_extractor.rb b/railties/lib/rails/source_annotation_extractor.rb
index e9088c44ce..5e17bc7211 100644
--- a/railties/lib/rails/source_annotation_extractor.rb
+++ b/railties/lib/rails/source_annotation_extractor.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Implements the logic behind the rake tasks for annotations like
#
# rails notes
diff --git a/railties/lib/rails/tasks.rb b/railties/lib/rails/tasks.rb
index c0a50e5bda..0bdd1efd07 100644
--- a/railties/lib/rails/tasks.rb
+++ b/railties/lib/rails/tasks.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rake"
# Load Rails Rakefile extensions
diff --git a/railties/lib/rails/tasks/annotations.rake b/railties/lib/rails/tasks/annotations.rake
index 9a69eb9934..802ef93bf3 100644
--- a/railties/lib/rails/tasks/annotations.rake
+++ b/railties/lib/rails/tasks/annotations.rake
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/source_annotation_extractor"
desc "Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)"
diff --git a/railties/lib/rails/tasks/dev.rake b/railties/lib/rails/tasks/dev.rake
index 334e968123..5f6070ae42 100644
--- a/railties/lib/rails/tasks/dev.rake
+++ b/railties/lib/rails/tasks/dev.rake
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/dev_caching"
namespace :dev do
diff --git a/railties/lib/rails/tasks/engine.rake b/railties/lib/rails/tasks/engine.rake
index 177b138090..fb9f6ce1c2 100644
--- a/railties/lib/rails/tasks/engine.rake
+++ b/railties/lib/rails/tasks/engine.rake
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
task "load_app" do
namespace :app do
load APP_RAKEFILE
diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake
index 80720a42ff..d63af956bc 100644
--- a/railties/lib/rails/tasks/framework.rake
+++ b/railties/lib/rails/tasks/framework.rake
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
namespace :app do
desc "Update configs and some other initially generated files (or use just update:configs or update:bin)"
task update: [ "update:configs", "update:bin", "update:upgrade_guide_info" ]
diff --git a/railties/lib/rails/tasks/initializers.rake b/railties/lib/rails/tasks/initializers.rake
index 6522f2ae5a..fa475c06be 100644
--- a/railties/lib/rails/tasks/initializers.rake
+++ b/railties/lib/rails/tasks/initializers.rake
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
desc "Print out all defined initializers in the order they are invoked by Rails."
task initializers: :environment do
Rails.application.initializers.tsort_each do |initializer|
diff --git a/railties/lib/rails/tasks/log.rake b/railties/lib/rails/tasks/log.rake
index ba796845d7..39b08f5433 100644
--- a/railties/lib/rails/tasks/log.rake
+++ b/railties/lib/rails/tasks/log.rake
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
namespace :log do
##
diff --git a/railties/lib/rails/tasks/middleware.rake b/railties/lib/rails/tasks/middleware.rake
index fd98be1ea9..d0d061bf7d 100644
--- a/railties/lib/rails/tasks/middleware.rake
+++ b/railties/lib/rails/tasks/middleware.rake
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
desc "Prints out your Rack middleware stack"
task middleware: :environment do
Rails.configuration.middleware.each do |middleware|
diff --git a/railties/lib/rails/tasks/misc.rake b/railties/lib/rails/tasks/misc.rake
index 29ea0ff804..4ac7f60fe9 100644
--- a/railties/lib/rails/tasks/misc.rake
+++ b/railties/lib/rails/tasks/misc.rake
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
desc "Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions)."
task :secret do
require "securerandom"
diff --git a/railties/lib/rails/tasks/restart.rake b/railties/lib/rails/tasks/restart.rake
index 03177d9954..05840f6562 100644
--- a/railties/lib/rails/tasks/restart.rake
+++ b/railties/lib/rails/tasks/restart.rake
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
desc "Restart app by touching tmp/restart.txt"
task :restart do
verbose(false) do
diff --git a/railties/lib/rails/tasks/routes.rake b/railties/lib/rails/tasks/routes.rake
index 215fb2ceb5..ac04b84d87 100644
--- a/railties/lib/rails/tasks/routes.rake
+++ b/railties/lib/rails/tasks/routes.rake
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "optparse"
desc "Print out all defined routes in match order, with names. Target specific controller with -c option, or grep routes using -g option"
diff --git a/railties/lib/rails/tasks/statistics.rake b/railties/lib/rails/tasks/statistics.rake
index cb569be58b..c80f44a7ce 100644
--- a/railties/lib/rails/tasks/statistics.rake
+++ b/railties/lib/rails/tasks/statistics.rake
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# While global constants are bad, many 3rd party tools depend on this one (e.g
# rspec-rails & cucumber-rails). So a deprecation warning is needed if we want
# to remove it.
diff --git a/railties/lib/rails/tasks/tmp.rake b/railties/lib/rails/tasks/tmp.rake
index d42a890cb6..95769a38be 100644
--- a/railties/lib/rails/tasks/tmp.rake
+++ b/railties/lib/rails/tasks/tmp.rake
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
namespace :tmp do
desc "Clear cache and socket files from tmp/ (narrow w/ tmp:cache:clear, tmp:sockets:clear)"
task clear: ["tmp:cache:clear", "tmp:sockets:clear"]
diff --git a/railties/lib/rails/tasks/yarn.rake b/railties/lib/rails/tasks/yarn.rake
index 87476b1b8c..1d3a69e455 100644
--- a/railties/lib/rails/tasks/yarn.rake
+++ b/railties/lib/rails/tasks/yarn.rake
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
namespace :yarn do
desc "Install all JavaScript dependencies as specified via Yarn"
task :install do
diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb
index 81537d813e..fe198f4d99 100644
--- a/railties/lib/rails/test_help.rb
+++ b/railties/lib/rails/test_help.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Make double-sure the RAILS_ENV is not set to production,
# so fixtures aren't loaded into that environment
abort("Abort testing: Your Rails environment is running in production mode!") if Rails.env.production?
diff --git a/railties/lib/rails/test_unit/line_filtering.rb b/railties/lib/rails/test_unit/line_filtering.rb
index 32ba744701..e60c003380 100644
--- a/railties/lib/rails/test_unit/line_filtering.rb
+++ b/railties/lib/rails/test_unit/line_filtering.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "method_source"
module Rails
diff --git a/railties/lib/rails/test_unit/minitest_plugin.rb b/railties/lib/rails/test_unit/minitest_plugin.rb
index 5d0cf1305f..9ebd635461 100644
--- a/railties/lib/rails/test_unit/minitest_plugin.rb
+++ b/railties/lib/rails/test_unit/minitest_plugin.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support/core_ext/module/attribute_accessors"
require "rails/test_unit/reporter"
require "rails/test_unit/test_requirer"
diff --git a/railties/lib/rails/test_unit/railtie.rb b/railties/lib/rails/test_unit/railtie.rb
index 443e743421..f1cbbcea2d 100644
--- a/railties/lib/rails/test_unit/railtie.rb
+++ b/railties/lib/rails/test_unit/railtie.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/test_unit/line_filtering"
if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^(default$|test(:|$))/).any?
diff --git a/railties/lib/rails/test_unit/reporter.rb b/railties/lib/rails/test_unit/reporter.rb
index 1cc27f7b6c..d92415c7d9 100644
--- a/railties/lib/rails/test_unit/reporter.rb
+++ b/railties/lib/rails/test_unit/reporter.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support/core_ext/class/attribute"
require "minitest"
diff --git a/railties/lib/rails/test_unit/test_requirer.rb b/railties/lib/rails/test_unit/test_requirer.rb
index 92e5fcf0bc..2006201209 100644
--- a/railties/lib/rails/test_unit/test_requirer.rb
+++ b/railties/lib/rails/test_unit/test_requirer.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "active_support/core_ext/object/blank"
require "rake/file_list"
diff --git a/railties/lib/rails/test_unit/testing.rake b/railties/lib/rails/test_unit/testing.rake
index 33408081f1..d79a52557f 100644
--- a/railties/lib/rails/test_unit/testing.rake
+++ b/railties/lib/rails/test_unit/testing.rake
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
gem "minitest"
require "minitest"
require "rails/test_unit/minitest_plugin"
diff --git a/railties/lib/rails/version.rb b/railties/lib/rails/version.rb
index 3d8e8291d1..6391949aac 100644
--- a/railties/lib/rails/version.rb
+++ b/railties/lib/rails/version.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require_relative "gem_version"
module Rails
diff --git a/railties/lib/rails/welcome_controller.rb b/railties/lib/rails/welcome_controller.rb
index b757dc72ef..0ce4d9e934 100644
--- a/railties/lib/rails/welcome_controller.rb
+++ b/railties/lib/rails/welcome_controller.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "rails/application_controller"
class Rails::WelcomeController < Rails::ApplicationController # :nodoc: