diff options
author | Matthew Draper <matthew@trebex.net> | 2017-07-02 01:08:37 +0930 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2017-07-02 01:11:50 +0930 |
commit | 3420a14590c0e6915d8b6c242887f74adb4120f9 (patch) | |
tree | 7ae54681e3e2b18555603c39c50b01f3707ef9a7 /railties | |
parent | afb66a5a598ce4ac74ad84b125a5abf046dcf5aa (diff) | |
parent | cfade1ec7ee7b5b51f3c1578e3474f9c156f2971 (diff) | |
download | rails-3420a14590c0e6915d8b6c242887f74adb4120f9.tar.gz rails-3420a14590c0e6915d8b6c242887f74adb4120f9.tar.bz2 rails-3420a14590c0e6915d8b6c242887f74adb4120f9.zip |
Merge pull request #29540 from kirs/rubocop-frozen-string
Enforce frozen string in Rubocop
Diffstat (limited to 'railties')
253 files changed, 253 insertions, 0 deletions
diff --git a/railties/Rakefile b/railties/Rakefile index d6284b7dc5..9e251d842b 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rake/testtask" task default: :test diff --git a/railties/bin/test b/railties/bin/test index 470ce93f10..c53377cc97 100755 --- a/railties/bin/test +++ b/railties/bin/test @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true COMPONENT_ROOT = File.expand_path("..", __dir__) require_relative "../../tools/test" diff --git a/railties/exe/rails b/railties/exe/rails index a5635c2297..79af4db6b6 100755 --- a/railties/exe/rails +++ b/railties/exe/rails @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true git_path = File.expand_path("../../.git", __dir__) 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 9522778c09..1d02ec909e 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 ef2cf3e389..9772317053 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 3d8ced1bf3..2e082a309f 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, socket and screenshot files from tmp/ (narrow w/ tmp:cache:clear, tmp:sockets:clear, tmp:screenshots:clear)" task clear: ["tmp:cache:clear", "tmp:sockets:clear", "tmp:screenshots: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: diff --git a/railties/railties.gemspec b/railties/railties.gemspec index e5587b531a..b6bad76a89 100644 --- a/railties/railties.gemspec +++ b/railties/railties.gemspec @@ -1,3 +1,4 @@ +# frozen_string_literal: true version = File.read(File.expand_path("../RAILS_VERSION", __dir__)).strip Gem::Specification.new do |s| diff --git a/railties/test/abstract_unit.rb b/railties/test/abstract_unit.rb index 2d4c7a0f0b..e04bce24cb 100644 --- a/railties/test/abstract_unit.rb +++ b/railties/test/abstract_unit.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ENV["RAILS_ENV"] ||= "test" require "stringio" diff --git a/railties/test/app_loader_test.rb b/railties/test/app_loader_test.rb index 85f5502b4d..6210215dc8 100644 --- a/railties/test/app_loader_test.rb +++ b/railties/test/app_loader_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "tmpdir" require "abstract_unit" require "rails/app_loader" diff --git a/railties/test/application/asset_debugging_test.rb b/railties/test/application/asset_debugging_test.rb index 3e17a1efa5..1ce77fba9f 100644 --- a/railties/test/application/asset_debugging_test.rb +++ b/railties/test/application/asset_debugging_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index f38cacd6da..8e7f50b8de 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" require "active_support/json" diff --git a/railties/test/application/bin_setup_test.rb b/railties/test/application/bin_setup_test.rb index 0fb995900f..a9009531aa 100644 --- a/railties/test/application/bin_setup_test.rb +++ b/railties/test/application/bin_setup_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/configuration/custom_test.rb b/railties/test/application/configuration/custom_test.rb index 8360b7bf4b..71b33c15a4 100644 --- a/railties/test/application/configuration/custom_test.rb +++ b/railties/test/application/configuration/custom_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 06767167a9..e73c2a992c 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" require "env_helpers" diff --git a/railties/test/application/console_test.rb b/railties/test/application/console_test.rb index 057d473870..7dc9d0083f 100644 --- a/railties/test/application/console_test.rb +++ b/railties/test/application/console_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" class ConsoleTest < ActiveSupport::TestCase diff --git a/railties/test/application/current_attributes_integration_test.rb b/railties/test/application/current_attributes_integration_test.rb index 5653ec0be1..a10eb51851 100644 --- a/railties/test/application/current_attributes_integration_test.rb +++ b/railties/test/application/current_attributes_integration_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" diff --git a/railties/test/application/generators_test.rb b/railties/test/application/generators_test.rb index fe581db286..9732216b92 100644 --- a/railties/test/application/generators_test.rb +++ b/railties/test/application/generators_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/help_test.rb b/railties/test/application/help_test.rb index 0c3fe8bfa3..f92dd60a7c 100644 --- a/railties/test/application/help_test.rb +++ b/railties/test/application/help_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" class HelpTest < ActiveSupport::TestCase diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb index eb2c578f91..c15e057b19 100644 --- a/railties/test/application/initializers/frameworks_test.rb +++ b/railties/test/application/initializers/frameworks_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/initializers/hooks_test.rb b/railties/test/application/initializers/hooks_test.rb index 36926c50ff..6acaea07dd 100644 --- a/railties/test/application/initializers/hooks_test.rb +++ b/railties/test/application/initializers/hooks_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/initializers/i18n_test.rb b/railties/test/application/initializers/i18n_test.rb index cee198bd01..4bf01c6f9e 100644 --- a/railties/test/application/initializers/i18n_test.rb +++ b/railties/test/application/initializers/i18n_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/initializers/load_path_test.rb b/railties/test/application/initializers/load_path_test.rb index dbefb22837..29f6bab256 100644 --- a/railties/test/application/initializers/load_path_test.rb +++ b/railties/test/application/initializers/load_path_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/initializers/notifications_test.rb b/railties/test/application/initializers/notifications_test.rb index b847ac6b36..0be4280f38 100644 --- a/railties/test/application/initializers/notifications_test.rb +++ b/railties/test/application/initializers/notifications_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/integration_test_case_test.rb b/railties/test/application/integration_test_case_test.rb index 1118e5037a..73fc9f63c0 100644 --- a/railties/test/application/integration_test_case_test.rb +++ b/railties/test/application/integration_test_case_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/loading_test.rb b/railties/test/application/loading_test.rb index c75a25bc6f..3572fd68eb 100644 --- a/railties/test/application/loading_test.rb +++ b/railties/test/application/loading_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" class LoadingTest < ActiveSupport::TestCase diff --git a/railties/test/application/mailer_previews_test.rb b/railties/test/application/mailer_previews_test.rb index f5c013dab6..7fc5adddaa 100644 --- a/railties/test/application/mailer_previews_test.rb +++ b/railties/test/application/mailer_previews_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" require "base64" diff --git a/railties/test/application/middleware/cache_test.rb b/railties/test/application/middleware/cache_test.rb index 93b5263bf7..cbb265bb7c 100644 --- a/railties/test/application/middleware/cache_test.rb +++ b/railties/test/application/middleware/cache_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/middleware/cookies_test.rb b/railties/test/application/middleware/cookies_test.rb index 1e4b5d086c..725a35aac1 100644 --- a/railties/test/application/middleware/cookies_test.rb +++ b/railties/test/application/middleware/cookies_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/middleware/exceptions_test.rb b/railties/test/application/middleware/exceptions_test.rb index fe07ad3cbe..af91720943 100644 --- a/railties/test/application/middleware/exceptions_test.rb +++ b/railties/test/application/middleware/exceptions_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" diff --git a/railties/test/application/middleware/remote_ip_test.rb b/railties/test/application/middleware/remote_ip_test.rb index c34d9d6ee7..68d97e9a96 100644 --- a/railties/test/application/middleware/remote_ip_test.rb +++ b/railties/test/application/middleware/remote_ip_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "ipaddr" require "isolation/abstract_unit" require "active_support/key_generator" diff --git a/railties/test/application/middleware/sendfile_test.rb b/railties/test/application/middleware/sendfile_test.rb index 4938402fdc..d1bad10fdc 100644 --- a/railties/test/application/middleware/sendfile_test.rb +++ b/railties/test/application/middleware/sendfile_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/middleware/session_test.rb b/railties/test/application/middleware/session_test.rb index a14ea589ed..028309d8e4 100644 --- a/railties/test/application/middleware/session_test.rb +++ b/railties/test/application/middleware/session_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" diff --git a/railties/test/application/middleware/static_test.rb b/railties/test/application/middleware/static_test.rb index 5cd3e4325e..9a0a5f7265 100644 --- a/railties/test/application/middleware/static_test.rb +++ b/railties/test/application/middleware/static_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index 0a6e5b52e9..64a3cbbfa1 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/multiple_applications_test.rb b/railties/test/application/multiple_applications_test.rb index 26b810af73..9e832b6892 100644 --- a/railties/test/application/multiple_applications_test.rb +++ b/railties/test/application/multiple_applications_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/paths_test.rb b/railties/test/application/paths_test.rb index 515205296c..1c7db1bb9d 100644 --- a/railties/test/application/paths_test.rb +++ b/railties/test/application/paths_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/per_request_digest_cache_test.rb b/railties/test/application/per_request_digest_cache_test.rb index 6e6996a6ba..148043d5cb 100644 --- a/railties/test/application/per_request_digest_cache_test.rb +++ b/railties/test/application/per_request_digest_cache_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" require "minitest/mock" diff --git a/railties/test/application/rack/logger_test.rb b/railties/test/application/rack/logger_test.rb index e71bcbc536..cb4d1d22af 100644 --- a/railties/test/application/rack/logger_test.rb +++ b/railties/test/application/rack/logger_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "active_support/log_subscriber/test_helper" require "rack/test" diff --git a/railties/test/application/rackup_test.rb b/railties/test/application/rackup_test.rb index 2943e9ee5d..bf9e96cf45 100644 --- a/railties/test/application/rackup_test.rb +++ b/railties/test/application/rackup_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/rake/dbs_test.rb b/railties/test/application/rake/dbs_test.rb index c63f23fa0a..d5e5566635 100644 --- a/railties/test/application/rake/dbs_test.rb +++ b/railties/test/application/rake/dbs_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/rake/dev_test.rb b/railties/test/application/rake/dev_test.rb index 4f992d9c8d..1556e5d5db 100644 --- a/railties/test/application/rake/dev_test.rb +++ b/railties/test/application/rake/dev_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/rake/framework_test.rb b/railties/test/application/rake/framework_test.rb index 40488a6aab..ec476addf4 100644 --- a/railties/test/application/rake/framework_test.rb +++ b/railties/test/application/rake/framework_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/rake/log_test.rb b/railties/test/application/rake/log_test.rb index fdd3c71fe8..431492fb64 100644 --- a/railties/test/application/rake/log_test.rb +++ b/railties/test/application/rake/log_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/rake/migrations_test.rb b/railties/test/application/rake/migrations_test.rb index 51dfe2ef98..1cf780178f 100644 --- a/railties/test/application/rake/migrations_test.rb +++ b/railties/test/application/rake/migrations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/rake/notes_test.rb b/railties/test/application/rake/notes_test.rb index e7ffea2e71..a500c55104 100644 --- a/railties/test/application/rake/notes_test.rb +++ b/railties/test/application/rake/notes_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "rails/source_annotation_extractor" diff --git a/railties/test/application/rake/restart_test.rb b/railties/test/application/rake/restart_test.rb index 6ebd2d5461..640a0008e7 100644 --- a/railties/test/application/rake/restart_test.rb +++ b/railties/test/application/rake/restart_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/rake/tmp_test.rb b/railties/test/application/rake/tmp_test.rb index bc9865b0de..d8f684dbe9 100644 --- a/railties/test/application/rake/tmp_test.rb +++ b/railties/test/application/rake/tmp_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index 1b64a0a1ca..a3508a4a12 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "active_support/core_ext/string/strip" diff --git a/railties/test/application/rendering_test.rb b/railties/test/application/rendering_test.rb index ccafc5b6f1..67843a09fa 100644 --- a/railties/test/application/rendering_test.rb +++ b/railties/test/application/rendering_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" diff --git a/railties/test/application/routing_test.rb b/railties/test/application/routing_test.rb index 6742da20cc..28a5ecb7ac 100644 --- a/railties/test/application/routing_test.rb +++ b/railties/test/application/routing_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" diff --git a/railties/test/application/runner_test.rb b/railties/test/application/runner_test.rb index 0c45bc398a..9611797765 100644 --- a/railties/test/application/runner_test.rb +++ b/railties/test/application/runner_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "env_helpers" diff --git a/railties/test/application/test_runner_test.rb b/railties/test/application/test_runner_test.rb index 8e0712fca2..91a6229cc4 100644 --- a/railties/test/application/test_runner_test.rb +++ b/railties/test/application/test_runner_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "active_support/core_ext/string/strip" require "env_helpers" diff --git a/railties/test/application/test_test.rb b/railties/test/application/test_test.rb index 32d2a6857c..c57cf548f7 100644 --- a/railties/test/application/test_test.rb +++ b/railties/test/application/test_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/url_generation_test.rb b/railties/test/application/url_generation_test.rb index 37f129475c..c7d7db8a75 100644 --- a/railties/test/application/url_generation_test.rb +++ b/railties/test/application/url_generation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/application/version_test.rb b/railties/test/application/version_test.rb index 6b419ae7ae..ff3751446c 100644 --- a/railties/test/application/version_test.rb +++ b/railties/test/application/version_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "rails/gem_version" diff --git a/railties/test/backtrace_cleaner_test.rb b/railties/test/backtrace_cleaner_test.rb index f71e56f323..e72963ee91 100644 --- a/railties/test/backtrace_cleaner_test.rb +++ b/railties/test/backtrace_cleaner_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "rails/backtrace_cleaner" diff --git a/railties/test/code_statistics_calculator_test.rb b/railties/test/code_statistics_calculator_test.rb index 25a8a40d27..3e7be58e9c 100644 --- a/railties/test/code_statistics_calculator_test.rb +++ b/railties/test/code_statistics_calculator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "rails/code_statistics_calculator" diff --git a/railties/test/code_statistics_test.rb b/railties/test/code_statistics_test.rb index e6e3943117..8cc59f1154 100644 --- a/railties/test/code_statistics_test.rb +++ b/railties/test/code_statistics_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "rails/code_statistics" diff --git a/railties/test/command/base_test.rb b/railties/test/command/base_test.rb index ebfc4d0ba9..02a508fea7 100644 --- a/railties/test/command/base_test.rb +++ b/railties/test/command/base_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "rails/command" require "rails/commands/generate/generate_command" diff --git a/railties/test/commands/console_test.rb b/railties/test/commands/console_test.rb index 4fc082e4ca..6fca08ad79 100644 --- a/railties/test/commands/console_test.rb +++ b/railties/test/commands/console_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "env_helpers" require "rails/command" diff --git a/railties/test/commands/dbconsole_test.rb b/railties/test/commands/dbconsole_test.rb index 0f8c5dbb79..3041f9233d 100644 --- a/railties/test/commands/dbconsole_test.rb +++ b/railties/test/commands/dbconsole_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "minitest/mock" require "rails/command" diff --git a/railties/test/commands/secrets_test.rb b/railties/test/commands/secrets_test.rb index be610f3b47..c06100cde2 100644 --- a/railties/test/commands/secrets_test.rb +++ b/railties/test/commands/secrets_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "rails/command" require "rails/commands/secrets/secrets_command" diff --git a/railties/test/commands/server_test.rb b/railties/test/commands/server_test.rb index 722323efdc..a0d2535c77 100644 --- a/railties/test/commands/server_test.rb +++ b/railties/test/commands/server_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "env_helpers" require "rails/command" diff --git a/railties/test/configuration/middleware_stack_proxy_test.rb b/railties/test/configuration/middleware_stack_proxy_test.rb index 559ce72693..ca2293d65f 100644 --- a/railties/test/configuration/middleware_stack_proxy_test.rb +++ b/railties/test/configuration/middleware_stack_proxy_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support" require "active_support/testing/autorun" require "rails/configuration" diff --git a/railties/test/engine/commands_test.rb b/railties/test/engine/commands_test.rb index b1c937143f..e3811f0ea4 100644 --- a/railties/test/engine/commands_test.rb +++ b/railties/test/engine/commands_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" begin require "pty" diff --git a/railties/test/engine_test.rb b/railties/test/engine_test.rb index 248afa2d2c..9a2629a9f2 100644 --- a/railties/test/engine_test.rb +++ b/railties/test/engine_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class EngineTest < ActiveSupport::TestCase diff --git a/railties/test/env_helpers.rb b/railties/test/env_helpers.rb index 1f64d5fda3..72f3008877 100644 --- a/railties/test/env_helpers.rb +++ b/railties/test/env_helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rails" module EnvHelpers diff --git a/railties/test/fixtures/about_yml_plugins/bad_about_yml/init.rb b/railties/test/fixtures/about_yml_plugins/bad_about_yml/init.rb index 636bc1a8ab..23b1b41541 100644 --- a/railties/test/fixtures/about_yml_plugins/bad_about_yml/init.rb +++ b/railties/test/fixtures/about_yml_plugins/bad_about_yml/init.rb @@ -1 +1,2 @@ +# frozen_string_literal: true # intentionally empty diff --git a/railties/test/fixtures/about_yml_plugins/plugin_without_about_yml/init.rb b/railties/test/fixtures/about_yml_plugins/plugin_without_about_yml/init.rb index 636bc1a8ab..23b1b41541 100644 --- a/railties/test/fixtures/about_yml_plugins/plugin_without_about_yml/init.rb +++ b/railties/test/fixtures/about_yml_plugins/plugin_without_about_yml/init.rb @@ -1 +1,2 @@ +# frozen_string_literal: true # intentionally empty diff --git a/railties/test/fixtures/lib/create_test_dummy_template.rb b/railties/test/fixtures/lib/create_test_dummy_template.rb index e4378bbd1a..934f1b9bca 100644 --- a/railties/test/fixtures/lib/create_test_dummy_template.rb +++ b/railties/test/fixtures/lib/create_test_dummy_template.rb @@ -1 +1,2 @@ +# frozen_string_literal: true create_dummy_app("spec/dummy") diff --git a/railties/test/fixtures/lib/generators/active_record/fixjour_generator.rb b/railties/test/fixtures/lib/generators/active_record/fixjour_generator.rb index 1139350b94..5f29d43851 100644 --- a/railties/test/fixtures/lib/generators/active_record/fixjour_generator.rb +++ b/railties/test/fixtures/lib/generators/active_record/fixjour_generator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rails/generators/active_record" module ActiveRecord diff --git a/railties/test/fixtures/lib/generators/fixjour_generator.rb b/railties/test/fixtures/lib/generators/fixjour_generator.rb index ef3e9edbed..587cbf3e30 100644 --- a/railties/test/fixtures/lib/generators/fixjour_generator.rb +++ b/railties/test/fixtures/lib/generators/fixjour_generator.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class FixjourGenerator < Rails::Generators::NamedBase end diff --git a/railties/test/fixtures/lib/generators/model_generator.rb b/railties/test/fixtures/lib/generators/model_generator.rb index 0905fa9631..422e19e388 100644 --- a/railties/test/fixtures/lib/generators/model_generator.rb +++ b/railties/test/fixtures/lib/generators/model_generator.rb @@ -1 +1,2 @@ +# frozen_string_literal: true raise "I should never be loaded" diff --git a/railties/test/fixtures/lib/generators/usage_template/usage_template_generator.rb b/railties/test/fixtures/lib/generators/usage_template/usage_template_generator.rb index 701515440a..df2cdadaea 100644 --- a/railties/test/fixtures/lib/generators/usage_template/usage_template_generator.rb +++ b/railties/test/fixtures/lib/generators/usage_template/usage_template_generator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rails/generators" class UsageTemplateGenerator < Rails::Generators::Base diff --git a/railties/test/fixtures/lib/rails/generators/foobar/foobar_generator.rb b/railties/test/fixtures/lib/rails/generators/foobar/foobar_generator.rb index d1de8c56fa..d7e4a8fdca 100644 --- a/railties/test/fixtures/lib/rails/generators/foobar/foobar_generator.rb +++ b/railties/test/fixtures/lib/rails/generators/foobar/foobar_generator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Foobar class FoobarGenerator < Rails::Generators::Base end diff --git a/railties/test/fixtures/lib/template.rb b/railties/test/fixtures/lib/template.rb index c14a1a8784..eccba91236 100644 --- a/railties/test/fixtures/lib/template.rb +++ b/railties/test/fixtures/lib/template.rb @@ -1 +1,2 @@ +# frozen_string_literal: true say "It works from file!" diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb index 03b29be907..2e212b0e71 100644 --- a/railties/test/generators/actions_test.rb +++ b/railties/test/generators/actions_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/app/app_generator" require "env_helpers" diff --git a/railties/test/generators/api_app_generator_test.rb b/railties/test/generators/api_app_generator_test.rb index a19e0f0dd8..86b99ec6f1 100644 --- a/railties/test/generators/api_app_generator_test.rb +++ b/railties/test/generators/api_app_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/app/app_generator" diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 9364f11a98..554c57d670 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/app/app_generator" require "generators/shared_generator_tests" diff --git a/railties/test/generators/argv_scrubber_test.rb b/railties/test/generators/argv_scrubber_test.rb index 7f4295a20f..61f28c0731 100644 --- a/railties/test/generators/argv_scrubber_test.rb +++ b/railties/test/generators/argv_scrubber_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/test_case" require "active_support/testing/autorun" require "rails/generators/rails/app/app_generator" diff --git a/railties/test/generators/assets_generator_test.rb b/railties/test/generators/assets_generator_test.rb index 1c02c67e42..55b910b2dd 100644 --- a/railties/test/generators/assets_generator_test.rb +++ b/railties/test/generators/assets_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/assets/assets_generator" diff --git a/railties/test/generators/channel_generator_test.rb b/railties/test/generators/channel_generator_test.rb index af68a9c49f..ef09b172ff 100644 --- a/railties/test/generators/channel_generator_test.rb +++ b/railties/test/generators/channel_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/channel/channel_generator" diff --git a/railties/test/generators/controller_generator_test.rb b/railties/test/generators/controller_generator_test.rb index af86a0136f..d573b3b803 100644 --- a/railties/test/generators/controller_generator_test.rb +++ b/railties/test/generators/controller_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/controller/controller_generator" diff --git a/railties/test/generators/create_migration_test.rb b/railties/test/generators/create_migration_test.rb index c7b0237f02..3d2d39bba5 100644 --- a/railties/test/generators/create_migration_test.rb +++ b/railties/test/generators/create_migration_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/migration/migration_generator" diff --git a/railties/test/generators/encrypted_secrets_generator_test.rb b/railties/test/generators/encrypted_secrets_generator_test.rb index 21fdcab19f..32651d81ae 100644 --- a/railties/test/generators/encrypted_secrets_generator_test.rb +++ b/railties/test/generators/encrypted_secrets_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/encrypted_secrets/encrypted_secrets_generator" diff --git a/railties/test/generators/generated_attribute_test.rb b/railties/test/generators/generated_attribute_test.rb index 97847c8624..29d6c0f4fc 100644 --- a/railties/test/generators/generated_attribute_test.rb +++ b/railties/test/generators/generated_attribute_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/generated_attribute" diff --git a/railties/test/generators/generator_generator_test.rb b/railties/test/generators/generator_generator_test.rb index 5ff8bb0357..c5d8412307 100644 --- a/railties/test/generators/generator_generator_test.rb +++ b/railties/test/generators/generator_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/generator/generator_generator" diff --git a/railties/test/generators/generator_test.rb b/railties/test/generators/generator_test.rb index 4444b3a56e..f9bfee2fa1 100644 --- a/railties/test/generators/generator_test.rb +++ b/railties/test/generators/generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/test_case" require "active_support/testing/autorun" require "rails/generators/app_base" diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb index 5fb331e197..73fb2a86c8 100644 --- a/railties/test/generators/generators_test_helper.rb +++ b/railties/test/generators/generators_test_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/module/remove_method" require "active_support/testing/stream" diff --git a/railties/test/generators/helper_generator_test.rb b/railties/test/generators/helper_generator_test.rb index d9e6e0a85a..683cd13cfb 100644 --- a/railties/test/generators/helper_generator_test.rb +++ b/railties/test/generators/helper_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/helper/helper_generator" diff --git a/railties/test/generators/integration_test_generator_test.rb b/railties/test/generators/integration_test_generator_test.rb index 9358b63bd4..dc586f60b4 100644 --- a/railties/test/generators/integration_test_generator_test.rb +++ b/railties/test/generators/integration_test_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/integration_test/integration_test_generator" diff --git a/railties/test/generators/job_generator_test.rb b/railties/test/generators/job_generator_test.rb index 68d158eb39..4981ee999e 100644 --- a/railties/test/generators/job_generator_test.rb +++ b/railties/test/generators/job_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/job/job_generator" diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb index 2ff03ea65e..13c3956ae8 100644 --- a/railties/test/generators/mailer_generator_test.rb +++ b/railties/test/generators/mailer_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/mailer/mailer_generator" diff --git a/railties/test/generators/migration_generator_test.rb b/railties/test/generators/migration_generator_test.rb index 6fe6e4ca07..0a70be0677 100644 --- a/railties/test/generators/migration_generator_test.rb +++ b/railties/test/generators/migration_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/migration/migration_generator" diff --git a/railties/test/generators/model_generator_test.rb b/railties/test/generators/model_generator_test.rb index f41969fc46..2a85f985ee 100644 --- a/railties/test/generators/model_generator_test.rb +++ b/railties/test/generators/model_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/model/model_generator" require "active_support/core_ext/string/strip" diff --git a/railties/test/generators/named_base_test.rb b/railties/test/generators/named_base_test.rb index 3015b5363b..d775faad36 100644 --- a/railties/test/generators/named_base_test.rb +++ b/railties/test/generators/named_base_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/scaffold_controller/scaffold_controller_generator" diff --git a/railties/test/generators/namespaced_generators_test.rb b/railties/test/generators/namespaced_generators_test.rb index 1caabbe6b1..7d63431436 100644 --- a/railties/test/generators/namespaced_generators_test.rb +++ b/railties/test/generators/namespaced_generators_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/controller/controller_generator" require "rails/generators/rails/model/model_generator" diff --git a/railties/test/generators/orm_test.rb b/railties/test/generators/orm_test.rb index 88ae930554..35cfeeabf6 100644 --- a/railties/test/generators/orm_test.rb +++ b/railties/test/generators/orm_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/scaffold_controller/scaffold_controller_generator" diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index f8512f9157..2aef4e6584 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/plugin/plugin_generator" require "generators/shared_generator_tests" diff --git a/railties/test/generators/plugin_test_helper.rb b/railties/test/generators/plugin_test_helper.rb index 8ac90e3484..81768b890f 100644 --- a/railties/test/generators/plugin_test_helper.rb +++ b/railties/test/generators/plugin_test_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "tmpdir" diff --git a/railties/test/generators/plugin_test_runner_test.rb b/railties/test/generators/plugin_test_runner_test.rb index 0bdd2a77d2..58f60404c4 100644 --- a/railties/test/generators/plugin_test_runner_test.rb +++ b/railties/test/generators/plugin_test_runner_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/plugin_test_helper" class PluginTestRunnerTest < ActiveSupport::TestCase diff --git a/railties/test/generators/resource_generator_test.rb b/railties/test/generators/resource_generator_test.rb index e976e58180..45b02e663d 100644 --- a/railties/test/generators/resource_generator_test.rb +++ b/railties/test/generators/resource_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/resource/resource_generator" diff --git a/railties/test/generators/scaffold_controller_generator_test.rb b/railties/test/generators/scaffold_controller_generator_test.rb index 9971626f9f..ff510e9312 100644 --- a/railties/test/generators/scaffold_controller_generator_test.rb +++ b/railties/test/generators/scaffold_controller_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/scaffold_controller/scaffold_controller_generator" diff --git a/railties/test/generators/scaffold_generator_test.rb b/railties/test/generators/scaffold_generator_test.rb index 9926d58d16..4956ca21b0 100644 --- a/railties/test/generators/scaffold_generator_test.rb +++ b/railties/test/generators/scaffold_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/scaffold/scaffold_generator" diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb index 5e75879964..5fd0a6c7d1 100644 --- a/railties/test/generators/shared_generator_tests.rb +++ b/railties/test/generators/shared_generator_tests.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Tests, setup, and teardown common to the application and plugin generator suites. # diff --git a/railties/test/generators/system_test_generator_test.rb b/railties/test/generators/system_test_generator_test.rb index 4622360244..03c1c78ef4 100644 --- a/railties/test/generators/system_test_generator_test.rb +++ b/railties/test/generators/system_test_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/system_test/system_test_generator" diff --git a/railties/test/generators/task_generator_test.rb b/railties/test/generators/task_generator_test.rb index 2285534bb9..1896dc5c87 100644 --- a/railties/test/generators/task_generator_test.rb +++ b/railties/test/generators/task_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/task/task_generator" diff --git a/railties/test/generators/test_runner_in_engine_test.rb b/railties/test/generators/test_runner_in_engine_test.rb index 680dc2608e..0a330ea4e9 100644 --- a/railties/test/generators/test_runner_in_engine_test.rb +++ b/railties/test/generators/test_runner_in_engine_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/plugin_test_helper" class TestRunnerInEngineTest < ActiveSupport::TestCase diff --git a/railties/test/generators_test.rb b/railties/test/generators_test.rb index e07627f36d..766a50f6a0 100644 --- a/railties/test/generators_test.rb +++ b/railties/test/generators_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/model/model_generator" require "rails/generators/test_unit/model/model_generator" diff --git a/railties/test/initializable_test.rb b/railties/test/initializable_test.rb index 4b67c91cc5..e942a983b6 100644 --- a/railties/test/initializable_test.rb +++ b/railties/test/initializable_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "rails/initializable" diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index 7496b5f84a..2e910d1d17 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Note: # It is important to keep this file as light as possible # the goal for tests that require this is to test booting up diff --git a/railties/test/json_params_parsing_test.rb b/railties/test/json_params_parsing_test.rb index 7fff3bb465..e2bd4a8230 100644 --- a/railties/test/json_params_parsing_test.rb +++ b/railties/test/json_params_parsing_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_dispatch" require "active_record" diff --git a/railties/test/path_generation_test.rb b/railties/test/path_generation_test.rb index c0b03d0c15..1f82ec3bbb 100644 --- a/railties/test/path_generation_test.rb +++ b/railties/test/path_generation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/object/with_options" require "active_support/core_ext/object/json" diff --git a/railties/test/paths_test.rb b/railties/test/paths_test.rb index f3db0a51d2..0ec21fc90e 100644 --- a/railties/test/paths_test.rb +++ b/railties/test/paths_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "rails/paths" require "minitest/mock" diff --git a/railties/test/rack_logger_test.rb b/railties/test/rack_logger_test.rb index 33b4bc6a3a..cd14cbe7a6 100644 --- a/railties/test/rack_logger_test.rb +++ b/railties/test/rack_logger_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/testing/autorun" require "active_support/test_case" diff --git a/railties/test/rails_info_controller_test.rb b/railties/test/rails_info_controller_test.rb index d795629ccd..bae87e6a1c 100644 --- a/railties/test/rails_info_controller_test.rb +++ b/railties/test/rails_info_controller_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionController diff --git a/railties/test/rails_info_test.rb b/railties/test/rails_info_test.rb index 383adcc55d..e29e3c828e 100644 --- a/railties/test/rails_info_test.rb +++ b/railties/test/rails_info_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" unless defined?(Rails) && defined?(Rails::Info) diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb index e382a7a873..19d2a2e4f6 100644 --- a/railties/test/railties/engine_test.rb +++ b/railties/test/railties/engine_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" require "stringio" require "rack/test" diff --git a/railties/test/railties/generators_test.rb b/railties/test/railties/generators_test.rb index 5c691b9ec4..22c2697577 100644 --- a/railties/test/railties/generators_test.rb +++ b/railties/test/railties/generators_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true RAILS_ISOLATED_ENGINE = true require "isolation/abstract_unit" diff --git a/railties/test/railties/mounted_engine_test.rb b/railties/test/railties/mounted_engine_test.rb index 6639e55382..b4efe50038 100644 --- a/railties/test/railties/mounted_engine_test.rb +++ b/railties/test/railties/mounted_engine_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests diff --git a/railties/test/railties/railtie_test.rb b/railties/test/railties/railtie_test.rb index 30cd525266..be77af8134 100644 --- a/railties/test/railties/railtie_test.rb +++ b/railties/test/railties/railtie_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "isolation/abstract_unit" module RailtiesTest diff --git a/railties/test/secrets_test.rb b/railties/test/secrets_test.rb index 36c8ef1fd9..030303525b 100644 --- a/railties/test/secrets_test.rb +++ b/railties/test/secrets_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "isolation/abstract_unit" require "rails/generators" diff --git a/railties/test/test_unit/reporter_test.rb b/railties/test/test_unit/reporter_test.rb index 98201394cd..dc462fe0f4 100644 --- a/railties/test/test_unit/reporter_test.rb +++ b/railties/test/test_unit/reporter_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "rails/test_unit/reporter" require "minitest/mock" diff --git a/railties/test/version_test.rb b/railties/test/version_test.rb index 86a482e091..393da344a1 100644 --- a/railties/test/version_test.rb +++ b/railties/test/version_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class VersionTest < ActiveSupport::TestCase |