diff --git a/.rubocop.yml b/.rubocop.yml index 8a0c55d5d44d..fc4ee39572c5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -97,6 +97,10 @@ Style/StringLiterals: Enabled: true EnforcedStyle: double_quotes +Style/FrozenStringLiteralComment: + Enabled: true + EnforcedStyle: always + # Detect hard tabs, no hard tabs. Layout/Tab: Enabled: true diff --git a/Gemfile b/Gemfile index 23b9b34b772b..1a62782cbe3d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,4 @@ +# frozen_string_literal: true source "https://rubygems.org" git_source(:github) do |repo_name| diff --git a/Rakefile b/Rakefile index ae269fbce7bc..3fde31c6972e 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "net/http" $:.unshift __dir__ diff --git a/actioncable/Rakefile b/actioncable/Rakefile index e21843bb44cf..95875fa27bea 100644 --- a/actioncable/Rakefile +++ b/actioncable/Rakefile @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rake/testtask" require "pathname" require "open3" diff --git a/actioncable/actioncable.gemspec b/actioncable/actioncable.gemspec index a72c0d2608f4..a95e8f8bda9b 100644 --- a/actioncable/actioncable.gemspec +++ b/actioncable/actioncable.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/actioncable/bin/test b/actioncable/bin/test index 470ce93f103c..c53377cc970f 100755 --- a/actioncable/bin/test +++ b/actioncable/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/actioncable/lib/action_cable.rb b/actioncable/lib/action_cable.rb index c2d3550acbd2..8c274b130ef8 100644 --- a/actioncable/lib/action_cable.rb +++ b/actioncable/lib/action_cable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true #-- # Copyright (c) 2015-2017 Basecamp, LLC # diff --git a/actioncable/lib/action_cable/channel.rb b/actioncable/lib/action_cable/channel.rb index 7ae262ce5f47..4ad5e1b003fe 100644 --- a/actioncable/lib/action_cable/channel.rb +++ b/actioncable/lib/action_cable/channel.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module Channel extend ActiveSupport::Autoload diff --git a/actioncable/lib/action_cable/channel/base.rb b/actioncable/lib/action_cable/channel/base.rb index 718f630f58cf..ca812e80d212 100644 --- a/actioncable/lib/action_cable/channel/base.rb +++ b/actioncable/lib/action_cable/channel/base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "set" module ActionCable diff --git a/actioncable/lib/action_cable/channel/broadcasting.rb b/actioncable/lib/action_cable/channel/broadcasting.rb index 23ed4ec94345..3db211446a25 100644 --- a/actioncable/lib/action_cable/channel/broadcasting.rb +++ b/actioncable/lib/action_cable/channel/broadcasting.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/to_param" module ActionCable diff --git a/actioncable/lib/action_cable/channel/callbacks.rb b/actioncable/lib/action_cable/channel/callbacks.rb index c740132c944a..65629e4191d2 100644 --- a/actioncable/lib/action_cable/channel/callbacks.rb +++ b/actioncable/lib/action_cable/channel/callbacks.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/callbacks" module ActionCable diff --git a/actioncable/lib/action_cable/channel/naming.rb b/actioncable/lib/action_cable/channel/naming.rb index b565cb3cac9b..433d9c521913 100644 --- a/actioncable/lib/action_cable/channel/naming.rb +++ b/actioncable/lib/action_cable/channel/naming.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module Channel module Naming diff --git a/actioncable/lib/action_cable/channel/periodic_timers.rb b/actioncable/lib/action_cable/channel/periodic_timers.rb index 90c68cfe849c..4686145f6479 100644 --- a/actioncable/lib/action_cable/channel/periodic_timers.rb +++ b/actioncable/lib/action_cable/channel/periodic_timers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module Channel module PeriodicTimers diff --git a/actioncable/lib/action_cable/channel/streams.rb b/actioncable/lib/action_cable/channel/streams.rb index dbba33335352..c938adab9ac5 100644 --- a/actioncable/lib/action_cable/channel/streams.rb +++ b/actioncable/lib/action_cable/channel/streams.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module Channel # Streams allow channels to route broadcastings to the subscriber. A broadcasting is, as discussed elsewhere, a pubsub queue where any data diff --git a/actioncable/lib/action_cable/connection.rb b/actioncable/lib/action_cable/connection.rb index 902efb07e2ba..c301846da6a0 100644 --- a/actioncable/lib/action_cable/connection.rb +++ b/actioncable/lib/action_cable/connection.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module Connection extend ActiveSupport::Autoload diff --git a/actioncable/lib/action_cable/connection/authorization.rb b/actioncable/lib/action_cable/connection/authorization.rb index 989a67d6df2a..e01fdf6c8960 100644 --- a/actioncable/lib/action_cable/connection/authorization.rb +++ b/actioncable/lib/action_cable/connection/authorization.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module Connection module Authorization diff --git a/actioncable/lib/action_cable/connection/base.rb b/actioncable/lib/action_cable/connection/base.rb index ac5f405deadf..e50ed7ef05d6 100644 --- a/actioncable/lib/action_cable/connection/base.rb +++ b/actioncable/lib/action_cable/connection/base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch" module ActionCable diff --git a/actioncable/lib/action_cable/connection/client_socket.rb b/actioncable/lib/action_cable/connection/client_socket.rb index c7e30e78c899..2b45befb01bd 100644 --- a/actioncable/lib/action_cable/connection/client_socket.rb +++ b/actioncable/lib/action_cable/connection/client_socket.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "websocket/driver" module ActionCable diff --git a/actioncable/lib/action_cable/connection/identification.rb b/actioncable/lib/action_cable/connection/identification.rb index ffab35942969..b10728a911bf 100644 --- a/actioncable/lib/action_cable/connection/identification.rb +++ b/actioncable/lib/action_cable/connection/identification.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "set" module ActionCable diff --git a/actioncable/lib/action_cable/connection/internal_channel.rb b/actioncable/lib/action_cable/connection/internal_channel.rb index 8f0ec766c34a..1feb1cf0dcfd 100644 --- a/actioncable/lib/action_cable/connection/internal_channel.rb +++ b/actioncable/lib/action_cable/connection/internal_channel.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module Connection # Makes it possible for the RemoteConnection to disconnect a specific connection. diff --git a/actioncable/lib/action_cable/connection/message_buffer.rb b/actioncable/lib/action_cable/connection/message_buffer.rb index 4ccd322644ed..222505de6c5e 100644 --- a/actioncable/lib/action_cable/connection/message_buffer.rb +++ b/actioncable/lib/action_cable/connection/message_buffer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module Connection # Allows us to buffer messages received from the WebSocket before the Connection has been fully initialized, and is ready to receive them. diff --git a/actioncable/lib/action_cable/connection/stream.rb b/actioncable/lib/action_cable/connection/stream.rb index e620b9384559..4b755cc7d53f 100644 --- a/actioncable/lib/action_cable/connection/stream.rb +++ b/actioncable/lib/action_cable/connection/stream.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "thread" module ActionCable diff --git a/actioncable/lib/action_cable/connection/stream_event_loop.rb b/actioncable/lib/action_cable/connection/stream_event_loop.rb index 2d1af0ff9f02..2ea233ed727e 100644 --- a/actioncable/lib/action_cable/connection/stream_event_loop.rb +++ b/actioncable/lib/action_cable/connection/stream_event_loop.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "nio" require "thread" diff --git a/actioncable/lib/action_cable/connection/subscriptions.rb b/actioncable/lib/action_cable/connection/subscriptions.rb index 44bce1e195d5..ae82d2f16471 100644 --- a/actioncable/lib/action_cable/connection/subscriptions.rb +++ b/actioncable/lib/action_cable/connection/subscriptions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/indifferent_access" module ActionCable diff --git a/actioncable/lib/action_cable/connection/tagged_logger_proxy.rb b/actioncable/lib/action_cable/connection/tagged_logger_proxy.rb index aef549aa86ce..7e22a551a32f 100644 --- a/actioncable/lib/action_cable/connection/tagged_logger_proxy.rb +++ b/actioncable/lib/action_cable/connection/tagged_logger_proxy.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module Connection # Allows the use of per-connection tags against the server logger. This wouldn't work using the traditional diff --git a/actioncable/lib/action_cable/connection/web_socket.rb b/actioncable/lib/action_cable/connection/web_socket.rb index 27ae499f2968..3df2c577e3b2 100644 --- a/actioncable/lib/action_cable/connection/web_socket.rb +++ b/actioncable/lib/action_cable/connection/web_socket.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "websocket/driver" module ActionCable diff --git a/actioncable/lib/action_cable/engine.rb b/actioncable/lib/action_cable/engine.rb index 63a26636a0c6..0cfd0a84c976 100644 --- a/actioncable/lib/action_cable/engine.rb +++ b/actioncable/lib/action_cable/engine.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rails" require "action_cable" require "action_cable/helpers/action_cable_helper" diff --git a/actioncable/lib/action_cable/gem_version.rb b/actioncable/lib/action_cable/gem_version.rb index 5d6f9af0bb8d..f15c22da0085 100644 --- a/actioncable/lib/action_cable/gem_version.rb +++ b/actioncable/lib/action_cable/gem_version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable # Returns the version of the currently loaded Action Cable as a Gem::Version. def self.gem_version diff --git a/actioncable/lib/action_cable/helpers/action_cable_helper.rb b/actioncable/lib/action_cable/helpers/action_cable_helper.rb index f53be0bc31e4..b1d312ca5371 100644 --- a/actioncable/lib/action_cable/helpers/action_cable_helper.rb +++ b/actioncable/lib/action_cable/helpers/action_cable_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module Helpers module ActionCableHelper diff --git a/actioncable/lib/action_cable/remote_connections.rb b/actioncable/lib/action_cable/remote_connections.rb index e689fbf21b46..4a4e36a0f107 100644 --- a/actioncable/lib/action_cable/remote_connections.rb +++ b/actioncable/lib/action_cable/remote_connections.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable # If you need to disconnect a given connection, you can go through the # RemoteConnections. You can find the connections you're looking for by diff --git a/actioncable/lib/action_cable/server.rb b/actioncable/lib/action_cable/server.rb index 22f93538254e..13ead5486d41 100644 --- a/actioncable/lib/action_cable/server.rb +++ b/actioncable/lib/action_cable/server.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module Server extend ActiveSupport::Autoload diff --git a/actioncable/lib/action_cable/server/base.rb b/actioncable/lib/action_cable/server/base.rb index 3b3a17a5329e..dd968e88b2c9 100644 --- a/actioncable/lib/action_cable/server/base.rb +++ b/actioncable/lib/action_cable/server/base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "monitor" module ActionCable diff --git a/actioncable/lib/action_cable/server/broadcasting.rb b/actioncable/lib/action_cable/server/broadcasting.rb index 7fcd6c6587d7..10549b5d32d6 100644 --- a/actioncable/lib/action_cable/server/broadcasting.rb +++ b/actioncable/lib/action_cable/server/broadcasting.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module Server # Broadcasting is how other parts of your application can send messages to a channel's subscribers. As explained in Channel, most of the time, these diff --git a/actioncable/lib/action_cable/server/configuration.rb b/actioncable/lib/action_cable/server/configuration.rb index 17e0dee064ef..ecfc84626405 100644 --- a/actioncable/lib/action_cable/server/configuration.rb +++ b/actioncable/lib/action_cable/server/configuration.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module Server # An instance of this configuration object is available via ActionCable.server.config, which allows you to tweak Action Cable configuration diff --git a/actioncable/lib/action_cable/server/connections.rb b/actioncable/lib/action_cable/server/connections.rb index 5e61b4e335b1..c506c744b35c 100644 --- a/actioncable/lib/action_cable/server/connections.rb +++ b/actioncable/lib/action_cable/server/connections.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module Server # Collection class for all the connections that have been established on this specific server. Remember, usually you'll run many Action Cable servers, so diff --git a/actioncable/lib/action_cable/server/worker.rb b/actioncable/lib/action_cable/server/worker.rb index 43639c27afdc..c6fb8ec77548 100644 --- a/actioncable/lib/action_cable/server/worker.rb +++ b/actioncable/lib/action_cable/server/worker.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/callbacks" require "active_support/core_ext/module/attribute_accessors_per_thread" require "concurrent" diff --git a/actioncable/lib/action_cable/server/worker/active_record_connection_management.rb b/actioncable/lib/action_cable/server/worker/active_record_connection_management.rb index c1e4aa810356..02886ee441ab 100644 --- a/actioncable/lib/action_cable/server/worker/active_record_connection_management.rb +++ b/actioncable/lib/action_cable/server/worker/active_record_connection_management.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module Server class Worker diff --git a/actioncable/lib/action_cable/subscription_adapter.rb b/actioncable/lib/action_cable/subscription_adapter.rb index 596269ab9bf3..018e8dbe31a8 100644 --- a/actioncable/lib/action_cable/subscription_adapter.rb +++ b/actioncable/lib/action_cable/subscription_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module SubscriptionAdapter extend ActiveSupport::Autoload diff --git a/actioncable/lib/action_cable/subscription_adapter/async.rb b/actioncable/lib/action_cable/subscription_adapter/async.rb index 46819dbfec17..b1d29a693c55 100644 --- a/actioncable/lib/action_cable/subscription_adapter/async.rb +++ b/actioncable/lib/action_cable/subscription_adapter/async.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_cable/subscription_adapter/inline" module ActionCable diff --git a/actioncable/lib/action_cable/subscription_adapter/base.rb b/actioncable/lib/action_cable/subscription_adapter/base.rb index 796db5ffa354..c33d75986dd3 100644 --- a/actioncable/lib/action_cable/subscription_adapter/base.rb +++ b/actioncable/lib/action_cable/subscription_adapter/base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module SubscriptionAdapter class Base diff --git a/actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb b/actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb index 8b293cc7853a..4beeaa24a0d4 100644 --- a/actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb +++ b/actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module SubscriptionAdapter module ChannelPrefix # :nodoc: diff --git a/actioncable/lib/action_cable/subscription_adapter/evented_redis.rb b/actioncable/lib/action_cable/subscription_adapter/evented_redis.rb index ae71708240f5..2703c7f297a9 100644 --- a/actioncable/lib/action_cable/subscription_adapter/evented_redis.rb +++ b/actioncable/lib/action_cable/subscription_adapter/evented_redis.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "thread" gem "em-hiredis", "~> 0.3.0" diff --git a/actioncable/lib/action_cable/subscription_adapter/inline.rb b/actioncable/lib/action_cable/subscription_adapter/inline.rb index 81357faead2c..7e04253635dc 100644 --- a/actioncable/lib/action_cable/subscription_adapter/inline.rb +++ b/actioncable/lib/action_cable/subscription_adapter/inline.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module SubscriptionAdapter class Inline < Base # :nodoc: diff --git a/actioncable/lib/action_cable/subscription_adapter/postgresql.rb b/actioncable/lib/action_cable/subscription_adapter/postgresql.rb index bdab5205ec91..58db65f546f3 100644 --- a/actioncable/lib/action_cable/subscription_adapter/postgresql.rb +++ b/actioncable/lib/action_cable/subscription_adapter/postgresql.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true gem "pg", "~> 0.18" require "pg" require "thread" diff --git a/actioncable/lib/action_cable/subscription_adapter/redis.rb b/actioncable/lib/action_cable/subscription_adapter/redis.rb index 225609c2366e..1931f443c18d 100644 --- a/actioncable/lib/action_cable/subscription_adapter/redis.rb +++ b/actioncable/lib/action_cable/subscription_adapter/redis.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "thread" gem "redis", "~> 3.0" diff --git a/actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb b/actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb index 4cce86dccad7..373b9d7fe322 100644 --- a/actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb +++ b/actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionCable module SubscriptionAdapter class SubscriberMap diff --git a/actioncable/lib/action_cable/version.rb b/actioncable/lib/action_cable/version.rb index d6081409f0e7..a6fe27aa687d 100644 --- a/actioncable/lib/action_cable/version.rb +++ b/actioncable/lib/action_cable/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "gem_version" module ActionCable diff --git a/actioncable/lib/rails/generators/channel/channel_generator.rb b/actioncable/lib/rails/generators/channel/channel_generator.rb index 80f512c94cc5..0b833611d3c9 100644 --- a/actioncable/lib/rails/generators/channel/channel_generator.rb +++ b/actioncable/lib/rails/generators/channel/channel_generator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Rails module Generators class ChannelGenerator < NamedBase diff --git a/actioncable/test/channel/base_test.rb b/actioncable/test/channel/base_test.rb index 9a3a3581e675..afefbaf07611 100644 --- a/actioncable/test/channel/base_test.rb +++ b/actioncable/test/channel/base_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "stubs/test_connection" require "stubs/room" diff --git a/actioncable/test/channel/broadcasting_test.rb b/actioncable/test/channel/broadcasting_test.rb index 3476c1db31fe..9062a244e459 100644 --- a/actioncable/test/channel/broadcasting_test.rb +++ b/actioncable/test/channel/broadcasting_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "stubs/test_connection" require "stubs/room" diff --git a/actioncable/test/channel/naming_test.rb b/actioncable/test/channel/naming_test.rb index 08f0e7be4829..b6ac7cfd42e5 100644 --- a/actioncable/test/channel/naming_test.rb +++ b/actioncable/test/channel/naming_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" class ActionCable::Channel::NamingTest < ActiveSupport::TestCase diff --git a/actioncable/test/channel/periodic_timers_test.rb b/actioncable/test/channel/periodic_timers_test.rb index 17a8e45a35d7..02945a2eedd9 100644 --- a/actioncable/test/channel/periodic_timers_test.rb +++ b/actioncable/test/channel/periodic_timers_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "stubs/test_connection" require "stubs/room" diff --git a/actioncable/test/channel/rejection_test.rb b/actioncable/test/channel/rejection_test.rb index 99c4a7603abe..989ecef1f15a 100644 --- a/actioncable/test/channel/rejection_test.rb +++ b/actioncable/test/channel/rejection_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "stubs/test_connection" require "stubs/room" diff --git a/actioncable/test/channel/stream_test.rb b/actioncable/test/channel/stream_test.rb index 50fc7be30b38..14b5d24fbd70 100644 --- a/actioncable/test/channel/stream_test.rb +++ b/actioncable/test/channel/stream_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "stubs/test_connection" require "stubs/room" diff --git a/actioncable/test/client_test.rb b/actioncable/test/client_test.rb index 30ac1e9c3895..d38d280339cf 100644 --- a/actioncable/test/client_test.rb +++ b/actioncable/test/client_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "concurrent" diff --git a/actioncable/test/connection/authorization_test.rb b/actioncable/test/connection/authorization_test.rb index dcdbe9c1d170..174821f785dd 100644 --- a/actioncable/test/connection/authorization_test.rb +++ b/actioncable/test/connection/authorization_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "stubs/test_server" diff --git a/actioncable/test/connection/base_test.rb b/actioncable/test/connection/base_test.rb index 9bcd0700cf96..a460fa2a33d3 100644 --- a/actioncable/test/connection/base_test.rb +++ b/actioncable/test/connection/base_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "stubs/test_server" require "active_support/core_ext/object/json" diff --git a/actioncable/test/connection/client_socket_test.rb b/actioncable/test/connection/client_socket_test.rb index bc3ff6a3d79a..b0e01fa5cc62 100644 --- a/actioncable/test/connection/client_socket_test.rb +++ b/actioncable/test/connection/client_socket_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "stubs/test_server" diff --git a/actioncable/test/connection/cross_site_forgery_test.rb b/actioncable/test/connection/cross_site_forgery_test.rb index 37bedfd7346a..f94717fecdab 100644 --- a/actioncable/test/connection/cross_site_forgery_test.rb +++ b/actioncable/test/connection/cross_site_forgery_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "stubs/test_server" diff --git a/actioncable/test/connection/identifier_test.rb b/actioncable/test/connection/identifier_test.rb index f3d3bc0603ed..de9447ba3b9c 100644 --- a/actioncable/test/connection/identifier_test.rb +++ b/actioncable/test/connection/identifier_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "stubs/test_server" require "stubs/user" diff --git a/actioncable/test/connection/multiple_identifiers_test.rb b/actioncable/test/connection/multiple_identifiers_test.rb index ca1a08f4d63b..754e76a123a7 100644 --- a/actioncable/test/connection/multiple_identifiers_test.rb +++ b/actioncable/test/connection/multiple_identifiers_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "stubs/test_server" require "stubs/user" diff --git a/actioncable/test/connection/stream_test.rb b/actioncable/test/connection/stream_test.rb index 36e1d3c095ce..b0f7408cac8f 100644 --- a/actioncable/test/connection/stream_test.rb +++ b/actioncable/test/connection/stream_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "stubs/test_server" diff --git a/actioncable/test/connection/string_identifier_test.rb b/actioncable/test/connection/string_identifier_test.rb index 6d53e249cb92..22dc95b8f63e 100644 --- a/actioncable/test/connection/string_identifier_test.rb +++ b/actioncable/test/connection/string_identifier_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "stubs/test_server" diff --git a/actioncable/test/connection/subscriptions_test.rb b/actioncable/test/connection/subscriptions_test.rb index a1c8a4613c4d..20333376e9ec 100644 --- a/actioncable/test/connection/subscriptions_test.rb +++ b/actioncable/test/connection/subscriptions_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" class ActionCable::Connection::SubscriptionsTest < ActionCable::TestCase diff --git a/actioncable/test/server/base_test.rb b/actioncable/test/server/base_test.rb index f0a51c5a7db8..bb79ed2ab92c 100644 --- a/actioncable/test/server/base_test.rb +++ b/actioncable/test/server/base_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "stubs/test_server" require "active_support/core_ext/hash/indifferent_access" diff --git a/actioncable/test/server/broadcasting_test.rb b/actioncable/test/server/broadcasting_test.rb index ed377b7d5daf..b941eb1e4f59 100644 --- a/actioncable/test/server/broadcasting_test.rb +++ b/actioncable/test/server/broadcasting_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "stubs/test_server" diff --git a/actioncable/test/stubs/global_id.rb b/actioncable/test/stubs/global_id.rb index 334f0d03e8f8..374503487d94 100644 --- a/actioncable/test/stubs/global_id.rb +++ b/actioncable/test/stubs/global_id.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class GlobalID attr_reader :uri delegate :to_param, :to_s, to: :uri diff --git a/actioncable/test/stubs/room.rb b/actioncable/test/stubs/room.rb index 1664b07d128c..662200aa68c5 100644 --- a/actioncable/test/stubs/room.rb +++ b/actioncable/test/stubs/room.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Room attr_reader :id, :name diff --git a/actioncable/test/stubs/test_adapter.rb b/actioncable/test/stubs/test_adapter.rb index bbd142b287a2..0d23576d2c57 100644 --- a/actioncable/test/stubs/test_adapter.rb +++ b/actioncable/test/stubs/test_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class SuccessAdapter < ActionCable::SubscriptionAdapter::Base def broadcast(channel, payload) end diff --git a/actioncable/test/stubs/test_connection.rb b/actioncable/test/stubs/test_connection.rb index cd2e219d8857..c543518929b2 100644 --- a/actioncable/test/stubs/test_connection.rb +++ b/actioncable/test/stubs/test_connection.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "stubs/user" class TestConnection diff --git a/actioncable/test/stubs/test_server.rb b/actioncable/test/stubs/test_server.rb index 5bf2a151dc6c..fc5b0df6bc5c 100644 --- a/actioncable/test/stubs/test_server.rb +++ b/actioncable/test/stubs/test_server.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "ostruct" class TestServer diff --git a/actioncable/test/stubs/user.rb b/actioncable/test/stubs/user.rb index a66b4f87d559..e6b917b281c6 100644 --- a/actioncable/test/stubs/user.rb +++ b/actioncable/test/stubs/user.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class User attr_reader :name diff --git a/actioncable/test/subscription_adapter/async_test.rb b/actioncable/test/subscription_adapter/async_test.rb index 8a447c7a4f2c..0b5bfb2fa952 100644 --- a/actioncable/test/subscription_adapter/async_test.rb +++ b/actioncable/test/subscription_adapter/async_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require_relative "common" diff --git a/actioncable/test/subscription_adapter/base_test.rb b/actioncable/test/subscription_adapter/base_test.rb index 212ea49d2fa3..15ce40b1c16c 100644 --- a/actioncable/test/subscription_adapter/base_test.rb +++ b/actioncable/test/subscription_adapter/base_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "stubs/test_server" diff --git a/actioncable/test/subscription_adapter/channel_prefix.rb b/actioncable/test/subscription_adapter/channel_prefix.rb index 9ad659912eb9..71f993b72ae9 100644 --- a/actioncable/test/subscription_adapter/channel_prefix.rb +++ b/actioncable/test/subscription_adapter/channel_prefix.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" class ActionCable::Server::WithIndependentConfig < ActionCable::Server::Base diff --git a/actioncable/test/subscription_adapter/common.rb b/actioncable/test/subscription_adapter/common.rb index 3aa88c2caa1b..10639cb112c3 100644 --- a/actioncable/test/subscription_adapter/common.rb +++ b/actioncable/test/subscription_adapter/common.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require "concurrent" diff --git a/actioncable/test/subscription_adapter/evented_redis_test.rb b/actioncable/test/subscription_adapter/evented_redis_test.rb index 1c99031ab0f0..33aab4672b18 100644 --- a/actioncable/test/subscription_adapter/evented_redis_test.rb +++ b/actioncable/test/subscription_adapter/evented_redis_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require_relative "common" require_relative "channel_prefix" diff --git a/actioncable/test/subscription_adapter/inline_test.rb b/actioncable/test/subscription_adapter/inline_test.rb index eafa3df2df18..a3d83c07fceb 100644 --- a/actioncable/test/subscription_adapter/inline_test.rb +++ b/actioncable/test/subscription_adapter/inline_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require_relative "common" diff --git a/actioncable/test/subscription_adapter/postgresql_test.rb b/actioncable/test/subscription_adapter/postgresql_test.rb index ada4c2e2bd46..4534846e6e0f 100644 --- a/actioncable/test/subscription_adapter/postgresql_test.rb +++ b/actioncable/test/subscription_adapter/postgresql_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require_relative "common" diff --git a/actioncable/test/subscription_adapter/redis_test.rb b/actioncable/test/subscription_adapter/redis_test.rb index 60596dd205a2..64dbd74a60c8 100644 --- a/actioncable/test/subscription_adapter/redis_test.rb +++ b/actioncable/test/subscription_adapter/redis_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" require_relative "common" require_relative "channel_prefix" diff --git a/actioncable/test/subscription_adapter/subscriber_map_test.rb b/actioncable/test/subscription_adapter/subscriber_map_test.rb index 76b984c8495a..ee36dd7a22d0 100644 --- a/actioncable/test/subscription_adapter/subscriber_map_test.rb +++ b/actioncable/test/subscription_adapter/subscriber_map_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" class SubscriberMapTest < ActionCable::TestCase diff --git a/actioncable/test/test_helper.rb b/actioncable/test/test_helper.rb index 5d246c2b7661..b9d407fb6d5b 100644 --- a/actioncable/test/test_helper.rb +++ b/actioncable/test/test_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_cable" require "active_support/testing/autorun" diff --git a/actioncable/test/worker_test.rb b/actioncable/test/worker_test.rb index 3385593f745e..2512df59e846 100644 --- a/actioncable/test/worker_test.rb +++ b/actioncable/test/worker_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "test_helper" class WorkerTest < ActiveSupport::TestCase diff --git a/actionmailer/Rakefile b/actionmailer/Rakefile index 6f05d236d913..942c14b2d60b 100644 --- a/actionmailer/Rakefile +++ b/actionmailer/Rakefile @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rake/testtask" desc "Default Task" diff --git a/actionmailer/actionmailer.gemspec b/actionmailer/actionmailer.gemspec index ae908ddda71b..66022602e31b 100644 --- a/actionmailer/actionmailer.gemspec +++ b/actionmailer/actionmailer.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/actionmailer/bin/test b/actionmailer/bin/test index 470ce93f103c..c53377cc970f 100755 --- a/actionmailer/bin/test +++ b/actionmailer/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/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index 8e59f033d00d..16dfe53e18d1 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true #-- # Copyright (c) 2004-2017 David Heinemeier Hansson # diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index f8aa54bd4431..782c369961dd 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "mail" require "action_mailer/collector" require "active_support/core_ext/string/inflections" diff --git a/actionmailer/lib/action_mailer/collector.rb b/actionmailer/lib/action_mailer/collector.rb index d97a73d65a34..c17715bac26d 100644 --- a/actionmailer/lib/action_mailer/collector.rb +++ b/actionmailer/lib/action_mailer/collector.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_controller/collector" require "active_support/core_ext/hash/reverse_merge" require "active_support/core_ext/array/extract_options" diff --git a/actionmailer/lib/action_mailer/delivery_job.rb b/actionmailer/lib/action_mailer/delivery_job.rb index a617daa87e8e..010edf5800e6 100644 --- a/actionmailer/lib/action_mailer/delivery_job.rb +++ b/actionmailer/lib/action_mailer/delivery_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_job" module ActionMailer diff --git a/actionmailer/lib/action_mailer/delivery_methods.rb b/actionmailer/lib/action_mailer/delivery_methods.rb index 93ae10fd704e..f4897e2b98d5 100644 --- a/actionmailer/lib/action_mailer/delivery_methods.rb +++ b/actionmailer/lib/action_mailer/delivery_methods.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "tmpdir" module ActionMailer diff --git a/actionmailer/lib/action_mailer/gem_version.rb b/actionmailer/lib/action_mailer/gem_version.rb index f5594ef928b3..c9bf5b3f7539 100644 --- a/actionmailer/lib/action_mailer/gem_version.rb +++ b/actionmailer/lib/action_mailer/gem_version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionMailer # Returns the version of the currently loaded Action Mailer as a Gem::Version. def self.gem_version diff --git a/actionmailer/lib/action_mailer/inline_preview_interceptor.rb b/actionmailer/lib/action_mailer/inline_preview_interceptor.rb index 980415afe090..925926ba4628 100644 --- a/actionmailer/lib/action_mailer/inline_preview_interceptor.rb +++ b/actionmailer/lib/action_mailer/inline_preview_interceptor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "base64" module ActionMailer diff --git a/actionmailer/lib/action_mailer/log_subscriber.rb b/actionmailer/lib/action_mailer/log_subscriber.rb index 2c058ccf660f..4f8aa98aaf31 100644 --- a/actionmailer/lib/action_mailer/log_subscriber.rb +++ b/actionmailer/lib/action_mailer/log_subscriber.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/log_subscriber" module ActionMailer diff --git a/actionmailer/lib/action_mailer/mail_helper.rb b/actionmailer/lib/action_mailer/mail_helper.rb index e04fc08866aa..69b6aebd8f2f 100644 --- a/actionmailer/lib/action_mailer/mail_helper.rb +++ b/actionmailer/lib/action_mailer/mail_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionMailer # Provides helper methods for ActionMailer::Base that can be used for easily # formatting messages, accessing mailer or message instances, and the diff --git a/actionmailer/lib/action_mailer/message_delivery.rb b/actionmailer/lib/action_mailer/message_delivery.rb index 0b54e124315f..a13a8a7ebed9 100644 --- a/actionmailer/lib/action_mailer/message_delivery.rb +++ b/actionmailer/lib/action_mailer/message_delivery.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "delegate" module ActionMailer diff --git a/actionmailer/lib/action_mailer/parameterized.rb b/actionmailer/lib/action_mailer/parameterized.rb index 3acacc1f1439..5a1adfca8f6d 100644 --- a/actionmailer/lib/action_mailer/parameterized.rb +++ b/actionmailer/lib/action_mailer/parameterized.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionMailer # Provides the option to parameterize mailers in order to share instance variable # setup, processing, and common headers. diff --git a/actionmailer/lib/action_mailer/preview.rb b/actionmailer/lib/action_mailer/preview.rb index 4f72eca93036..8053bf9eba0b 100644 --- a/actionmailer/lib/action_mailer/preview.rb +++ b/actionmailer/lib/action_mailer/preview.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/descendants_tracker" module ActionMailer diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb index 913df8cf939c..65a23e1ae7c7 100644 --- a/actionmailer/lib/action_mailer/railtie.rb +++ b/actionmailer/lib/action_mailer/railtie.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_job/railtie" require "action_mailer" require "rails" diff --git a/actionmailer/lib/action_mailer/rescuable.rb b/actionmailer/lib/action_mailer/rescuable.rb index f2eabfa0574f..7e8a9642b6e0 100644 --- a/actionmailer/lib/action_mailer/rescuable.rb +++ b/actionmailer/lib/action_mailer/rescuable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionMailer #:nodoc: # Provides `rescue_from` for mailers. Wraps mailer action processing, # mail job processing, and mail delivery. diff --git a/actionmailer/lib/action_mailer/test_case.rb b/actionmailer/lib/action_mailer/test_case.rb index 9ead03a40cc2..1aee49d79126 100644 --- a/actionmailer/lib/action_mailer/test_case.rb +++ b/actionmailer/lib/action_mailer/test_case.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/test_case" require "rails-dom-testing" diff --git a/actionmailer/lib/action_mailer/test_helper.rb b/actionmailer/lib/action_mailer/test_helper.rb index c30fb1fc18fb..dad260d1b654 100644 --- a/actionmailer/lib/action_mailer/test_helper.rb +++ b/actionmailer/lib/action_mailer/test_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_job" module ActionMailer diff --git a/actionmailer/lib/action_mailer/version.rb b/actionmailer/lib/action_mailer/version.rb index 8452d6370e5b..b0cfa198916a 100644 --- a/actionmailer/lib/action_mailer/version.rb +++ b/actionmailer/lib/action_mailer/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "gem_version" module ActionMailer diff --git a/actionmailer/lib/rails/generators/mailer/mailer_generator.rb b/actionmailer/lib/rails/generators/mailer/mailer_generator.rb index bc21b0710972..335f991decc5 100644 --- a/actionmailer/lib/rails/generators/mailer/mailer_generator.rb +++ b/actionmailer/lib/rails/generators/mailer/mailer_generator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Rails module Generators class MailerGenerator < NamedBase diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index dbfdb07e6e9b..f71ca117d2f1 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/kernel/reporting" # These are the normal settings that will be set up by Railties diff --git a/actionmailer/test/assert_select_email_test.rb b/actionmailer/test/assert_select_email_test.rb index bf14fe085303..0a99e0c8f3ad 100644 --- a/actionmailer/test/assert_select_email_test.rb +++ b/actionmailer/test/assert_select_email_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class AssertSelectEmailTest < ActionMailer::TestCase diff --git a/actionmailer/test/asset_host_test.rb b/actionmailer/test/asset_host_test.rb index 812df01a34db..e2b614c568ce 100644 --- a/actionmailer/test/asset_host_test.rb +++ b/actionmailer/test/asset_host_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_controller" diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index ebb97078e63b..0890448f65cb 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "set" diff --git a/actionmailer/test/caching_test.rb b/actionmailer/test/caching_test.rb index e76466439ebe..d491bba90587 100644 --- a/actionmailer/test/caching_test.rb +++ b/actionmailer/test/caching_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "fileutils" require "abstract_unit" require "mailers/base_mailer" diff --git a/actionmailer/test/delivery_methods_test.rb b/actionmailer/test/delivery_methods_test.rb index f64a69019f9c..23a501862ca9 100644 --- a/actionmailer/test/delivery_methods_test.rb +++ b/actionmailer/test/delivery_methods_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class MyCustomDelivery diff --git a/actionmailer/test/i18n_with_controller_test.rb b/actionmailer/test/i18n_with_controller_test.rb index 4f09339800cb..df7e969042e0 100644 --- a/actionmailer/test/i18n_with_controller_test.rb +++ b/actionmailer/test/i18n_with_controller_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_view" require "action_controller" diff --git a/actionmailer/test/log_subscriber_test.rb b/actionmailer/test/log_subscriber_test.rb index 799c6144d7f7..fabc7c366962 100644 --- a/actionmailer/test/log_subscriber_test.rb +++ b/actionmailer/test/log_subscriber_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "mailers/base_mailer" require "active_support/log_subscriber/test_helper" diff --git a/actionmailer/test/mail_helper_test.rb b/actionmailer/test/mail_helper_test.rb index 6042548aef33..da1241a4e2d9 100644 --- a/actionmailer/test/mail_helper_test.rb +++ b/actionmailer/test/mail_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class HelperMailer < ActionMailer::Base diff --git a/actionmailer/test/mail_layout_test.rb b/actionmailer/test/mail_layout_test.rb index 73059d782d7d..ac66a733c6de 100644 --- a/actionmailer/test/mail_layout_test.rb +++ b/actionmailer/test/mail_layout_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class AutoLayoutMailer < ActionMailer::Base diff --git a/actionmailer/test/mailers/asset_mailer.rb b/actionmailer/test/mailers/asset_mailer.rb index 1cf15128d285..a59000382cd6 100644 --- a/actionmailer/test/mailers/asset_mailer.rb +++ b/actionmailer/test/mailers/asset_mailer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class AssetMailer < ActionMailer::Base self.mailer_name = "asset_mailer" diff --git a/actionmailer/test/mailers/base_mailer.rb b/actionmailer/test/mailers/base_mailer.rb index 2a8884959cae..a339ef190dd1 100644 --- a/actionmailer/test/mailers/base_mailer.rb +++ b/actionmailer/test/mailers/base_mailer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class BaseMailer < ActionMailer::Base self.mailer_name = "base_mailer" diff --git a/actionmailer/test/mailers/caching_mailer.rb b/actionmailer/test/mailers/caching_mailer.rb index 92d3cff7c96f..fa548b98e541 100644 --- a/actionmailer/test/mailers/caching_mailer.rb +++ b/actionmailer/test/mailers/caching_mailer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CachingMailer < ActionMailer::Base self.mailer_name = "caching_mailer" diff --git a/actionmailer/test/mailers/delayed_mailer.rb b/actionmailer/test/mailers/delayed_mailer.rb index cae4ec2f4831..21eded8d0545 100644 --- a/actionmailer/test/mailers/delayed_mailer.rb +++ b/actionmailer/test/mailers/delayed_mailer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_job/arguments" class DelayedMailerError < StandardError; end diff --git a/actionmailer/test/mailers/params_mailer.rb b/actionmailer/test/mailers/params_mailer.rb index 4c0fae6d91d7..94f8da2201df 100644 --- a/actionmailer/test/mailers/params_mailer.rb +++ b/actionmailer/test/mailers/params_mailer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ParamsMailer < ActionMailer::Base before_action { @inviter, @invitee = params[:inviter], params[:invitee] } diff --git a/actionmailer/test/mailers/proc_mailer.rb b/actionmailer/test/mailers/proc_mailer.rb index 2487db9eb96f..f69615e768f8 100644 --- a/actionmailer/test/mailers/proc_mailer.rb +++ b/actionmailer/test/mailers/proc_mailer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ProcMailer < ActionMailer::Base default to: "system@test.lindsaar.net", "X-Proc-Method" => Proc.new { Time.now.to_i.to_s }, diff --git a/actionmailer/test/message_delivery_test.rb b/actionmailer/test/message_delivery_test.rb index 51f10b0bf1b2..58675e6d375d 100644 --- a/actionmailer/test/message_delivery_test.rb +++ b/actionmailer/test/message_delivery_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_job" require "mailers/delayed_mailer" diff --git a/actionmailer/test/parameterized_test.rb b/actionmailer/test/parameterized_test.rb index e988fffcb95b..4a53df37fa49 100644 --- a/actionmailer/test/parameterized_test.rb +++ b/actionmailer/test/parameterized_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_job" require "mailers/params_mailer" diff --git a/actionmailer/test/test_case_test.rb b/actionmailer/test/test_case_test.rb index 193d107b0a86..fa8a55163c19 100644 --- a/actionmailer/test/test_case_test.rb +++ b/actionmailer/test/test_case_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class TestTestMailer < ActionMailer::Base diff --git a/actionmailer/test/test_helper_test.rb b/actionmailer/test/test_helper_test.rb index 876e9b0634cd..cbb7572fd887 100644 --- a/actionmailer/test/test_helper_test.rb +++ b/actionmailer/test/test_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/testing/stream" diff --git a/actionmailer/test/url_test.rb b/actionmailer/test/url_test.rb index 6dbfb3a1ffb2..08c1bf1d2370 100644 --- a/actionmailer/test/url_test.rb +++ b/actionmailer/test/url_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_controller" diff --git a/actionpack/Rakefile b/actionpack/Rakefile index 69408c8aab26..984951f96d6e 100644 --- a/actionpack/Rakefile +++ b/actionpack/Rakefile @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rake/testtask" test_files = Dir.glob("test/**/*_test.rb") diff --git a/actionpack/actionpack.gemspec b/actionpack/actionpack.gemspec index 294cc4559376..a09c23bdb5d2 100644 --- a/actionpack/actionpack.gemspec +++ b/actionpack/actionpack.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/actionpack/bin/test b/actionpack/bin/test index 470ce93f103c..c53377cc970f 100755 --- a/actionpack/bin/test +++ b/actionpack/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/actionpack/lib/abstract_controller.rb b/actionpack/lib/abstract_controller.rb index 8bd965b198f3..5d56d71aa176 100644 --- a/actionpack/lib/abstract_controller.rb +++ b/actionpack/lib/abstract_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_pack" require "active_support/rails" require "active_support/i18n" diff --git a/actionpack/lib/abstract_controller/asset_paths.rb b/actionpack/lib/abstract_controller/asset_paths.rb index e6170228d9ce..96031b3aa023 100644 --- a/actionpack/lib/abstract_controller/asset_paths.rb +++ b/actionpack/lib/abstract_controller/asset_paths.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module AbstractController module AssetPaths #:nodoc: extend ActiveSupport::Concern diff --git a/actionpack/lib/abstract_controller/base.rb b/actionpack/lib/abstract_controller/base.rb index dc79820a82c1..0046baacd086 100644 --- a/actionpack/lib/abstract_controller/base.rb +++ b/actionpack/lib/abstract_controller/base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_controller/error" require "active_support/configurable" require "active_support/descendants_tracker" diff --git a/actionpack/lib/abstract_controller/caching.rb b/actionpack/lib/abstract_controller/caching.rb index 30e3d4426c6f..272ec7997024 100644 --- a/actionpack/lib/abstract_controller/caching.rb +++ b/actionpack/lib/abstract_controller/caching.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module AbstractController module Caching extend ActiveSupport::Concern diff --git a/actionpack/lib/abstract_controller/caching/fragments.rb b/actionpack/lib/abstract_controller/caching/fragments.rb index 14e4a82523f9..1fe653cd128e 100644 --- a/actionpack/lib/abstract_controller/caching/fragments.rb +++ b/actionpack/lib/abstract_controller/caching/fragments.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module AbstractController module Caching # Fragment caching is used for caching various blocks within diff --git a/actionpack/lib/abstract_controller/callbacks.rb b/actionpack/lib/abstract_controller/callbacks.rb index e4400e8704eb..c0ba1bff9652 100644 --- a/actionpack/lib/abstract_controller/callbacks.rb +++ b/actionpack/lib/abstract_controller/callbacks.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module AbstractController # = Abstract Controller Callbacks # diff --git a/actionpack/lib/abstract_controller/collector.rb b/actionpack/lib/abstract_controller/collector.rb index 40ae5aa1cada..2910a69ca487 100644 --- a/actionpack/lib/abstract_controller/collector.rb +++ b/actionpack/lib/abstract_controller/collector.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/http/mime_type" module AbstractController diff --git a/actionpack/lib/abstract_controller/error.rb b/actionpack/lib/abstract_controller/error.rb index 7fafce4dd4fe..450a6fc9df17 100644 --- a/actionpack/lib/abstract_controller/error.rb +++ b/actionpack/lib/abstract_controller/error.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module AbstractController class Error < StandardError #:nodoc: end diff --git a/actionpack/lib/abstract_controller/helpers.rb b/actionpack/lib/abstract_controller/helpers.rb index 2e50637c39a1..6cd16b028604 100644 --- a/actionpack/lib/abstract_controller/helpers.rb +++ b/actionpack/lib/abstract_controller/helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/dependencies" module AbstractController diff --git a/actionpack/lib/abstract_controller/logger.rb b/actionpack/lib/abstract_controller/logger.rb index c31ea6c5b52c..61df54fff267 100644 --- a/actionpack/lib/abstract_controller/logger.rb +++ b/actionpack/lib/abstract_controller/logger.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/benchmarkable" module AbstractController diff --git a/actionpack/lib/abstract_controller/railties/routes_helpers.rb b/actionpack/lib/abstract_controller/railties/routes_helpers.rb index 14b574e32282..0a6a5315b3c9 100644 --- a/actionpack/lib/abstract_controller/railties/routes_helpers.rb +++ b/actionpack/lib/abstract_controller/railties/routes_helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module AbstractController module Railties module RoutesHelpers diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index 54af938a9319..b822d36e721e 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_controller/error" require "action_view" require "action_view/view_paths" diff --git a/actionpack/lib/abstract_controller/translation.rb b/actionpack/lib/abstract_controller/translation.rb index e4ac95df50db..2cfc8d14847e 100644 --- a/actionpack/lib/abstract_controller/translation.rb +++ b/actionpack/lib/abstract_controller/translation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module AbstractController module Translation # Delegates to I18n.translate. Also aliased as t. diff --git a/actionpack/lib/abstract_controller/url_for.rb b/actionpack/lib/abstract_controller/url_for.rb index 72d07b092702..ddde3eacc27c 100644 --- a/actionpack/lib/abstract_controller/url_for.rb +++ b/actionpack/lib/abstract_controller/url_for.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module AbstractController # Includes +url_for+ into the host class (e.g. an abstract controller or mailer). The class # has to provide a +RouteSet+ by implementing the _routes methods. Otherwise, an diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index 50f20aa789f6..806797bc5010 100644 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/rails" require "abstract_controller" require "action_dispatch" diff --git a/actionpack/lib/action_controller/api.rb b/actionpack/lib/action_controller/api.rb index 94698df7307a..3060afd1f82b 100644 --- a/actionpack/lib/action_controller/api.rb +++ b/actionpack/lib/action_controller/api.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view" require "action_controller" require "action_controller/log_subscriber" diff --git a/actionpack/lib/action_controller/api/api_rendering.rb b/actionpack/lib/action_controller/api/api_rendering.rb index 3a08d28c393c..5ff11cf855e3 100644 --- a/actionpack/lib/action_controller/api/api_rendering.rb +++ b/actionpack/lib/action_controller/api/api_rendering.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController module ApiRendering extend ActiveSupport::Concern diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 8c2b111f8985..ff9e6702dc3e 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view" require "action_controller/log_subscriber" require "action_controller/metal/params_wrapper" diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index 954265ad9770..86c1194ce0af 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController # \Caching is a cheap way of speeding up slow applications by keeping the result of # calculations, renderings, and database calls around for subsequent requests. diff --git a/actionpack/lib/action_controller/form_builder.rb b/actionpack/lib/action_controller/form_builder.rb index f2656ca894a7..f636c8182906 100644 --- a/actionpack/lib/action_controller/form_builder.rb +++ b/actionpack/lib/action_controller/form_builder.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController # Override the default form builder for all views rendered by this # controller and any of its descendants. Accepts a subclass of diff --git a/actionpack/lib/action_controller/log_subscriber.rb b/actionpack/lib/action_controller/log_subscriber.rb index d00fcbcd1358..a2abc2356f74 100644 --- a/actionpack/lib/action_controller/log_subscriber.rb +++ b/actionpack/lib/action_controller/log_subscriber.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController class LogSubscriber < ActiveSupport::LogSubscriber INTERNAL_PARAMS = %w(controller action format _method only_path) diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb index 96c708f45ae9..5d9983eb4909 100644 --- a/actionpack/lib/action_controller/metal.rb +++ b/actionpack/lib/action_controller/metal.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array/extract_options" require "action_dispatch/middleware/stack" require "action_dispatch/http/request" diff --git a/actionpack/lib/action_controller/metal/basic_implicit_render.rb b/actionpack/lib/action_controller/metal/basic_implicit_render.rb index cef65a362c5b..b993a6afdfac 100644 --- a/actionpack/lib/action_controller/metal/basic_implicit_render.rb +++ b/actionpack/lib/action_controller/metal/basic_implicit_render.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController module BasicImplicitRender # :nodoc: def send_action(method, *args) diff --git a/actionpack/lib/action_controller/metal/conditional_get.rb b/actionpack/lib/action_controller/metal/conditional_get.rb index 0525252c7cb8..cbf87d2ec958 100644 --- a/actionpack/lib/action_controller/metal/conditional_get.rb +++ b/actionpack/lib/action_controller/metal/conditional_get.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/keys" module ActionController diff --git a/actionpack/lib/action_controller/metal/cookies.rb b/actionpack/lib/action_controller/metal/cookies.rb index 44925641a1cf..6616d9665e75 100644 --- a/actionpack/lib/action_controller/metal/cookies.rb +++ b/actionpack/lib/action_controller/metal/cookies.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController #:nodoc: module Cookies extend ActiveSupport::Concern diff --git a/actionpack/lib/action_controller/metal/data_streaming.rb b/actionpack/lib/action_controller/metal/data_streaming.rb index 731e03e2fc79..333efcf6aa63 100644 --- a/actionpack/lib/action_controller/metal/data_streaming.rb +++ b/actionpack/lib/action_controller/metal/data_streaming.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_controller/metal/exceptions" module ActionController #:nodoc: diff --git a/actionpack/lib/action_controller/metal/etag_with_flash.rb b/actionpack/lib/action_controller/metal/etag_with_flash.rb index 7bd338bd7cb3..f5f9c6267a3a 100644 --- a/actionpack/lib/action_controller/metal/etag_with_flash.rb +++ b/actionpack/lib/action_controller/metal/etag_with_flash.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController # When you're using the flash, it's generally used as a conditional on the view. # This means the content of the view depends on the flash. Which in turn means diff --git a/actionpack/lib/action_controller/metal/etag_with_template_digest.rb b/actionpack/lib/action_controller/metal/etag_with_template_digest.rb index 69c3979a0ea2..4c563d5072ac 100644 --- a/actionpack/lib/action_controller/metal/etag_with_template_digest.rb +++ b/actionpack/lib/action_controller/metal/etag_with_template_digest.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController # When our views change, they should bubble up into HTTP cache freshness # and bust browser caches. So the template digest for the current action diff --git a/actionpack/lib/action_controller/metal/exceptions.rb b/actionpack/lib/action_controller/metal/exceptions.rb index 175dd9eb9e10..9bff006e2bc7 100644 --- a/actionpack/lib/action_controller/metal/exceptions.rb +++ b/actionpack/lib/action_controller/metal/exceptions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController class ActionControllerError < StandardError #:nodoc: end diff --git a/actionpack/lib/action_controller/metal/flash.rb b/actionpack/lib/action_controller/metal/flash.rb index 24d1097ebee1..e0708a9421af 100644 --- a/actionpack/lib/action_controller/metal/flash.rb +++ b/actionpack/lib/action_controller/metal/flash.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController #:nodoc: module Flash extend ActiveSupport::Concern diff --git a/actionpack/lib/action_controller/metal/force_ssl.rb b/actionpack/lib/action_controller/metal/force_ssl.rb index 73e67573ca21..99daa20d1c96 100644 --- a/actionpack/lib/action_controller/metal/force_ssl.rb +++ b/actionpack/lib/action_controller/metal/force_ssl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/except" require "active_support/core_ext/hash/slice" diff --git a/actionpack/lib/action_controller/metal/head.rb b/actionpack/lib/action_controller/metal/head.rb index 0c50894bce78..33a1e4d70f11 100644 --- a/actionpack/lib/action_controller/metal/head.rb +++ b/actionpack/lib/action_controller/metal/head.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController module Head # Returns a response that has no content (merely headers). The options diff --git a/actionpack/lib/action_controller/metal/helpers.rb b/actionpack/lib/action_controller/metal/helpers.rb index 913a4b9a0419..ad3aaf4232d6 100644 --- a/actionpack/lib/action_controller/metal/helpers.rb +++ b/actionpack/lib/action_controller/metal/helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController # The \Rails framework provides a large number of helpers for working with assets, dates, forms, # numbers and model objects, to name a few. These helpers are available to all templates diff --git a/actionpack/lib/action_controller/metal/http_authentication.rb b/actionpack/lib/action_controller/metal/http_authentication.rb index d8bc895265a9..1d38e3504a5e 100644 --- a/actionpack/lib/action_controller/metal/http_authentication.rb +++ b/actionpack/lib/action_controller/metal/http_authentication.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "base64" require "active_support/security_utils" diff --git a/actionpack/lib/action_controller/metal/implicit_render.rb b/actionpack/lib/action_controller/metal/implicit_render.rb index eeb27f99f425..3cfbf0180542 100644 --- a/actionpack/lib/action_controller/metal/implicit_render.rb +++ b/actionpack/lib/action_controller/metal/implicit_render.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController # Handles implicit rendering for a controller action that does not # explicitly respond with +render+, +respond_to+, +redirect+, or +head+. diff --git a/actionpack/lib/action_controller/metal/instrumentation.rb b/actionpack/lib/action_controller/metal/instrumentation.rb index 2485d27cec6b..d9be52bc71ff 100644 --- a/actionpack/lib/action_controller/metal/instrumentation.rb +++ b/actionpack/lib/action_controller/metal/instrumentation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "benchmark" require "abstract_controller/logger" diff --git a/actionpack/lib/action_controller/metal/live.rb b/actionpack/lib/action_controller/metal/live.rb index a607ee230909..4bd59ea4829b 100644 --- a/actionpack/lib/action_controller/metal/live.rb +++ b/actionpack/lib/action_controller/metal/live.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/http/response" require "delegate" require "active_support/json" diff --git a/actionpack/lib/action_controller/metal/mime_responds.rb b/actionpack/lib/action_controller/metal/mime_responds.rb index 96bd5482684f..ca4bb100d381 100644 --- a/actionpack/lib/action_controller/metal/mime_responds.rb +++ b/actionpack/lib/action_controller/metal/mime_responds.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_controller/collector" module ActionController #:nodoc: diff --git a/actionpack/lib/action_controller/metal/parameter_encoding.rb b/actionpack/lib/action_controller/metal/parameter_encoding.rb index ecc691619eb3..b16c2f636a9d 100644 --- a/actionpack/lib/action_controller/metal/parameter_encoding.rb +++ b/actionpack/lib/action_controller/metal/parameter_encoding.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController # Specify binary encoding for parameters for a given action. module ParameterEncoding diff --git a/actionpack/lib/action_controller/metal/params_wrapper.rb b/actionpack/lib/action_controller/metal/params_wrapper.rb index 44151c9f7197..86919aebf5af 100644 --- a/actionpack/lib/action_controller/metal/params_wrapper.rb +++ b/actionpack/lib/action_controller/metal/params_wrapper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/slice" require "active_support/core_ext/hash/except" require "active_support/core_ext/module/anonymous" diff --git a/actionpack/lib/action_controller/metal/redirecting.rb b/actionpack/lib/action_controller/metal/redirecting.rb index fdfe82f96ba8..c021699b0d40 100644 --- a/actionpack/lib/action_controller/metal/redirecting.rb +++ b/actionpack/lib/action_controller/metal/redirecting.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController module Redirecting extend ActiveSupport::Concern diff --git a/actionpack/lib/action_controller/metal/renderers.rb b/actionpack/lib/action_controller/metal/renderers.rb index 23c21b05014e..79314fa5053d 100644 --- a/actionpack/lib/action_controller/metal/renderers.rb +++ b/actionpack/lib/action_controller/metal/renderers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "set" module ActionController diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index 67f207afc279..ff75c558eec9 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/filters" module ActionController diff --git a/actionpack/lib/action_controller/metal/request_forgery_protection.rb b/actionpack/lib/action_controller/metal/request_forgery_protection.rb index 5051c02a6282..0616840a560f 100644 --- a/actionpack/lib/action_controller/metal/request_forgery_protection.rb +++ b/actionpack/lib/action_controller/metal/request_forgery_protection.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rack/session/abstract/id" require "action_controller/metal/exceptions" require "active_support/security_utils" diff --git a/actionpack/lib/action_controller/metal/rescue.rb b/actionpack/lib/action_controller/metal/rescue.rb index 25757938f5c2..35e3cae985a2 100644 --- a/actionpack/lib/action_controller/metal/rescue.rb +++ b/actionpack/lib/action_controller/metal/rescue.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController #:nodoc: # This module is responsible for providing `rescue_from` helpers # to controllers and configuring when detailed exceptions must be diff --git a/actionpack/lib/action_controller/metal/streaming.rb b/actionpack/lib/action_controller/metal/streaming.rb index 58cf60ad2a4e..407ae9508622 100644 --- a/actionpack/lib/action_controller/metal/streaming.rb +++ b/actionpack/lib/action_controller/metal/streaming.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rack/chunked" module ActionController #:nodoc: diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb index cd6a0c0b9844..e0b521367e7e 100644 --- a/actionpack/lib/action_controller/metal/strong_parameters.rb +++ b/actionpack/lib/action_controller/metal/strong_parameters.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/indifferent_access" require "active_support/core_ext/hash/transform_values" require "active_support/core_ext/array/wrap" diff --git a/actionpack/lib/action_controller/metal/testing.rb b/actionpack/lib/action_controller/metal/testing.rb index 9bb416178a59..4fd0fb40de6d 100644 --- a/actionpack/lib/action_controller/metal/testing.rb +++ b/actionpack/lib/action_controller/metal/testing.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController module Testing extend ActiveSupport::Concern diff --git a/actionpack/lib/action_controller/metal/url_for.rb b/actionpack/lib/action_controller/metal/url_for.rb index 21ed5b4ec8a3..068ad00130b9 100644 --- a/actionpack/lib/action_controller/metal/url_for.rb +++ b/actionpack/lib/action_controller/metal/url_for.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController # Includes +url_for+ into the host class. The class has to provide a +RouteSet+ by implementing # the _routes method. Otherwise, an exception will be raised. diff --git a/actionpack/lib/action_controller/railtie.rb b/actionpack/lib/action_controller/railtie.rb index fadfc8de6069..0eec7b383c24 100644 --- a/actionpack/lib/action_controller/railtie.rb +++ b/actionpack/lib/action_controller/railtie.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rails" require "action_controller" require "action_dispatch/railtie" diff --git a/actionpack/lib/action_controller/railties/helpers.rb b/actionpack/lib/action_controller/railties/helpers.rb index 3985c6b27342..4417ebdedb80 100644 --- a/actionpack/lib/action_controller/railties/helpers.rb +++ b/actionpack/lib/action_controller/railties/helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController module Railties module Helpers diff --git a/actionpack/lib/action_controller/renderer.rb b/actionpack/lib/action_controller/renderer.rb index cbb719d8b2be..c35a778d463f 100644 --- a/actionpack/lib/action_controller/renderer.rb +++ b/actionpack/lib/action_controller/renderer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/keys" module ActionController diff --git a/actionpack/lib/action_controller/template_assertions.rb b/actionpack/lib/action_controller/template_assertions.rb index 0179f4afcd63..086c42fea745 100644 --- a/actionpack/lib/action_controller/template_assertions.rb +++ b/actionpack/lib/action_controller/template_assertions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionController module TemplateAssertions def assert_template(options = {}, message = nil) diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index bc42d5020571..9df9381be81b 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rack/session/abstract/id" require "active_support/core_ext/hash/conversions" require "active_support/core_ext/object/to_query" diff --git a/actionpack/lib/action_dispatch.rb b/actionpack/lib/action_dispatch.rb index 303790e96d28..1f3f6d615aae 100644 --- a/actionpack/lib/action_dispatch.rb +++ b/actionpack/lib/action_dispatch.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true #-- # Copyright (c) 2004-2017 David Heinemeier Hansson # diff --git a/actionpack/lib/action_dispatch/http/cache.rb b/actionpack/lib/action_dispatch/http/cache.rb index 985e0fb97215..2cbb3facb7e0 100644 --- a/actionpack/lib/action_dispatch/http/cache.rb +++ b/actionpack/lib/action_dispatch/http/cache.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch module Http module Cache diff --git a/actionpack/lib/action_dispatch/http/filter_parameters.rb b/actionpack/lib/action_dispatch/http/filter_parameters.rb index 077ab2561f49..872c2cb9d3fe 100644 --- a/actionpack/lib/action_dispatch/http/filter_parameters.rb +++ b/actionpack/lib/action_dispatch/http/filter_parameters.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/http/parameter_filter" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/http/filter_redirect.rb b/actionpack/lib/action_dispatch/http/filter_redirect.rb index fc3c44582a3a..91f1ebeb7928 100644 --- a/actionpack/lib/action_dispatch/http/filter_redirect.rb +++ b/actionpack/lib/action_dispatch/http/filter_redirect.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch module Http module FilterRedirect diff --git a/actionpack/lib/action_dispatch/http/headers.rb b/actionpack/lib/action_dispatch/http/headers.rb index 3c03976f03ab..59323d26d65f 100644 --- a/actionpack/lib/action_dispatch/http/headers.rb +++ b/actionpack/lib/action_dispatch/http/headers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch module Http # Provides access to the request's HTTP headers from the environment. diff --git a/actionpack/lib/action_dispatch/http/mime_negotiation.rb b/actionpack/lib/action_dispatch/http/mime_negotiation.rb index 5994a01c78f6..9e97b1417070 100644 --- a/actionpack/lib/action_dispatch/http/mime_negotiation.rb +++ b/actionpack/lib/action_dispatch/http/mime_negotiation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb index 74a3afab44bf..7dc3a175fb1c 100644 --- a/actionpack/lib/action_dispatch/http/mime_type.rb +++ b/actionpack/lib/action_dispatch/http/mime_type.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # -*- frozen-string-literal: true -*- require "singleton" diff --git a/actionpack/lib/action_dispatch/http/mime_types.rb b/actionpack/lib/action_dispatch/http/mime_types.rb index 8b04174f1feb..9ddb560d989e 100644 --- a/actionpack/lib/action_dispatch/http/mime_types.rb +++ b/actionpack/lib/action_dispatch/http/mime_types.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Build list of Mime types for HTTP responses # http://www.iana.org/assignments/media-types/ diff --git a/actionpack/lib/action_dispatch/http/parameter_filter.rb b/actionpack/lib/action_dispatch/http/parameter_filter.rb index 1d2b4b902bdf..8a5340732320 100644 --- a/actionpack/lib/action_dispatch/http/parameter_filter.rb +++ b/actionpack/lib/action_dispatch/http/parameter_filter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/duplicable" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/http/parameters.rb b/actionpack/lib/action_dispatch/http/parameters.rb index 7c585dbe6807..9723d78dfc74 100644 --- a/actionpack/lib/action_dispatch/http/parameters.rb +++ b/actionpack/lib/action_dispatch/http/parameters.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch module Http module Parameters diff --git a/actionpack/lib/action_dispatch/http/rack_cache.rb b/actionpack/lib/action_dispatch/http/rack_cache.rb index 003ae4029d9a..dff27a568fdf 100644 --- a/actionpack/lib/action_dispatch/http/rack_cache.rb +++ b/actionpack/lib/action_dispatch/http/rack_cache.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rack/cache" require "rack/cache/context" require "active_support/cache" diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index 6d42404a9870..bd3d7fb5b8f3 100644 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "stringio" require "active_support/inflector" diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb index 3c91677d55ee..213e7098c171 100644 --- a/actionpack/lib/action_dispatch/http/response.rb +++ b/actionpack/lib/action_dispatch/http/response.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" require "action_dispatch/http/filter_redirect" require "action_dispatch/http/cache" diff --git a/actionpack/lib/action_dispatch/http/upload.rb b/actionpack/lib/action_dispatch/http/upload.rb index 225272d66e9e..03def91070a2 100644 --- a/actionpack/lib/action_dispatch/http/upload.rb +++ b/actionpack/lib/action_dispatch/http/upload.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch module Http # Models uploaded files. diff --git a/actionpack/lib/action_dispatch/http/url.rb b/actionpack/lib/action_dispatch/http/url.rb index f902fe36e0cd..513bf9eedca2 100644 --- a/actionpack/lib/action_dispatch/http/url.rb +++ b/actionpack/lib/action_dispatch/http/url.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/journey.rb b/actionpack/lib/action_dispatch/journey.rb index d1cfc51f3e26..d93d9473ede3 100644 --- a/actionpack/lib/action_dispatch/journey.rb +++ b/actionpack/lib/action_dispatch/journey.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/journey/router" require "action_dispatch/journey/gtg/builder" require "action_dispatch/journey/gtg/simulator" diff --git a/actionpack/lib/action_dispatch/journey/formatter.rb b/actionpack/lib/action_dispatch/journey/formatter.rb index 326f4e52f9d2..a6b16c83a360 100644 --- a/actionpack/lib/action_dispatch/journey/formatter.rb +++ b/actionpack/lib/action_dispatch/journey/formatter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_controller/metal/exceptions" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/journey/gtg/builder.rb b/actionpack/lib/action_dispatch/journey/gtg/builder.rb index 0f8bed89bfd7..ed8b99440859 100644 --- a/actionpack/lib/action_dispatch/journey/gtg/builder.rb +++ b/actionpack/lib/action_dispatch/journey/gtg/builder.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/journey/gtg/transition_table" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/journey/gtg/simulator.rb b/actionpack/lib/action_dispatch/journey/gtg/simulator.rb index 62f052ced6ca..240536dd7c1d 100644 --- a/actionpack/lib/action_dispatch/journey/gtg/simulator.rb +++ b/actionpack/lib/action_dispatch/journey/gtg/simulator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "strscan" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb b/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb index 45aff287b1ad..b99a228c3201 100644 --- a/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb +++ b/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/journey/nfa/dot" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/journey/nfa/builder.rb b/actionpack/lib/action_dispatch/journey/nfa/builder.rb index 532f765094e1..0796d98cfded 100644 --- a/actionpack/lib/action_dispatch/journey/nfa/builder.rb +++ b/actionpack/lib/action_dispatch/journey/nfa/builder.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/journey/nfa/transition_table" require "action_dispatch/journey/gtg/transition_table" diff --git a/actionpack/lib/action_dispatch/journey/nfa/dot.rb b/actionpack/lib/action_dispatch/journey/nfa/dot.rb index 8119e5d9dac8..8b1d40149bc8 100644 --- a/actionpack/lib/action_dispatch/journey/nfa/dot.rb +++ b/actionpack/lib/action_dispatch/journey/nfa/dot.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch module Journey # :nodoc: module NFA # :nodoc: diff --git a/actionpack/lib/action_dispatch/journey/nfa/simulator.rb b/actionpack/lib/action_dispatch/journey/nfa/simulator.rb index 324d0eed1583..284b734b3964 100644 --- a/actionpack/lib/action_dispatch/journey/nfa/simulator.rb +++ b/actionpack/lib/action_dispatch/journey/nfa/simulator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "strscan" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/journey/nfa/transition_table.rb b/actionpack/lib/action_dispatch/journey/nfa/transition_table.rb index 543a670da0a6..9cdb4a2496b8 100644 --- a/actionpack/lib/action_dispatch/journey/nfa/transition_table.rb +++ b/actionpack/lib/action_dispatch/journey/nfa/transition_table.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/journey/nfa/dot" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/journey/nodes/node.rb b/actionpack/lib/action_dispatch/journey/nodes/node.rb index 0d874a84c9cb..6f2cd48d93d1 100644 --- a/actionpack/lib/action_dispatch/journey/nodes/node.rb +++ b/actionpack/lib/action_dispatch/journey/nodes/node.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/journey/visitors" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/journey/parser_extras.rb b/actionpack/lib/action_dispatch/journey/parser_extras.rb index 4c7e82d93c94..8f1a12f2864a 100644 --- a/actionpack/lib/action_dispatch/journey/parser_extras.rb +++ b/actionpack/lib/action_dispatch/journey/parser_extras.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/journey/scanner" require "action_dispatch/journey/nodes/node" diff --git a/actionpack/lib/action_dispatch/journey/path/pattern.rb b/actionpack/lib/action_dispatch/journey/path/pattern.rb index cf0108ec32f6..d63eecb6006e 100644 --- a/actionpack/lib/action_dispatch/journey/path/pattern.rb +++ b/actionpack/lib/action_dispatch/journey/path/pattern.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch module Journey # :nodoc: module Path # :nodoc: diff --git a/actionpack/lib/action_dispatch/journey/route.rb b/actionpack/lib/action_dispatch/journey/route.rb index 0acbac1d9d65..38aa45f94260 100644 --- a/actionpack/lib/action_dispatch/journey/route.rb +++ b/actionpack/lib/action_dispatch/journey/route.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch # :stopdoc: module Journey diff --git a/actionpack/lib/action_dispatch/journey/router.rb b/actionpack/lib/action_dispatch/journey/router.rb index d55e1399e4eb..f55b187cc8ee 100644 --- a/actionpack/lib/action_dispatch/journey/router.rb +++ b/actionpack/lib/action_dispatch/journey/router.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/journey/router/utils" require "action_dispatch/journey/routes" require "action_dispatch/journey/formatter" diff --git a/actionpack/lib/action_dispatch/journey/router/utils.rb b/actionpack/lib/action_dispatch/journey/router/utils.rb index 6d400f3364b7..5d9563ee1a5d 100644 --- a/actionpack/lib/action_dispatch/journey/router/utils.rb +++ b/actionpack/lib/action_dispatch/journey/router/utils.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch module Journey # :nodoc: class Router # :nodoc: diff --git a/actionpack/lib/action_dispatch/journey/routes.rb b/actionpack/lib/action_dispatch/journey/routes.rb index f7b009109ea3..bee2140c5f38 100644 --- a/actionpack/lib/action_dispatch/journey/routes.rb +++ b/actionpack/lib/action_dispatch/journey/routes.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch module Journey # :nodoc: # The Routing table. Contains all routes for a system. Routes can be diff --git a/actionpack/lib/action_dispatch/journey/visitors.rb b/actionpack/lib/action_dispatch/journey/visitors.rb index 335797f4b97c..6670079241cc 100644 --- a/actionpack/lib/action_dispatch/journey/visitors.rb +++ b/actionpack/lib/action_dispatch/journey/visitors.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch # :stopdoc: module Journey diff --git a/actionpack/lib/action_dispatch/middleware/callbacks.rb b/actionpack/lib/action_dispatch/middleware/callbacks.rb index ff129cf96a30..cc3b344d7250 100644 --- a/actionpack/lib/action_dispatch/middleware/callbacks.rb +++ b/actionpack/lib/action_dispatch/middleware/callbacks.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch # Provides callbacks to be executed before and after dispatching the request. class Callbacks diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb index 533925ebe1e7..6a9d54a32abb 100644 --- a/actionpack/lib/action_dispatch/middleware/cookies.rb +++ b/actionpack/lib/action_dispatch/middleware/cookies.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/keys" require "active_support/key_generator" require "active_support/message_verifier" diff --git a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb index 336a775880b1..fe01c5511616 100644 --- a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/http/request" require "action_dispatch/middleware/exception_wrapper" require "action_dispatch/routing/inspector" diff --git a/actionpack/lib/action_dispatch/middleware/debug_locks.rb b/actionpack/lib/action_dispatch/middleware/debug_locks.rb index 74b952528ead..600b0a51b1d4 100644 --- a/actionpack/lib/action_dispatch/middleware/debug_locks.rb +++ b/actionpack/lib/action_dispatch/middleware/debug_locks.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch # This middleware can be used to diagnose deadlocks in the autoload interlock. # diff --git a/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb b/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb index 08b4541d2467..47ed09ecb51c 100644 --- a/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb +++ b/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" require "rack/utils" diff --git a/actionpack/lib/action_dispatch/middleware/executor.rb b/actionpack/lib/action_dispatch/middleware/executor.rb index 3d43f97a2b9e..7423d5911903 100644 --- a/actionpack/lib/action_dispatch/middleware/executor.rb +++ b/actionpack/lib/action_dispatch/middleware/executor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rack/body_proxy" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/middleware/flash.rb b/actionpack/lib/action_dispatch/middleware/flash.rb index 6b29ce63baa3..3fe80cf03d4e 100644 --- a/actionpack/lib/action_dispatch/middleware/flash.rb +++ b/actionpack/lib/action_dispatch/middleware/flash.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/keys" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/middleware/public_exceptions.rb b/actionpack/lib/action_dispatch/middleware/public_exceptions.rb index 46f0f675b96d..e37416d9571f 100644 --- a/actionpack/lib/action_dispatch/middleware/public_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/public_exceptions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch # When called, this middleware renders an error page. By default if an HTML # response is expected it will render static error pages from the `/public` diff --git a/actionpack/lib/action_dispatch/middleware/reloader.rb b/actionpack/lib/action_dispatch/middleware/reloader.rb index 6d64b1424ba8..989d6c3cd7e2 100644 --- a/actionpack/lib/action_dispatch/middleware/reloader.rb +++ b/actionpack/lib/action_dispatch/middleware/reloader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch # ActionDispatch::Reloader wraps the request with callbacks provided by ActiveSupport::Reloader # callbacks, intended to assist with code reloading during development. diff --git a/actionpack/lib/action_dispatch/middleware/remote_ip.rb b/actionpack/lib/action_dispatch/middleware/remote_ip.rb index 53d5a4918cbe..b5decc98b5b7 100644 --- a/actionpack/lib/action_dispatch/middleware/remote_ip.rb +++ b/actionpack/lib/action_dispatch/middleware/remote_ip.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "ipaddr" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/middleware/request_id.rb b/actionpack/lib/action_dispatch/middleware/request_id.rb index 1925ffd9dd33..6ac846e10b06 100644 --- a/actionpack/lib/action_dispatch/middleware/request_id.rb +++ b/actionpack/lib/action_dispatch/middleware/request_id.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "securerandom" require "active_support/core_ext/string/access" diff --git a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb index 21ccf5a097c5..6af03da443a8 100644 --- a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb +++ b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rack/utils" require "rack/request" require "rack/session/abstract/id" diff --git a/actionpack/lib/action_dispatch/middleware/session/cache_store.rb b/actionpack/lib/action_dispatch/middleware/session/cache_store.rb index 71274bc13ac1..456febcfba60 100644 --- a/actionpack/lib/action_dispatch/middleware/session/cache_store.rb +++ b/actionpack/lib/action_dispatch/middleware/session/cache_store.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/middleware/session/abstract_store" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb b/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb index 57d325a9d8b2..f71997a6d798 100644 --- a/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb +++ b/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/keys" require "action_dispatch/middleware/session/abstract_store" require "rack/session/cookie" diff --git a/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb b/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb index ee2b1f26ad6b..977b4c703117 100644 --- a/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb +++ b/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/middleware/session/abstract_store" begin require "rack/session/dalli" diff --git a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb index 5a99714ec2f5..5289b3cb87d4 100644 --- a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/http/request" require "action_dispatch/middleware/exception_wrapper" diff --git a/actionpack/lib/action_dispatch/middleware/ssl.rb b/actionpack/lib/action_dispatch/middleware/ssl.rb index 557721c301bf..36faf6a7c64c 100644 --- a/actionpack/lib/action_dispatch/middleware/ssl.rb +++ b/actionpack/lib/action_dispatch/middleware/ssl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch # This middleware is added to the stack when `config.force_ssl = true`, and is passed # the options set in `config.ssl_options`. It does three jobs to enforce secure HTTP diff --git a/actionpack/lib/action_dispatch/middleware/stack.rb b/actionpack/lib/action_dispatch/middleware/stack.rb index 6949b31e758e..66d07f57d50a 100644 --- a/actionpack/lib/action_dispatch/middleware/stack.rb +++ b/actionpack/lib/action_dispatch/middleware/stack.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/inflector/methods" require "active_support/dependencies" diff --git a/actionpack/lib/action_dispatch/middleware/static.rb b/actionpack/lib/action_dispatch/middleware/static.rb index fb99f13a1c44..338e0d45a15b 100644 --- a/actionpack/lib/action_dispatch/middleware/static.rb +++ b/actionpack/lib/action_dispatch/middleware/static.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rack/utils" require "active_support/core_ext/uri" diff --git a/actionpack/lib/action_dispatch/railtie.rb b/actionpack/lib/action_dispatch/railtie.rb index 7662e164b802..c865713b31d4 100644 --- a/actionpack/lib/action_dispatch/railtie.rb +++ b/actionpack/lib/action_dispatch/railtie.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/request/session.rb b/actionpack/lib/action_dispatch/request/session.rb index 3547a8604f2e..4f9e2e62d328 100644 --- a/actionpack/lib/action_dispatch/request/session.rb +++ b/actionpack/lib/action_dispatch/request/session.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rack/session/abstract/id" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/request/utils.rb b/actionpack/lib/action_dispatch/request/utils.rb index 4f79c4c21ea5..89c4d49e1a37 100644 --- a/actionpack/lib/action_dispatch/request/utils.rb +++ b/actionpack/lib/action_dispatch/request/utils.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch class Request class Utils # :nodoc: diff --git a/actionpack/lib/action_dispatch/routing.rb b/actionpack/lib/action_dispatch/routing.rb index 87dd1eba3845..da0afa5e139c 100644 --- a/actionpack/lib/action_dispatch/routing.rb +++ b/actionpack/lib/action_dispatch/routing.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/filters" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/routing/endpoint.rb b/actionpack/lib/action_dispatch/routing/endpoint.rb index 88aa13c3e8a4..e2dbf8a2cd88 100644 --- a/actionpack/lib/action_dispatch/routing/endpoint.rb +++ b/actionpack/lib/action_dispatch/routing/endpoint.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch module Routing class Endpoint # :nodoc: diff --git a/actionpack/lib/action_dispatch/routing/inspector.rb b/actionpack/lib/action_dispatch/routing/inspector.rb index 9aa4b92df2c7..ba533d63d64e 100644 --- a/actionpack/lib/action_dispatch/routing/inspector.rb +++ b/actionpack/lib/action_dispatch/routing/inspector.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "delegate" require "active_support/core_ext/string/strip" diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 88deee5f5e28..1376469c2bd7 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/slice" require "active_support/core_ext/enumerable" require "active_support/core_ext/array/extract_options" diff --git a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb index e89ea8b21d57..6c26e2198efb 100644 --- a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb +++ b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch module Routing # Polymorphic URL helpers are methods for smart resolution to a named route call when diff --git a/actionpack/lib/action_dispatch/routing/redirection.rb b/actionpack/lib/action_dispatch/routing/redirection.rb index 3bcb34175872..a87dfa403782 100644 --- a/actionpack/lib/action_dispatch/routing/redirection.rb +++ b/actionpack/lib/action_dispatch/routing/redirection.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/http/request" require "active_support/core_ext/uri" require "active_support/core_ext/array/extract_options" diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 68bd6d806bcf..ee692e124349 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/journey" require "active_support/core_ext/object/to_query" require "active_support/core_ext/hash/slice" diff --git a/actionpack/lib/action_dispatch/routing/routes_proxy.rb b/actionpack/lib/action_dispatch/routing/routes_proxy.rb index c1423f770f25..996d40e91175 100644 --- a/actionpack/lib/action_dispatch/routing/routes_proxy.rb +++ b/actionpack/lib/action_dispatch/routing/routes_proxy.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array/extract_options" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/routing/url_for.rb b/actionpack/lib/action_dispatch/routing/url_for.rb index a9bdefa77553..deccd22f232a 100644 --- a/actionpack/lib/action_dispatch/routing/url_for.rb +++ b/actionpack/lib/action_dispatch/routing/url_for.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch module Routing # In config/routes.rb you define URL-to-controller mappings, but the reverse diff --git a/actionpack/lib/action_dispatch/system_test_case.rb b/actionpack/lib/action_dispatch/system_test_case.rb index c39a135ce034..11f2ff438413 100644 --- a/actionpack/lib/action_dispatch/system_test_case.rb +++ b/actionpack/lib/action_dispatch/system_test_case.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "capybara/dsl" require "capybara/minitest" require "action_controller" diff --git a/actionpack/lib/action_dispatch/system_testing/driver.rb b/actionpack/lib/action_dispatch/system_testing/driver.rb index 1a027f2e234d..2b4addde0816 100644 --- a/actionpack/lib/action_dispatch/system_testing/driver.rb +++ b/actionpack/lib/action_dispatch/system_testing/driver.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch module SystemTesting class Driver # :nodoc: diff --git a/actionpack/lib/action_dispatch/system_testing/server.rb b/actionpack/lib/action_dispatch/system_testing/server.rb index 89ca6944d932..b98a1deee9eb 100644 --- a/actionpack/lib/action_dispatch/system_testing/server.rb +++ b/actionpack/lib/action_dispatch/system_testing/server.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rack/handler/puma" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb b/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb index 859d68e47580..40150c1fe536 100644 --- a/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb +++ b/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch module SystemTesting module TestHelpers diff --git a/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb b/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb index f03f0d429938..7c45e165bc91 100644 --- a/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb +++ b/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch module SystemTesting module TestHelpers diff --git a/actionpack/lib/action_dispatch/testing/assertion_response.rb b/actionpack/lib/action_dispatch/testing/assertion_response.rb index c37726957e71..869b98b48039 100644 --- a/actionpack/lib/action_dispatch/testing/assertion_response.rb +++ b/actionpack/lib/action_dispatch/testing/assertion_response.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch # This is a class that abstracts away an asserted response. It purposely # does not inherit from Response because it doesn't need it. That means it diff --git a/actionpack/lib/action_dispatch/testing/assertions.rb b/actionpack/lib/action_dispatch/testing/assertions.rb index 4ea18d671d64..c6eaae0a951d 100644 --- a/actionpack/lib/action_dispatch/testing/assertions.rb +++ b/actionpack/lib/action_dispatch/testing/assertions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rails-dom-testing" module ActionDispatch diff --git a/actionpack/lib/action_dispatch/testing/assertions/response.rb b/actionpack/lib/action_dispatch/testing/assertions/response.rb index 1baf979ac95d..8c17ec5a75c5 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/response.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/response.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch module Assertions # A small suite of assertions that test responses from \Rails applications. diff --git a/actionpack/lib/action_dispatch/testing/assertions/routing.rb b/actionpack/lib/action_dispatch/testing/assertions/routing.rb index 8645df437018..cde83dc537a9 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/routing.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/routing.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "uri" require "active_support/core_ext/hash/indifferent_access" require "active_support/core_ext/string/access" diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index f16647fac87b..d38a3648015e 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "stringio" require "uri" require "active_support/core_ext/kernel/singleton_class" diff --git a/actionpack/lib/action_dispatch/testing/request_encoder.rb b/actionpack/lib/action_dispatch/testing/request_encoder.rb index 8c27e9ecb7ee..a614a9d5bc71 100644 --- a/actionpack/lib/action_dispatch/testing/request_encoder.rb +++ b/actionpack/lib/action_dispatch/testing/request_encoder.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionDispatch class RequestEncoder # :nodoc: class IdentityEncoder diff --git a/actionpack/lib/action_dispatch/testing/test_process.rb b/actionpack/lib/action_dispatch/testing/test_process.rb index 0282eb15c370..ea0e6dcb1a7a 100644 --- a/actionpack/lib/action_dispatch/testing/test_process.rb +++ b/actionpack/lib/action_dispatch/testing/test_process.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/middleware/cookies" require "action_dispatch/middleware/flash" diff --git a/actionpack/lib/action_dispatch/testing/test_request.rb b/actionpack/lib/action_dispatch/testing/test_request.rb index ec949c869b30..0b2e8a623204 100644 --- a/actionpack/lib/action_dispatch/testing/test_request.rb +++ b/actionpack/lib/action_dispatch/testing/test_request.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/indifferent_access" require "rack/utils" diff --git a/actionpack/lib/action_dispatch/testing/test_response.rb b/actionpack/lib/action_dispatch/testing/test_response.rb index 5c89f9c75e03..c63e4b5b0961 100644 --- a/actionpack/lib/action_dispatch/testing/test_response.rb +++ b/actionpack/lib/action_dispatch/testing/test_response.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/testing/request_encoder" module ActionDispatch diff --git a/actionpack/lib/action_pack.rb b/actionpack/lib/action_pack.rb index eec622e08555..ada60031b0c4 100644 --- a/actionpack/lib/action_pack.rb +++ b/actionpack/lib/action_pack.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true #-- # Copyright (c) 2004-2017 David Heinemeier Hansson # diff --git a/actionpack/lib/action_pack/gem_version.rb b/actionpack/lib/action_pack/gem_version.rb index fddc3033d5c8..88c4bcd2d9d6 100644 --- a/actionpack/lib/action_pack/gem_version.rb +++ b/actionpack/lib/action_pack/gem_version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionPack # Returns the version of the currently loaded Action Pack as a Gem::Version def self.gem_version diff --git a/actionpack/lib/action_pack/version.rb b/actionpack/lib/action_pack/version.rb index 3d96158431f0..9b0c5026ace5 100644 --- a/actionpack/lib/action_pack/version.rb +++ b/actionpack/lib/action_pack/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "gem_version" module ActionPack diff --git a/actionpack/test/abstract/callbacks_test.rb b/actionpack/test/abstract/callbacks_test.rb index 9c2261bf7678..6e1490cabf47 100644 --- a/actionpack/test/abstract/callbacks_test.rb +++ b/actionpack/test/abstract/callbacks_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module AbstractController diff --git a/actionpack/test/abstract/collector_test.rb b/actionpack/test/abstract/collector_test.rb index 1cd35264834e..c701001a4d99 100644 --- a/actionpack/test/abstract/collector_test.rb +++ b/actionpack/test/abstract/collector_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module AbstractController diff --git a/actionpack/test/abstract/translation_test.rb b/actionpack/test/abstract/translation_test.rb index 489314490554..42f330bc9d37 100644 --- a/actionpack/test/abstract/translation_test.rb +++ b/actionpack/test/abstract/translation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module AbstractController diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index bd118b46be94..e54c62b96bcc 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true $:.unshift File.expand_path("lib", __dir__) $:.unshift File.expand_path("fixtures/helpers", __dir__) $:.unshift File.expand_path("fixtures/alternate_helpers", __dir__) diff --git a/actionpack/test/assertions/response_assertions_test.rb b/actionpack/test/assertions/response_assertions_test.rb index 14a04ccdb188..2a0fd92c7918 100644 --- a/actionpack/test/assertions/response_assertions_test.rb +++ b/actionpack/test/assertions/response_assertions_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_dispatch/testing/assertions/response" diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index 73aab5848b17..baacd5820724 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "controller/fake_controllers" diff --git a/actionpack/test/controller/api/conditional_get_test.rb b/actionpack/test/controller/api/conditional_get_test.rb index 7b70829101e6..fa9aea0cd3e0 100644 --- a/actionpack/test/controller/api/conditional_get_test.rb +++ b/actionpack/test/controller/api/conditional_get_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/integer/time" require "active_support/core_ext/numeric/time" diff --git a/actionpack/test/controller/api/data_streaming_test.rb b/actionpack/test/controller/api/data_streaming_test.rb index e6419b9adf2b..cedec53f81b4 100644 --- a/actionpack/test/controller/api/data_streaming_test.rb +++ b/actionpack/test/controller/api/data_streaming_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module TestApiFileUtils diff --git a/actionpack/test/controller/api/force_ssl_test.rb b/actionpack/test/controller/api/force_ssl_test.rb index d239964e4a69..2343d1340d25 100644 --- a/actionpack/test/controller/api/force_ssl_test.rb +++ b/actionpack/test/controller/api/force_ssl_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ForceSSLApiController < ActionController::API diff --git a/actionpack/test/controller/api/implicit_render_test.rb b/actionpack/test/controller/api/implicit_render_test.rb index b51ee0cf42c6..658ec8c4f901 100644 --- a/actionpack/test/controller/api/implicit_render_test.rb +++ b/actionpack/test/controller/api/implicit_render_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ImplicitRenderAPITestController < ActionController::API diff --git a/actionpack/test/controller/api/params_wrapper_test.rb b/actionpack/test/controller/api/params_wrapper_test.rb index a1da85204026..62fd2d8c8aec 100644 --- a/actionpack/test/controller/api/params_wrapper_test.rb +++ b/actionpack/test/controller/api/params_wrapper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ParamsWrapperForApiTest < ActionController::TestCase diff --git a/actionpack/test/controller/api/redirect_to_test.rb b/actionpack/test/controller/api/redirect_to_test.rb index ab14409f4017..442cfcca6eb4 100644 --- a/actionpack/test/controller/api/redirect_to_test.rb +++ b/actionpack/test/controller/api/redirect_to_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class RedirectToApiController < ActionController::API diff --git a/actionpack/test/controller/api/renderers_test.rb b/actionpack/test/controller/api/renderers_test.rb index 04e34a1f8f68..fa0f75bcdf77 100644 --- a/actionpack/test/controller/api/renderers_test.rb +++ b/actionpack/test/controller/api/renderers_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/hash/conversions" diff --git a/actionpack/test/controller/api/url_for_test.rb b/actionpack/test/controller/api/url_for_test.rb index cb4ae7a88a96..958067f8430a 100644 --- a/actionpack/test/controller/api/url_for_test.rb +++ b/actionpack/test/controller/api/url_for_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class UrlForApiController < ActionController::API diff --git a/actionpack/test/controller/api/with_cookies_test.rb b/actionpack/test/controller/api/with_cookies_test.rb index 8928237dfd49..3dd63a52856f 100644 --- a/actionpack/test/controller/api/with_cookies_test.rb +++ b/actionpack/test/controller/api/with_cookies_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class WithCookiesController < ActionController::API diff --git a/actionpack/test/controller/api/with_helpers_test.rb b/actionpack/test/controller/api/with_helpers_test.rb index 06db949153f7..b9d8f6515f37 100644 --- a/actionpack/test/controller/api/with_helpers_test.rb +++ b/actionpack/test/controller/api/with_helpers_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ApiWithHelper diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb index 4e969fac07b7..46828a0f9ece 100644 --- a/actionpack/test/controller/base_test.rb +++ b/actionpack/test/controller/base_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/logger" require "controller/fake_models" diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index c86dcafee5c2..aae7d0272fed 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "fileutils" require "abstract_unit" require "lib/controller/fake_models" diff --git a/actionpack/test/controller/content_type_test.rb b/actionpack/test/controller/content_type_test.rb index fcb2632b80e8..37b29eedf227 100644 --- a/actionpack/test/controller/content_type_test.rb +++ b/actionpack/test/controller/content_type_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class OldContentTypeController < ActionController::Base diff --git a/actionpack/test/controller/default_url_options_with_before_action_test.rb b/actionpack/test/controller/default_url_options_with_before_action_test.rb index e3fe7a64957a..78eb72f5d0b4 100644 --- a/actionpack/test/controller/default_url_options_with_before_action_test.rb +++ b/actionpack/test/controller/default_url_options_with_before_action_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ControllerWithBeforeActionAndDefaultUrlOptions < ActionController::Base diff --git a/actionpack/test/controller/filters_test.rb b/actionpack/test/controller/filters_test.rb index 5f1463cfa8cb..93706ca888af 100644 --- a/actionpack/test/controller/filters_test.rb +++ b/actionpack/test/controller/filters_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ActionController::Base diff --git a/actionpack/test/controller/flash_hash_test.rb b/actionpack/test/controller/flash_hash_test.rb index 45b598a5941b..d571f79b69a6 100644 --- a/actionpack/test/controller/flash_hash_test.rb +++ b/actionpack/test/controller/flash_hash_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionpack/test/controller/flash_test.rb b/actionpack/test/controller/flash_test.rb index dc641c19abda..e2025e9ac2da 100644 --- a/actionpack/test/controller/flash_test.rb +++ b/actionpack/test/controller/flash_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/key_generator" diff --git a/actionpack/test/controller/force_ssl_test.rb b/actionpack/test/controller/force_ssl_test.rb index 2b3859aa5740..0bfbed7b2c4e 100644 --- a/actionpack/test/controller/force_ssl_test.rb +++ b/actionpack/test/controller/force_ssl_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ForceSSLController < ActionController::Base diff --git a/actionpack/test/controller/form_builder_test.rb b/actionpack/test/controller/form_builder_test.rb index 5a3dc2ee03bc..06c655f44447 100644 --- a/actionpack/test/controller/form_builder_test.rb +++ b/actionpack/test/controller/form_builder_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class FormBuilderController < ActionController::Base diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb index 03dbd6361475..f7fd8c3f8b27 100644 --- a/actionpack/test/controller/helper_test.rb +++ b/actionpack/test/controller/helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" ActionController::Base.helpers_path = File.expand_path("../fixtures/helpers", __dir__) diff --git a/actionpack/test/controller/http_basic_authentication_test.rb b/actionpack/test/controller/http_basic_authentication_test.rb index d9ae78768987..5b14855d5997 100644 --- a/actionpack/test/controller/http_basic_authentication_test.rb +++ b/actionpack/test/controller/http_basic_authentication_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class HttpBasicAuthenticationTest < ActionController::TestCase diff --git a/actionpack/test/controller/http_digest_authentication_test.rb b/actionpack/test/controller/http_digest_authentication_test.rb index 0b59e123d702..f3a216075e35 100644 --- a/actionpack/test/controller/http_digest_authentication_test.rb +++ b/actionpack/test/controller/http_digest_authentication_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/key_generator" diff --git a/actionpack/test/controller/http_token_authentication_test.rb b/actionpack/test/controller/http_token_authentication_test.rb index 09d2793c9a1c..bcb47de98ad3 100644 --- a/actionpack/test/controller/http_token_authentication_test.rb +++ b/actionpack/test/controller/http_token_authentication_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class HttpTokenAuthenticationTest < ActionController::TestCase diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index cb282d4330d3..a610844fb12b 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "controller/fake_controllers" require "rails/engine" diff --git a/actionpack/test/controller/live_stream_test.rb b/actionpack/test/controller/live_stream_test.rb index bfb47b90d51a..01ae9c75de49 100644 --- a/actionpack/test/controller/live_stream_test.rb +++ b/actionpack/test/controller/live_stream_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "timeout" require "concurrent/atomic/count_down_latch" diff --git a/actionpack/test/controller/localized_templates_test.rb b/actionpack/test/controller/localized_templates_test.rb index 0f2242b693ac..bbb5b356d9da 100644 --- a/actionpack/test/controller/localized_templates_test.rb +++ b/actionpack/test/controller/localized_templates_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class LocalizedController < ActionController::Base diff --git a/actionpack/test/controller/log_subscriber_test.rb b/actionpack/test/controller/log_subscriber_test.rb index 45a120acb68c..b17e351e0f7c 100644 --- a/actionpack/test/controller/log_subscriber_test.rb +++ b/actionpack/test/controller/log_subscriber_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/log_subscriber/test_helper" require "action_controller/log_subscriber" diff --git a/actionpack/test/controller/metal/renderers_test.rb b/actionpack/test/controller/metal/renderers_test.rb index 7dc3dd6a6df6..f7130240563b 100644 --- a/actionpack/test/controller/metal/renderers_test.rb +++ b/actionpack/test/controller/metal/renderers_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/hash/conversions" diff --git a/actionpack/test/controller/metal_test.rb b/actionpack/test/controller/metal_test.rb index e16452ed6fe1..67925359db36 100644 --- a/actionpack/test/controller/metal_test.rb +++ b/actionpack/test/controller/metal_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class MetalControllerInstanceTests < ActiveSupport::TestCase diff --git a/actionpack/test/controller/mime/accept_format_test.rb b/actionpack/test/controller/mime/accept_format_test.rb index d1c4dbfef7ba..01325ba94444 100644 --- a/actionpack/test/controller/mime/accept_format_test.rb +++ b/actionpack/test/controller/mime/accept_format_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class StarStarMimeController < ActionController::Base diff --git a/actionpack/test/controller/mime/respond_to_test.rb b/actionpack/test/controller/mime/respond_to_test.rb index 61bd5c80c4f8..63be0c7ce9b6 100644 --- a/actionpack/test/controller/mime/respond_to_test.rb +++ b/actionpack/test/controller/mime/respond_to_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/log_subscriber/test_helper" diff --git a/actionpack/test/controller/new_base/bare_metal_test.rb b/actionpack/test/controller/new_base/bare_metal_test.rb index 054757fab3f6..70494649699f 100644 --- a/actionpack/test/controller/new_base/bare_metal_test.rb +++ b/actionpack/test/controller/new_base/bare_metal_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module BareMetalTest diff --git a/actionpack/test/controller/new_base/base_test.rb b/actionpack/test/controller/new_base/base_test.rb index b891df4c0ff5..decb15481245 100644 --- a/actionpack/test/controller/new_base/base_test.rb +++ b/actionpack/test/controller/new_base/base_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" # Tests the controller dispatching happy path diff --git a/actionpack/test/controller/new_base/content_negotiation_test.rb b/actionpack/test/controller/new_base/content_negotiation_test.rb index b8707450316c..a61a573c2177 100644 --- a/actionpack/test/controller/new_base/content_negotiation_test.rb +++ b/actionpack/test/controller/new_base/content_negotiation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ContentNegotiation diff --git a/actionpack/test/controller/new_base/content_type_test.rb b/actionpack/test/controller/new_base/content_type_test.rb index 85089bafe2d2..1c2cbc849395 100644 --- a/actionpack/test/controller/new_base/content_type_test.rb +++ b/actionpack/test/controller/new_base/content_type_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ContentType diff --git a/actionpack/test/controller/new_base/middleware_test.rb b/actionpack/test/controller/new_base/middleware_test.rb index 0493291c03b2..7340a573896c 100644 --- a/actionpack/test/controller/new_base/middleware_test.rb +++ b/actionpack/test/controller/new_base/middleware_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module MiddlewareTest diff --git a/actionpack/test/controller/new_base/render_action_test.rb b/actionpack/test/controller/new_base/render_action_test.rb index 4b59a3d6769b..bd55be2adca2 100644 --- a/actionpack/test/controller/new_base/render_action_test.rb +++ b/actionpack/test/controller/new_base/render_action_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module RenderAction diff --git a/actionpack/test/controller/new_base/render_body_test.rb b/actionpack/test/controller/new_base/render_body_test.rb index b1467a0deb6e..647ae16329de 100644 --- a/actionpack/test/controller/new_base/render_body_test.rb +++ b/actionpack/test/controller/new_base/render_body_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module RenderBody diff --git a/actionpack/test/controller/new_base/render_context_test.rb b/actionpack/test/controller/new_base/render_context_test.rb index 25b73ac78cf0..87b778b21bca 100644 --- a/actionpack/test/controller/new_base/render_context_test.rb +++ b/actionpack/test/controller/new_base/render_context_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" # This is testing the decoupling of view renderer and view context diff --git a/actionpack/test/controller/new_base/render_file_test.rb b/actionpack/test/controller/new_base/render_file_test.rb index 4491dd96edf3..db7b1b94eec5 100644 --- a/actionpack/test/controller/new_base/render_file_test.rb +++ b/actionpack/test/controller/new_base/render_file_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module RenderFile diff --git a/actionpack/test/controller/new_base/render_html_test.rb b/actionpack/test/controller/new_base/render_html_test.rb index 8019aa1eb5e9..8041e22a113d 100644 --- a/actionpack/test/controller/new_base/render_html_test.rb +++ b/actionpack/test/controller/new_base/render_html_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module RenderHtml diff --git a/actionpack/test/controller/new_base/render_implicit_action_test.rb b/actionpack/test/controller/new_base/render_implicit_action_test.rb index c5fc8e15e109..9e2b02914d55 100644 --- a/actionpack/test/controller/new_base/render_implicit_action_test.rb +++ b/actionpack/test/controller/new_base/render_implicit_action_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module RenderImplicitAction diff --git a/actionpack/test/controller/new_base/render_layout_test.rb b/actionpack/test/controller/new_base/render_layout_test.rb index 0a3809560e5b..c49e1890c329 100644 --- a/actionpack/test/controller/new_base/render_layout_test.rb +++ b/actionpack/test/controller/new_base/render_layout_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ControllerLayouts diff --git a/actionpack/test/controller/new_base/render_partial_test.rb b/actionpack/test/controller/new_base/render_partial_test.rb index 4511826978f9..70a4f5a9d5c5 100644 --- a/actionpack/test/controller/new_base/render_partial_test.rb +++ b/actionpack/test/controller/new_base/render_partial_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module RenderPartial diff --git a/actionpack/test/controller/new_base/render_plain_test.rb b/actionpack/test/controller/new_base/render_plain_test.rb index 44be8dd380da..236d9d0fd1c4 100644 --- a/actionpack/test/controller/new_base/render_plain_test.rb +++ b/actionpack/test/controller/new_base/render_plain_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module RenderPlain diff --git a/actionpack/test/controller/new_base/render_streaming_test.rb b/actionpack/test/controller/new_base/render_streaming_test.rb index 1177b8b03e00..555e961abaae 100644 --- a/actionpack/test/controller/new_base/render_streaming_test.rb +++ b/actionpack/test/controller/new_base/render_streaming_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module RenderStreaming diff --git a/actionpack/test/controller/new_base/render_template_test.rb b/actionpack/test/controller/new_base/render_template_test.rb index 1102305f3e56..0ea1b6eeb727 100644 --- a/actionpack/test/controller/new_base/render_template_test.rb +++ b/actionpack/test/controller/new_base/render_template_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module RenderTemplate diff --git a/actionpack/test/controller/new_base/render_test.rb b/actionpack/test/controller/new_base/render_test.rb index cea3f9b5fd78..ee81760450d9 100644 --- a/actionpack/test/controller/new_base/render_test.rb +++ b/actionpack/test/controller/new_base/render_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module Render diff --git a/actionpack/test/controller/new_base/render_xml_test.rb b/actionpack/test/controller/new_base/render_xml_test.rb index 8bab41337785..bf3563080d5f 100644 --- a/actionpack/test/controller/new_base/render_xml_test.rb +++ b/actionpack/test/controller/new_base/render_xml_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module RenderXml diff --git a/actionpack/test/controller/output_escaping_test.rb b/actionpack/test/controller/output_escaping_test.rb index c7047d95ae7d..cf5eda7fc2f3 100644 --- a/actionpack/test/controller/output_escaping_test.rb +++ b/actionpack/test/controller/output_escaping_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class OutputEscapingTest < ActiveSupport::TestCase diff --git a/actionpack/test/controller/parameter_encoding_test.rb b/actionpack/test/controller/parameter_encoding_test.rb index 234d0bddd1ed..371188c23091 100644 --- a/actionpack/test/controller/parameter_encoding_test.rb +++ b/actionpack/test/controller/parameter_encoding_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ParameterEncodingController < ActionController::Base diff --git a/actionpack/test/controller/parameters/accessors_test.rb b/actionpack/test/controller/parameters/accessors_test.rb index 7725c25e2258..05e80a162d21 100644 --- a/actionpack/test/controller/parameters/accessors_test.rb +++ b/actionpack/test/controller/parameters/accessors_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_controller/metal/strong_parameters" require "active_support/core_ext/hash/transform_values" diff --git a/actionpack/test/controller/parameters/always_permitted_parameters_test.rb b/actionpack/test/controller/parameters/always_permitted_parameters_test.rb index cd7c98f1120a..55c9d7b96ab8 100644 --- a/actionpack/test/controller/parameters/always_permitted_parameters_test.rb +++ b/actionpack/test/controller/parameters/always_permitted_parameters_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_controller/metal/strong_parameters" diff --git a/actionpack/test/controller/parameters/dup_test.rb b/actionpack/test/controller/parameters/dup_test.rb index fb707a135432..4a163df390b9 100644 --- a/actionpack/test/controller/parameters/dup_test.rb +++ b/actionpack/test/controller/parameters/dup_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_controller/metal/strong_parameters" require "active_support/core_ext/object/deep_dup" diff --git a/actionpack/test/controller/parameters/log_on_unpermitted_params_test.rb b/actionpack/test/controller/parameters/log_on_unpermitted_params_test.rb index c800c1d3df32..52b588ee4faf 100644 --- a/actionpack/test/controller/parameters/log_on_unpermitted_params_test.rb +++ b/actionpack/test/controller/parameters/log_on_unpermitted_params_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_controller/metal/strong_parameters" diff --git a/actionpack/test/controller/parameters/multi_parameter_attributes_test.rb b/actionpack/test/controller/parameters/multi_parameter_attributes_test.rb index 88fb477c10b5..ef39fc3b71e3 100644 --- a/actionpack/test/controller/parameters/multi_parameter_attributes_test.rb +++ b/actionpack/test/controller/parameters/multi_parameter_attributes_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_controller/metal/strong_parameters" diff --git a/actionpack/test/controller/parameters/mutators_test.rb b/actionpack/test/controller/parameters/mutators_test.rb index 3fe7340782c9..98dc62169109 100644 --- a/actionpack/test/controller/parameters/mutators_test.rb +++ b/actionpack/test/controller/parameters/mutators_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_controller/metal/strong_parameters" require "active_support/core_ext/hash/transform_values" diff --git a/actionpack/test/controller/parameters/nested_parameters_permit_test.rb b/actionpack/test/controller/parameters/nested_parameters_permit_test.rb index 00e591d5a722..46ac1028021f 100644 --- a/actionpack/test/controller/parameters/nested_parameters_permit_test.rb +++ b/actionpack/test/controller/parameters/nested_parameters_permit_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_controller/metal/strong_parameters" diff --git a/actionpack/test/controller/parameters/parameters_permit_test.rb b/actionpack/test/controller/parameters/parameters_permit_test.rb index ae2b45c9f0cb..5b13b65f6143 100644 --- a/actionpack/test/controller/parameters/parameters_permit_test.rb +++ b/actionpack/test/controller/parameters/parameters_permit_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_dispatch/http/upload" require "action_controller/metal/strong_parameters" diff --git a/actionpack/test/controller/parameters/raise_on_unpermitted_params_test.rb b/actionpack/test/controller/parameters/raise_on_unpermitted_params_test.rb index 8fab7b28e904..b5e0406b9c1f 100644 --- a/actionpack/test/controller/parameters/raise_on_unpermitted_params_test.rb +++ b/actionpack/test/controller/parameters/raise_on_unpermitted_params_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_controller/metal/strong_parameters" diff --git a/actionpack/test/controller/parameters/serialization_test.rb b/actionpack/test/controller/parameters/serialization_test.rb index 6fba2fde9188..11e264a23aa2 100644 --- a/actionpack/test/controller/parameters/serialization_test.rb +++ b/actionpack/test/controller/parameters/serialization_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_controller/metal/strong_parameters" require "active_support/core_ext/string/strip" diff --git a/actionpack/test/controller/params_wrapper_test.rb b/actionpack/test/controller/params_wrapper_test.rb index 4cbb28ef603a..7eab45676763 100644 --- a/actionpack/test/controller/params_wrapper_test.rb +++ b/actionpack/test/controller/params_wrapper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module Admin; class User; end; end diff --git a/actionpack/test/controller/permitted_params_test.rb b/actionpack/test/controller/permitted_params_test.rb index 6205a0981643..37b53360a4f4 100644 --- a/actionpack/test/controller/permitted_params_test.rb +++ b/actionpack/test/controller/permitted_params_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class PeopleController < ActionController::Base diff --git a/actionpack/test/controller/redirect_test.rb b/actionpack/test/controller/redirect_test.rb index 5b16af78c494..ecec3b63c4b3 100644 --- a/actionpack/test/controller/redirect_test.rb +++ b/actionpack/test/controller/redirect_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class Workshop diff --git a/actionpack/test/controller/render_js_test.rb b/actionpack/test/controller/render_js_test.rb index 290218d4a273..29b865104655 100644 --- a/actionpack/test/controller/render_js_test.rb +++ b/actionpack/test/controller/render_js_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "controller/fake_models" require "pathname" diff --git a/actionpack/test/controller/render_json_test.rb b/actionpack/test/controller/render_json_test.rb index 79552ec8f1cb..2173d8927686 100644 --- a/actionpack/test/controller/render_json_test.rb +++ b/actionpack/test/controller/render_json_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "controller/fake_models" require "active_support/logger" diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index 17d834d55f51..a9ef36690c2e 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "controller/fake_models" diff --git a/actionpack/test/controller/render_xml_test.rb b/actionpack/test/controller/render_xml_test.rb index 24866d7d6a55..0bd73fe8802a 100644 --- a/actionpack/test/controller/render_xml_test.rb +++ b/actionpack/test/controller/render_xml_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "controller/fake_models" require "pathname" diff --git a/actionpack/test/controller/renderer_test.rb b/actionpack/test/controller/renderer_test.rb index 052c974d686f..817dbc2f347f 100644 --- a/actionpack/test/controller/renderer_test.rb +++ b/actionpack/test/controller/renderer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class RendererTest < ActiveSupport::TestCase diff --git a/actionpack/test/controller/renderers_test.rb b/actionpack/test/controller/renderers_test.rb index ccc700d79c9d..63f36adeeba2 100644 --- a/actionpack/test/controller/renderers_test.rb +++ b/actionpack/test/controller/renderers_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "controller/fake_models" require "active_support/logger" diff --git a/actionpack/test/controller/request/test_request_test.rb b/actionpack/test/controller/request/test_request_test.rb index 1440db00f60e..a051e0f86cb2 100644 --- a/actionpack/test/controller/request/test_request_test.rb +++ b/actionpack/test/controller/request/test_request_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "stringio" diff --git a/actionpack/test/controller/request_forgery_protection_test.rb b/actionpack/test/controller/request_forgery_protection_test.rb index 521d93f02eea..0fb103b4444e 100644 --- a/actionpack/test/controller/request_forgery_protection_test.rb +++ b/actionpack/test/controller/request_forgery_protection_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/log_subscriber/test_helper" diff --git a/actionpack/test/controller/required_params_test.rb b/actionpack/test/controller/required_params_test.rb index 46bb374b3fc5..9d9a9d49b568 100644 --- a/actionpack/test/controller/required_params_test.rb +++ b/actionpack/test/controller/required_params_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class BooksController < ActionController::Base diff --git a/actionpack/test/controller/rescue_test.rb b/actionpack/test/controller/rescue_test.rb index 9ae22c4554e0..45c04f566dea 100644 --- a/actionpack/test/controller/rescue_test.rb +++ b/actionpack/test/controller/rescue_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class RescueController < ActionController::Base diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb index fad34dacce73..a3833a593d29 100644 --- a/actionpack/test/controller/resources_test.rb +++ b/actionpack/test/controller/resources_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/object/try" require "active_support/core_ext/object/with_options" diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 56b39510bb45..2f82b000d7ff 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "controller/fake_controllers" require "active_support/core_ext/object/with_options" diff --git a/actionpack/test/controller/runner_test.rb b/actionpack/test/controller/runner_test.rb index 3c0c1907f923..558995b48bf2 100644 --- a/actionpack/test/controller/runner_test.rb +++ b/actionpack/test/controller/runner_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_dispatch/testing/integration" diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb index e265c6c49c48..20ed938e56c9 100644 --- a/actionpack/test/controller/send_file_test.rb +++ b/actionpack/test/controller/send_file_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module TestFileUtils diff --git a/actionpack/test/controller/show_exceptions_test.rb b/actionpack/test/controller/show_exceptions_test.rb index 38c601ee81fa..13a5001f397f 100644 --- a/actionpack/test/controller/show_exceptions_test.rb +++ b/actionpack/test/controller/show_exceptions_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ShowExceptions diff --git a/actionpack/test/controller/streaming_test.rb b/actionpack/test/controller/streaming_test.rb index d685467cad7a..c03a09dc1fde 100644 --- a/actionpack/test/controller/streaming_test.rb +++ b/actionpack/test/controller/streaming_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionController diff --git a/actionpack/test/controller/test_case_test.rb b/actionpack/test/controller/test_case_test.rb index 677e2ddded3a..fe10d8f381f5 100644 --- a/actionpack/test/controller/test_case_test.rb +++ b/actionpack/test/controller/test_case_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "controller/fake_controllers" require "active_support/json/decoding" diff --git a/actionpack/test/controller/url_for_integration_test.rb b/actionpack/test/controller/url_for_integration_test.rb index f640e77b998c..e910f95e24e4 100644 --- a/actionpack/test/controller/url_for_integration_test.rb +++ b/actionpack/test/controller/url_for_integration_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "controller/fake_controllers" require "active_support/core_ext/object/with_options" diff --git a/actionpack/test/controller/url_for_test.rb b/actionpack/test/controller/url_for_test.rb index 2afe67ed9157..bd618adb3ed5 100644 --- a/actionpack/test/controller/url_for_test.rb +++ b/actionpack/test/controller/url_for_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module AbstractController diff --git a/actionpack/test/controller/url_rewriter_test.rb b/actionpack/test/controller/url_rewriter_test.rb index a055e6d177cd..ca1be689274b 100644 --- a/actionpack/test/controller/url_rewriter_test.rb +++ b/actionpack/test/controller/url_rewriter_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "controller/fake_controllers" diff --git a/actionpack/test/controller/webservice_test.rb b/actionpack/test/controller/webservice_test.rb index 6f97a4b62e0b..3ec6e5eda580 100644 --- a/actionpack/test/controller/webservice_test.rb +++ b/actionpack/test/controller/webservice_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/json/decoding" diff --git a/actionpack/test/dispatch/callbacks_test.rb b/actionpack/test/dispatch/callbacks_test.rb index 29a5dfc0adde..0edeb93cd5fe 100644 --- a/actionpack/test/dispatch/callbacks_test.rb +++ b/actionpack/test/dispatch/callbacks_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class DispatcherTest < ActiveSupport::TestCase diff --git a/actionpack/test/dispatch/cookies_test.rb b/actionpack/test/dispatch/cookies_test.rb index e5646de82ee6..6e37d2ad07aa 100644 --- a/actionpack/test/dispatch/cookies_test.rb +++ b/actionpack/test/dispatch/cookies_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "openssl" require "active_support/key_generator" diff --git a/actionpack/test/dispatch/debug_exceptions_test.rb b/actionpack/test/dispatch/debug_exceptions_test.rb index ea477e890884..dc98681c6e06 100644 --- a/actionpack/test/dispatch/debug_exceptions_test.rb +++ b/actionpack/test/dispatch/debug_exceptions_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class DebugExceptionsTest < ActionDispatch::IntegrationTest diff --git a/actionpack/test/dispatch/exception_wrapper_test.rb b/actionpack/test/dispatch/exception_wrapper_test.rb index 316661a116eb..54079b3b3835 100644 --- a/actionpack/test/dispatch/exception_wrapper_test.rb +++ b/actionpack/test/dispatch/exception_wrapper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionpack/test/dispatch/executor_test.rb b/actionpack/test/dispatch/executor_test.rb index 0b4e0849c3e3..1250723cb51a 100644 --- a/actionpack/test/dispatch/executor_test.rb +++ b/actionpack/test/dispatch/executor_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ExecutorTest < ActiveSupport::TestCase diff --git a/actionpack/test/dispatch/header_test.rb b/actionpack/test/dispatch/header_test.rb index 958450072ef9..11b7dee8c915 100644 --- a/actionpack/test/dispatch/header_test.rb +++ b/actionpack/test/dispatch/header_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class HeaderTest < ActiveSupport::TestCase diff --git a/actionpack/test/dispatch/live_response_test.rb b/actionpack/test/dispatch/live_response_test.rb index d10fc7d575fb..21d9cccbf764 100644 --- a/actionpack/test/dispatch/live_response_test.rb +++ b/actionpack/test/dispatch/live_response_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "concurrent/atomic/count_down_latch" diff --git a/actionpack/test/dispatch/mapper_test.rb b/actionpack/test/dispatch/mapper_test.rb index 1596d23b1ea4..3fad24ee7f04 100644 --- a/actionpack/test/dispatch/mapper_test.rb +++ b/actionpack/test/dispatch/mapper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionpack/test/dispatch/middleware_stack_test.rb b/actionpack/test/dispatch/middleware_stack_test.rb index 481aa22b1079..adb17e83d4bf 100644 --- a/actionpack/test/dispatch/middleware_stack_test.rb +++ b/actionpack/test/dispatch/middleware_stack_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class MiddlewareStackTest < ActiveSupport::TestCase diff --git a/actionpack/test/dispatch/mime_type_test.rb b/actionpack/test/dispatch/mime_type_test.rb index 2ca03c535a1d..6c254fb6903c 100644 --- a/actionpack/test/dispatch/mime_type_test.rb +++ b/actionpack/test/dispatch/mime_type_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class MimeTypeTest < ActiveSupport::TestCase diff --git a/actionpack/test/dispatch/mount_test.rb b/actionpack/test/dispatch/mount_test.rb index a7d5ba234555..c64c7821360e 100644 --- a/actionpack/test/dispatch/mount_test.rb +++ b/actionpack/test/dispatch/mount_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "rails/engine" diff --git a/actionpack/test/dispatch/prefix_generation_test.rb b/actionpack/test/dispatch/prefix_generation_test.rb index 0e093d218812..a40f92dc5830 100644 --- a/actionpack/test/dispatch/prefix_generation_test.rb +++ b/actionpack/test/dispatch/prefix_generation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "rack/test" require "rails/engine" diff --git a/actionpack/test/dispatch/rack_cache_test.rb b/actionpack/test/dispatch/rack_cache_test.rb index d7bb90abbf98..4f23711a21c2 100644 --- a/actionpack/test/dispatch/rack_cache_test.rb +++ b/actionpack/test/dispatch/rack_cache_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_dispatch/http/rack_cache" diff --git a/actionpack/test/dispatch/reloader_test.rb b/actionpack/test/dispatch/reloader_test.rb index 9eb78fe059b1..1d89abc0385d 100644 --- a/actionpack/test/dispatch/reloader_test.rb +++ b/actionpack/test/dispatch/reloader_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ReloaderTest < ActiveSupport::TestCase diff --git a/actionpack/test/dispatch/request/json_params_parsing_test.rb b/actionpack/test/dispatch/request/json_params_parsing_test.rb index 10234a481597..8dec548fc4a2 100644 --- a/actionpack/test/dispatch/request/json_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/json_params_parsing_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class JsonParamsParsingTest < ActionDispatch::IntegrationTest diff --git a/actionpack/test/dispatch/request/multipart_params_parsing_test.rb b/actionpack/test/dispatch/request/multipart_params_parsing_test.rb index e7e8c8297449..bfdc675e2c4f 100644 --- a/actionpack/test/dispatch/request/multipart_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/multipart_params_parsing_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class MultipartParamsParsingTest < ActionDispatch::IntegrationTest diff --git a/actionpack/test/dispatch/request/query_string_parsing_test.rb b/actionpack/test/dispatch/request/query_string_parsing_test.rb index 2499c33cef29..eda8a493c4c8 100644 --- a/actionpack/test/dispatch/request/query_string_parsing_test.rb +++ b/actionpack/test/dispatch/request/query_string_parsing_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class QueryStringParsingTest < ActionDispatch::IntegrationTest diff --git a/actionpack/test/dispatch/request/session_test.rb b/actionpack/test/dispatch/request/session_test.rb index 228135c54770..6e6b58b63335 100644 --- a/actionpack/test/dispatch/request/session_test.rb +++ b/actionpack/test/dispatch/request/session_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_dispatch/middleware/session/abstract_store" diff --git a/actionpack/test/dispatch/request/url_encoded_params_parsing_test.rb b/actionpack/test/dispatch/request/url_encoded_params_parsing_test.rb index 6721a388c1d0..80362066da50 100644 --- a/actionpack/test/dispatch/request/url_encoded_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/url_encoded_params_parsing_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class UrlEncodedParamsParsingTest < ActionDispatch::IntegrationTest diff --git a/actionpack/test/dispatch/request_id_test.rb b/actionpack/test/dispatch/request_id_test.rb index 4fcd45acf55e..d2b550505430 100644 --- a/actionpack/test/dispatch/request_id_test.rb +++ b/actionpack/test/dispatch/request_id_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class RequestIdTest < ActiveSupport::TestCase diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index 899b27b9627d..a2305a0fa2dc 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class BaseRequestTest < ActiveSupport::TestCase diff --git a/actionpack/test/dispatch/response_test.rb b/actionpack/test/dispatch/response_test.rb index 7433c5ce0cb6..ca3dfba6ecd3 100644 --- a/actionpack/test/dispatch/response_test.rb +++ b/actionpack/test/dispatch/response_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "timeout" require "rack/content_length" diff --git a/actionpack/test/dispatch/routing/concerns_test.rb b/actionpack/test/dispatch/routing/concerns_test.rb index 2d71c375629a..bf6dfda3b8c0 100644 --- a/actionpack/test/dispatch/routing/concerns_test.rb +++ b/actionpack/test/dispatch/routing/concerns_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ReviewsController < ResourcesController; end diff --git a/actionpack/test/dispatch/routing/custom_url_helpers_test.rb b/actionpack/test/dispatch/routing/custom_url_helpers_test.rb index 338992dda561..d9a30fa42fc8 100644 --- a/actionpack/test/dispatch/routing/custom_url_helpers_test.rb +++ b/actionpack/test/dispatch/routing/custom_url_helpers_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class TestCustomUrlHelpers < ActionDispatch::IntegrationTest diff --git a/actionpack/test/dispatch/routing/inspector_test.rb b/actionpack/test/dispatch/routing/inspector_test.rb index a4babf85546d..1d04569d6d7b 100644 --- a/actionpack/test/dispatch/routing/inspector_test.rb +++ b/actionpack/test/dispatch/routing/inspector_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "rails/engine" require "action_dispatch/routing/inspector" diff --git a/actionpack/test/dispatch/routing/ipv6_redirect_test.rb b/actionpack/test/dispatch/routing/ipv6_redirect_test.rb index 179aee9ba7b4..6e4fb6842bba 100644 --- a/actionpack/test/dispatch/routing/ipv6_redirect_test.rb +++ b/actionpack/test/dispatch/routing/ipv6_redirect_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class IPv6IntegrationTest < ActionDispatch::IntegrationTest diff --git a/actionpack/test/dispatch/routing/route_set_test.rb b/actionpack/test/dispatch/routing/route_set_test.rb index d6ecbda092de..d78b9f85f7cc 100644 --- a/actionpack/test/dispatch/routing/route_set_test.rb +++ b/actionpack/test/dispatch/routing/route_set_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionpack/test/dispatch/routing_assertions_test.rb b/actionpack/test/dispatch/routing_assertions_test.rb index 917ce7e66866..a1c3cffdefce 100644 --- a/actionpack/test/dispatch/routing_assertions_test.rb +++ b/actionpack/test/dispatch/routing_assertions_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "controller/fake_controllers" diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 32cd78e492ab..967e5c78ffda 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "erb" require "abstract_unit" require "controller/fake_controllers" diff --git a/actionpack/test/dispatch/runner_test.rb b/actionpack/test/dispatch/runner_test.rb index b76bf4a3207c..1adf8e6d1121 100644 --- a/actionpack/test/dispatch/runner_test.rb +++ b/actionpack/test/dispatch/runner_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class RunnerTest < ActiveSupport::TestCase diff --git a/actionpack/test/dispatch/session/abstract_store_test.rb b/actionpack/test/dispatch/session/abstract_store_test.rb index fd4d359cf852..903ec8cc7738 100644 --- a/actionpack/test/dispatch/session/abstract_store_test.rb +++ b/actionpack/test/dispatch/session/abstract_store_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_dispatch/middleware/session/abstract_store" diff --git a/actionpack/test/dispatch/session/cache_store_test.rb b/actionpack/test/dispatch/session/cache_store_test.rb index 859059063f73..4f483a851d18 100644 --- a/actionpack/test/dispatch/session/cache_store_test.rb +++ b/actionpack/test/dispatch/session/cache_store_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "fixtures/session_autoload_test/session_autoload_test/foo" diff --git a/actionpack/test/dispatch/session/cookie_store_test.rb b/actionpack/test/dispatch/session/cookie_store_test.rb index 63dfc07c0d23..41a55f2ec018 100644 --- a/actionpack/test/dispatch/session/cookie_store_test.rb +++ b/actionpack/test/dispatch/session/cookie_store_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "stringio" require "active_support/key_generator" diff --git a/actionpack/test/dispatch/session/mem_cache_store_test.rb b/actionpack/test/dispatch/session/mem_cache_store_test.rb index 121e9ebef7bd..f66075add7ef 100644 --- a/actionpack/test/dispatch/session/mem_cache_store_test.rb +++ b/actionpack/test/dispatch/session/mem_cache_store_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "securerandom" diff --git a/actionpack/test/dispatch/session/test_session_test.rb b/actionpack/test/dispatch/session/test_session_test.rb index 0bf3a8b3ee9f..e355645acc7d 100644 --- a/actionpack/test/dispatch/session/test_session_test.rb +++ b/actionpack/test/dispatch/session/test_session_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "stringio" diff --git a/actionpack/test/dispatch/show_exceptions_test.rb b/actionpack/test/dispatch/show_exceptions_test.rb index 3513534d72f8..9f6e15ec61a4 100644 --- a/actionpack/test/dispatch/show_exceptions_test.rb +++ b/actionpack/test/dispatch/show_exceptions_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ShowExceptionsTest < ActionDispatch::IntegrationTest diff --git a/actionpack/test/dispatch/ssl_test.rb b/actionpack/test/dispatch/ssl_test.rb index 757e26973f42..7b9cf1cba4ad 100644 --- a/actionpack/test/dispatch/ssl_test.rb +++ b/actionpack/test/dispatch/ssl_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class SSLTest < ActionDispatch::IntegrationTest diff --git a/actionpack/test/dispatch/static_test.rb b/actionpack/test/dispatch/static_test.rb index 3082d1072b5f..ce95d2b74b59 100644 --- a/actionpack/test/dispatch/static_test.rb +++ b/actionpack/test/dispatch/static_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "zlib" diff --git a/actionpack/test/dispatch/system_testing/driver_test.rb b/actionpack/test/dispatch/system_testing/driver_test.rb index 4a1b971da5fe..579c92f2ae2b 100644 --- a/actionpack/test/dispatch/system_testing/driver_test.rb +++ b/actionpack/test/dispatch/system_testing/driver_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_dispatch/system_testing/driver" diff --git a/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb b/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb index a83818fd80e2..0f0c7c157a16 100644 --- a/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb +++ b/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_dispatch/system_testing/test_helpers/screenshot_helper" require "capybara/dsl" diff --git a/actionpack/test/dispatch/system_testing/server_test.rb b/actionpack/test/dispatch/system_testing/server_test.rb index 10412d63673c..e1cecce3e105 100644 --- a/actionpack/test/dispatch/system_testing/server_test.rb +++ b/actionpack/test/dispatch/system_testing/server_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "capybara/dsl" require "action_dispatch/system_testing/server" diff --git a/actionpack/test/dispatch/system_testing/system_test_case_test.rb b/actionpack/test/dispatch/system_testing/system_test_case_test.rb index 8f90e45f5f3a..b853079476fa 100644 --- a/actionpack/test/dispatch/system_testing/system_test_case_test.rb +++ b/actionpack/test/dispatch/system_testing/system_test_case_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class SetDriverToRackTestTest < DrivenByRackTest diff --git a/actionpack/test/dispatch/test_request_test.rb b/actionpack/test/dispatch/test_request_test.rb index 85a6df4975ec..1bfafb61695c 100644 --- a/actionpack/test/dispatch/test_request_test.rb +++ b/actionpack/test/dispatch/test_request_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class TestRequestTest < ActiveSupport::TestCase diff --git a/actionpack/test/dispatch/test_response_test.rb b/actionpack/test/dispatch/test_response_test.rb index 98eafb5119c6..4e208f478414 100644 --- a/actionpack/test/dispatch/test_response_test.rb +++ b/actionpack/test/dispatch/test_response_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class TestResponseTest < ActiveSupport::TestCase diff --git a/actionpack/test/dispatch/uploaded_file_test.rb b/actionpack/test/dispatch/uploaded_file_test.rb index 0074d2a314b8..e47e122dfa44 100644 --- a/actionpack/test/dispatch/uploaded_file_test.rb +++ b/actionpack/test/dispatch/uploaded_file_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionpack/test/dispatch/url_generation_test.rb b/actionpack/test/dispatch/url_generation_test.rb index 5d81fd68347d..c87c3f628a48 100644 --- a/actionpack/test/dispatch/url_generation_test.rb +++ b/actionpack/test/dispatch/url_generation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module TestUrlGeneration diff --git a/actionpack/test/fixtures/alternate_helpers/foo_helper.rb b/actionpack/test/fixtures/alternate_helpers/foo_helper.rb index 25285844733f..66e74edd5128 100644 --- a/actionpack/test/fixtures/alternate_helpers/foo_helper.rb +++ b/actionpack/test/fixtures/alternate_helpers/foo_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module FooHelper redefine_method(:baz) {} end diff --git a/actionpack/test/fixtures/company.rb b/actionpack/test/fixtures/company.rb index 9f527acdd897..18a197947a23 100644 --- a/actionpack/test/fixtures/company.rb +++ b/actionpack/test/fixtures/company.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Company < ActiveRecord::Base has_one :mascot self.sequence_name = :companies_nonstd_seq diff --git a/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.xml.builder b/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.xml.builder index 65995797403b..91b5160fcb62 100644 --- a/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.xml.builder +++ b/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.xml.builder @@ -1,3 +1,4 @@ +# frozen_string_literal: true xml.body do cache("fragment") do xml.p "Builder" diff --git a/actionpack/test/fixtures/helpers/abc_helper.rb b/actionpack/test/fixtures/helpers/abc_helper.rb index cf2774bb5f48..a743c7ee9a4f 100644 --- a/actionpack/test/fixtures/helpers/abc_helper.rb +++ b/actionpack/test/fixtures/helpers/abc_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module AbcHelper def bare_a() end end diff --git a/actionpack/test/fixtures/helpers/fun/games_helper.rb b/actionpack/test/fixtures/helpers/fun/games_helper.rb index 2d5e50f5a5f7..7781f9087cd1 100644 --- a/actionpack/test/fixtures/helpers/fun/games_helper.rb +++ b/actionpack/test/fixtures/helpers/fun/games_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Fun module GamesHelper def stratego() "Iz guuut!" end diff --git a/actionpack/test/fixtures/helpers/fun/pdf_helper.rb b/actionpack/test/fixtures/helpers/fun/pdf_helper.rb index 16057fd46647..70d8f722fb26 100644 --- a/actionpack/test/fixtures/helpers/fun/pdf_helper.rb +++ b/actionpack/test/fixtures/helpers/fun/pdf_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Fun module PdfHelper def foobar() "baz" end diff --git a/actionpack/test/fixtures/helpers/just_me_helper.rb b/actionpack/test/fixtures/helpers/just_me_helper.rb index 9b43fc6d4962..eb0cce3b77fe 100644 --- a/actionpack/test/fixtures/helpers/just_me_helper.rb +++ b/actionpack/test/fixtures/helpers/just_me_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module JustMeHelper def me() "mine!" end end diff --git a/actionpack/test/fixtures/helpers/me_too_helper.rb b/actionpack/test/fixtures/helpers/me_too_helper.rb index 8e312e7cd094..e8eb1ea52ab1 100644 --- a/actionpack/test/fixtures/helpers/me_too_helper.rb +++ b/actionpack/test/fixtures/helpers/me_too_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module MeTooHelper def me() "me too!" end end diff --git a/actionpack/test/fixtures/helpers1_pack/pack1_helper.rb b/actionpack/test/fixtures/helpers1_pack/pack1_helper.rb index 9faa4277363e..9ff86420be2b 100644 --- a/actionpack/test/fixtures/helpers1_pack/pack1_helper.rb +++ b/actionpack/test/fixtures/helpers1_pack/pack1_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Pack1Helper def conflicting_helper "pack1" diff --git a/actionpack/test/fixtures/helpers2_pack/pack2_helper.rb b/actionpack/test/fixtures/helpers2_pack/pack2_helper.rb index cf56697dfb8d..8b39ffd971cf 100644 --- a/actionpack/test/fixtures/helpers2_pack/pack2_helper.rb +++ b/actionpack/test/fixtures/helpers2_pack/pack2_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Pack2Helper def conflicting_helper "pack2" diff --git a/actionpack/test/fixtures/helpers_typo/admin/users_helper.rb b/actionpack/test/fixtures/helpers_typo/admin/users_helper.rb index 64aa1a047644..fbfeeaedde55 100644 --- a/actionpack/test/fixtures/helpers_typo/admin/users_helper.rb +++ b/actionpack/test/fixtures/helpers_typo/admin/users_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Admin module UsersHelpeR end diff --git a/actionpack/test/fixtures/layouts/builder.builder b/actionpack/test/fixtures/layouts/builder.builder index c55488edd05c..0f34d03a4ce5 100644 --- a/actionpack/test/fixtures/layouts/builder.builder +++ b/actionpack/test/fixtures/layouts/builder.builder @@ -1,3 +1,4 @@ +# frozen_string_literal: true xml.wrapper do xml << yield end diff --git a/actionpack/test/fixtures/load_me.rb b/actionpack/test/fixtures/load_me.rb index e516512a4e46..e826cba0f753 100644 --- a/actionpack/test/fixtures/load_me.rb +++ b/actionpack/test/fixtures/load_me.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class LoadMe end diff --git a/actionpack/test/fixtures/old_content_type/render_default_for_builder.builder b/actionpack/test/fixtures/old_content_type/render_default_for_builder.builder index 15c8a7f5cf9b..d2761ed8c3f0 100644 --- a/actionpack/test/fixtures/old_content_type/render_default_for_builder.builder +++ b/actionpack/test/fixtures/old_content_type/render_default_for_builder.builder @@ -1 +1,2 @@ +# frozen_string_literal: true xml.p "Hello world!" diff --git a/actionpack/test/fixtures/respond_to/using_defaults.xml.builder b/actionpack/test/fixtures/respond_to/using_defaults.xml.builder index 15c8a7f5cf9b..d2761ed8c3f0 100644 --- a/actionpack/test/fixtures/respond_to/using_defaults.xml.builder +++ b/actionpack/test/fixtures/respond_to/using_defaults.xml.builder @@ -1 +1,2 @@ +# frozen_string_literal: true xml.p "Hello world!" diff --git a/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.xml.builder b/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.xml.builder index 15c8a7f5cf9b..d2761ed8c3f0 100644 --- a/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.xml.builder +++ b/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.xml.builder @@ -1 +1,2 @@ +# frozen_string_literal: true xml.p "Hello world!" diff --git a/actionpack/test/fixtures/ruby_template.ruby b/actionpack/test/fixtures/ruby_template.ruby index 5097bce47c09..cae21339f523 100644 --- a/actionpack/test/fixtures/ruby_template.ruby +++ b/actionpack/test/fixtures/ruby_template.ruby @@ -1,2 +1,3 @@ +# frozen_string_literal: true body = "" body << ["Hello", "from", "Ruby", "code"].join(" ") diff --git a/actionpack/test/fixtures/session_autoload_test/session_autoload_test/foo.rb b/actionpack/test/fixtures/session_autoload_test/session_autoload_test/foo.rb index 18fa5cd923bd..cb488a595b3d 100644 --- a/actionpack/test/fixtures/session_autoload_test/session_autoload_test/foo.rb +++ b/actionpack/test/fixtures/session_autoload_test/session_autoload_test/foo.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module SessionAutoloadTest class Foo def initialize(bar = "baz") diff --git a/actionpack/test/fixtures/test/formatted_xml_erb.builder b/actionpack/test/fixtures/test/formatted_xml_erb.builder index f98aaa34a50f..568a2ddefe1d 100644 --- a/actionpack/test/fixtures/test/formatted_xml_erb.builder +++ b/actionpack/test/fixtures/test/formatted_xml_erb.builder @@ -1 +1,2 @@ +# frozen_string_literal: true xml.test "failed" diff --git a/actionpack/test/fixtures/test/hello_xml_world.builder b/actionpack/test/fixtures/test/hello_xml_world.builder index d16bb6b5cbd6..c496fb416023 100644 --- a/actionpack/test/fixtures/test/hello_xml_world.builder +++ b/actionpack/test/fixtures/test/hello_xml_world.builder @@ -1,3 +1,4 @@ +# frozen_string_literal: true xml.html do xml.head do xml.title "Hello World" diff --git a/actionpack/test/fixtures/test/implicit_content_type.atom.builder b/actionpack/test/fixtures/test/implicit_content_type.atom.builder index 2fcb32d2473a..bcb3c79f0b9b 100644 --- a/actionpack/test/fixtures/test/implicit_content_type.atom.builder +++ b/actionpack/test/fixtures/test/implicit_content_type.atom.builder @@ -1,2 +1,3 @@ +# frozen_string_literal: true xml.atom do end diff --git a/actionpack/test/journey/gtg/builder_test.rb b/actionpack/test/journey/gtg/builder_test.rb index aa8427b2650a..f48394a243f3 100644 --- a/actionpack/test/journey/gtg/builder_test.rb +++ b/actionpack/test/journey/gtg/builder_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionpack/test/journey/gtg/transition_table_test.rb b/actionpack/test/journey/gtg/transition_table_test.rb index 889640fdd75c..1f908c7c37a4 100644 --- a/actionpack/test/journey/gtg/transition_table_test.rb +++ b/actionpack/test/journey/gtg/transition_table_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/json/decoding" diff --git a/actionpack/test/journey/nfa/simulator_test.rb b/actionpack/test/journey/nfa/simulator_test.rb index 38f99398cb88..d3a216d4a5a3 100644 --- a/actionpack/test/journey/nfa/simulator_test.rb +++ b/actionpack/test/journey/nfa/simulator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionpack/test/journey/nfa/transition_table_test.rb b/actionpack/test/journey/nfa/transition_table_test.rb index 0bc6bc1cf81b..264a8c2a375e 100644 --- a/actionpack/test/journey/nfa/transition_table_test.rb +++ b/actionpack/test/journey/nfa/transition_table_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionpack/test/journey/nodes/symbol_test.rb b/actionpack/test/journey/nodes/symbol_test.rb index baf60f40b8c1..d4e1753b4a27 100644 --- a/actionpack/test/journey/nodes/symbol_test.rb +++ b/actionpack/test/journey/nodes/symbol_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionpack/test/journey/path/pattern_test.rb b/actionpack/test/journey/path/pattern_test.rb index 2c746179441d..716f2a352c4d 100644 --- a/actionpack/test/journey/path/pattern_test.rb +++ b/actionpack/test/journey/path/pattern_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionpack/test/journey/route/definition/parser_test.rb b/actionpack/test/journey/route/definition/parser_test.rb index 8c6e3c0371eb..bbb521957ff4 100644 --- a/actionpack/test/journey/route/definition/parser_test.rb +++ b/actionpack/test/journey/route/definition/parser_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionpack/test/journey/route/definition/scanner_test.rb b/actionpack/test/journey/route/definition/scanner_test.rb index 98578ddbf1cc..e39a4b41e20e 100644 --- a/actionpack/test/journey/route/definition/scanner_test.rb +++ b/actionpack/test/journey/route/definition/scanner_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionpack/test/journey/route_test.rb b/actionpack/test/journey/route_test.rb index 8fd73970b87f..8c4d5fb0f81b 100644 --- a/actionpack/test/journey/route_test.rb +++ b/actionpack/test/journey/route_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionpack/test/journey/router/utils_test.rb b/actionpack/test/journey/router/utils_test.rb index 74277a432559..69b720afd544 100644 --- a/actionpack/test/journey/router/utils_test.rb +++ b/actionpack/test/journey/router/utils_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionpack/test/journey/router_test.rb b/actionpack/test/journey/router_test.rb index f223a125a312..5399e2aa0b2f 100644 --- a/actionpack/test/journey/router_test.rb +++ b/actionpack/test/journey/router_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionpack/test/journey/routes_test.rb b/actionpack/test/journey/routes_test.rb index d8db5ffad115..9759a3d69225 100644 --- a/actionpack/test/journey/routes_test.rb +++ b/actionpack/test/journey/routes_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionpack/test/lib/controller/fake_controllers.rb b/actionpack/test/lib/controller/fake_controllers.rb index 1a2863b6891c..a9a2003d19d8 100644 --- a/actionpack/test/lib/controller/fake_controllers.rb +++ b/actionpack/test/lib/controller/fake_controllers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ContentController < ActionController::Base; end module Admin diff --git a/actionpack/test/lib/controller/fake_models.rb b/actionpack/test/lib/controller/fake_models.rb index ff37d85ed8bc..8af297a5fd43 100644 --- a/actionpack/test/lib/controller/fake_models.rb +++ b/actionpack/test/lib/controller/fake_models.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_model" Customer = Struct.new(:name, :id) do diff --git a/actionpack/test/routing/helper_test.rb b/actionpack/test/routing/helper_test.rb index 0debacedf716..ce3434dd3257 100644 --- a/actionpack/test/routing/helper_test.rb +++ b/actionpack/test/routing/helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActionDispatch diff --git a/actionview/Rakefile b/actionview/Rakefile index 0fc38e8db4df..564971ce14e3 100644 --- a/actionview/Rakefile +++ b/actionview/Rakefile @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rake/testtask" require "fileutils" require "open3" diff --git a/actionview/actionview.gemspec b/actionview/actionview.gemspec index 48e79c53ca29..5455a37c5ed8 100644 --- a/actionview/actionview.gemspec +++ b/actionview/actionview.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/actionview/bin/test b/actionview/bin/test index 470ce93f103c..c53377cc970f 100755 --- a/actionview/bin/test +++ b/actionview/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/actionview/lib/action_view.rb b/actionview/lib/action_view.rb index 99c5b831b5e4..c125651a64d5 100644 --- a/actionview/lib/action_view.rb +++ b/actionview/lib/action_view.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true #-- # Copyright (c) 2004-2017 David Heinemeier Hansson # diff --git a/actionview/lib/action_view/base.rb b/actionview/lib/action_view/base.rb index 1808553239a2..51f8202de4e7 100644 --- a/actionview/lib/action_view/base.rb +++ b/actionview/lib/action_view/base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attr_internal" require "active_support/core_ext/module/attribute_accessors" require "active_support/ordered_options" diff --git a/actionview/lib/action_view/buffers.rb b/actionview/lib/action_view/buffers.rb index 089daa6d6045..824995582b66 100644 --- a/actionview/lib/action_view/buffers.rb +++ b/actionview/lib/action_view/buffers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/output_safety" module ActionView diff --git a/actionview/lib/action_view/context.rb b/actionview/lib/action_view/context.rb index 31aa73a0cf1b..3a24a7692ef1 100644 --- a/actionview/lib/action_view/context.rb +++ b/actionview/lib/action_view/context.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module CompiledTemplates #:nodoc: # holds compiled template code diff --git a/actionview/lib/action_view/dependency_tracker.rb b/actionview/lib/action_view/dependency_tracker.rb index 451eeec9d69d..9128494501d2 100644 --- a/actionview/lib/action_view/dependency_tracker.rb +++ b/actionview/lib/action_view/dependency_tracker.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "concurrent/map" require "action_view/path_set" diff --git a/actionview/lib/action_view/digestor.rb b/actionview/lib/action_view/digestor.rb index 5ddf1ceb66bc..9a5e11699c31 100644 --- a/actionview/lib/action_view/digestor.rb +++ b/actionview/lib/action_view/digestor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "concurrent/map" require "action_view/dependency_tracker" require "monitor" diff --git a/actionview/lib/action_view/flows.rb b/actionview/lib/action_view/flows.rb index 6d5f57a570f6..d933f05456b3 100644 --- a/actionview/lib/action_view/flows.rb +++ b/actionview/lib/action_view/flows.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/output_safety" module ActionView diff --git a/actionview/lib/action_view/gem_version.rb b/actionview/lib/action_view/gem_version.rb index 92e21d7a4feb..44425b4aa33c 100644 --- a/actionview/lib/action_view/gem_version.rb +++ b/actionview/lib/action_view/gem_version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView # Returns the version of the currently loaded Action View as a Gem::Version def self.gem_version diff --git a/actionview/lib/action_view/helpers.rb b/actionview/lib/action_view/helpers.rb index c1b4b4f84b63..b98041252c77 100644 --- a/actionview/lib/action_view/helpers.rb +++ b/actionview/lib/action_view/helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/benchmarkable" module ActionView #:nodoc: diff --git a/actionview/lib/action_view/helpers/active_model_helper.rb b/actionview/lib/action_view/helpers/active_model_helper.rb index 4bb5788a1667..ba3b5801c9fb 100644 --- a/actionview/lib/action_view/helpers/active_model_helper.rb +++ b/actionview/lib/action_view/helpers/active_model_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" require "active_support/core_ext/enumerable" diff --git a/actionview/lib/action_view/helpers/asset_tag_helper.rb b/actionview/lib/action_view/helpers/asset_tag_helper.rb index c21fe782c681..791454ca8715 100644 --- a/actionview/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionview/lib/action_view/helpers/asset_tag_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array/extract_options" require "active_support/core_ext/hash/keys" require "action_view/helpers/asset_url_helper" diff --git a/actionview/lib/action_view/helpers/asset_url_helper.rb b/actionview/lib/action_view/helpers/asset_url_helper.rb index 03bd1eb00899..f9f12fdba570 100644 --- a/actionview/lib/action_view/helpers/asset_url_helper.rb +++ b/actionview/lib/action_view/helpers/asset_url_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "zlib" module ActionView diff --git a/actionview/lib/action_view/helpers/atom_feed_helper.rb b/actionview/lib/action_view/helpers/atom_feed_helper.rb index 3538515aee74..a4ec1f938816 100644 --- a/actionview/lib/action_view/helpers/atom_feed_helper.rb +++ b/actionview/lib/action_view/helpers/atom_feed_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "set" module ActionView diff --git a/actionview/lib/action_view/helpers/cache_helper.rb b/actionview/lib/action_view/helpers/cache_helper.rb index b7c7324f31a5..101fe86e9f96 100644 --- a/actionview/lib/action_view/helpers/cache_helper.rb +++ b/actionview/lib/action_view/helpers/cache_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView # = Action View Cache Helper module Helpers diff --git a/actionview/lib/action_view/helpers/capture_helper.rb b/actionview/lib/action_view/helpers/capture_helper.rb index 719592b5c5dc..0865ac0a7e9c 100644 --- a/actionview/lib/action_view/helpers/capture_helper.rb +++ b/actionview/lib/action_view/helpers/capture_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/output_safety" module ActionView diff --git a/actionview/lib/action_view/helpers/controller_helper.rb b/actionview/lib/action_view/helpers/controller_helper.rb index e86cdca4e433..0991fc16e031 100644 --- a/actionview/lib/action_view/helpers/controller_helper.rb +++ b/actionview/lib/action_view/helpers/controller_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attr_internal" module ActionView diff --git a/actionview/lib/action_view/helpers/csrf_helper.rb b/actionview/lib/action_view/helpers/csrf_helper.rb index 2a15d2aa5a8a..f560445b83ff 100644 --- a/actionview/lib/action_view/helpers/csrf_helper.rb +++ b/actionview/lib/action_view/helpers/csrf_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView # = Action View CSRF Helper module Helpers diff --git a/actionview/lib/action_view/helpers/date_helper.rb b/actionview/lib/action_view/helpers/date_helper.rb index 3f43465aa4e6..2c30f88c3b1c 100644 --- a/actionview/lib/action_view/helpers/date_helper.rb +++ b/actionview/lib/action_view/helpers/date_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" require "action_view/helpers/tag_helper" require "active_support/core_ext/array/extract_options" diff --git a/actionview/lib/action_view/helpers/debug_helper.rb b/actionview/lib/action_view/helpers/debug_helper.rb index f61ca2c9c29f..26c97ab2bf4e 100644 --- a/actionview/lib/action_view/helpers/debug_helper.rb +++ b/actionview/lib/action_view/helpers/debug_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView # = Action View Debug Helper # diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index 4b2561e53d87..4a1e6ae9bd47 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cgi" require "action_view/helpers/date_helper" require "action_view/helpers/tag_helper" diff --git a/actionview/lib/action_view/helpers/form_options_helper.rb b/actionview/lib/action_view/helpers/form_options_helper.rb index 07d4310a4ed3..7d0fbce34e5c 100644 --- a/actionview/lib/action_view/helpers/form_options_helper.rb +++ b/actionview/lib/action_view/helpers/form_options_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cgi" require "erb" require "action_view/helpers/form_helper" diff --git a/actionview/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb index 9fc08b3837cf..8225fa1e3896 100644 --- a/actionview/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cgi" require "action_view/helpers/tag_helper" require "active_support/core_ext/string/output_safety" diff --git a/actionview/lib/action_view/helpers/javascript_helper.rb b/actionview/lib/action_view/helpers/javascript_helper.rb index 22e1e74ad651..2c93647534c0 100644 --- a/actionview/lib/action_view/helpers/javascript_helper.rb +++ b/actionview/lib/action_view/helpers/javascript_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/tag_helper" module ActionView diff --git a/actionview/lib/action_view/helpers/number_helper.rb b/actionview/lib/action_view/helpers/number_helper.rb index b6bc5f4f6fc7..e40041cb743b 100644 --- a/actionview/lib/action_view/helpers/number_helper.rb +++ b/actionview/lib/action_view/helpers/number_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/keys" require "active_support/core_ext/string/output_safety" require "active_support/number_helper" diff --git a/actionview/lib/action_view/helpers/output_safety_helper.rb b/actionview/lib/action_view/helpers/output_safety_helper.rb index 25defd12766a..71e586269862 100644 --- a/actionview/lib/action_view/helpers/output_safety_helper.rb +++ b/actionview/lib/action_view/helpers/output_safety_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/output_safety" module ActionView #:nodoc: diff --git a/actionview/lib/action_view/helpers/record_tag_helper.rb b/actionview/lib/action_view/helpers/record_tag_helper.rb index f7ee573035da..7aca005d4610 100644 --- a/actionview/lib/action_view/helpers/record_tag_helper.rb +++ b/actionview/lib/action_view/helpers/record_tag_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module RecordTagHelper diff --git a/actionview/lib/action_view/helpers/rendering_helper.rb b/actionview/lib/action_view/helpers/rendering_helper.rb index 7d7f2393ff64..ffb5627805bf 100644 --- a/actionview/lib/action_view/helpers/rendering_helper.rb +++ b/actionview/lib/action_view/helpers/rendering_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers # = Action View Rendering diff --git a/actionview/lib/action_view/helpers/sanitize_helper.rb b/actionview/lib/action_view/helpers/sanitize_helper.rb index 0abd5bc5dc60..b7757086c3fa 100644 --- a/actionview/lib/action_view/helpers/sanitize_helper.rb +++ b/actionview/lib/action_view/helpers/sanitize_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/try" require "rails-html-sanitizer" diff --git a/actionview/lib/action_view/helpers/tag_helper.rb b/actionview/lib/action_view/helpers/tag_helper.rb index 306b71c85e8a..a64d7e396ef4 100644 --- a/actionview/lib/action_view/helpers/tag_helper.rb +++ b/actionview/lib/action_view/helpers/tag_helper.rb @@ -1,4 +1,4 @@ -# frozen-string-literal: true +# frozen_string_literal: true require "active_support/core_ext/string/output_safety" require "set" diff --git a/actionview/lib/action_view/helpers/tags.rb b/actionview/lib/action_view/helpers/tags.rb index a4f6eb015049..ec0661789118 100644 --- a/actionview/lib/action_view/helpers/tags.rb +++ b/actionview/lib/action_view/helpers/tags.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags #:nodoc: diff --git a/actionview/lib/action_view/helpers/tags/base.rb b/actionview/lib/action_view/helpers/tags/base.rb index 0895533a6068..dec1c1f0706f 100644 --- a/actionview/lib/action_view/helpers/tags/base.rb +++ b/actionview/lib/action_view/helpers/tags/base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/check_box.rb b/actionview/lib/action_view/helpers/tags/check_box.rb index 02f87fc89fef..88da221eb24a 100644 --- a/actionview/lib/action_view/helpers/tags/check_box.rb +++ b/actionview/lib/action_view/helpers/tags/check_box.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/tags/checkable" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/checkable.rb b/actionview/lib/action_view/helpers/tags/checkable.rb index 052e9df662eb..a3638aa3fae0 100644 --- a/actionview/lib/action_view/helpers/tags/checkable.rb +++ b/actionview/lib/action_view/helpers/tags/checkable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb b/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb index e02b7bdb2e70..1e9f6a1cee6e 100644 --- a/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb +++ b/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/tags/collection_helpers" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/collection_helpers.rb b/actionview/lib/action_view/helpers/tags/collection_helpers.rb index 75d237eb35f3..7f0296e46650 100644 --- a/actionview/lib/action_view/helpers/tags/collection_helpers.rb +++ b/actionview/lib/action_view/helpers/tags/collection_helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb b/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb index f085a5fb7303..85648991d709 100644 --- a/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb +++ b/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/tags/collection_helpers" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/collection_select.rb b/actionview/lib/action_view/helpers/tags/collection_select.rb index 4365c714ebec..c6a81cf7956c 100644 --- a/actionview/lib/action_view/helpers/tags/collection_select.rb +++ b/actionview/lib/action_view/helpers/tags/collection_select.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/color_field.rb b/actionview/lib/action_view/helpers/tags/color_field.rb index b4bbe9274670..c133fcab77b9 100644 --- a/actionview/lib/action_view/helpers/tags/color_field.rb +++ b/actionview/lib/action_view/helpers/tags/color_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/date_field.rb b/actionview/lib/action_view/helpers/tags/date_field.rb index c22be0db29cc..2043a056898d 100644 --- a/actionview/lib/action_view/helpers/tags/date_field.rb +++ b/actionview/lib/action_view/helpers/tags/date_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/date_select.rb b/actionview/lib/action_view/helpers/tags/date_select.rb index 638c134debe4..fdfcad7e48c9 100644 --- a/actionview/lib/action_view/helpers/tags/date_select.rb +++ b/actionview/lib/action_view/helpers/tags/date_select.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/time/calculations" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/datetime_field.rb b/actionview/lib/action_view/helpers/tags/datetime_field.rb index b3940c7e4412..468660680677 100644 --- a/actionview/lib/action_view/helpers/tags/datetime_field.rb +++ b/actionview/lib/action_view/helpers/tags/datetime_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/datetime_local_field.rb b/actionview/lib/action_view/helpers/tags/datetime_local_field.rb index b4a74185d163..ba0c7fa5f7b5 100644 --- a/actionview/lib/action_view/helpers/tags/datetime_local_field.rb +++ b/actionview/lib/action_view/helpers/tags/datetime_local_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/datetime_select.rb b/actionview/lib/action_view/helpers/tags/datetime_select.rb index 563de1840e76..3a36e47714ff 100644 --- a/actionview/lib/action_view/helpers/tags/datetime_select.rb +++ b/actionview/lib/action_view/helpers/tags/datetime_select.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/email_field.rb b/actionview/lib/action_view/helpers/tags/email_field.rb index 7ce3ccb9bfcc..4ba0905cfbea 100644 --- a/actionview/lib/action_view/helpers/tags/email_field.rb +++ b/actionview/lib/action_view/helpers/tags/email_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/file_field.rb b/actionview/lib/action_view/helpers/tags/file_field.rb index 476b820d84da..201b7fffa586 100644 --- a/actionview/lib/action_view/helpers/tags/file_field.rb +++ b/actionview/lib/action_view/helpers/tags/file_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb b/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb index 20e312dd0f3f..1b3f993b32df 100644 --- a/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb +++ b/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/hidden_field.rb b/actionview/lib/action_view/helpers/tags/hidden_field.rb index c3757c246120..ca5cd395a2dd 100644 --- a/actionview/lib/action_view/helpers/tags/hidden_field.rb +++ b/actionview/lib/action_view/helpers/tags/hidden_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/label.rb b/actionview/lib/action_view/helpers/tags/label.rb index cab15ae2012d..9f8dac4bbdb5 100644 --- a/actionview/lib/action_view/helpers/tags/label.rb +++ b/actionview/lib/action_view/helpers/tags/label.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/month_field.rb b/actionview/lib/action_view/helpers/tags/month_field.rb index 4c0fb846eef3..ed74ca3f35bd 100644 --- a/actionview/lib/action_view/helpers/tags/month_field.rb +++ b/actionview/lib/action_view/helpers/tags/month_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/number_field.rb b/actionview/lib/action_view/helpers/tags/number_field.rb index 4f95b1b4dede..fc5adfeab18b 100644 --- a/actionview/lib/action_view/helpers/tags/number_field.rb +++ b/actionview/lib/action_view/helpers/tags/number_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/password_field.rb b/actionview/lib/action_view/helpers/tags/password_field.rb index 444ef65074e8..008df0f8174c 100644 --- a/actionview/lib/action_view/helpers/tags/password_field.rb +++ b/actionview/lib/action_view/helpers/tags/password_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/placeholderable.rb b/actionview/lib/action_view/helpers/tags/placeholderable.rb index cf7b117614d9..5ae57cdeefdd 100644 --- a/actionview/lib/action_view/helpers/tags/placeholderable.rb +++ b/actionview/lib/action_view/helpers/tags/placeholderable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/radio_button.rb b/actionview/lib/action_view/helpers/tags/radio_button.rb index 43dbd32083b2..538826f749c3 100644 --- a/actionview/lib/action_view/helpers/tags/radio_button.rb +++ b/actionview/lib/action_view/helpers/tags/radio_button.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/tags/checkable" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/range_field.rb b/actionview/lib/action_view/helpers/tags/range_field.rb index f98ae880437b..d7c11cc7a465 100644 --- a/actionview/lib/action_view/helpers/tags/range_field.rb +++ b/actionview/lib/action_view/helpers/tags/range_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/search_field.rb b/actionview/lib/action_view/helpers/tags/search_field.rb index a848aeabfabe..38304d8d73db 100644 --- a/actionview/lib/action_view/helpers/tags/search_field.rb +++ b/actionview/lib/action_view/helpers/tags/search_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/select.rb b/actionview/lib/action_view/helpers/tags/select.rb index 380f7a8c4ef0..8c166d630ff3 100644 --- a/actionview/lib/action_view/helpers/tags/select.rb +++ b/actionview/lib/action_view/helpers/tags/select.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/tel_field.rb b/actionview/lib/action_view/helpers/tags/tel_field.rb index 987bb9e67a34..c95127a71484 100644 --- a/actionview/lib/action_view/helpers/tags/tel_field.rb +++ b/actionview/lib/action_view/helpers/tags/tel_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/text_area.rb b/actionview/lib/action_view/helpers/tags/text_area.rb index 31e3a9e9b11a..6bf3c0c02ff2 100644 --- a/actionview/lib/action_view/helpers/tags/text_area.rb +++ b/actionview/lib/action_view/helpers/tags/text_area.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/tags/placeholderable" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/text_field.rb b/actionview/lib/action_view/helpers/tags/text_field.rb index 613cade7b315..48930770bec8 100644 --- a/actionview/lib/action_view/helpers/tags/text_field.rb +++ b/actionview/lib/action_view/helpers/tags/text_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/tags/placeholderable" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/time_field.rb b/actionview/lib/action_view/helpers/tags/time_field.rb index 0e90a3aed78b..8c3f08235912 100644 --- a/actionview/lib/action_view/helpers/tags/time_field.rb +++ b/actionview/lib/action_view/helpers/tags/time_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/time_select.rb b/actionview/lib/action_view/helpers/tags/time_select.rb index 0b06311d2552..d46728698f80 100644 --- a/actionview/lib/action_view/helpers/tags/time_select.rb +++ b/actionview/lib/action_view/helpers/tags/time_select.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/time_zone_select.rb b/actionview/lib/action_view/helpers/tags/time_zone_select.rb index 80d165ec7e9f..49e099d38a26 100644 --- a/actionview/lib/action_view/helpers/tags/time_zone_select.rb +++ b/actionview/lib/action_view/helpers/tags/time_zone_select.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/translator.rb b/actionview/lib/action_view/helpers/tags/translator.rb index ced835eaa8ce..0d3ac246895d 100644 --- a/actionview/lib/action_view/helpers/tags/translator.rb +++ b/actionview/lib/action_view/helpers/tags/translator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/url_field.rb b/actionview/lib/action_view/helpers/tags/url_field.rb index d76340178db9..4c474a579fea 100644 --- a/actionview/lib/action_view/helpers/tags/url_field.rb +++ b/actionview/lib/action_view/helpers/tags/url_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/week_field.rb b/actionview/lib/action_view/helpers/tags/week_field.rb index 835d1667d7e5..08c6fbb81d6e 100644 --- a/actionview/lib/action_view/helpers/tags/week_field.rb +++ b/actionview/lib/action_view/helpers/tags/week_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/text_helper.rb b/actionview/lib/action_view/helpers/text_helper.rb index bc922f9ce8bf..4fce229276f1 100644 --- a/actionview/lib/action_view/helpers/text_helper.rb +++ b/actionview/lib/action_view/helpers/text_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/filters" require "active_support/core_ext/array/extract_options" diff --git a/actionview/lib/action_view/helpers/translation_helper.rb b/actionview/lib/action_view/helpers/translation_helper.rb index cc928f2b7a6a..a1f8b6307c98 100644 --- a/actionview/lib/action_view/helpers/translation_helper.rb +++ b/actionview/lib/action_view/helpers/translation_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/tag_helper" require "active_support/core_ext/string/access" require "i18n/exceptions" diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb index b78c367921f5..6bdb8e90ff09 100644 --- a/actionview/lib/action_view/helpers/url_helper.rb +++ b/actionview/lib/action_view/helpers/url_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/javascript_helper" require "active_support/core_ext/array/access" require "active_support/core_ext/hash/keys" diff --git a/actionview/lib/action_view/layouts.rb b/actionview/lib/action_view/layouts.rb index ab8409e8d094..f5681668e513 100644 --- a/actionview/lib/action_view/layouts.rb +++ b/actionview/lib/action_view/layouts.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/rendering" require "active_support/core_ext/module/remove_method" diff --git a/actionview/lib/action_view/log_subscriber.rb b/actionview/lib/action_view/log_subscriber.rb index ab8ec0aa421c..dd8729adf76e 100644 --- a/actionview/lib/action_view/log_subscriber.rb +++ b/actionview/lib/action_view/log_subscriber.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/log_subscriber" module ActionView diff --git a/actionview/lib/action_view/lookup_context.rb b/actionview/lib/action_view/lookup_context.rb index b7dbb383694d..0220ac3a4283 100644 --- a/actionview/lib/action_view/lookup_context.rb +++ b/actionview/lib/action_view/lookup_context.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "concurrent/map" require "active_support/core_ext/module/remove_method" require "active_support/core_ext/module/attribute_accessors" diff --git a/actionview/lib/action_view/model_naming.rb b/actionview/lib/action_view/model_naming.rb index b6ed13424efd..5eab00cd1a01 100644 --- a/actionview/lib/action_view/model_naming.rb +++ b/actionview/lib/action_view/model_naming.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module ModelNaming #:nodoc: # Converts the given object to an ActiveModel compliant one. diff --git a/actionview/lib/action_view/path_set.rb b/actionview/lib/action_view/path_set.rb index 6688519ffd1c..0ac5778273fa 100644 --- a/actionview/lib/action_view/path_set.rb +++ b/actionview/lib/action_view/path_set.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView #:nodoc: # = Action View PathSet # diff --git a/actionview/lib/action_view/railtie.rb b/actionview/lib/action_view/railtie.rb index 61678933e922..3971dc0aed35 100644 --- a/actionview/lib/action_view/railtie.rb +++ b/actionview/lib/action_view/railtie.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view" require "rails" diff --git a/actionview/lib/action_view/record_identifier.rb b/actionview/lib/action_view/record_identifier.rb index 48bea315a984..885f93524895 100644 --- a/actionview/lib/action_view/record_identifier.rb +++ b/actionview/lib/action_view/record_identifier.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module" require "action_view/model_naming" diff --git a/actionview/lib/action_view/renderer/abstract_renderer.rb b/actionview/lib/action_view/renderer/abstract_renderer.rb index 0b315eb569ce..217b05b5f36d 100644 --- a/actionview/lib/action_view/renderer/abstract_renderer.rb +++ b/actionview/lib/action_view/renderer/abstract_renderer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView # This class defines the interface for a renderer. Each class that # subclasses +AbstractRenderer+ is used by the base +Renderer+ class to diff --git a/actionview/lib/action_view/renderer/partial_renderer.rb b/actionview/lib/action_view/renderer/partial_renderer.rb index 1f8f997a2da0..0bc414677f2a 100644 --- a/actionview/lib/action_view/renderer/partial_renderer.rb +++ b/actionview/lib/action_view/renderer/partial_renderer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "concurrent/map" require "action_view/renderer/partial_renderer/collection_caching" diff --git a/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb b/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb index 32663fb80d92..61cb6c90b9f2 100644 --- a/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb +++ b/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module CollectionCaching # :nodoc: extend ActiveSupport::Concern diff --git a/actionview/lib/action_view/renderer/renderer.rb b/actionview/lib/action_view/renderer/renderer.rb index bcdeb85d3024..07461d3e2ef0 100644 --- a/actionview/lib/action_view/renderer/renderer.rb +++ b/actionview/lib/action_view/renderer/renderer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView # This is the main entry point for rendering. It basically delegates # to other objects like TemplateRenderer and PartialRenderer which diff --git a/actionview/lib/action_view/renderer/streaming_template_renderer.rb b/actionview/lib/action_view/renderer/streaming_template_renderer.rb index 62ce98524396..40d7ce63a65b 100644 --- a/actionview/lib/action_view/renderer/streaming_template_renderer.rb +++ b/actionview/lib/action_view/renderer/streaming_template_renderer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "fiber" module ActionView diff --git a/actionview/lib/action_view/renderer/template_renderer.rb b/actionview/lib/action_view/renderer/template_renderer.rb index 54317199de36..1fe95a5f67f5 100644 --- a/actionview/lib/action_view/renderer/template_renderer.rb +++ b/actionview/lib/action_view/renderer/template_renderer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/try" module ActionView diff --git a/actionview/lib/action_view/rendering.rb b/actionview/lib/action_view/rendering.rb index cf18562c4520..29cdbf37cb25 100644 --- a/actionview/lib/action_view/rendering.rb +++ b/actionview/lib/action_view/rendering.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/view_paths" module ActionView diff --git a/actionview/lib/action_view/routing_url_for.rb b/actionview/lib/action_view/routing_url_for.rb index 687ba7c1b45f..3f6b59cf9889 100644 --- a/actionview/lib/action_view/routing_url_for.rb +++ b/actionview/lib/action_view/routing_url_for.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/routing/polymorphic_routes" module ActionView diff --git a/actionview/lib/action_view/tasks/cache_digests.rake b/actionview/lib/action_view/tasks/cache_digests.rake index d30b3f77975b..929bace6d40a 100644 --- a/actionview/lib/action_view/tasks/cache_digests.rake +++ b/actionview/lib/action_view/tasks/cache_digests.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true namespace :cache_digests do desc "Lookup nested dependencies for TEMPLATE (like messages/show or comments/_comment.html)" task nested_dependencies: :environment do diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb index b0e2f1e54ef7..ccd8af255982 100644 --- a/actionview/lib/action_view/template.rb +++ b/actionview/lib/action_view/template.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/try" require "active_support/core_ext/kernel/singleton_class" require "thread" diff --git a/actionview/lib/action_view/template/error.rb b/actionview/lib/action_view/template/error.rb index cc90477190fe..c2f13eb77cd1 100644 --- a/actionview/lib/action_view/template/error.rb +++ b/actionview/lib/action_view/template/error.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/enumerable" module ActionView diff --git a/actionview/lib/action_view/template/handlers.rb b/actionview/lib/action_view/template/handlers.rb index f4301f6f07ce..d5300ea659cd 100644 --- a/actionview/lib/action_view/template/handlers.rb +++ b/actionview/lib/action_view/template/handlers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView #:nodoc: # = Action View Template Handlers class Template diff --git a/actionview/lib/action_view/template/handlers/builder.rb b/actionview/lib/action_view/template/handlers/builder.rb index 67ad78133d28..f8f5b9670486 100644 --- a/actionview/lib/action_view/template/handlers/builder.rb +++ b/actionview/lib/action_view/template/handlers/builder.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Template::Handlers class Builder diff --git a/actionview/lib/action_view/template/handlers/erb.rb b/actionview/lib/action_view/template/handlers/erb.rb index 48c2e22a890c..fc2a901fa97e 100644 --- a/actionview/lib/action_view/template/handlers/erb.rb +++ b/actionview/lib/action_view/template/handlers/erb.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView class Template module Handlers diff --git a/actionview/lib/action_view/template/handlers/erb/deprecated_erubis.rb b/actionview/lib/action_view/template/handlers/erb/deprecated_erubis.rb index 427ea2006400..59d6018f9373 100644 --- a/actionview/lib/action_view/template/handlers/erb/deprecated_erubis.rb +++ b/actionview/lib/action_view/template/handlers/erb/deprecated_erubis.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ::ActiveSupport::Deprecation.warn("ActionView::Template::Handlers::Erubis is deprecated and will be removed from Rails 5.2. Switch to ActionView::Template::Handlers::ERB::Erubi instead.") module ActionView diff --git a/actionview/lib/action_view/template/handlers/erb/erubi.rb b/actionview/lib/action_view/template/handlers/erb/erubi.rb index 755cc8401583..85750d57ca95 100644 --- a/actionview/lib/action_view/template/handlers/erb/erubi.rb +++ b/actionview/lib/action_view/template/handlers/erb/erubi.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "erubi" module ActionView diff --git a/actionview/lib/action_view/template/handlers/erb/erubis.rb b/actionview/lib/action_view/template/handlers/erb/erubis.rb index f3c35e1aecc4..43a3731f8bd5 100644 --- a/actionview/lib/action_view/template/handlers/erb/erubis.rb +++ b/actionview/lib/action_view/template/handlers/erb/erubis.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true gem "erubis" require "erubis" diff --git a/actionview/lib/action_view/template/handlers/html.rb b/actionview/lib/action_view/template/handlers/html.rb index ccaa8d146995..215de5cfa2d4 100644 --- a/actionview/lib/action_view/template/handlers/html.rb +++ b/actionview/lib/action_view/template/handlers/html.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Template::Handlers class Html < Raw diff --git a/actionview/lib/action_view/template/handlers/raw.rb b/actionview/lib/action_view/template/handlers/raw.rb index e7519e94f9cb..6fc46aaa93da 100644 --- a/actionview/lib/action_view/template/handlers/raw.rb +++ b/actionview/lib/action_view/template/handlers/raw.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Template::Handlers class Raw diff --git a/actionview/lib/action_view/template/html.rb b/actionview/lib/action_view/template/html.rb index 0ffae10432a1..e2d2d05ec7f7 100644 --- a/actionview/lib/action_view/template/html.rb +++ b/actionview/lib/action_view/template/html.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView #:nodoc: # = Action View HTML Template class Template diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb index 75ea4d31f5b7..32d2db3e5767 100644 --- a/actionview/lib/action_view/template/resolver.rb +++ b/actionview/lib/action_view/template/resolver.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "pathname" require "active_support/core_ext/class" require "active_support/core_ext/module/attribute_accessors" diff --git a/actionview/lib/action_view/template/text.rb b/actionview/lib/action_view/template/text.rb index 380528d6ef03..8249b27aa09e 100644 --- a/actionview/lib/action_view/template/text.rb +++ b/actionview/lib/action_view/template/text.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView #:nodoc: # = Action View Text Template class Template diff --git a/actionview/lib/action_view/template/types.rb b/actionview/lib/action_view/template/types.rb index 21959a37982c..6f00fd0a3b24 100644 --- a/actionview/lib/action_view/template/types.rb +++ b/actionview/lib/action_view/template/types.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" module ActionView diff --git a/actionview/lib/action_view/test_case.rb b/actionview/lib/action_view/test_case.rb index 80403799ab7b..f149d66bf97b 100644 --- a/actionview/lib/action_view/test_case.rb +++ b/actionview/lib/action_view/test_case.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/remove_method" require "action_controller" require "action_controller/test_case" diff --git a/actionview/lib/action_view/testing/resolvers.rb b/actionview/lib/action_view/testing/resolvers.rb index 3188526b6386..4e7fe4306695 100644 --- a/actionview/lib/action_view/testing/resolvers.rb +++ b/actionview/lib/action_view/testing/resolvers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/template/resolver" module ActionView #:nodoc: diff --git a/actionview/lib/action_view/version.rb b/actionview/lib/action_view/version.rb index 315404864de1..3d4e517f9946 100644 --- a/actionview/lib/action_view/version.rb +++ b/actionview/lib/action_view/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "gem_version" module ActionView diff --git a/actionview/lib/action_view/view_paths.rb b/actionview/lib/action_view/view_paths.rb index 938f0fc17f2d..bbff56f88dc7 100644 --- a/actionview/lib/action_view/view_paths.rb +++ b/actionview/lib/action_view/view_paths.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module ViewPaths extend ActiveSupport::Concern diff --git a/actionview/test/abstract_unit.rb b/actionview/test/abstract_unit.rb index a7d706c5e160..da554b830c0c 100644 --- a/actionview/test/abstract_unit.rb +++ b/actionview/test/abstract_unit.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true $:.unshift File.expand_path("lib", __dir__) $:.unshift File.expand_path("fixtures/helpers", __dir__) $:.unshift File.expand_path("fixtures/alternate_helpers", __dir__) diff --git a/actionview/test/actionpack/abstract/abstract_controller_test.rb b/actionview/test/actionpack/abstract/abstract_controller_test.rb index 8f65a6149331..7714f97605ae 100644 --- a/actionview/test/actionpack/abstract/abstract_controller_test.rb +++ b/actionview/test/actionpack/abstract/abstract_controller_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "set" diff --git a/actionview/test/actionpack/abstract/helper_test.rb b/actionview/test/actionpack/abstract/helper_test.rb index 13922e448593..e3a16140577c 100644 --- a/actionview/test/actionpack/abstract/helper_test.rb +++ b/actionview/test/actionpack/abstract/helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" ActionController::Base.helpers_path = File.expand_path("../../fixtures/helpers", __dir__) diff --git a/actionview/test/actionpack/abstract/layouts_test.rb b/actionview/test/actionpack/abstract/layouts_test.rb index 4ece992597d2..e733dc43afac 100644 --- a/actionview/test/actionpack/abstract/layouts_test.rb +++ b/actionview/test/actionpack/abstract/layouts_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module AbstractControllerTests diff --git a/actionview/test/actionpack/abstract/render_test.rb b/actionview/test/actionpack/abstract/render_test.rb index 8b0c54fb77ea..017e9ed2ff61 100644 --- a/actionview/test/actionpack/abstract/render_test.rb +++ b/actionview/test/actionpack/abstract/render_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module AbstractController diff --git a/actionview/test/actionpack/controller/capture_test.rb b/actionview/test/actionpack/controller/capture_test.rb index cc3a23c60cc3..19167333aeb2 100644 --- a/actionview/test/actionpack/controller/capture_test.rb +++ b/actionview/test/actionpack/controller/capture_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/logger" diff --git a/actionview/test/actionpack/controller/layout_test.rb b/actionview/test/actionpack/controller/layout_test.rb index b3e0329f5781..8af653905675 100644 --- a/actionview/test/actionpack/controller/layout_test.rb +++ b/actionview/test/actionpack/controller/layout_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/array/extract_options" diff --git a/actionview/test/actionpack/controller/render_test.rb b/actionview/test/actionpack/controller/render_test.rb index 65281693122f..c7990f8d96c3 100644 --- a/actionview/test/actionpack/controller/render_test.rb +++ b/actionview/test/actionpack/controller/render_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_model" require "controller/fake_models" diff --git a/actionview/test/actionpack/controller/view_paths_test.rb b/actionview/test/actionpack/controller/view_paths_test.rb index 4c58b959a9a7..a0e9842dbf54 100644 --- a/actionview/test/actionpack/controller/view_paths_test.rb +++ b/actionview/test/actionpack/controller/view_paths_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ViewLoadPathsTest < ActionController::TestCase diff --git a/actionview/test/active_record_unit.rb b/actionview/test/active_record_unit.rb index 901c0e2b3e10..23d5d9814fc0 100644 --- a/actionview/test/active_record_unit.rb +++ b/actionview/test/active_record_unit.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" # Define the essentials diff --git a/actionview/test/activerecord/controller_runtime_test.rb b/actionview/test/activerecord/controller_runtime_test.rb index 1cec5072c031..176d9e6d8c49 100644 --- a/actionview/test/activerecord/controller_runtime_test.rb +++ b/actionview/test/activerecord/controller_runtime_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record_unit" require "active_record/railties/controller_runtime" require "fixtures/project" diff --git a/actionview/test/activerecord/debug_helper_test.rb b/actionview/test/activerecord/debug_helper_test.rb index 06ae555a035e..6ada7a3e4235 100644 --- a/actionview/test/activerecord/debug_helper_test.rb +++ b/actionview/test/activerecord/debug_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record_unit" require "nokogiri" diff --git a/actionview/test/activerecord/form_helper_activerecord_test.rb b/actionview/test/activerecord/form_helper_activerecord_test.rb index 3b314588c7c0..291568c672a7 100644 --- a/actionview/test/activerecord/form_helper_activerecord_test.rb +++ b/actionview/test/activerecord/form_helper_activerecord_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record_unit" require "fixtures/project" require "fixtures/developer" diff --git a/actionview/test/activerecord/polymorphic_routes_test.rb b/actionview/test/activerecord/polymorphic_routes_test.rb index b2e0fb08c427..2fd538fee04a 100644 --- a/actionview/test/activerecord/polymorphic_routes_test.rb +++ b/actionview/test/activerecord/polymorphic_routes_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record_unit" require "fixtures/project" diff --git a/actionview/test/activerecord/relation_cache_test.rb b/actionview/test/activerecord/relation_cache_test.rb index d12c426586e2..a6d8f2d278e5 100644 --- a/actionview/test/activerecord/relation_cache_test.rb +++ b/actionview/test/activerecord/relation_cache_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record_unit" class RelationCacheTest < ActionView::TestCase diff --git a/actionview/test/activerecord/render_partial_with_record_identification_test.rb b/actionview/test/activerecord/render_partial_with_record_identification_test.rb index 60c3ab3045b1..88e72599d49e 100644 --- a/actionview/test/activerecord/render_partial_with_record_identification_test.rb +++ b/actionview/test/activerecord/render_partial_with_record_identification_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record_unit" class RenderPartialWithRecordIdentificationController < ActionController::Base diff --git a/actionview/test/fixtures/actionpack/layouts/builder.builder b/actionview/test/fixtures/actionpack/layouts/builder.builder index c55488edd05c..0f34d03a4ce5 100644 --- a/actionview/test/fixtures/actionpack/layouts/builder.builder +++ b/actionview/test/fixtures/actionpack/layouts/builder.builder @@ -1,3 +1,4 @@ +# frozen_string_literal: true xml.wrapper do xml << yield end diff --git a/actionview/test/fixtures/actionpack/test/_hello.builder b/actionview/test/fixtures/actionpack/test/_hello.builder index fc72df16d036..a767060f3ced 100644 --- a/actionview/test/fixtures/actionpack/test/_hello.builder +++ b/actionview/test/fixtures/actionpack/test/_hello.builder @@ -1 +1,2 @@ +# frozen_string_literal: true xm.hello diff --git a/actionview/test/fixtures/actionpack/test/formatted_xml_erb.builder b/actionview/test/fixtures/actionpack/test/formatted_xml_erb.builder index f98aaa34a50f..568a2ddefe1d 100644 --- a/actionview/test/fixtures/actionpack/test/formatted_xml_erb.builder +++ b/actionview/test/fixtures/actionpack/test/formatted_xml_erb.builder @@ -1 +1,2 @@ +# frozen_string_literal: true xml.test "failed" diff --git a/actionview/test/fixtures/actionpack/test/hello.builder b/actionview/test/fixtures/actionpack/test/hello.builder index b8ab17ad5bc1..205ad8722f1e 100644 --- a/actionview/test/fixtures/actionpack/test/hello.builder +++ b/actionview/test/fixtures/actionpack/test/hello.builder @@ -1,3 +1,4 @@ +# frozen_string_literal: true xml.html do xml.p "Hello #{@name}" xml << render(file: "test/greeting") diff --git a/actionview/test/fixtures/actionpack/test/hello_world_container.builder b/actionview/test/fixtures/actionpack/test/hello_world_container.builder index 24032ab5e013..f0291694ee71 100644 --- a/actionview/test/fixtures/actionpack/test/hello_world_container.builder +++ b/actionview/test/fixtures/actionpack/test/hello_world_container.builder @@ -1,3 +1,4 @@ +# frozen_string_literal: true xml.test do render partial: "hello", locals: { xm: xml } end diff --git a/actionview/test/fixtures/actionpack/test/hello_world_from_rxml.builder b/actionview/test/fixtures/actionpack/test/hello_world_from_rxml.builder index 619a97ba96f9..2a87fd1a3da2 100644 --- a/actionview/test/fixtures/actionpack/test/hello_world_from_rxml.builder +++ b/actionview/test/fixtures/actionpack/test/hello_world_from_rxml.builder @@ -1,3 +1,4 @@ +# frozen_string_literal: true xml.html do xml.p "Hello" end diff --git a/actionview/test/fixtures/actionpack/test/hello_xml_world.builder b/actionview/test/fixtures/actionpack/test/hello_xml_world.builder index d16bb6b5cbd6..c496fb416023 100644 --- a/actionview/test/fixtures/actionpack/test/hello_xml_world.builder +++ b/actionview/test/fixtures/actionpack/test/hello_xml_world.builder @@ -1,3 +1,4 @@ +# frozen_string_literal: true xml.html do xml.head do xml.title "Hello World" diff --git a/actionview/test/fixtures/actionpack/test/implicit_content_type.atom.builder b/actionview/test/fixtures/actionpack/test/implicit_content_type.atom.builder index 2fcb32d2473a..bcb3c79f0b9b 100644 --- a/actionview/test/fixtures/actionpack/test/implicit_content_type.atom.builder +++ b/actionview/test/fixtures/actionpack/test/implicit_content_type.atom.builder @@ -1,2 +1,3 @@ +# frozen_string_literal: true xml.atom do end diff --git a/actionview/test/fixtures/actionpack/test/non_erb_block_content_for.builder b/actionview/test/fixtures/actionpack/test/non_erb_block_content_for.builder index cd65da751b34..4db7d66d902b 100644 --- a/actionview/test/fixtures/actionpack/test/non_erb_block_content_for.builder +++ b/actionview/test/fixtures/actionpack/test/non_erb_block_content_for.builder @@ -1,3 +1,4 @@ +# frozen_string_literal: true content_for :title do "Putting stuff in the title!" end diff --git a/actionview/test/fixtures/comments/empty.html.builder b/actionview/test/fixtures/comments/empty.html.builder index 12d6fdd9a5e1..ecc10787471c 100644 --- a/actionview/test/fixtures/comments/empty.html.builder +++ b/actionview/test/fixtures/comments/empty.html.builder @@ -1 +1,2 @@ +# frozen_string_literal: true xml.h1 "No Comment" diff --git a/actionview/test/fixtures/company.rb b/actionview/test/fixtures/company.rb index 9f527acdd897..18a197947a23 100644 --- a/actionview/test/fixtures/company.rb +++ b/actionview/test/fixtures/company.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Company < ActiveRecord::Base has_one :mascot self.sequence_name = :companies_nonstd_seq diff --git a/actionview/test/fixtures/developer.rb b/actionview/test/fixtures/developer.rb index 1a686a33ce78..59f5f17efe45 100644 --- a/actionview/test/fixtures/developer.rb +++ b/actionview/test/fixtures/developer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Developer < ActiveRecord::Base has_and_belongs_to_many :projects has_many :replies diff --git a/actionview/test/fixtures/helpers/abc_helper.rb b/actionview/test/fixtures/helpers/abc_helper.rb index cf2774bb5f48..a743c7ee9a4f 100644 --- a/actionview/test/fixtures/helpers/abc_helper.rb +++ b/actionview/test/fixtures/helpers/abc_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module AbcHelper def bare_a() end end diff --git a/actionview/test/fixtures/helpers/helpery_test_helper.rb b/actionview/test/fixtures/helpers/helpery_test_helper.rb index a4f2951efabc..af67fe1c5ce1 100644 --- a/actionview/test/fixtures/helpers/helpery_test_helper.rb +++ b/actionview/test/fixtures/helpers/helpery_test_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module HelperyTestHelper def helpery_test "Default" diff --git a/actionview/test/fixtures/helpers_missing/invalid_require_helper.rb b/actionview/test/fixtures/helpers_missing/invalid_require_helper.rb index 6ac6677daa0a..d1d66a71614b 100644 --- a/actionview/test/fixtures/helpers_missing/invalid_require_helper.rb +++ b/actionview/test/fixtures/helpers_missing/invalid_require_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "very_invalid_file_name" module InvalidRequireHelper diff --git a/actionview/test/fixtures/mascot.rb b/actionview/test/fixtures/mascot.rb index 1c0bd7c8fd52..212303b838d3 100644 --- a/actionview/test/fixtures/mascot.rb +++ b/actionview/test/fixtures/mascot.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Mascot < ActiveRecord::Base belongs_to :company end diff --git a/actionview/test/fixtures/project.rb b/actionview/test/fixtures/project.rb index 404b12cbab79..a9e4bb44d6d4 100644 --- a/actionview/test/fixtures/project.rb +++ b/actionview/test/fixtures/project.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Project < ActiveRecord::Base has_and_belongs_to_many :developers, -> { uniq } diff --git a/actionview/test/fixtures/reply.rb b/actionview/test/fixtures/reply.rb index 047522c55b4d..e9a7828d2d5d 100644 --- a/actionview/test/fixtures/reply.rb +++ b/actionview/test/fixtures/reply.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Reply < ActiveRecord::Base scope :base, -> { all } belongs_to :topic, -> { includes(:replies) } diff --git a/actionview/test/fixtures/ruby_template.ruby b/actionview/test/fixtures/ruby_template.ruby index 5097bce47c09..cae21339f523 100644 --- a/actionview/test/fixtures/ruby_template.ruby +++ b/actionview/test/fixtures/ruby_template.ruby @@ -1,2 +1,3 @@ +# frozen_string_literal: true body = "" body << ["Hello", "from", "Ruby", "code"].join(" ") diff --git a/actionview/test/fixtures/test/hello.builder b/actionview/test/fixtures/test/hello.builder index b8ab17ad5bc1..205ad8722f1e 100644 --- a/actionview/test/fixtures/test/hello.builder +++ b/actionview/test/fixtures/test/hello.builder @@ -1,3 +1,4 @@ +# frozen_string_literal: true xml.html do xml.p "Hello #{@name}" xml << render(file: "test/greeting") diff --git a/actionview/test/fixtures/topic.rb b/actionview/test/fixtures/topic.rb index 48a3dfba8882..7e66f53bd59e 100644 --- a/actionview/test/fixtures/topic.rb +++ b/actionview/test/fixtures/topic.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Topic < ActiveRecord::Base has_many :replies, dependent: :destroy end diff --git a/actionview/test/lib/controller/fake_models.rb b/actionview/test/lib/controller/fake_models.rb index 525010122035..c4199849974b 100644 --- a/actionview/test/lib/controller/fake_models.rb +++ b/actionview/test/lib/controller/fake_models.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_model" Customer = Struct.new(:name, :id) do diff --git a/actionview/test/template/active_model_helper_test.rb b/actionview/test/template/active_model_helper_test.rb index 6b63aa25a5ce..030c36b1b22c 100644 --- a/actionview/test/template/active_model_helper_test.rb +++ b/actionview/test/template/active_model_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ActiveModelHelperTest < ActionView::TestCase diff --git a/actionview/test/template/asset_tag_helper_test.rb b/actionview/test/template/asset_tag_helper_test.rb index 6093a4e66085..5bdcbda72e58 100644 --- a/actionview/test/template/asset_tag_helper_test.rb +++ b/actionview/test/template/asset_tag_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/ordered_options" diff --git a/actionview/test/template/atom_feed_helper_test.rb b/actionview/test/template/atom_feed_helper_test.rb index 7304b769a4f5..4a1188922c3c 100644 --- a/actionview/test/template/atom_feed_helper_test.rb +++ b/actionview/test/template/atom_feed_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" Scroll = Struct.new(:id, :to_param, :title, :body, :updated_at, :created_at) do diff --git a/actionview/test/template/capture_helper_test.rb b/actionview/test/template/capture_helper_test.rb index 7f37523eeba2..657fda405e71 100644 --- a/actionview/test/template/capture_helper_test.rb +++ b/actionview/test/template/capture_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class CaptureHelperTest < ActionView::TestCase diff --git a/actionview/test/template/compiled_templates_test.rb b/actionview/test/template/compiled_templates_test.rb index adb2be9be493..5135b1e90bf2 100644 --- a/actionview/test/template/compiled_templates_test.rb +++ b/actionview/test/template/compiled_templates_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class CompiledTemplatesTest < ActiveSupport::TestCase diff --git a/actionview/test/template/controller_helper_test.rb b/actionview/test/template/controller_helper_test.rb index 8dd0cedb7572..1b6f1b95c2c2 100644 --- a/actionview/test/template/controller_helper_test.rb +++ b/actionview/test/template/controller_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ControllerHelperTest < ActionView::TestCase diff --git a/actionview/test/template/date_helper_i18n_test.rb b/actionview/test/template/date_helper_i18n_test.rb index 207c8a683ece..eee434095899 100644 --- a/actionview/test/template/date_helper_i18n_test.rb +++ b/actionview/test/template/date_helper_i18n_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class DateHelperDistanceOfTimeInWordsI18nTests < ActiveSupport::TestCase diff --git a/actionview/test/template/date_helper_test.rb b/actionview/test/template/date_helper_test.rb index b66730331863..72573917fa22 100644 --- a/actionview/test/template/date_helper_test.rb +++ b/actionview/test/template/date_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class DateHelperTest < ActionView::TestCase diff --git a/actionview/test/template/dependency_tracker_test.rb b/actionview/test/template/dependency_tracker_test.rb index 89917035ff66..f3c1ab4fbf32 100644 --- a/actionview/test/template/dependency_tracker_test.rb +++ b/actionview/test/template/dependency_tracker_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_view/dependency_tracker" diff --git a/actionview/test/template/digestor_test.rb b/actionview/test/template/digestor_test.rb index de04f3f25d5e..b8cae0ab66eb 100644 --- a/actionview/test/template/digestor_test.rb +++ b/actionview/test/template/digestor_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "fileutils" require "action_view/dependency_tracker" diff --git a/actionview/test/template/erb/deprecated_erubis_implementation_test.rb b/actionview/test/template/erb/deprecated_erubis_implementation_test.rb index aaf99f85c021..511dbf800870 100644 --- a/actionview/test/template/erb/deprecated_erubis_implementation_test.rb +++ b/actionview/test/template/erb/deprecated_erubis_implementation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ERBTest diff --git a/actionview/test/template/erb/form_for_test.rb b/actionview/test/template/erb/form_for_test.rb index e722b40a9a97..e251083fc8f1 100644 --- a/actionview/test/template/erb/form_for_test.rb +++ b/actionview/test/template/erb/form_for_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "template/erb/helper" diff --git a/actionview/test/template/erb/helper.rb b/actionview/test/template/erb/helper.rb index bc1eedc15fb4..78fc0d429054 100644 --- a/actionview/test/template/erb/helper.rb +++ b/actionview/test/template/erb/helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ERBTest class ViewContext include ActionView::Helpers::UrlHelper diff --git a/actionview/test/template/erb/tag_helper_test.rb b/actionview/test/template/erb/tag_helper_test.rb index 233f37c48a27..65ded0aaf55f 100644 --- a/actionview/test/template/erb/tag_helper_test.rb +++ b/actionview/test/template/erb/tag_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "template/erb/helper" diff --git a/actionview/test/template/erb_util_test.rb b/actionview/test/template/erb_util_test.rb index 4412ea37faca..69d092b6c641 100644 --- a/actionview/test/template/erb_util_test.rb +++ b/actionview/test/template/erb_util_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/json" diff --git a/actionview/test/template/form_collections_helper_test.rb b/actionview/test/template/form_collections_helper_test.rb index 6160524eb38b..ddc2619e7a9f 100644 --- a/actionview/test/template/form_collections_helper_test.rb +++ b/actionview/test/template/form_collections_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" Category = Struct.new(:id, :name) diff --git a/actionview/test/template/form_helper/form_with_test.rb b/actionview/test/template/form_helper/form_with_test.rb index ecdd5ce67248..d62edf5dd994 100644 --- a/actionview/test/template/form_helper/form_with_test.rb +++ b/actionview/test/template/form_helper/form_with_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "controller/fake_models" diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb index b3a180b28ac9..8c06a6260fd5 100644 --- a/actionview/test/template/form_helper_test.rb +++ b/actionview/test/template/form_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "controller/fake_models" diff --git a/actionview/test/template/form_options_helper_i18n_test.rb b/actionview/test/template/form_options_helper_i18n_test.rb index a1048fbb894c..e23bd94307b3 100644 --- a/actionview/test/template/form_options_helper_i18n_test.rb +++ b/actionview/test/template/form_options_helper_i18n_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class FormOptionsHelperI18nTests < ActionView::TestCase diff --git a/actionview/test/template/form_options_helper_test.rb b/actionview/test/template/form_options_helper_test.rb index 3247f20ba711..faeb84faef23 100644 --- a/actionview/test/template/form_options_helper_test.rb +++ b/actionview/test/template/form_options_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class Map < Hash diff --git a/actionview/test/template/form_tag_helper_test.rb b/actionview/test/template/form_tag_helper_test.rb index 084c54013909..bbcb5237716e 100644 --- a/actionview/test/template/form_tag_helper_test.rb +++ b/actionview/test/template/form_tag_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class FormTagHelperTest < ActionView::TestCase diff --git a/actionview/test/template/html_test.rb b/actionview/test/template/html_test.rb index 60f4b0aee6de..17560287bc5d 100644 --- a/actionview/test/template/html_test.rb +++ b/actionview/test/template/html_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class HTMLTest < ActiveSupport::TestCase diff --git a/actionview/test/template/javascript_helper_test.rb b/actionview/test/template/javascript_helper_test.rb index c7670b056bf9..fef262511445 100644 --- a/actionview/test/template/javascript_helper_test.rb +++ b/actionview/test/template/javascript_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class JavaScriptHelperTest < ActionView::TestCase diff --git a/actionview/test/template/log_subscriber_test.rb b/actionview/test/template/log_subscriber_test.rb index 4c9f84f277f2..765f644bb403 100644 --- a/actionview/test/template/log_subscriber_test.rb +++ b/actionview/test/template/log_subscriber_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/log_subscriber/test_helper" require "action_view/log_subscriber" diff --git a/actionview/test/template/lookup_context_test.rb b/actionview/test/template/lookup_context_test.rb index b47d92df34bb..b55f68e36b53 100644 --- a/actionview/test/template/lookup_context_test.rb +++ b/actionview/test/template/lookup_context_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "abstract_controller/rendering" diff --git a/actionview/test/template/number_helper_test.rb b/actionview/test/template/number_helper_test.rb index 678120a9c951..9077dbb0c8c7 100644 --- a/actionview/test/template/number_helper_test.rb +++ b/actionview/test/template/number_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class NumberHelperTest < ActionView::TestCase diff --git a/actionview/test/template/output_safety_helper_test.rb b/actionview/test/template/output_safety_helper_test.rb index 537b4393eed0..3b4b83110ceb 100644 --- a/actionview/test/template/output_safety_helper_test.rb +++ b/actionview/test/template/output_safety_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class OutputSafetyHelperTest < ActionView::TestCase diff --git a/actionview/test/template/partial_iteration_test.rb b/actionview/test/template/partial_iteration_test.rb index 3ebf3b550ae3..3a31134e5b0d 100644 --- a/actionview/test/template/partial_iteration_test.rb +++ b/actionview/test/template/partial_iteration_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "action_view/renderer/partial_renderer" diff --git a/actionview/test/template/record_identifier_test.rb b/actionview/test/template/record_identifier_test.rb index ce446715fd76..529de9a57b50 100644 --- a/actionview/test/template/record_identifier_test.rb +++ b/actionview/test/template/record_identifier_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "controller/fake_models" diff --git a/actionview/test/template/record_tag_helper_test.rb b/actionview/test/template/record_tag_helper_test.rb index 3685230558db..ab110d831405 100644 --- a/actionview/test/template/record_tag_helper_test.rb +++ b/actionview/test/template/record_tag_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class RecordTagPost diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb index 99996070671d..3f7e671fafeb 100644 --- a/actionview/test/template/render_test.rb +++ b/actionview/test/template/render_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "controller/fake_models" diff --git a/actionview/test/template/resolver_cache_test.rb b/actionview/test/template/resolver_cache_test.rb index 0ecfccd3754a..b881618a1d9c 100644 --- a/actionview/test/template/resolver_cache_test.rb +++ b/actionview/test/template/resolver_cache_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ResolverCacheTest < ActiveSupport::TestCase diff --git a/actionview/test/template/resolver_patterns_test.rb b/actionview/test/template/resolver_patterns_test.rb index 8e21f4b82851..f5a28be4009b 100644 --- a/actionview/test/template/resolver_patterns_test.rb +++ b/actionview/test/template/resolver_patterns_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ResolverPatternsTest < ActiveSupport::TestCase diff --git a/actionview/test/template/sanitize_helper_test.rb b/actionview/test/template/sanitize_helper_test.rb index 4d4ed3c35c86..8ca8cb6d1785 100644 --- a/actionview/test/template/sanitize_helper_test.rb +++ b/actionview/test/template/sanitize_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" # The exhaustive tests are in the rails-html-sanitizer gem. diff --git a/actionview/test/template/streaming_render_test.rb b/actionview/test/template/streaming_render_test.rb index 6ce66a127596..098c2e755131 100644 --- a/actionview/test/template/streaming_render_test.rb +++ b/actionview/test/template/streaming_render_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class TestController < ActionController::Base diff --git a/actionview/test/template/tag_helper_test.rb b/actionview/test/template/tag_helper_test.rb index f1e5946e14a9..d338ff9d3f9c 100644 --- a/actionview/test/template/tag_helper_test.rb +++ b/actionview/test/template/tag_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class TagHelperTest < ActionView::TestCase diff --git a/actionview/test/template/template_error_test.rb b/actionview/test/template/template_error_test.rb index 54c1d53b60a0..a5201edfcf45 100644 --- a/actionview/test/template/template_error_test.rb +++ b/actionview/test/template/template_error_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class TemplateErrorTest < ActiveSupport::TestCase diff --git a/actionview/test/template/template_test.rb b/actionview/test/template/template_test.rb index 9d31a987038b..0420b2df1d17 100644 --- a/actionview/test/template/template_test.rb +++ b/actionview/test/template/template_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # encoding: US-ASCII require "abstract_unit" require "logger" diff --git a/actionview/test/template/test_case_test.rb b/actionview/test/template/test_case_test.rb index 3deddd57066a..4a8324b235da 100644 --- a/actionview/test/template/test_case_test.rb +++ b/actionview/test/template/test_case_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "rails/engine" diff --git a/actionview/test/template/test_test.rb b/actionview/test/template/test_test.rb index 52cac77bc59e..ecc7a9a5a189 100644 --- a/actionview/test/template/test_test.rb +++ b/actionview/test/template/test_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module PeopleHelper diff --git a/actionview/test/template/testing/fixture_resolver_test.rb b/actionview/test/template/testing/fixture_resolver_test.rb index effe453fc0d7..45b4e1b30982 100644 --- a/actionview/test/template/testing/fixture_resolver_test.rb +++ b/actionview/test/template/testing/fixture_resolver_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class FixtureResolverTest < ActiveSupport::TestCase diff --git a/actionview/test/template/testing/null_resolver_test.rb b/actionview/test/template/testing/null_resolver_test.rb index 5346fd3368c3..cc7a732d21de 100644 --- a/actionview/test/template/testing/null_resolver_test.rb +++ b/actionview/test/template/testing/null_resolver_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class NullResolverTest < ActiveSupport::TestCase diff --git a/actionview/test/template/text_helper_test.rb b/actionview/test/template/text_helper_test.rb index 251c98230f80..52f20b631b6e 100644 --- a/actionview/test/template/text_helper_test.rb +++ b/actionview/test/template/text_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class TextHelperTest < ActionView::TestCase diff --git a/actionview/test/template/text_test.rb b/actionview/test/template/text_test.rb index 72ffd5f3bec7..4eb571eaa78f 100644 --- a/actionview/test/template/text_test.rb +++ b/actionview/test/template/text_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class TextTest < ActiveSupport::TestCase diff --git a/actionview/test/template/translation_helper_test.rb b/actionview/test/template/translation_helper_test.rb index 1cfc13f3370e..f43e8b9a808f 100644 --- a/actionview/test/template/translation_helper_test.rb +++ b/actionview/test/template/translation_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module I18n diff --git a/actionview/test/template/url_helper_test.rb b/actionview/test/template/url_helper_test.rb index bdedbeba9243..c5790d29b3d2 100644 --- a/actionview/test/template/url_helper_test.rb +++ b/actionview/test/template/url_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class UrlHelperTest < ActiveSupport::TestCase diff --git a/actionview/test/ujs/config.ru b/actionview/test/ujs/config.ru index 213a41127af4..87f37efe8b59 100644 --- a/actionview/test/ujs/config.ru +++ b/actionview/test/ujs/config.ru @@ -1,3 +1,4 @@ +# frozen_string_literal: true $LOAD_PATH.unshift __dir__ require "server" diff --git a/actionview/test/ujs/server.rb b/actionview/test/ujs/server.rb index 7deb208af062..b31c6b896ad9 100644 --- a/actionview/test/ujs/server.rb +++ b/actionview/test/ujs/server.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rack" require "rails" require "action_controller/railtie" diff --git a/activejob/Rakefile b/activejob/Rakefile index dd03ab0b8f07..5d0d22e88b3b 100644 --- a/activejob/Rakefile +++ b/activejob/Rakefile @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rake/testtask" #TODO: add qu back to the list after it support Rails 5.1 diff --git a/activejob/activejob.gemspec b/activejob/activejob.gemspec index bdf23223d1ed..d3fe7b45e702 100644 --- a/activejob/activejob.gemspec +++ b/activejob/activejob.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/activejob/bin/test b/activejob/bin/test index 470ce93f103c..c53377cc970f 100755 --- a/activejob/bin/test +++ b/activejob/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/activejob/lib/active_job.rb b/activejob/lib/active_job.rb index 8b7aef65a264..c94903854ad0 100644 --- a/activejob/lib/active_job.rb +++ b/activejob/lib/active_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true #-- # Copyright (c) 2014-2017 David Heinemeier Hansson # diff --git a/activejob/lib/active_job/arguments.rb b/activejob/lib/active_job/arguments.rb index 523a0e7f336e..dde7d7afa609 100644 --- a/activejob/lib/active_job/arguments.rb +++ b/activejob/lib/active_job/arguments.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash" module ActiveJob diff --git a/activejob/lib/active_job/base.rb b/activejob/lib/active_job/base.rb index 18e8641e50a1..c4eec7ea78e9 100644 --- a/activejob/lib/active_job/base.rb +++ b/activejob/lib/active_job/base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_job/core" require "active_job/queue_adapter" require "active_job/queue_name" diff --git a/activejob/lib/active_job/callbacks.rb b/activejob/lib/active_job/callbacks.rb index 9aebc880a577..ab225a93d3d0 100644 --- a/activejob/lib/active_job/callbacks.rb +++ b/activejob/lib/active_job/callbacks.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/callbacks" module ActiveJob diff --git a/activejob/lib/active_job/configured_job.rb b/activejob/lib/active_job/configured_job.rb index 2ff31f2dae3c..79c197d53164 100644 --- a/activejob/lib/active_job/configured_job.rb +++ b/activejob/lib/active_job/configured_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveJob class ConfiguredJob #:nodoc: def initialize(job_class, options = {}) diff --git a/activejob/lib/active_job/core.rb b/activejob/lib/active_job/core.rb index e3e63f227ef0..7f1d4efc657e 100644 --- a/activejob/lib/active_job/core.rb +++ b/activejob/lib/active_job/core.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveJob # Provides general behavior that will be included into every Active Job # object that inherits from ActiveJob::Base. diff --git a/activejob/lib/active_job/enqueuing.rb b/activejob/lib/active_job/enqueuing.rb index c73117e7f305..d1dbc4539ebc 100644 --- a/activejob/lib/active_job/enqueuing.rb +++ b/activejob/lib/active_job/enqueuing.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_job/arguments" module ActiveJob diff --git a/activejob/lib/active_job/exceptions.rb b/activejob/lib/active_job/exceptions.rb index c1b5d35313d3..3a91cbc0b63c 100644 --- a/activejob/lib/active_job/exceptions.rb +++ b/activejob/lib/active_job/exceptions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/numeric/time" module ActiveJob diff --git a/activejob/lib/active_job/execution.rb b/activejob/lib/active_job/execution.rb index 94d30c8eaf05..ddffabe0ee18 100644 --- a/activejob/lib/active_job/execution.rb +++ b/activejob/lib/active_job/execution.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/rescuable" require "active_job/arguments" diff --git a/activejob/lib/active_job/gem_version.rb b/activejob/lib/active_job/gem_version.rb index bf81f37e81db..0e414f1b1182 100644 --- a/activejob/lib/active_job/gem_version.rb +++ b/activejob/lib/active_job/gem_version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveJob # Returns the version of the currently loaded Active Job as a Gem::Version def self.gem_version diff --git a/activejob/lib/active_job/logging.rb b/activejob/lib/active_job/logging.rb index ddc4915fd38a..8f8f4cb2441d 100644 --- a/activejob/lib/active_job/logging.rb +++ b/activejob/lib/active_job/logging.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/transform_values" require "active_support/core_ext/string/filters" require "active_support/tagged_logging" diff --git a/activejob/lib/active_job/queue_adapter.rb b/activejob/lib/active_job/queue_adapter.rb index b22d8b83476d..8f4d40de19c1 100644 --- a/activejob/lib/active_job/queue_adapter.rb +++ b/activejob/lib/active_job/queue_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/inflections" module ActiveJob diff --git a/activejob/lib/active_job/queue_adapters.rb b/activejob/lib/active_job/queue_adapters.rb index c8eedb6156bb..b89a62319af7 100644 --- a/activejob/lib/active_job/queue_adapters.rb +++ b/activejob/lib/active_job/queue_adapters.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveJob # == Active Job adapters # diff --git a/activejob/lib/active_job/queue_adapters/async_adapter.rb b/activejob/lib/active_job/queue_adapters/async_adapter.rb index e2bff9e646c5..d2fc686339f6 100644 --- a/activejob/lib/active_job/queue_adapters/async_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/async_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "securerandom" require "concurrent/scheduled_task" require "concurrent/executor/thread_pool_executor" diff --git a/activejob/lib/active_job/queue_adapters/backburner_adapter.rb b/activejob/lib/active_job/queue_adapters/backburner_adapter.rb index e3eccce62b5b..63519df5511f 100644 --- a/activejob/lib/active_job/queue_adapters/backburner_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/backburner_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "backburner" module ActiveJob diff --git a/activejob/lib/active_job/queue_adapters/delayed_job_adapter.rb b/activejob/lib/active_job/queue_adapters/delayed_job_adapter.rb index 83ad2e767dc3..54a5af2ae6f8 100644 --- a/activejob/lib/active_job/queue_adapters/delayed_job_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/delayed_job_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "delayed_job" module ActiveJob diff --git a/activejob/lib/active_job/queue_adapters/inline_adapter.rb b/activejob/lib/active_job/queue_adapters/inline_adapter.rb index 0496f8449ede..e793fff89d45 100644 --- a/activejob/lib/active_job/queue_adapters/inline_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/inline_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveJob module QueueAdapters # == Active Job Inline adapter diff --git a/activejob/lib/active_job/queue_adapters/qu_adapter.rb b/activejob/lib/active_job/queue_adapters/qu_adapter.rb index e8994533e431..9b2072f611bd 100644 --- a/activejob/lib/active_job/queue_adapters/qu_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/qu_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "qu" module ActiveJob diff --git a/activejob/lib/active_job/queue_adapters/que_adapter.rb b/activejob/lib/active_job/queue_adapters/que_adapter.rb index 0e698f0d79ef..e72899a1cbca 100644 --- a/activejob/lib/active_job/queue_adapters/que_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/que_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "que" module ActiveJob diff --git a/activejob/lib/active_job/queue_adapters/queue_classic_adapter.rb b/activejob/lib/active_job/queue_adapters/queue_classic_adapter.rb index 1115eb88ae98..53fb0d83b4fb 100644 --- a/activejob/lib/active_job/queue_adapters/queue_classic_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/queue_classic_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "queue_classic" module ActiveJob diff --git a/activejob/lib/active_job/queue_adapters/resque_adapter.rb b/activejob/lib/active_job/queue_adapters/resque_adapter.rb index 2df157ef89d5..f9cefd3c3341 100644 --- a/activejob/lib/active_job/queue_adapters/resque_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/resque_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "resque" require "active_support/core_ext/enumerable" require "active_support/core_ext/array/access" diff --git a/activejob/lib/active_job/queue_adapters/sidekiq_adapter.rb b/activejob/lib/active_job/queue_adapters/sidekiq_adapter.rb index 895cc1f9813f..35f399b0f061 100644 --- a/activejob/lib/active_job/queue_adapters/sidekiq_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/sidekiq_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "sidekiq" module ActiveJob diff --git a/activejob/lib/active_job/queue_adapters/sneakers_adapter.rb b/activejob/lib/active_job/queue_adapters/sneakers_adapter.rb index f00acfc04a1b..972ff5af0fdc 100644 --- a/activejob/lib/active_job/queue_adapters/sneakers_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/sneakers_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "sneakers" require "monitor" diff --git a/activejob/lib/active_job/queue_adapters/sucker_punch_adapter.rb b/activejob/lib/active_job/queue_adapters/sucker_punch_adapter.rb index dd59a798134c..2ba9372f4f47 100644 --- a/activejob/lib/active_job/queue_adapters/sucker_punch_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/sucker_punch_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "sucker_punch" module ActiveJob diff --git a/activejob/lib/active_job/queue_adapters/test_adapter.rb b/activejob/lib/active_job/queue_adapters/test_adapter.rb index 1b633b210ee4..5972b28156aa 100644 --- a/activejob/lib/active_job/queue_adapters/test_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/test_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveJob module QueueAdapters # == Test adapter for Active Job diff --git a/activejob/lib/active_job/queue_name.rb b/activejob/lib/active_job/queue_name.rb index 6f521a1c1a34..22ebd5e3fc53 100644 --- a/activejob/lib/active_job/queue_name.rb +++ b/activejob/lib/active_job/queue_name.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveJob module QueueName extend ActiveSupport::Concern diff --git a/activejob/lib/active_job/queue_priority.rb b/activejob/lib/active_job/queue_priority.rb index 399d7a135ab0..fd1c0f6286f0 100644 --- a/activejob/lib/active_job/queue_priority.rb +++ b/activejob/lib/active_job/queue_priority.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveJob module QueuePriority extend ActiveSupport::Concern diff --git a/activejob/lib/active_job/railtie.rb b/activejob/lib/active_job/railtie.rb index 4a8bf04d70ba..8adbd3473cb9 100644 --- a/activejob/lib/active_job/railtie.rb +++ b/activejob/lib/active_job/railtie.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "global_id/railtie" require "active_job" diff --git a/activejob/lib/active_job/test_case.rb b/activejob/lib/active_job/test_case.rb index a5ec45e4a7b9..028ff552bf08 100644 --- a/activejob/lib/active_job/test_case.rb +++ b/activejob/lib/active_job/test_case.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/test_case" module ActiveJob diff --git a/activejob/lib/active_job/test_helper.rb b/activejob/lib/active_job/test_helper.rb index a61e4f59a561..60ca1b5f1bf0 100644 --- a/activejob/lib/active_job/test_helper.rb +++ b/activejob/lib/active_job/test_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/class/subclasses" require "active_support/core_ext/hash/keys" diff --git a/activejob/lib/active_job/translation.rb b/activejob/lib/active_job/translation.rb index 67e4cf4ab971..71c4cb24afe2 100644 --- a/activejob/lib/active_job/translation.rb +++ b/activejob/lib/active_job/translation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveJob module Translation #:nodoc: extend ActiveSupport::Concern diff --git a/activejob/lib/active_job/version.rb b/activejob/lib/active_job/version.rb index 60b463817f2b..afff4271d45f 100644 --- a/activejob/lib/active_job/version.rb +++ b/activejob/lib/active_job/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "gem_version" module ActiveJob diff --git a/activejob/lib/rails/generators/job/job_generator.rb b/activejob/lib/rails/generators/job/job_generator.rb index 474f181f652d..dce4e3a3fec9 100644 --- a/activejob/lib/rails/generators/job/job_generator.rb +++ b/activejob/lib/rails/generators/job/job_generator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rails/generators/named_base" module Rails # :nodoc: diff --git a/activejob/test/adapters/async.rb b/activejob/test/adapters/async.rb index 08eb9658cd7e..d5a61d768482 100644 --- a/activejob/test/adapters/async.rb +++ b/activejob/test/adapters/async.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true ActiveJob::Base.queue_adapter = :async ActiveJob::Base.queue_adapter.immediate = true diff --git a/activejob/test/adapters/backburner.rb b/activejob/test/adapters/backburner.rb index 17ba07b80203..cfc97432f2c9 100644 --- a/activejob/test/adapters/backburner.rb +++ b/activejob/test/adapters/backburner.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "support/backburner/inline" ActiveJob::Base.queue_adapter = :backburner diff --git a/activejob/test/adapters/delayed_job.rb b/activejob/test/adapters/delayed_job.rb index 98e41c0c36c7..3aa646555aae 100644 --- a/activejob/test/adapters/delayed_job.rb +++ b/activejob/test/adapters/delayed_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ActiveJob::Base.queue_adapter = :delayed_job $LOAD_PATH << File.expand_path("../support/delayed_job", __dir__) diff --git a/activejob/test/adapters/inline.rb b/activejob/test/adapters/inline.rb index 24113dfa5a0e..ec3f0940e61a 100644 --- a/activejob/test/adapters/inline.rb +++ b/activejob/test/adapters/inline.rb @@ -1 +1,2 @@ +# frozen_string_literal: true ActiveJob::Base.queue_adapter = :inline diff --git a/activejob/test/adapters/qu.rb b/activejob/test/adapters/qu.rb index b89c50409199..f8e7eb624dd2 100644 --- a/activejob/test/adapters/qu.rb +++ b/activejob/test/adapters/qu.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "qu-immediate" ActiveJob::Base.queue_adapter = :qu diff --git a/activejob/test/adapters/que.rb b/activejob/test/adapters/que.rb index 0c49274a4e62..0d27bb8fc91b 100644 --- a/activejob/test/adapters/que.rb +++ b/activejob/test/adapters/que.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "support/que/inline" ActiveJob::Base.queue_adapter = :que diff --git a/activejob/test/adapters/queue_classic.rb b/activejob/test/adapters/queue_classic.rb index e301a7ca96c5..f57057c914bc 100644 --- a/activejob/test/adapters/queue_classic.rb +++ b/activejob/test/adapters/queue_classic.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true require "support/queue_classic/inline" ActiveJob::Base.queue_adapter = :queue_classic diff --git a/activejob/test/adapters/resque.rb b/activejob/test/adapters/resque.rb index af7080358d3c..6c732c1e3308 100644 --- a/activejob/test/adapters/resque.rb +++ b/activejob/test/adapters/resque.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true ActiveJob::Base.queue_adapter = :resque Resque.inline = true diff --git a/activejob/test/adapters/sidekiq.rb b/activejob/test/adapters/sidekiq.rb index 8036331ef1e7..6cc64e768465 100644 --- a/activejob/test/adapters/sidekiq.rb +++ b/activejob/test/adapters/sidekiq.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true require "sidekiq/testing/inline" ActiveJob::Base.queue_adapter = :sidekiq diff --git a/activejob/test/adapters/sneakers.rb b/activejob/test/adapters/sneakers.rb index 159c0d1906ad..85f6b74144df 100644 --- a/activejob/test/adapters/sneakers.rb +++ b/activejob/test/adapters/sneakers.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true require "support/sneakers/inline" ActiveJob::Base.queue_adapter = :sneakers diff --git a/activejob/test/adapters/sucker_punch.rb b/activejob/test/adapters/sucker_punch.rb index 5661b6ee9268..45b5fa1db23f 100644 --- a/activejob/test/adapters/sucker_punch.rb +++ b/activejob/test/adapters/sucker_punch.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true require "sucker_punch/testing/inline" ActiveJob::Base.queue_adapter = :sucker_punch diff --git a/activejob/test/adapters/test.rb b/activejob/test/adapters/test.rb index 7180b38a57dc..965f7e91a2a4 100644 --- a/activejob/test/adapters/test.rb +++ b/activejob/test/adapters/test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ActiveJob::Base.queue_adapter = :test ActiveJob::Base.queue_adapter.perform_enqueued_jobs = true ActiveJob::Base.queue_adapter.perform_enqueued_at_jobs = true diff --git a/activejob/test/cases/adapter_test.rb b/activejob/test/cases/adapter_test.rb index caf5d44a5e8e..764ce3ccbc98 100644 --- a/activejob/test/cases/adapter_test.rb +++ b/activejob/test/cases/adapter_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "helper" class AdapterTest < ActiveSupport::TestCase diff --git a/activejob/test/cases/argument_serialization_test.rb b/activejob/test/cases/argument_serialization_test.rb index 7934d8e55640..ebd9a4fe41d0 100644 --- a/activejob/test/cases/argument_serialization_test.rb +++ b/activejob/test/cases/argument_serialization_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "helper" require "active_job/arguments" require "models/person" diff --git a/activejob/test/cases/callbacks_test.rb b/activejob/test/cases/callbacks_test.rb index 8d1c9c3058e9..fbca367ae995 100644 --- a/activejob/test/cases/callbacks_test.rb +++ b/activejob/test/cases/callbacks_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "helper" require "jobs/callback_job" diff --git a/activejob/test/cases/exceptions_test.rb b/activejob/test/cases/exceptions_test.rb index dbe55f7430e7..5f56d47e8e48 100644 --- a/activejob/test/cases/exceptions_test.rb +++ b/activejob/test/cases/exceptions_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "helper" require "jobs/retry_job" diff --git a/activejob/test/cases/job_serialization_test.rb b/activejob/test/cases/job_serialization_test.rb index c737557ece72..fa8d98ddcacc 100644 --- a/activejob/test/cases/job_serialization_test.rb +++ b/activejob/test/cases/job_serialization_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "helper" require "jobs/gid_job" require "jobs/hello_job" diff --git a/activejob/test/cases/logging_test.rb b/activejob/test/cases/logging_test.rb index d5ca0f385c99..117d9b23a362 100644 --- a/activejob/test/cases/logging_test.rb +++ b/activejob/test/cases/logging_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "helper" require "active_support/log_subscriber/test_helper" require "active_support/core_ext/numeric/time" diff --git a/activejob/test/cases/queue_adapter_test.rb b/activejob/test/cases/queue_adapter_test.rb index 8368107bdf27..6061fb212742 100644 --- a/activejob/test/cases/queue_adapter_test.rb +++ b/activejob/test/cases/queue_adapter_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "helper" module ActiveJob diff --git a/activejob/test/cases/queue_naming_test.rb b/activejob/test/cases/queue_naming_test.rb index 0247bc111edf..8ba4324c46ff 100644 --- a/activejob/test/cases/queue_naming_test.rb +++ b/activejob/test/cases/queue_naming_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "helper" require "jobs/hello_job" require "jobs/logging_job" diff --git a/activejob/test/cases/queue_priority_test.rb b/activejob/test/cases/queue_priority_test.rb index 171fb1e5937d..416498c27021 100644 --- a/activejob/test/cases/queue_priority_test.rb +++ b/activejob/test/cases/queue_priority_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "helper" require "jobs/hello_job" diff --git a/activejob/test/cases/queuing_test.rb b/activejob/test/cases/queuing_test.rb index a3ecb15c31b5..44f674a2ee8b 100644 --- a/activejob/test/cases/queuing_test.rb +++ b/activejob/test/cases/queuing_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "helper" require "jobs/hello_job" require "active_support/core_ext/numeric/time" diff --git a/activejob/test/cases/rescue_test.rb b/activejob/test/cases/rescue_test.rb index afb1b488313c..c2a991cb2d93 100644 --- a/activejob/test/cases/rescue_test.rb +++ b/activejob/test/cases/rescue_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "helper" require "jobs/rescue_job" require "models/person" diff --git a/activejob/test/cases/test_case_test.rb b/activejob/test/cases/test_case_test.rb index 3db2d9dec78d..eb320a98d13c 100644 --- a/activejob/test/cases/test_case_test.rb +++ b/activejob/test/cases/test_case_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "helper" require "jobs/hello_job" require "jobs/logging_job" diff --git a/activejob/test/cases/test_helper_test.rb b/activejob/test/cases/test_helper_test.rb index 81e75b4374aa..0f8174663ed0 100644 --- a/activejob/test/cases/test_helper_test.rb +++ b/activejob/test/cases/test_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "helper" require "active_support/core_ext/time" require "active_support/core_ext/date" diff --git a/activejob/test/cases/translation_test.rb b/activejob/test/cases/translation_test.rb index 27bfd50985b9..d6782a38bd4f 100644 --- a/activejob/test/cases/translation_test.rb +++ b/activejob/test/cases/translation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "helper" require "jobs/translated_hello_job" diff --git a/activejob/test/helper.rb b/activejob/test/helper.rb index db07ecab7a0a..edcf159056e2 100644 --- a/activejob/test/helper.rb +++ b/activejob/test/helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_job" require "support/job_buffer" diff --git a/activejob/test/integration/queuing_test.rb b/activejob/test/integration/queuing_test.rb index 2669c52a1cb2..72c66d111fad 100644 --- a/activejob/test/integration/queuing_test.rb +++ b/activejob/test/integration/queuing_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "helper" require "jobs/logging_job" require "jobs/hello_job" diff --git a/activejob/test/jobs/application_job.rb b/activejob/test/jobs/application_job.rb index a009ace51ccf..32fe70b8e46b 100644 --- a/activejob/test/jobs/application_job.rb +++ b/activejob/test/jobs/application_job.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class ApplicationJob < ActiveJob::Base end diff --git a/activejob/test/jobs/callback_job.rb b/activejob/test/jobs/callback_job.rb index ca2a8e031a85..7c5b16143744 100644 --- a/activejob/test/jobs/callback_job.rb +++ b/activejob/test/jobs/callback_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CallbackJob < ActiveJob::Base before_perform ->(job) { job.history << "CallbackJob ran before_perform" } after_perform ->(job) { job.history << "CallbackJob ran after_perform" } diff --git a/activejob/test/jobs/gid_job.rb b/activejob/test/jobs/gid_job.rb index c7cfa6e7a2a0..c43e25a796b5 100644 --- a/activejob/test/jobs/gid_job.rb +++ b/activejob/test/jobs/gid_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "../support/job_buffer" class GidJob < ActiveJob::Base diff --git a/activejob/test/jobs/hello_job.rb b/activejob/test/jobs/hello_job.rb index 126fefae0002..79e1d6a6f4cd 100644 --- a/activejob/test/jobs/hello_job.rb +++ b/activejob/test/jobs/hello_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "../support/job_buffer" class HelloJob < ActiveJob::Base diff --git a/activejob/test/jobs/inherited_job.rb b/activejob/test/jobs/inherited_job.rb index 60fca66f88d4..58b658215478 100644 --- a/activejob/test/jobs/inherited_job.rb +++ b/activejob/test/jobs/inherited_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "application_job" class InheritedJob < ApplicationJob diff --git a/activejob/test/jobs/kwargs_job.rb b/activejob/test/jobs/kwargs_job.rb index 9f9d809673a7..ccd98115952b 100644 --- a/activejob/test/jobs/kwargs_job.rb +++ b/activejob/test/jobs/kwargs_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "../support/job_buffer" class KwargsJob < ActiveJob::Base diff --git a/activejob/test/jobs/logging_job.rb b/activejob/test/jobs/logging_job.rb index 119b32fa670b..1a47601fdecc 100644 --- a/activejob/test/jobs/logging_job.rb +++ b/activejob/test/jobs/logging_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class LoggingJob < ActiveJob::Base def perform(dummy) logger.info "Dummy, here is it: #{dummy}" diff --git a/activejob/test/jobs/nested_job.rb b/activejob/test/jobs/nested_job.rb index 21b7692cd150..891a2f952eb6 100644 --- a/activejob/test/jobs/nested_job.rb +++ b/activejob/test/jobs/nested_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class NestedJob < ActiveJob::Base def perform LoggingJob.perform_later "NestedJob" diff --git a/activejob/test/jobs/overridden_logging_job.rb b/activejob/test/jobs/overridden_logging_job.rb index 2b17a6514210..808d6e30e641 100644 --- a/activejob/test/jobs/overridden_logging_job.rb +++ b/activejob/test/jobs/overridden_logging_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class OverriddenLoggingJob < ActiveJob::Base def perform(dummy) logger.info "Dummy, here is it: #{dummy}" diff --git a/activejob/test/jobs/provider_jid_job.rb b/activejob/test/jobs/provider_jid_job.rb index 0c8ba040f552..71ed23e9bb0a 100644 --- a/activejob/test/jobs/provider_jid_job.rb +++ b/activejob/test/jobs/provider_jid_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "../support/job_buffer" class ProviderJidJob < ActiveJob::Base diff --git a/activejob/test/jobs/queue_adapter_job.rb b/activejob/test/jobs/queue_adapter_job.rb index 160dfd74ecd4..7058ab208783 100644 --- a/activejob/test/jobs/queue_adapter_job.rb +++ b/activejob/test/jobs/queue_adapter_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class QueueAdapterJob < ActiveJob::Base self.queue_adapter = :inline end diff --git a/activejob/test/jobs/queue_as_job.rb b/activejob/test/jobs/queue_as_job.rb index 7dc318e736ee..ab3075aa77d2 100644 --- a/activejob/test/jobs/queue_as_job.rb +++ b/activejob/test/jobs/queue_as_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "../support/job_buffer" class QueueAsJob < ActiveJob::Base diff --git a/activejob/test/jobs/rescue_job.rb b/activejob/test/jobs/rescue_job.rb index 62add4271abd..fd78820bfeeb 100644 --- a/activejob/test/jobs/rescue_job.rb +++ b/activejob/test/jobs/rescue_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "../support/job_buffer" class RescueJob < ActiveJob::Base diff --git a/activejob/test/jobs/retry_job.rb b/activejob/test/jobs/retry_job.rb index c02febc50cf7..b12129644148 100644 --- a/activejob/test/jobs/retry_job.rb +++ b/activejob/test/jobs/retry_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "../support/job_buffer" require "active_support/core_ext/integer/inflections" diff --git a/activejob/test/jobs/translated_hello_job.rb b/activejob/test/jobs/translated_hello_job.rb index 56e9f147b936..67ddca2f415d 100644 --- a/activejob/test/jobs/translated_hello_job.rb +++ b/activejob/test/jobs/translated_hello_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "../support/job_buffer" class TranslatedHelloJob < ActiveJob::Base diff --git a/activejob/test/models/person.rb b/activejob/test/models/person.rb index b5d68ad9c18c..bcd10187829c 100644 --- a/activejob/test/models/person.rb +++ b/activejob/test/models/person.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Person class RecordNotFound < StandardError; end diff --git a/activejob/test/support/backburner/inline.rb b/activejob/test/support/backburner/inline.rb index 9758332b6f4c..304f9c781c4d 100644 --- a/activejob/test/support/backburner/inline.rb +++ b/activejob/test/support/backburner/inline.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "backburner" Backburner::Worker.class_eval do diff --git a/activejob/test/support/delayed_job/delayed/backend/test.rb b/activejob/test/support/delayed_job/delayed/backend/test.rb index 68288c062b91..ed3b25204273 100644 --- a/activejob/test/support/delayed_job/delayed/backend/test.rb +++ b/activejob/test/support/delayed_job/delayed/backend/test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true #copied from https://github.com/collectiveidea/delayed_job/blob/master/spec/delayed/backend/test.rb require "ostruct" diff --git a/activejob/test/support/integration/adapters/async.rb b/activejob/test/support/integration/adapters/async.rb index 44ab98437aaf..19aea8472e46 100644 --- a/activejob/test/support/integration/adapters/async.rb +++ b/activejob/test/support/integration/adapters/async.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module AsyncJobsManager def setup ActiveJob::Base.queue_adapter = :async diff --git a/activejob/test/support/integration/adapters/backburner.rb b/activejob/test/support/integration/adapters/backburner.rb index 2e194933a171..fd1e7697c5bb 100644 --- a/activejob/test/support/integration/adapters/backburner.rb +++ b/activejob/test/support/integration/adapters/backburner.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module BackburnerJobsManager def setup ActiveJob::Base.queue_adapter = :backburner diff --git a/activejob/test/support/integration/adapters/delayed_job.rb b/activejob/test/support/integration/adapters/delayed_job.rb index 2adbbcd88fb2..73e1a04e451e 100644 --- a/activejob/test/support/integration/adapters/delayed_job.rb +++ b/activejob/test/support/integration/adapters/delayed_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "delayed_job" require "delayed_job_active_record" diff --git a/activejob/test/support/integration/adapters/inline.rb b/activejob/test/support/integration/adapters/inline.rb index e06b34c976f2..c669793dba9b 100644 --- a/activejob/test/support/integration/adapters/inline.rb +++ b/activejob/test/support/integration/adapters/inline.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module InlineJobsManager def setup ActiveJob::Base.queue_adapter = :inline diff --git a/activejob/test/support/integration/adapters/qu.rb b/activejob/test/support/integration/adapters/qu.rb index 71819f5a5593..b2f63d8f9498 100644 --- a/activejob/test/support/integration/adapters/qu.rb +++ b/activejob/test/support/integration/adapters/qu.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module QuJobsManager def setup require "qu-rails" diff --git a/activejob/test/support/integration/adapters/que.rb b/activejob/test/support/integration/adapters/que.rb index 20faee3427e6..cf1160d2bcd3 100644 --- a/activejob/test/support/integration/adapters/que.rb +++ b/activejob/test/support/integration/adapters/que.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module QueJobsManager def setup require "sequel" diff --git a/activejob/test/support/integration/adapters/queue_classic.rb b/activejob/test/support/integration/adapters/queue_classic.rb index 369693e947b0..7f1308c5d3d1 100644 --- a/activejob/test/support/integration/adapters/queue_classic.rb +++ b/activejob/test/support/integration/adapters/queue_classic.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module QueueClassicJobsManager def setup ENV["QC_DATABASE_URL"] ||= "postgres:///active_jobs_qc_int_test" diff --git a/activejob/test/support/integration/adapters/resque.rb b/activejob/test/support/integration/adapters/resque.rb index a21a1786c914..ef2dd75687b2 100644 --- a/activejob/test/support/integration/adapters/resque.rb +++ b/activejob/test/support/integration/adapters/resque.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ResqueJobsManager def setup ActiveJob::Base.queue_adapter = :resque diff --git a/activejob/test/support/integration/adapters/sidekiq.rb b/activejob/test/support/integration/adapters/sidekiq.rb index bbb575f6da55..8c90410e763c 100644 --- a/activejob/test/support/integration/adapters/sidekiq.rb +++ b/activejob/test/support/integration/adapters/sidekiq.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "sidekiq/api" require "sidekiq/testing" diff --git a/activejob/test/support/integration/adapters/sneakers.rb b/activejob/test/support/integration/adapters/sneakers.rb index 1c8dfaca5960..dc42501ff330 100644 --- a/activejob/test/support/integration/adapters/sneakers.rb +++ b/activejob/test/support/integration/adapters/sneakers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "sneakers/runner" require "sneakers/publisher" require "timeout" diff --git a/activejob/test/support/integration/adapters/sucker_punch.rb b/activejob/test/support/integration/adapters/sucker_punch.rb index 9c0d66b46990..e528f24261c1 100644 --- a/activejob/test/support/integration/adapters/sucker_punch.rb +++ b/activejob/test/support/integration/adapters/sucker_punch.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module SuckerPunchJobsManager def setup ActiveJob::Base.queue_adapter = :sucker_punch diff --git a/activejob/test/support/integration/dummy_app_template.rb b/activejob/test/support/integration/dummy_app_template.rb index 14fe3c9adc94..a054ecea0831 100644 --- a/activejob/test/support/integration/dummy_app_template.rb +++ b/activejob/test/support/integration/dummy_app_template.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true if ENV["AJ_ADAPTER"] == "delayed_job" generate "delayed_job:active_record", "--quiet" end diff --git a/activejob/test/support/integration/helper.rb b/activejob/test/support/integration/helper.rb index 545b62752eae..c0aa14c4c2bd 100644 --- a/activejob/test/support/integration/helper.rb +++ b/activejob/test/support/integration/helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true puts "\n\n*** rake aj:integration:#{ENV['AJ_ADAPTER']} ***\n" ENV["RAILS_ENV"] = "test" diff --git a/activejob/test/support/integration/jobs_manager.rb b/activejob/test/support/integration/jobs_manager.rb index 488756437bd3..1cfbd60dc468 100644 --- a/activejob/test/support/integration/jobs_manager.rb +++ b/activejob/test/support/integration/jobs_manager.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class JobsManager @@managers = {} attr :adapter_name diff --git a/activejob/test/support/integration/test_case_helpers.rb b/activejob/test/support/integration/test_case_helpers.rb index 41bf9c89d1ed..add719187c21 100644 --- a/activejob/test/support/integration/test_case_helpers.rb +++ b/activejob/test/support/integration/test_case_helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/inflections" require "support/integration/jobs_manager" diff --git a/activejob/test/support/job_buffer.rb b/activejob/test/support/job_buffer.rb index 620cb5288d83..3146d06d54bd 100644 --- a/activejob/test/support/job_buffer.rb +++ b/activejob/test/support/job_buffer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module JobBuffer class << self def clear diff --git a/activejob/test/support/que/inline.rb b/activejob/test/support/que/inline.rb index 55eb0d01ef62..e204f8154a9b 100644 --- a/activejob/test/support/que/inline.rb +++ b/activejob/test/support/que/inline.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "que" Que::Job.class_eval do diff --git a/activejob/test/support/queue_classic/inline.rb b/activejob/test/support/queue_classic/inline.rb index dcd834eccef4..955469e5a8ea 100644 --- a/activejob/test/support/queue_classic/inline.rb +++ b/activejob/test/support/queue_classic/inline.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "queue_classic" module QC diff --git a/activejob/test/support/sneakers/inline.rb b/activejob/test/support/sneakers/inline.rb index cf102ae5c20d..46882870d58b 100644 --- a/activejob/test/support/sneakers/inline.rb +++ b/activejob/test/support/sneakers/inline.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "sneakers" module Sneakers diff --git a/activemodel/Rakefile b/activemodel/Rakefile index d60f6d999741..8027b46d541f 100644 --- a/activemodel/Rakefile +++ b/activemodel/Rakefile @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rake/testtask" task default: :test diff --git a/activemodel/activemodel.gemspec b/activemodel/activemodel.gemspec index 18a35678f170..9ea67960810f 100644 --- a/activemodel/activemodel.gemspec +++ b/activemodel/activemodel.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/activemodel/bin/test b/activemodel/bin/test index 470ce93f103c..c53377cc970f 100755 --- a/activemodel/bin/test +++ b/activemodel/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/activemodel/lib/active_model.rb b/activemodel/lib/active_model.rb index a2892e9ea9fe..1f090bad177d 100644 --- a/activemodel/lib/active_model.rb +++ b/activemodel/lib/active_model.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true #-- # Copyright (c) 2004-2017 David Heinemeier Hansson # diff --git a/activemodel/lib/active_model/attribute_methods.rb b/activemodel/lib/active_model/attribute_methods.rb index b3b39bf7ae78..c87fd64a1045 100644 --- a/activemodel/lib/active_model/attribute_methods.rb +++ b/activemodel/lib/active_model/attribute_methods.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "concurrent/map" require "mutex_m" diff --git a/activemodel/lib/active_model/callbacks.rb b/activemodel/lib/active_model/callbacks.rb index 835e6f771617..3bc2fed7cf32 100644 --- a/activemodel/lib/active_model/callbacks.rb +++ b/activemodel/lib/active_model/callbacks.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array/extract_options" module ActiveModel diff --git a/activemodel/lib/active_model/conversion.rb b/activemodel/lib/active_model/conversion.rb index 12687c70d314..fc0c499f1463 100644 --- a/activemodel/lib/active_model/conversion.rb +++ b/activemodel/lib/active_model/conversion.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel # == Active \Model \Conversion # diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb index dc81f7477960..4dfa31222393 100644 --- a/activemodel/lib/active_model/dirty.rb +++ b/activemodel/lib/active_model/dirty.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/hash_with_indifferent_access" require "active_support/core_ext/object/duplicable" diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb index 942b4fa9bb6b..52e1a46bfc97 100644 --- a/activemodel/lib/active_model/errors.rb +++ b/activemodel/lib/active_model/errors.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array/conversions" require "active_support/core_ext/string/inflections" require "active_support/core_ext/object/deep_dup" diff --git a/activemodel/lib/active_model/forbidden_attributes_protection.rb b/activemodel/lib/active_model/forbidden_attributes_protection.rb index 45ab8a2ca114..37a16863d7c4 100644 --- a/activemodel/lib/active_model/forbidden_attributes_protection.rb +++ b/activemodel/lib/active_model/forbidden_attributes_protection.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel # Raised when forbidden attributes are used for mass assignment. # diff --git a/activemodel/lib/active_model/gem_version.rb b/activemodel/lib/active_model/gem_version.rb index 67bdfaa64379..e257b0de7172 100644 --- a/activemodel/lib/active_model/gem_version.rb +++ b/activemodel/lib/active_model/gem_version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel # Returns the version of the currently loaded \Active \Model as a Gem::Version def self.gem_version diff --git a/activemodel/lib/active_model/lint.rb b/activemodel/lib/active_model/lint.rb index 291a54552879..4120d769c9dc 100644 --- a/activemodel/lib/active_model/lint.rb +++ b/activemodel/lib/active_model/lint.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Lint # == Active \Model \Lint \Tests diff --git a/activemodel/lib/active_model/model.rb b/activemodel/lib/active_model/model.rb index 945a5402a3e9..234e479b35e9 100644 --- a/activemodel/lib/active_model/model.rb +++ b/activemodel/lib/active_model/model.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel # == Active \Model \Basic \Model # diff --git a/activemodel/lib/active_model/naming.rb b/activemodel/lib/active_model/naming.rb index 9ac56526a2d5..b32c90884ed5 100644 --- a/activemodel/lib/active_model/naming.rb +++ b/activemodel/lib/active_model/naming.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/except" require "active_support/core_ext/module/introspection" require "active_support/core_ext/module/remove_method" diff --git a/activemodel/lib/active_model/railtie.rb b/activemodel/lib/active_model/railtie.rb index 1671eb7bd4b3..f7666d201a1d 100644 --- a/activemodel/lib/active_model/railtie.rb +++ b/activemodel/lib/active_model/railtie.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_model" require "rails" diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb index 1c0fe92bc0ec..d1dc833f839a 100644 --- a/activemodel/lib/active_model/secure_password.rb +++ b/activemodel/lib/active_model/secure_password.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module SecurePassword extend ActiveSupport::Concern diff --git a/activemodel/lib/active_model/serialization.rb b/activemodel/lib/active_model/serialization.rb index 77834f26fc16..3151c46828d9 100644 --- a/activemodel/lib/active_model/serialization.rb +++ b/activemodel/lib/active_model/serialization.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/except" require "active_support/core_ext/hash/slice" diff --git a/activemodel/lib/active_model/serializers/json.rb b/activemodel/lib/active_model/serializers/json.rb index 205b84ddb4df..3d453cd829a3 100644 --- a/activemodel/lib/active_model/serializers/json.rb +++ b/activemodel/lib/active_model/serializers/json.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/json" module ActiveModel diff --git a/activemodel/lib/active_model/translation.rb b/activemodel/lib/active_model/translation.rb index 35fc7cf743a8..7d8fe1717c9b 100644 --- a/activemodel/lib/active_model/translation.rb +++ b/activemodel/lib/active_model/translation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel # == Active \Model \Translation # diff --git a/activemodel/lib/active_model/type.rb b/activemodel/lib/active_model/type.rb index 095801d8f092..3d8c0a00cef0 100644 --- a/activemodel/lib/active_model/type.rb +++ b/activemodel/lib/active_model/type.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_model/type/helpers" require "active_model/type/value" diff --git a/activemodel/lib/active_model/type/big_integer.rb b/activemodel/lib/active_model/type/big_integer.rb index 3b629682fe9b..90734cb2fa24 100644 --- a/activemodel/lib/active_model/type/big_integer.rb +++ b/activemodel/lib/active_model/type/big_integer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_model/type/integer" module ActiveModel diff --git a/activemodel/lib/active_model/type/binary.rb b/activemodel/lib/active_model/type/binary.rb index 819e4e4a96b9..37da9deb436a 100644 --- a/activemodel/lib/active_model/type/binary.rb +++ b/activemodel/lib/active_model/type/binary.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Type class Binary < Value # :nodoc: diff --git a/activemodel/lib/active_model/type/boolean.rb b/activemodel/lib/active_model/type/boolean.rb index f2a47370a31a..120aca8c6ab6 100644 --- a/activemodel/lib/active_model/type/boolean.rb +++ b/activemodel/lib/active_model/type/boolean.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Type # == Active \Model \Type \Boolean diff --git a/activemodel/lib/active_model/type/date.rb b/activemodel/lib/active_model/type/date.rb index eefd080351df..e17fe1047a22 100644 --- a/activemodel/lib/active_model/type/date.rb +++ b/activemodel/lib/active_model/type/date.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Type class Date < Value # :nodoc: diff --git a/activemodel/lib/active_model/type/date_time.rb b/activemodel/lib/active_model/type/date_time.rb index 5cb0077e4525..325ab1337577 100644 --- a/activemodel/lib/active_model/type/date_time.rb +++ b/activemodel/lib/active_model/type/date_time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Type class DateTime < Value # :nodoc: diff --git a/activemodel/lib/active_model/type/decimal.rb b/activemodel/lib/active_model/type/decimal.rb index e6805c5f6bff..388d41e7ff12 100644 --- a/activemodel/lib/active_model/type/decimal.rb +++ b/activemodel/lib/active_model/type/decimal.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "bigdecimal/util" module ActiveModel diff --git a/activemodel/lib/active_model/type/float.rb b/activemodel/lib/active_model/type/float.rb index 4d0d2771a030..00cef09ccab5 100644 --- a/activemodel/lib/active_model/type/float.rb +++ b/activemodel/lib/active_model/type/float.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Type class Float < Value # :nodoc: diff --git a/activemodel/lib/active_model/type/helpers.rb b/activemodel/lib/active_model/type/helpers.rb index 82cd9ebe9841..3d039b753089 100644 --- a/activemodel/lib/active_model/type/helpers.rb +++ b/activemodel/lib/active_model/type/helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_model/type/helpers/accepts_multiparameter_time" require "active_model/type/helpers/numeric" require "active_model/type/helpers/mutable" diff --git a/activemodel/lib/active_model/type/helpers/accepts_multiparameter_time.rb b/activemodel/lib/active_model/type/helpers/accepts_multiparameter_time.rb index f783d286c53d..69405f8e0a09 100644 --- a/activemodel/lib/active_model/type/helpers/accepts_multiparameter_time.rb +++ b/activemodel/lib/active_model/type/helpers/accepts_multiparameter_time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Type module Helpers # :nodoc: all diff --git a/activemodel/lib/active_model/type/helpers/mutable.rb b/activemodel/lib/active_model/type/helpers/mutable.rb index f3a17a169835..61569f1e7b50 100644 --- a/activemodel/lib/active_model/type/helpers/mutable.rb +++ b/activemodel/lib/active_model/type/helpers/mutable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Type module Helpers # :nodoc: all diff --git a/activemodel/lib/active_model/type/helpers/numeric.rb b/activemodel/lib/active_model/type/helpers/numeric.rb index 275822b738e0..363115632f12 100644 --- a/activemodel/lib/active_model/type/helpers/numeric.rb +++ b/activemodel/lib/active_model/type/helpers/numeric.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Type module Helpers # :nodoc: all diff --git a/activemodel/lib/active_model/type/helpers/time_value.rb b/activemodel/lib/active_model/type/helpers/time_value.rb index 53cf7c6029df..c99addc64275 100644 --- a/activemodel/lib/active_model/type/helpers/time_value.rb +++ b/activemodel/lib/active_model/type/helpers/time_value.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/time/zones" module ActiveModel diff --git a/activemodel/lib/active_model/type/immutable_string.rb b/activemodel/lib/active_model/type/immutable_string.rb index 58268540e5a4..06abd8a13fe6 100644 --- a/activemodel/lib/active_model/type/immutable_string.rb +++ b/activemodel/lib/active_model/type/immutable_string.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Type class ImmutableString < Value # :nodoc: diff --git a/activemodel/lib/active_model/type/integer.rb b/activemodel/lib/active_model/type/integer.rb index 106b5d966c70..0cd0e7f37105 100644 --- a/activemodel/lib/active_model/type/integer.rb +++ b/activemodel/lib/active_model/type/integer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Type class Integer < Value # :nodoc: diff --git a/activemodel/lib/active_model/type/registry.rb b/activemodel/lib/active_model/type/registry.rb index 2d5dd366eb18..15732d1bbdaa 100644 --- a/activemodel/lib/active_model/type/registry.rb +++ b/activemodel/lib/active_model/type/registry.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel # :stopdoc: module Type diff --git a/activemodel/lib/active_model/type/string.rb b/activemodel/lib/active_model/type/string.rb index 850cab962b5e..d6e330bdbaa0 100644 --- a/activemodel/lib/active_model/type/string.rb +++ b/activemodel/lib/active_model/type/string.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_model/type/immutable_string" module ActiveModel diff --git a/activemodel/lib/active_model/type/time.rb b/activemodel/lib/active_model/type/time.rb index 54d6214e8199..8cf7078ff352 100644 --- a/activemodel/lib/active_model/type/time.rb +++ b/activemodel/lib/active_model/type/time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Type class Time < Value # :nodoc: diff --git a/activemodel/lib/active_model/type/value.rb b/activemodel/lib/active_model/type/value.rb index 7e9ae92245c3..b56c8b48f5b7 100644 --- a/activemodel/lib/active_model/type/value.rb +++ b/activemodel/lib/active_model/type/value.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Type class Value diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb index ae1d69f68547..a68427712716 100644 --- a/activemodel/lib/active_model/validations.rb +++ b/activemodel/lib/active_model/validations.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array/extract_options" require "active_support/core_ext/hash/keys" require "active_support/core_ext/hash/except" diff --git a/activemodel/lib/active_model/validations/absence.rb b/activemodel/lib/active_model/validations/absence.rb index 4618f46e30a3..f09f89bff2c5 100644 --- a/activemodel/lib/active_model/validations/absence.rb +++ b/activemodel/lib/active_model/validations/absence.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Validations # == \Active \Model Absence Validator diff --git a/activemodel/lib/active_model/validations/acceptance.rb b/activemodel/lib/active_model/validations/acceptance.rb index a26c37daa54a..32b8d9567e2f 100644 --- a/activemodel/lib/active_model/validations/acceptance.rb +++ b/activemodel/lib/active_model/validations/acceptance.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Validations class AcceptanceValidator < EachValidator # :nodoc: diff --git a/activemodel/lib/active_model/validations/callbacks.rb b/activemodel/lib/active_model/validations/callbacks.rb index 4e94422cf14f..f4e10ce918dd 100644 --- a/activemodel/lib/active_model/validations/callbacks.rb +++ b/activemodel/lib/active_model/validations/callbacks.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Validations # == Active \Model \Validation \Callbacks diff --git a/activemodel/lib/active_model/validations/clusivity.rb b/activemodel/lib/active_model/validations/clusivity.rb index 18f1056e2bae..081c69a7f7de 100644 --- a/activemodel/lib/active_model/validations/clusivity.rb +++ b/activemodel/lib/active_model/validations/clusivity.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/range" module ActiveModel diff --git a/activemodel/lib/active_model/validations/confirmation.rb b/activemodel/lib/active_model/validations/confirmation.rb index 03585bf5e14a..88930ea0cdb7 100644 --- a/activemodel/lib/active_model/validations/confirmation.rb +++ b/activemodel/lib/active_model/validations/confirmation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Validations class ConfirmationValidator < EachValidator # :nodoc: diff --git a/activemodel/lib/active_model/validations/exclusion.rb b/activemodel/lib/active_model/validations/exclusion.rb index b7156ba802ed..1442f8900286 100644 --- a/activemodel/lib/active_model/validations/exclusion.rb +++ b/activemodel/lib/active_model/validations/exclusion.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_model/validations/clusivity" module ActiveModel diff --git a/activemodel/lib/active_model/validations/format.rb b/activemodel/lib/active_model/validations/format.rb index 98b3f6a8e592..01ea49c4d6c2 100644 --- a/activemodel/lib/active_model/validations/format.rb +++ b/activemodel/lib/active_model/validations/format.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Validations class FormatValidator < EachValidator # :nodoc: diff --git a/activemodel/lib/active_model/validations/helper_methods.rb b/activemodel/lib/active_model/validations/helper_methods.rb index 217611533467..14236dcf41f9 100644 --- a/activemodel/lib/active_model/validations/helper_methods.rb +++ b/activemodel/lib/active_model/validations/helper_methods.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Validations module HelperMethods # :nodoc: diff --git a/activemodel/lib/active_model/validations/inclusion.rb b/activemodel/lib/active_model/validations/inclusion.rb index c6c5bae64997..7ca869695102 100644 --- a/activemodel/lib/active_model/validations/inclusion.rb +++ b/activemodel/lib/active_model/validations/inclusion.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_model/validations/clusivity" module ActiveModel diff --git a/activemodel/lib/active_model/validations/length.rb b/activemodel/lib/active_model/validations/length.rb index 940c58f3a750..e77a9e4f4c0f 100644 --- a/activemodel/lib/active_model/validations/length.rb +++ b/activemodel/lib/active_model/validations/length.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Validations class LengthValidator < EachValidator # :nodoc: diff --git a/activemodel/lib/active_model/validations/numericality.rb b/activemodel/lib/active_model/validations/numericality.rb index fb053a4c4e42..53a7287ec636 100644 --- a/activemodel/lib/active_model/validations/numericality.rb +++ b/activemodel/lib/active_model/validations/numericality.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Validations class NumericalityValidator < EachValidator # :nodoc: diff --git a/activemodel/lib/active_model/validations/presence.rb b/activemodel/lib/active_model/validations/presence.rb index ce4106a5e11a..82f9ea0c9c12 100644 --- a/activemodel/lib/active_model/validations/presence.rb +++ b/activemodel/lib/active_model/validations/presence.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveModel module Validations class PresenceValidator < EachValidator # :nodoc: diff --git a/activemodel/lib/active_model/validations/validates.rb b/activemodel/lib/active_model/validations/validates.rb index a8b958e97414..45a7007c45cf 100644 --- a/activemodel/lib/active_model/validations/validates.rb +++ b/activemodel/lib/active_model/validations/validates.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/slice" module ActiveModel diff --git a/activemodel/lib/active_model/validations/with.rb b/activemodel/lib/active_model/validations/with.rb index 9227dd06ff9b..b485846c6d89 100644 --- a/activemodel/lib/active_model/validations/with.rb +++ b/activemodel/lib/active_model/validations/with.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array/extract_options" module ActiveModel diff --git a/activemodel/lib/active_model/validator.rb b/activemodel/lib/active_model/validator.rb index 6c11981e1dc1..976cf56a5ecd 100644 --- a/activemodel/lib/active_model/validator.rb +++ b/activemodel/lib/active_model/validator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/anonymous" module ActiveModel diff --git a/activemodel/lib/active_model/version.rb b/activemodel/lib/active_model/version.rb index 6e7fd227fdb5..09667cf42553 100644 --- a/activemodel/lib/active_model/version.rb +++ b/activemodel/lib/active_model/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "gem_version" module ActiveModel diff --git a/activemodel/test/cases/attribute_assignment_test.rb b/activemodel/test/cases/attribute_assignment_test.rb index fa41d1b95f80..5ec55676daf0 100644 --- a/activemodel/test/cases/attribute_assignment_test.rb +++ b/activemodel/test/cases/attribute_assignment_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_support/core_ext/hash/indifferent_access" require "active_support/hash_with_indifferent_access" diff --git a/activemodel/test/cases/attribute_methods_test.rb b/activemodel/test/cases/attribute_methods_test.rb index 4767accb7cec..4b03c581e92b 100644 --- a/activemodel/test/cases/attribute_methods_test.rb +++ b/activemodel/test/cases/attribute_methods_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class ModelWithAttributes diff --git a/activemodel/test/cases/callbacks_test.rb b/activemodel/test/cases/callbacks_test.rb index f85cd7dec4c9..f236cb3997b1 100644 --- a/activemodel/test/cases/callbacks_test.rb +++ b/activemodel/test/cases/callbacks_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class CallbacksTest < ActiveModel::TestCase diff --git a/activemodel/test/cases/conversion_test.rb b/activemodel/test/cases/conversion_test.rb index 4a93347abcf5..145a7b4e7fe4 100644 --- a/activemodel/test/cases/conversion_test.rb +++ b/activemodel/test/cases/conversion_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/contact" require "models/helicopter" diff --git a/activemodel/test/cases/dirty_test.rb b/activemodel/test/cases/dirty_test.rb index fdd18d760123..56abb17e264a 100644 --- a/activemodel/test/cases/dirty_test.rb +++ b/activemodel/test/cases/dirty_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class DirtyTest < ActiveModel::TestCase diff --git a/activemodel/test/cases/errors_test.rb b/activemodel/test/cases/errors_test.rb index 43aee5a814b4..790113331d60 100644 --- a/activemodel/test/cases/errors_test.rb +++ b/activemodel/test/cases/errors_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_support/core_ext/string/strip" require "yaml" diff --git a/activemodel/test/cases/forbidden_attributes_protection_test.rb b/activemodel/test/cases/forbidden_attributes_protection_test.rb index d8cc72e66294..b2211b069c5c 100644 --- a/activemodel/test/cases/forbidden_attributes_protection_test.rb +++ b/activemodel/test/cases/forbidden_attributes_protection_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_support/core_ext/hash/indifferent_access" require "models/account" diff --git a/activemodel/test/cases/helper.rb b/activemodel/test/cases/helper.rb index eeb5c85a487c..be0817624c52 100644 --- a/activemodel/test/cases/helper.rb +++ b/activemodel/test/cases/helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_model" # Show backtraces for deprecated behavior for quicker cleanup. diff --git a/activemodel/test/cases/lint_test.rb b/activemodel/test/cases/lint_test.rb index 7a817d7c01f1..29443f212f09 100644 --- a/activemodel/test/cases/lint_test.rb +++ b/activemodel/test/cases/lint_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class LintTest < ActiveModel::TestCase diff --git a/activemodel/test/cases/model_test.rb b/activemodel/test/cases/model_test.rb index ba87cd150624..593077a768c0 100644 --- a/activemodel/test/cases/model_test.rb +++ b/activemodel/test/cases/model_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class ModelTest < ActiveModel::TestCase diff --git a/activemodel/test/cases/naming_test.rb b/activemodel/test/cases/naming_test.rb index d5cb1a62bc16..068cb9376203 100644 --- a/activemodel/test/cases/naming_test.rb +++ b/activemodel/test/cases/naming_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/contact" require "models/sheep" diff --git a/activemodel/test/cases/railtie_test.rb b/activemodel/test/cases/railtie_test.rb index a56b26b5eebb..faace1be8571 100644 --- a/activemodel/test/cases/railtie_test.rb +++ b/activemodel/test/cases/railtie_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_support/testing/isolation" diff --git a/activemodel/test/cases/secure_password_test.rb b/activemodel/test/cases/secure_password_test.rb index 77ce86f39250..92368a551281 100644 --- a/activemodel/test/cases/secure_password_test.rb +++ b/activemodel/test/cases/secure_password_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/user" require "models/visitor" diff --git a/activemodel/test/cases/serialization_test.rb b/activemodel/test/cases/serialization_test.rb index f78efd2f0cc1..8611dcbf0b64 100644 --- a/activemodel/test/cases/serialization_test.rb +++ b/activemodel/test/cases/serialization_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_support/core_ext/object/instance_variables" diff --git a/activemodel/test/cases/serializers/json_serialization_test.rb b/activemodel/test/cases/serializers/json_serialization_test.rb index d15ba64eb044..c6981e86e1d4 100644 --- a/activemodel/test/cases/serializers/json_serialization_test.rb +++ b/activemodel/test/cases/serializers/json_serialization_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/contact" require "active_support/core_ext/object/instance_variables" diff --git a/activemodel/test/cases/translation_test.rb b/activemodel/test/cases/translation_test.rb index 9972f9daead7..aa2c41849dea 100644 --- a/activemodel/test/cases/translation_test.rb +++ b/activemodel/test/cases/translation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/person" diff --git a/activemodel/test/cases/type/big_integer_test.rb b/activemodel/test/cases/type/big_integer_test.rb index 56002b7cc69c..fba019c01f8b 100644 --- a/activemodel/test/cases/type/big_integer_test.rb +++ b/activemodel/test/cases/type/big_integer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/binary_test.rb b/activemodel/test/cases/type/binary_test.rb index e9c2ccfca4c8..b0ae5c3423c2 100644 --- a/activemodel/test/cases/type/binary_test.rb +++ b/activemodel/test/cases/type/binary_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/boolean_test.rb b/activemodel/test/cases/type/boolean_test.rb index 92e5aebfb7b9..e8ed904c7517 100644 --- a/activemodel/test/cases/type/boolean_test.rb +++ b/activemodel/test/cases/type/boolean_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/date_test.rb b/activemodel/test/cases/type/date_test.rb index 0cc90e99d34f..ef21e5236101 100644 --- a/activemodel/test/cases/type/date_test.rb +++ b/activemodel/test/cases/type/date_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/date_time_test.rb b/activemodel/test/cases/type/date_time_test.rb index 75a7fc686eb9..fd717d879389 100644 --- a/activemodel/test/cases/type/date_time_test.rb +++ b/activemodel/test/cases/type/date_time_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/decimal_test.rb b/activemodel/test/cases/type/decimal_test.rb index c3b43725cc8d..18b1e6012709 100644 --- a/activemodel/test/cases/type/decimal_test.rb +++ b/activemodel/test/cases/type/decimal_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/float_test.rb b/activemodel/test/cases/type/float_test.rb index 8026d63ad5cc..594a7fc66818 100644 --- a/activemodel/test/cases/type/float_test.rb +++ b/activemodel/test/cases/type/float_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/immutable_string_test.rb b/activemodel/test/cases/type/immutable_string_test.rb index 23e58974fb53..5b2830d4a474 100644 --- a/activemodel/test/cases/type/immutable_string_test.rb +++ b/activemodel/test/cases/type/immutable_string_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/integer_test.rb b/activemodel/test/cases/type/integer_test.rb index a91144036b51..67ee6307eaea 100644 --- a/activemodel/test/cases/type/integer_test.rb +++ b/activemodel/test/cases/type/integer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" require "active_support/core_ext/numeric/time" diff --git a/activemodel/test/cases/type/registry_test.rb b/activemodel/test/cases/type/registry_test.rb index 927b6d03076a..b2901253a517 100644 --- a/activemodel/test/cases/type/registry_test.rb +++ b/activemodel/test/cases/type/registry_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/string_test.rb b/activemodel/test/cases/type/string_test.rb index 47d412e27ee4..3c9137c05559 100644 --- a/activemodel/test/cases/type/string_test.rb +++ b/activemodel/test/cases/type/string_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/time_test.rb b/activemodel/test/cases/type/time_test.rb index 0cc4d33caa98..aa114fc911b4 100644 --- a/activemodel/test/cases/type/time_test.rb +++ b/activemodel/test/cases/type/time_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/value_test.rb b/activemodel/test/cases/type/value_test.rb index d8b3e7f164f4..d294e86ef93c 100644 --- a/activemodel/test/cases/type/value_test.rb +++ b/activemodel/test/cases/type/value_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/validations/absence_validation_test.rb b/activemodel/test/cases/validations/absence_validation_test.rb index 833f694c5a00..10a42fba5966 100644 --- a/activemodel/test/cases/validations/absence_validation_test.rb +++ b/activemodel/test/cases/validations/absence_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/person" diff --git a/activemodel/test/cases/validations/acceptance_validation_test.rb b/activemodel/test/cases/validations/acceptance_validation_test.rb index fbd994e9145f..78619abdb868 100644 --- a/activemodel/test/cases/validations/acceptance_validation_test.rb +++ b/activemodel/test/cases/validations/acceptance_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations/callbacks_test.rb b/activemodel/test/cases/validations/callbacks_test.rb index f2e4a5946de5..9ef59b917adf 100644 --- a/activemodel/test/cases/validations/callbacks_test.rb +++ b/activemodel/test/cases/validations/callbacks_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class Dog diff --git a/activemodel/test/cases/validations/conditional_validation_test.rb b/activemodel/test/cases/validations/conditional_validation_test.rb index 048d27446ee5..c86124c8ea74 100644 --- a/activemodel/test/cases/validations/conditional_validation_test.rb +++ b/activemodel/test/cases/validations/conditional_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations/confirmation_validation_test.rb b/activemodel/test/cases/validations/confirmation_validation_test.rb index 7ddf3ad27316..1d3e2390e68b 100644 --- a/activemodel/test/cases/validations/confirmation_validation_test.rb +++ b/activemodel/test/cases/validations/confirmation_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations/exclusion_validation_test.rb b/activemodel/test/cases/validations/exclusion_validation_test.rb index 06ae4fbecdea..2bef74fd6c2c 100644 --- a/activemodel/test/cases/validations/exclusion_validation_test.rb +++ b/activemodel/test/cases/validations/exclusion_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_support/core_ext/numeric/time" diff --git a/activemodel/test/cases/validations/format_validation_test.rb b/activemodel/test/cases/validations/format_validation_test.rb index f5b1ad721c5e..3bde650d3738 100644 --- a/activemodel/test/cases/validations/format_validation_test.rb +++ b/activemodel/test/cases/validations/format_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb b/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb index f049ee26e8d4..462a2254d201 100644 --- a/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb +++ b/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/person" diff --git a/activemodel/test/cases/validations/i18n_validation_test.rb b/activemodel/test/cases/validations/i18n_validation_test.rb index f28cfc0ef5d6..d6a00a663063 100644 --- a/activemodel/test/cases/validations/i18n_validation_test.rb +++ b/activemodel/test/cases/validations/i18n_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/person" diff --git a/activemodel/test/cases/validations/inclusion_validation_test.rb b/activemodel/test/cases/validations/inclusion_validation_test.rb index 5aa43ea4a90e..537ff45626bb 100644 --- a/activemodel/test/cases/validations/inclusion_validation_test.rb +++ b/activemodel/test/cases/validations/inclusion_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_support/all" diff --git a/activemodel/test/cases/validations/length_validation_test.rb b/activemodel/test/cases/validations/length_validation_test.rb index 95ee87b4014d..03e73546dafa 100644 --- a/activemodel/test/cases/validations/length_validation_test.rb +++ b/activemodel/test/cases/validations/length_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations/numericality_validation_test.rb b/activemodel/test/cases/validations/numericality_validation_test.rb index c0158e075fbe..aadc825b5249 100644 --- a/activemodel/test/cases/validations/numericality_validation_test.rb +++ b/activemodel/test/cases/validations/numericality_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations/presence_validation_test.rb b/activemodel/test/cases/validations/presence_validation_test.rb index 642dd0f144a4..af3d7401edb4 100644 --- a/activemodel/test/cases/validations/presence_validation_test.rb +++ b/activemodel/test/cases/validations/presence_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations/validates_test.rb b/activemodel/test/cases/validations/validates_test.rb index 011033606e24..fe602a23169e 100644 --- a/activemodel/test/cases/validations/validates_test.rb +++ b/activemodel/test/cases/validations/validates_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/person" require "models/topic" diff --git a/activemodel/test/cases/validations/validations_context_test.rb b/activemodel/test/cases/validations/validations_context_test.rb index 25c37a572f7d..04108eb2a0d6 100644 --- a/activemodel/test/cases/validations/validations_context_test.rb +++ b/activemodel/test/cases/validations/validations_context_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations/with_validation_test.rb b/activemodel/test/cases/validations/with_validation_test.rb index 5ce86738cdcd..70f13370352b 100644 --- a/activemodel/test/cases/validations/with_validation_test.rb +++ b/activemodel/test/cases/validations/with_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations_test.rb b/activemodel/test/cases/validations_test.rb index 664719120514..83be8b26da39 100644 --- a/activemodel/test/cases/validations_test.rb +++ b/activemodel/test/cases/validations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/models/account.rb b/activemodel/test/models/account.rb index eed668d38f85..c25d12e13863 100644 --- a/activemodel/test/models/account.rb +++ b/activemodel/test/models/account.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Account include ActiveModel::ForbiddenAttributesProtection diff --git a/activemodel/test/models/blog_post.rb b/activemodel/test/models/blog_post.rb index 46eba857dfcd..2a6240fb04ba 100644 --- a/activemodel/test/models/blog_post.rb +++ b/activemodel/test/models/blog_post.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Blog def self.use_relative_model_naming? true diff --git a/activemodel/test/models/contact.rb b/activemodel/test/models/contact.rb index 113ab0bc1f37..9853bc623440 100644 --- a/activemodel/test/models/contact.rb +++ b/activemodel/test/models/contact.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Contact extend ActiveModel::Naming include ActiveModel::Conversion diff --git a/activemodel/test/models/custom_reader.rb b/activemodel/test/models/custom_reader.rb index dc26bb10ff94..a6f983e3cab7 100644 --- a/activemodel/test/models/custom_reader.rb +++ b/activemodel/test/models/custom_reader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CustomReader include ActiveModel::Validations diff --git a/activemodel/test/models/helicopter.rb b/activemodel/test/models/helicopter.rb index 933f3c463a32..33877e1fbac2 100644 --- a/activemodel/test/models/helicopter.rb +++ b/activemodel/test/models/helicopter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Helicopter include ActiveModel::Conversion end diff --git a/activemodel/test/models/person.rb b/activemodel/test/models/person.rb index e896e90f9842..94a32755148f 100644 --- a/activemodel/test/models/person.rb +++ b/activemodel/test/models/person.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Person include ActiveModel::Validations extend ActiveModel::Translation diff --git a/activemodel/test/models/person_with_validator.rb b/activemodel/test/models/person_with_validator.rb index 505ed880c1d6..b32730abc1ae 100644 --- a/activemodel/test/models/person_with_validator.rb +++ b/activemodel/test/models/person_with_validator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class PersonWithValidator include ActiveModel::Validations diff --git a/activemodel/test/models/reply.rb b/activemodel/test/models/reply.rb index 3fe11043d2c3..9a6b4864f140 100644 --- a/activemodel/test/models/reply.rb +++ b/activemodel/test/models/reply.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "models/topic" class Reply < Topic diff --git a/activemodel/test/models/sheep.rb b/activemodel/test/models/sheep.rb index 7aba055c4f8f..f62a98777abc 100644 --- a/activemodel/test/models/sheep.rb +++ b/activemodel/test/models/sheep.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Sheep extend ActiveModel::Naming end diff --git a/activemodel/test/models/topic.rb b/activemodel/test/models/topic.rb index 192786c0967d..37dc437e81f9 100644 --- a/activemodel/test/models/topic.rb +++ b/activemodel/test/models/topic.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Topic include ActiveModel::Validations include ActiveModel::Validations::Callbacks diff --git a/activemodel/test/models/track_back.rb b/activemodel/test/models/track_back.rb index 357ee37d6db0..80c4075b00c8 100644 --- a/activemodel/test/models/track_back.rb +++ b/activemodel/test/models/track_back.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Post class TrackBack def to_model diff --git a/activemodel/test/models/user.rb b/activemodel/test/models/user.rb index 6556b1a7d934..106b487cbcd0 100644 --- a/activemodel/test/models/user.rb +++ b/activemodel/test/models/user.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class User extend ActiveModel::Callbacks include ActiveModel::SecurePassword diff --git a/activemodel/test/models/visitor.rb b/activemodel/test/models/visitor.rb index 22ad1a3c3dc1..5bcd5d6458bf 100644 --- a/activemodel/test/models/visitor.rb +++ b/activemodel/test/models/visitor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Visitor extend ActiveModel::Callbacks include ActiveModel::SecurePassword diff --git a/activemodel/test/validators/email_validator.rb b/activemodel/test/validators/email_validator.rb index f733c45cf038..206c3d319c5f 100644 --- a/activemodel/test/validators/email_validator.rb +++ b/activemodel/test/validators/email_validator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class EmailValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) record.errors[attribute] << (options[:message] || "is not an email") unless diff --git a/activemodel/test/validators/namespace/email_validator.rb b/activemodel/test/validators/namespace/email_validator.rb index 8639045b0d40..4c37f6f3a2b9 100644 --- a/activemodel/test/validators/namespace/email_validator.rb +++ b/activemodel/test/validators/namespace/email_validator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "validators/email_validator" module Namespace diff --git a/activerecord/Rakefile b/activerecord/Rakefile index fe5f9d1071e4..43470716934b 100644 --- a/activerecord/Rakefile +++ b/activerecord/Rakefile @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rake/testtask" require_relative "test/config" diff --git a/activerecord/activerecord.gemspec b/activerecord/activerecord.gemspec index a626a1f21bc1..b28cb0c2f7c6 100644 --- a/activerecord/activerecord.gemspec +++ b/activerecord/activerecord.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/activerecord/bin/test b/activerecord/bin/test index ab69f4f6034a..83c192531ec3 100755 --- a/activerecord/bin/test +++ b/activerecord/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/activerecord/examples/performance.rb b/activerecord/examples/performance.rb index 3257dd4ad7f1..74e5ffd976e1 100644 --- a/activerecord/examples/performance.rb +++ b/activerecord/examples/performance.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record" require "benchmark/ips" diff --git a/activerecord/examples/simple.rb b/activerecord/examples/simple.rb index c3648fee48d0..6b9bc781d1f5 100644 --- a/activerecord/examples/simple.rb +++ b/activerecord/examples/simple.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record" class Person < ActiveRecord::Base diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index 29f49c619508..11300da52ae3 100644 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true #-- # Copyright (c) 2004-2017 David Heinemeier Hansson # diff --git a/activerecord/lib/active_record/aggregations.rb b/activerecord/lib/active_record/aggregations.rb index 10cbd5429cd9..e0caad53817c 100644 --- a/activerecord/lib/active_record/aggregations.rb +++ b/activerecord/lib/active_record/aggregations.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # See ActiveRecord::Aggregations::ClassMethods for documentation module Aggregations diff --git a/activerecord/lib/active_record/association_relation.rb b/activerecord/lib/active_record/association_relation.rb index de2d03cd0b93..a79112cb3bca 100644 --- a/activerecord/lib/active_record/association_relation.rb +++ b/activerecord/lib/active_record/association_relation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class AssociationRelation < Relation def initialize(klass, table, predicate_builder, association) diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index f05a122544b2..13db82b2aae0 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/enumerable" require "active_support/core_ext/string/conversions" require "active_support/core_ext/module/remove_method" diff --git a/activerecord/lib/active_record/associations/alias_tracker.rb b/activerecord/lib/active_record/associations/alias_tracker.rb index 104de4f69da3..eb81ba5ff6d4 100644 --- a/activerecord/lib/active_record/associations/alias_tracker.rb +++ b/activerecord/lib/active_record/associations/alias_tracker.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/conversions" module ActiveRecord diff --git a/activerecord/lib/active_record/associations/association.rb b/activerecord/lib/active_record/associations/association.rb index 1138ae3462a3..0fca4467f9ed 100644 --- a/activerecord/lib/active_record/associations/association.rb +++ b/activerecord/lib/active_record/associations/association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array/wrap" module ActiveRecord diff --git a/activerecord/lib/active_record/associations/association_scope.rb b/activerecord/lib/active_record/associations/association_scope.rb index 6ef225b7251f..900ebda2bbdd 100644 --- a/activerecord/lib/active_record/associations/association_scope.rb +++ b/activerecord/lib/active_record/associations/association_scope.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Associations class AssociationScope #:nodoc: diff --git a/activerecord/lib/active_record/associations/belongs_to_association.rb b/activerecord/lib/active_record/associations/belongs_to_association.rb index 0e61dbfb0036..b8d3173dc7a9 100644 --- a/activerecord/lib/active_record/associations/belongs_to_association.rb +++ b/activerecord/lib/active_record/associations/belongs_to_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record Belongs To Association module Associations diff --git a/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb b/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb index b710cf6bdb69..15aae53e8083 100644 --- a/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb +++ b/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record Belongs To Polymorphic Association module Associations diff --git a/activerecord/lib/active_record/associations/builder/association.rb b/activerecord/lib/active_record/associations/builder/association.rb index d0534056d956..df8d77a5d19d 100644 --- a/activerecord/lib/active_record/associations/builder/association.rb +++ b/activerecord/lib/active_record/associations/builder/association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # This is the parent Association class which defines the variables # used by all associations. # diff --git a/activerecord/lib/active_record/associations/builder/belongs_to.rb b/activerecord/lib/active_record/associations/builder/belongs_to.rb index 2b9dd8aae8df..7c2cc61ecdbf 100644 --- a/activerecord/lib/active_record/associations/builder/belongs_to.rb +++ b/activerecord/lib/active_record/associations/builder/belongs_to.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord::Associations::Builder # :nodoc: class BelongsTo < SingularAssociation #:nodoc: def self.macro diff --git a/activerecord/lib/active_record/associations/builder/collection_association.rb b/activerecord/lib/active_record/associations/builder/collection_association.rb index edeb6491bd88..4de3371d5487 100644 --- a/activerecord/lib/active_record/associations/builder/collection_association.rb +++ b/activerecord/lib/active_record/associations/builder/collection_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # This class is inherited by the has_many and has_many_and_belongs_to_many association classes require "active_record/associations" diff --git a/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb b/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb index 6b71826431fe..c3e62c1a3d93 100644 --- a/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb +++ b/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord::Associations::Builder # :nodoc: class HasAndBelongsToMany # :nodoc: class JoinTableResolver # :nodoc: diff --git a/activerecord/lib/active_record/associations/builder/has_many.rb b/activerecord/lib/active_record/associations/builder/has_many.rb index 7864d4c536bd..3e83fad61941 100644 --- a/activerecord/lib/active_record/associations/builder/has_many.rb +++ b/activerecord/lib/active_record/associations/builder/has_many.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord::Associations::Builder # :nodoc: class HasMany < CollectionAssociation #:nodoc: def self.macro diff --git a/activerecord/lib/active_record/associations/builder/has_one.rb b/activerecord/lib/active_record/associations/builder/has_one.rb index 4de846d12b95..66135bbc2d8b 100644 --- a/activerecord/lib/active_record/associations/builder/has_one.rb +++ b/activerecord/lib/active_record/associations/builder/has_one.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord::Associations::Builder # :nodoc: class HasOne < SingularAssociation #:nodoc: def self.macro diff --git a/activerecord/lib/active_record/associations/builder/singular_association.rb b/activerecord/lib/active_record/associations/builder/singular_association.rb index 7732b63af69f..3a154ba25fac 100644 --- a/activerecord/lib/active_record/associations/builder/singular_association.rb +++ b/activerecord/lib/active_record/associations/builder/singular_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # This class is inherited by the has_one and belongs_to association classes module ActiveRecord::Associations::Builder # :nodoc: diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index bbf3dbb75e5c..f73b0b90cf30 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Associations # = Active Record Association Collection diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb index d77fcaf6688a..6ccdaebbe384 100644 --- a/activerecord/lib/active_record/associations/collection_proxy.rb +++ b/activerecord/lib/active_record/associations/collection_proxy.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Associations # Association proxies in Active Record are middlemen between the object that diff --git a/activerecord/lib/active_record/associations/foreign_association.rb b/activerecord/lib/active_record/associations/foreign_association.rb index 3ceec0ee4688..1fb6ff7bffa0 100644 --- a/activerecord/lib/active_record/associations/foreign_association.rb +++ b/activerecord/lib/active_record/associations/foreign_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord::Associations module ForeignAssociation # :nodoc: def foreign_key_present? diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb index 10ca0e47ff3e..4e0c89791e0b 100644 --- a/activerecord/lib/active_record/associations/has_many_association.rb +++ b/activerecord/lib/active_record/associations/has_many_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record Has Many Association module Associations diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb index 2fd20b436811..c4ed91aecab1 100644 --- a/activerecord/lib/active_record/associations/has_many_through_association.rb +++ b/activerecord/lib/active_record/associations/has_many_through_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record Has Many Through Association module Associations diff --git a/activerecord/lib/active_record/associations/has_one_association.rb b/activerecord/lib/active_record/associations/has_one_association.rb index 8458253ff83d..a78c1b1d32d8 100644 --- a/activerecord/lib/active_record/associations/has_one_association.rb +++ b/activerecord/lib/active_record/associations/has_one_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record Has One Association module Associations diff --git a/activerecord/lib/active_record/associations/has_one_through_association.rb b/activerecord/lib/active_record/associations/has_one_through_association.rb index 1183bdf6f4e9..1e8b2244d98e 100644 --- a/activerecord/lib/active_record/associations/has_one_through_association.rb +++ b/activerecord/lib/active_record/associations/has_one_through_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record Has One Through Association module Associations diff --git a/activerecord/lib/active_record/associations/join_dependency.rb b/activerecord/lib/active_record/associations/join_dependency.rb index bc66194aef24..575051c45a13 100644 --- a/activerecord/lib/active_record/associations/join_dependency.rb +++ b/activerecord/lib/active_record/associations/join_dependency.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Associations class JoinDependency # :nodoc: diff --git a/activerecord/lib/active_record/associations/join_dependency/join_association.rb b/activerecord/lib/active_record/associations/join_dependency/join_association.rb index 005410d5980a..5df23e92ca06 100644 --- a/activerecord/lib/active_record/associations/join_dependency/join_association.rb +++ b/activerecord/lib/active_record/associations/join_dependency/join_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/associations/join_dependency/join_part" module ActiveRecord diff --git a/activerecord/lib/active_record/associations/join_dependency/join_base.rb b/activerecord/lib/active_record/associations/join_dependency/join_base.rb index fca20514d153..aa02c5f05679 100644 --- a/activerecord/lib/active_record/associations/join_dependency/join_base.rb +++ b/activerecord/lib/active_record/associations/join_dependency/join_base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/associations/join_dependency/join_part" module ActiveRecord diff --git a/activerecord/lib/active_record/associations/join_dependency/join_part.rb b/activerecord/lib/active_record/associations/join_dependency/join_part.rb index 80c9fde5d1fe..0604333f30be 100644 --- a/activerecord/lib/active_record/associations/join_dependency/join_part.rb +++ b/activerecord/lib/active_record/associations/join_dependency/join_part.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Associations class JoinDependency # :nodoc: diff --git a/activerecord/lib/active_record/associations/preloader.rb b/activerecord/lib/active_record/associations/preloader.rb index 208d1b26705f..130494f71297 100644 --- a/activerecord/lib/active_record/associations/preloader.rb +++ b/activerecord/lib/active_record/associations/preloader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Associations # Implements the details of eager loading of Active Record associations. diff --git a/activerecord/lib/active_record/associations/preloader/association.rb b/activerecord/lib/active_record/associations/preloader/association.rb index 63ef3f2d8c03..6a8425c989f2 100644 --- a/activerecord/lib/active_record/associations/preloader/association.rb +++ b/activerecord/lib/active_record/associations/preloader/association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Associations class Preloader diff --git a/activerecord/lib/active_record/associations/preloader/belongs_to.rb b/activerecord/lib/active_record/associations/preloader/belongs_to.rb index c20145770f89..ee7be18d1577 100644 --- a/activerecord/lib/active_record/associations/preloader/belongs_to.rb +++ b/activerecord/lib/active_record/associations/preloader/belongs_to.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Associations class Preloader diff --git a/activerecord/lib/active_record/associations/preloader/collection_association.rb b/activerecord/lib/active_record/associations/preloader/collection_association.rb index 26690bf16d0c..59c0bc4d8e1e 100644 --- a/activerecord/lib/active_record/associations/preloader/collection_association.rb +++ b/activerecord/lib/active_record/associations/preloader/collection_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Associations class Preloader diff --git a/activerecord/lib/active_record/associations/preloader/has_many.rb b/activerecord/lib/active_record/associations/preloader/has_many.rb index 20df1cc19a98..197f561b9575 100644 --- a/activerecord/lib/active_record/associations/preloader/has_many.rb +++ b/activerecord/lib/active_record/associations/preloader/has_many.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Associations class Preloader diff --git a/activerecord/lib/active_record/associations/preloader/has_many_through.rb b/activerecord/lib/active_record/associations/preloader/has_many_through.rb index 2029871f3911..3bd561c187b4 100644 --- a/activerecord/lib/active_record/associations/preloader/has_many_through.rb +++ b/activerecord/lib/active_record/associations/preloader/has_many_through.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Associations class Preloader diff --git a/activerecord/lib/active_record/associations/preloader/has_one.rb b/activerecord/lib/active_record/associations/preloader/has_one.rb index c4add621caa4..d6254d8c5608 100644 --- a/activerecord/lib/active_record/associations/preloader/has_one.rb +++ b/activerecord/lib/active_record/associations/preloader/has_one.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Associations class Preloader diff --git a/activerecord/lib/active_record/associations/preloader/has_one_through.rb b/activerecord/lib/active_record/associations/preloader/has_one_through.rb index f063f8557455..512ca8200572 100644 --- a/activerecord/lib/active_record/associations/preloader/has_one_through.rb +++ b/activerecord/lib/active_record/associations/preloader/has_one_through.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Associations class Preloader diff --git a/activerecord/lib/active_record/associations/preloader/singular_association.rb b/activerecord/lib/active_record/associations/preloader/singular_association.rb index 5c5828262ed6..5583c7d79ce3 100644 --- a/activerecord/lib/active_record/associations/preloader/singular_association.rb +++ b/activerecord/lib/active_record/associations/preloader/singular_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Associations class Preloader diff --git a/activerecord/lib/active_record/associations/preloader/through_association.rb b/activerecord/lib/active_record/associations/preloader/through_association.rb index 34587fd3f5b7..8e12afc6955e 100644 --- a/activerecord/lib/active_record/associations/preloader/through_association.rb +++ b/activerecord/lib/active_record/associations/preloader/through_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Associations class Preloader diff --git a/activerecord/lib/active_record/associations/singular_association.rb b/activerecord/lib/active_record/associations/singular_association.rb index f8bbe4c2eda7..891caa44c319 100644 --- a/activerecord/lib/active_record/associations/singular_association.rb +++ b/activerecord/lib/active_record/associations/singular_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Associations class SingularAssociation < Association #:nodoc: diff --git a/activerecord/lib/active_record/associations/through_association.rb b/activerecord/lib/active_record/associations/through_association.rb index 6b87993ba3fe..fd4c1a1e783a 100644 --- a/activerecord/lib/active_record/associations/through_association.rb +++ b/activerecord/lib/active_record/associations/through_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record Through Association module Associations diff --git a/activerecord/lib/active_record/attribute.rb b/activerecord/lib/active_record/attribute.rb index 38281158d87e..61e8d4d84966 100644 --- a/activerecord/lib/active_record/attribute.rb +++ b/activerecord/lib/active_record/attribute.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class Attribute # :nodoc: class << self diff --git a/activerecord/lib/active_record/attribute/user_provided_default.rb b/activerecord/lib/active_record/attribute/user_provided_default.rb index 57f8bbed7697..b2e9ff9d990f 100644 --- a/activerecord/lib/active_record/attribute/user_provided_default.rb +++ b/activerecord/lib/active_record/attribute/user_provided_default.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/attribute" module ActiveRecord diff --git a/activerecord/lib/active_record/attribute_assignment.rb b/activerecord/lib/active_record/attribute_assignment.rb index d0dfca0cac45..39ba094b6db8 100644 --- a/activerecord/lib/active_record/attribute_assignment.rb +++ b/activerecord/lib/active_record/attribute_assignment.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_model/forbidden_attributes_protection" module ActiveRecord diff --git a/activerecord/lib/active_record/attribute_decorators.rb b/activerecord/lib/active_record/attribute_decorators.rb index 5bc85277456d..cb744d7b61c4 100644 --- a/activerecord/lib/active_record/attribute_decorators.rb +++ b/activerecord/lib/active_record/attribute_decorators.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module AttributeDecorators # :nodoc: extend ActiveSupport::Concern diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index 83c61fad197b..b718da85553f 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/enumerable" require "active_support/core_ext/string/filters" require "mutex_m" diff --git a/activerecord/lib/active_record/attribute_methods/before_type_cast.rb b/activerecord/lib/active_record/attribute_methods/before_type_cast.rb index 115eb1ef3f68..7cdb85e6cf95 100644 --- a/activerecord/lib/active_record/attribute_methods/before_type_cast.rb +++ b/activerecord/lib/active_record/attribute_methods/before_type_cast.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module AttributeMethods # = Active Record Attribute Methods Before Type Cast diff --git a/activerecord/lib/active_record/attribute_methods/primary_key.rb b/activerecord/lib/active_record/attribute_methods/primary_key.rb index b9b2acff37bf..ca21eae7c116 100644 --- a/activerecord/lib/active_record/attribute_methods/primary_key.rb +++ b/activerecord/lib/active_record/attribute_methods/primary_key.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "set" module ActiveRecord diff --git a/activerecord/lib/active_record/attribute_methods/query.rb b/activerecord/lib/active_record/attribute_methods/query.rb index 10498f43226a..db86ef428ed5 100644 --- a/activerecord/lib/active_record/attribute_methods/query.rb +++ b/activerecord/lib/active_record/attribute_methods/query.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module AttributeMethods module Query diff --git a/activerecord/lib/active_record/attribute_methods/read.rb b/activerecord/lib/active_record/attribute_methods/read.rb index fdc4bf6621d7..9d85af942450 100644 --- a/activerecord/lib/active_record/attribute_methods/read.rb +++ b/activerecord/lib/active_record/attribute_methods/read.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module AttributeMethods module Read diff --git a/activerecord/lib/active_record/attribute_methods/serialization.rb b/activerecord/lib/active_record/attribute_methods/serialization.rb index 4d9aff76cc36..0f267e3a34f1 100644 --- a/activerecord/lib/active_record/attribute_methods/serialization.rb +++ b/activerecord/lib/active_record/attribute_methods/serialization.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module AttributeMethods module Serialization diff --git a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb index 1f1efe881211..0c5f0a2fd190 100644 --- a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb +++ b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module AttributeMethods module TimeZoneConversion diff --git a/activerecord/lib/active_record/attribute_methods/write.rb b/activerecord/lib/active_record/attribute_methods/write.rb index 75c5a1a60061..166cab7dd633 100644 --- a/activerecord/lib/active_record/attribute_methods/write.rb +++ b/activerecord/lib/active_record/attribute_methods/write.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module AttributeMethods module Write diff --git a/activerecord/lib/active_record/attribute_mutation_tracker.rb b/activerecord/lib/active_record/attribute_mutation_tracker.rb index 4de993e1696a..4b0d52742b8c 100644 --- a/activerecord/lib/active_record/attribute_mutation_tracker.rb +++ b/activerecord/lib/active_record/attribute_mutation_tracker.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class AttributeMutationTracker # :nodoc: OPTION_NOT_GIVEN = Object.new diff --git a/activerecord/lib/active_record/attribute_set.rb b/activerecord/lib/active_record/attribute_set.rb index 01f9d815d5c6..76de68ac7095 100644 --- a/activerecord/lib/active_record/attribute_set.rb +++ b/activerecord/lib/active_record/attribute_set.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/attribute_set/builder" require "active_record/attribute_set/yaml_encoder" diff --git a/activerecord/lib/active_record/attribute_set/builder.rb b/activerecord/lib/active_record/attribute_set/builder.rb index 2f624d32af22..9b75f185f7a2 100644 --- a/activerecord/lib/active_record/attribute_set/builder.rb +++ b/activerecord/lib/active_record/attribute_set/builder.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/attribute" module ActiveRecord diff --git a/activerecord/lib/active_record/attribute_set/yaml_encoder.rb b/activerecord/lib/active_record/attribute_set/yaml_encoder.rb index 899de147921e..f3d726f53c6c 100644 --- a/activerecord/lib/active_record/attribute_set/yaml_encoder.rb +++ b/activerecord/lib/active_record/attribute_set/yaml_encoder.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class AttributeSet # Attempts to do more intelligent YAML dumping of an diff --git a/activerecord/lib/active_record/attributes.rb b/activerecord/lib/active_record/attributes.rb index 475b9beec4c3..0dceb417a566 100644 --- a/activerecord/lib/active_record/attributes.rb +++ b/activerecord/lib/active_record/attributes.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/attribute/user_provided_default" module ActiveRecord diff --git a/activerecord/lib/active_record/autosave_association.rb b/activerecord/lib/active_record/autosave_association.rb index 70f0e2af8efe..137e9673abb5 100644 --- a/activerecord/lib/active_record/autosave_association.rb +++ b/activerecord/lib/active_record/autosave_association.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record Autosave Association # diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index ac1aa2df4588..5229c82f3a09 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "yaml" require "active_support/benchmarkable" require "active_support/dependencies" diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index eb44887e1804..b25a8e4033f1 100644 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record \Callbacks # diff --git a/activerecord/lib/active_record/coders/json.rb b/activerecord/lib/active_record/coders/json.rb index cb185a881e7d..a7ad65fbf4ed 100644 --- a/activerecord/lib/active_record/coders/json.rb +++ b/activerecord/lib/active_record/coders/json.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Coders # :nodoc: class JSON # :nodoc: diff --git a/activerecord/lib/active_record/coders/yaml_column.rb b/activerecord/lib/active_record/coders/yaml_column.rb index 9c52a31b95e2..7186252b8bbc 100644 --- a/activerecord/lib/active_record/coders/yaml_column.rb +++ b/activerecord/lib/active_record/coders/yaml_column.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "yaml" module ActiveRecord diff --git a/activerecord/lib/active_record/collection_cache_key.rb b/activerecord/lib/active_record/collection_cache_key.rb index 8b937b670395..7831aee3a48c 100644 --- a/activerecord/lib/active_record/collection_cache_key.rb +++ b/activerecord/lib/active_record/collection_cache_key.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module CollectionCacheKey def collection_cache_key(collection = all, timestamp_column = :updated_at) # :nodoc: diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb index 61bf5477aae3..fcdef9f033ca 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "thread" require "concurrent/map" require "monitor" diff --git a/activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb b/activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb index 407e01932647..6331b1546a9c 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters # :nodoc: module DatabaseLimits diff --git a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb index af5314c1d63c..d36e8d7fddd0 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters # :nodoc: module DatabaseStatements diff --git a/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb b/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb index c352ddfc11bd..31d8f53a105d 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters # :nodoc: module QueryCache diff --git a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb index 61233dcc51dc..631e5176bbd5 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/big_decimal/conversions" require "active_support/multibyte/chars" diff --git a/activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb b/activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb index 3a06f7529215..b1b793828dcf 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module Savepoints diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb index 93f452920234..19f0d7558edf 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/strip" module ActiveRecord diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index a30fbe0e0529..6dbf66999367 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters #:nodoc: # Abstract representation of an index definition on a table. Instances of diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb index 34036d8a1dd4..ef8038b5c39b 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters # :nodoc: # The goal of this module is to move Adapter specific column diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index 22d7791deca2..cf93eb052bda 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/migration/join_table" require "active_support/core_ext/string/access" require "digest" diff --git a/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb b/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb index 19b78214940a..013cf5bfb692 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters class TransactionState diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index 85d6fbe8b30e..820803f71549 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/type" require "active_record/connection_adapters/determine_if_preparable_visitor" require "active_record/connection_adapters/schema_cache" diff --git a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb index 183f0f3c1bcd..4e29801d3eea 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/connection_adapters/abstract_adapter" require "active_record/connection_adapters/statement_pool" require "active_record/connection_adapters/mysql/column" diff --git a/activerecord/lib/active_record/connection_adapters/column.rb b/activerecord/lib/active_record/connection_adapters/column.rb index 61cd7ae4cc6a..34eca702539a 100644 --- a/activerecord/lib/active_record/connection_adapters/column.rb +++ b/activerecord/lib/active_record/connection_adapters/column.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # :stopdoc: module ConnectionAdapters diff --git a/activerecord/lib/active_record/connection_adapters/connection_specification.rb b/activerecord/lib/active_record/connection_adapters/connection_specification.rb index 3e4ea28f63a2..de54787458cb 100644 --- a/activerecord/lib/active_record/connection_adapters/connection_specification.rb +++ b/activerecord/lib/active_record/connection_adapters/connection_specification.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "uri" module ActiveRecord diff --git a/activerecord/lib/active_record/connection_adapters/determine_if_preparable_visitor.rb b/activerecord/lib/active_record/connection_adapters/determine_if_preparable_visitor.rb index 0fdc185c453a..e57147221f22 100644 --- a/activerecord/lib/active_record/connection_adapters/determine_if_preparable_visitor.rb +++ b/activerecord/lib/active_record/connection_adapters/determine_if_preparable_visitor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module DetermineIfPreparableVisitor diff --git a/activerecord/lib/active_record/connection_adapters/mysql/column.rb b/activerecord/lib/active_record/connection_adapters/mysql/column.rb index c9ad47c03572..8bdc2a16225c 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/column.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/column.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module MySQL diff --git a/activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb b/activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb index 9f1021456bb5..733b4ce734d8 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module MySQL diff --git a/activerecord/lib/active_record/connection_adapters/mysql/explain_pretty_printer.rb b/activerecord/lib/active_record/connection_adapters/mysql/explain_pretty_printer.rb index 9691060cd3fe..f174ba5b0eb0 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/explain_pretty_printer.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/explain_pretty_printer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module MySQL diff --git a/activerecord/lib/active_record/connection_adapters/mysql/quoting.rb b/activerecord/lib/active_record/connection_adapters/mysql/quoting.rb index d4f5906b332a..9fcf1e0a8974 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/quoting.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/quoting.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module MySQL diff --git a/activerecord/lib/active_record/connection_adapters/mysql/schema_creation.rb b/activerecord/lib/active_record/connection_adapters/mysql/schema_creation.rb index 083cd6340f70..285aed12e263 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/schema_creation.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/schema_creation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module MySQL diff --git a/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb index 6d88c14d50ef..b62b857bb737 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module MySQL diff --git a/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper.rb b/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper.rb index f21b2546de96..1748bceb4e3b 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module MySQL diff --git a/activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb index fc57e41fc927..7d6fa4b60ad3 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module MySQL diff --git a/activerecord/lib/active_record/connection_adapters/mysql/type_metadata.rb b/activerecord/lib/active_record/connection_adapters/mysql/type_metadata.rb index 9ad6a6c0d016..aa4d98e06bef 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/type_metadata.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/type_metadata.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module MySQL diff --git a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb index af55cfe2f6ce..350a99a2e423 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/connection_adapters/abstract_mysql_adapter" require "active_record/connection_adapters/mysql/database_statements" diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/column.rb b/activerecord/lib/active_record/connection_adapters/postgresql/column.rb index 3ad1911a281e..36382b6d5789 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/column.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/column.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters # PostgreSQL-specific extensions to column definitions in a table. diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb b/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb index ebf1715ed0ef..659b860ccea7 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/explain_pretty_printer.rb b/activerecord/lib/active_record/connection_adapters/postgresql/explain_pretty_printer.rb index 99f3a5bbdf99..21d0b4a0d2cf 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/explain_pretty_printer.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/explain_pretty_printer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb index 4098250f3ec6..ea07b4843045 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/connection_adapters/postgresql/oid/array" require "active_record/connection_adapters/postgresql/oid/bit" require "active_record/connection_adapters/postgresql/oid/bit_varying" diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/array.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/array.rb index a73a8c172688..fd629012ec01 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/array.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/array.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb index 0a505f46a767..70e84d85c29d 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit_varying.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit_varying.rb index 4c21097d48f7..b4ea3b4eddfb 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit_varying.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit_varying.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea.rb index 702fa8175cd7..4902a64330c3 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/cidr.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/cidr.rb index 5225609e370a..2007665ec07d 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/cidr.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/cidr.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "ipaddr" module ActiveRecord diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/date_time.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/date_time.rb index b7acbf7178dd..110771e7a231 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/date_time.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/date_time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/decimal.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/decimal.rb index 43d22c8daf67..bc720a36c8a6 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/decimal.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/decimal.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/enum.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/enum.rb index 950d23d51632..db1cd22b48a5 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/enum.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/enum.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/hstore.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/hstore.rb index 49dd4fc73fea..828bcd23ddd0 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/hstore.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/hstore.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/inet.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/inet.rb index 96486fa65bea..4cc78a8c10ed 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/inet.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/inet.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/json.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/json.rb index 3c706c27c4f7..bb0f8487fa2a 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/json.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/json.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb.rb index a1fec289d429..fcb6c1498d98 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/legacy_point.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/legacy_point.rb index 775eecaf85e9..3ed9fefee8a7 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/legacy_point.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/legacy_point.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb index 7a91272d1c5a..cc3e0c9169c3 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/oid.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/oid.rb index 9c2ac08b303b..d8b47e8e2912 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/oid.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/oid.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/point.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/point.rb index 7c764e7287dd..3275f28d0c11 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/point.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/point.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord Point = Struct.new(:x, :y) diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb index 54d5d0902e46..eddb0fb0ac64 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/specialized_string.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/specialized_string.rb index 564e82a4ac9e..f5270a64abe5 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/specialized_string.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/specialized_string.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb index d9ae1aa7a2f3..503691f7fc0c 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid.rb index 5e839228e9fa..2fdf3b5d8ed9 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/vector.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/vector.rb index b26e876b543a..6d86a221a7ca 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/vector.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/vector.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/xml.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/xml.rb index d40d837cee0c..f0e21f9f232a 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/xml.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/xml.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb index 44eb666965c1..9ffa81ec5922 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity.rb b/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity.rb index 44a7338bf5d7..3387bad79f91 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/schema_creation.rb b/activerecord/lib/active_record/connection_adapters/postgresql/schema_creation.rb index e1d5089115f2..5fab6f60d27a 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_creation.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_creation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb index 11ea1e5144d1..32b7239f54e2 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper.rb b/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper.rb index 5555a46b6bdb..a631e4534f78 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb index 7aa034f90160..b746304c2722 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/strip" module ActiveRecord diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb b/activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb index f57179ae59e3..110cc888724d 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters class PostgreSQLTypeMetadata < DelegateClass(SqlTypeMetadata) diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/utils.rb b/activerecord/lib/active_record/connection_adapters/postgresql/utils.rb index aa7940188a7c..6a4d6d50bd5e 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/utils.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/utils.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 99edbe486f48..edf313f49dc8 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Make sure we're using pg high enough for type casts and Ruby 2.2+ compatibility gem "pg", "~> 0.18" require "pg" diff --git a/activerecord/lib/active_record/connection_adapters/schema_cache.rb b/activerecord/lib/active_record/connection_adapters/schema_cache.rb index 4d339b0a8c0f..32aa9d803bc7 100644 --- a/activerecord/lib/active_record/connection_adapters/schema_cache.rb +++ b/activerecord/lib/active_record/connection_adapters/schema_cache.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters class SchemaCache diff --git a/activerecord/lib/active_record/connection_adapters/sql_type_metadata.rb b/activerecord/lib/active_record/connection_adapters/sql_type_metadata.rb index 9e12ae0de8ef..e6908e984663 100644 --- a/activerecord/lib/active_record/connection_adapters/sql_type_metadata.rb +++ b/activerecord/lib/active_record/connection_adapters/sql_type_metadata.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # :stopdoc: module ConnectionAdapters diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb b/activerecord/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb index 6fe3e1211ed0..01cfafdd2b45 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module SQLite3 diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb b/activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb index 7276a65098c5..c5bc797d4832 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module SQLite3 diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3/schema_creation.rb b/activerecord/lib/active_record/connection_adapters/sqlite3/schema_creation.rb index bc798d1dbb68..bcd43eac0840 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3/schema_creation.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3/schema_creation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module SQLite3 diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb index e157e4b218aa..7bbda675ebd1 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module SQLite3 diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3/schema_dumper.rb b/activerecord/lib/active_record/connection_adapters/sqlite3/schema_dumper.rb index eec018eda3cb..d265a6020659 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3/schema_dumper.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3/schema_dumper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module SQLite3 diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/sqlite3/schema_statements.rb index e02491edb6cc..9c10970d344a 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3/schema_statements.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module SQLite3 diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb index ee2faf43b536..c4cbdb588cb5 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/connection_adapters/abstract_adapter" require "active_record/connection_adapters/statement_pool" require "active_record/connection_adapters/sqlite3/explain_pretty_printer" diff --git a/activerecord/lib/active_record/connection_adapters/statement_pool.rb b/activerecord/lib/active_record/connection_adapters/statement_pool.rb index 790db56185ae..e7c237d42f92 100644 --- a/activerecord/lib/active_record/connection_adapters/statement_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/statement_pool.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionAdapters class StatementPool # :nodoc: diff --git a/activerecord/lib/active_record/connection_handling.rb b/activerecord/lib/active_record/connection_handling.rb index b8fbb489b608..61f160b99d1c 100644 --- a/activerecord/lib/active_record/connection_handling.rb +++ b/activerecord/lib/active_record/connection_handling.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionHandling RAILS_ENV = -> { (Rails.env if defined?(Rails.env)) || ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence } diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 198c712abce2..f1eaa07f1a48 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "thread" require "active_support/core_ext/hash/indifferent_access" require "active_support/core_ext/object/duplicable" diff --git a/activerecord/lib/active_record/counter_cache.rb b/activerecord/lib/active_record/counter_cache.rb index cbd71a37796f..5dcd28244afe 100644 --- a/activerecord/lib/active_record/counter_cache.rb +++ b/activerecord/lib/active_record/counter_cache.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record Counter Cache module CounterCache diff --git a/activerecord/lib/active_record/define_callbacks.rb b/activerecord/lib/active_record/define_callbacks.rb index 7d955a24bedc..291ebd3678a5 100644 --- a/activerecord/lib/active_record/define_callbacks.rb +++ b/activerecord/lib/active_record/define_callbacks.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # This module exists because `ActiveRecord::AttributeMethods::Dirty` needs to # define callbacks, but continue to have its version of `save` be the super diff --git a/activerecord/lib/active_record/dynamic_matchers.rb b/activerecord/lib/active_record/dynamic_matchers.rb index 3a9625092efa..a3425c8097e2 100644 --- a/activerecord/lib/active_record/dynamic_matchers.rb +++ b/activerecord/lib/active_record/dynamic_matchers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module DynamicMatchers #:nodoc: private diff --git a/activerecord/lib/active_record/enum.rb b/activerecord/lib/active_record/enum.rb index 12ef58a941ac..86ffa28306af 100644 --- a/activerecord/lib/active_record/enum.rb +++ b/activerecord/lib/active_record/enum.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/deep_dup" module ActiveRecord diff --git a/activerecord/lib/active_record/errors.rb b/activerecord/lib/active_record/errors.rb index 60d4fb70e05d..7507d6153553 100644 --- a/activerecord/lib/active_record/errors.rb +++ b/activerecord/lib/active_record/errors.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record Errors # diff --git a/activerecord/lib/active_record/explain.rb b/activerecord/lib/active_record/explain.rb index 8f7ae2c33cd9..c6a9e2a67cce 100644 --- a/activerecord/lib/active_record/explain.rb +++ b/activerecord/lib/active_record/explain.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/explain_registry" module ActiveRecord diff --git a/activerecord/lib/active_record/explain_registry.rb b/activerecord/lib/active_record/explain_registry.rb index ef1ce3dc85ef..0af48be6fd07 100644 --- a/activerecord/lib/active_record/explain_registry.rb +++ b/activerecord/lib/active_record/explain_registry.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/per_thread_registry" module ActiveRecord diff --git a/activerecord/lib/active_record/explain_subscriber.rb b/activerecord/lib/active_record/explain_subscriber.rb index abd8cfc8f241..07a412a8a17f 100644 --- a/activerecord/lib/active_record/explain_subscriber.rb +++ b/activerecord/lib/active_record/explain_subscriber.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/notifications" require "active_record/explain_registry" diff --git a/activerecord/lib/active_record/fixture_set/file.rb b/activerecord/lib/active_record/fixture_set/file.rb index 6cf2e011798c..93b8ba07e912 100644 --- a/activerecord/lib/active_record/fixture_set/file.rb +++ b/activerecord/lib/active_record/fixture_set/file.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "erb" require "yaml" diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index e9acb8acae43..1835965b7f3d 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "erb" require "yaml" require "zlib" diff --git a/activerecord/lib/active_record/gem_version.rb b/activerecord/lib/active_record/gem_version.rb index 1a937dbcf7c6..a0434766f55f 100644 --- a/activerecord/lib/active_record/gem_version.rb +++ b/activerecord/lib/active_record/gem_version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # Returns the version of the currently loaded Active Record as a Gem::Version def self.gem_version diff --git a/activerecord/lib/active_record/inheritance.rb b/activerecord/lib/active_record/inheritance.rb index 5776807507b0..10911b9a3e97 100644 --- a/activerecord/lib/active_record/inheritance.rb +++ b/activerecord/lib/active_record/inheritance.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/indifferent_access" module ActiveRecord diff --git a/activerecord/lib/active_record/integration.rb b/activerecord/lib/active_record/integration.rb index cf954852bca4..2bb96457c6e4 100644 --- a/activerecord/lib/active_record/integration.rb +++ b/activerecord/lib/active_record/integration.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/filters" module ActiveRecord diff --git a/activerecord/lib/active_record/internal_metadata.rb b/activerecord/lib/active_record/internal_metadata.rb index 25ee9d6bfe03..9ec6b51cb392 100644 --- a/activerecord/lib/active_record/internal_metadata.rb +++ b/activerecord/lib/active_record/internal_metadata.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/scoping/default" require "active_record/scoping/named" diff --git a/activerecord/lib/active_record/legacy_yaml_adapter.rb b/activerecord/lib/active_record/legacy_yaml_adapter.rb index c7683f68c734..ba74f1a56c4a 100644 --- a/activerecord/lib/active_record/legacy_yaml_adapter.rb +++ b/activerecord/lib/active_record/legacy_yaml_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module LegacyYamlAdapter def self.convert(klass, coder) diff --git a/activerecord/lib/active_record/locking/optimistic.rb b/activerecord/lib/active_record/locking/optimistic.rb index 522da6a5712e..2e2f2979d804 100644 --- a/activerecord/lib/active_record/locking/optimistic.rb +++ b/activerecord/lib/active_record/locking/optimistic.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Locking # == What is Optimistic Locking diff --git a/activerecord/lib/active_record/locking/pessimistic.rb b/activerecord/lib/active_record/locking/pessimistic.rb index 263e2a5f7fac..0fb4dc3a35ac 100644 --- a/activerecord/lib/active_record/locking/pessimistic.rb +++ b/activerecord/lib/active_record/locking/pessimistic.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Locking # Locking::Pessimistic provides support for row-level locking using diff --git a/activerecord/lib/active_record/log_subscriber.rb b/activerecord/lib/active_record/log_subscriber.rb index e39ca5f6dc74..e8593c1a48a0 100644 --- a/activerecord/lib/active_record/log_subscriber.rb +++ b/activerecord/lib/active_record/log_subscriber.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class LogSubscriber < ActiveSupport::LogSubscriber IGNORE_PAYLOAD_NAMES = ["SCHEMA", "EXPLAIN"] diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index 51c82f4ced51..f83842958c42 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "set" require "zlib" require "active_support/core_ext/module/attribute_accessors" diff --git a/activerecord/lib/active_record/migration/command_recorder.rb b/activerecord/lib/active_record/migration/command_recorder.rb index f9cf59b2833d..164104484112 100644 --- a/activerecord/lib/active_record/migration/command_recorder.rb +++ b/activerecord/lib/active_record/migration/command_recorder.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class Migration # ActiveRecord::Migration::CommandRecorder records commands done during diff --git a/activerecord/lib/active_record/migration/compatibility.rb b/activerecord/lib/active_record/migration/compatibility.rb index 188dd0acefeb..ccb1b2ddd705 100644 --- a/activerecord/lib/active_record/migration/compatibility.rb +++ b/activerecord/lib/active_record/migration/compatibility.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class Migration module Compatibility # :nodoc: all diff --git a/activerecord/lib/active_record/migration/join_table.rb b/activerecord/lib/active_record/migration/join_table.rb index 89789f00ea94..026217880cd0 100644 --- a/activerecord/lib/active_record/migration/join_table.rb +++ b/activerecord/lib/active_record/migration/join_table.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class Migration module JoinTable #:nodoc: diff --git a/activerecord/lib/active_record/model_schema.rb b/activerecord/lib/active_record/model_schema.rb index 14e0f5bff754..e846bcc1a16e 100644 --- a/activerecord/lib/active_record/model_schema.rb +++ b/activerecord/lib/active_record/model_schema.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "monitor" module ActiveRecord diff --git a/activerecord/lib/active_record/nested_attributes.rb b/activerecord/lib/active_record/nested_attributes.rb index 917bc769933f..43d4364e3524 100644 --- a/activerecord/lib/active_record/nested_attributes.rb +++ b/activerecord/lib/active_record/nested_attributes.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/except" require "active_support/core_ext/object/try" require "active_support/core_ext/hash/indifferent_access" diff --git a/activerecord/lib/active_record/no_touching.rb b/activerecord/lib/active_record/no_touching.rb index 4059020e2573..84ee036c175d 100644 --- a/activerecord/lib/active_record/no_touching.rb +++ b/activerecord/lib/active_record/no_touching.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record No Touching module NoTouching diff --git a/activerecord/lib/active_record/null_relation.rb b/activerecord/lib/active_record/null_relation.rb index 26966f94338e..6d65154a142b 100644 --- a/activerecord/lib/active_record/null_relation.rb +++ b/activerecord/lib/active_record/null_relation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module NullRelation # :nodoc: def pluck(*column_names) diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index b2dba5516e69..c310ae35755f 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record \Persistence module Persistence diff --git a/activerecord/lib/active_record/query_cache.rb b/activerecord/lib/active_record/query_cache.rb index e4c2e1f86ff6..17e6bbfec023 100644 --- a/activerecord/lib/active_record/query_cache.rb +++ b/activerecord/lib/active_record/query_cache.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record Query Cache class QueryCache diff --git a/activerecord/lib/active_record/querying.rb b/activerecord/lib/active_record/querying.rb index b16e1783584c..dd7d833a9624 100644 --- a/activerecord/lib/active_record/querying.rb +++ b/activerecord/lib/active_record/querying.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Querying delegate :find, :take, :take!, :first, :first!, :last, :last!, :exists?, :any?, :many?, :none?, :one?, to: :all diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index 73518ca14443..441dca9fe7cc 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record" require "rails" require "active_model/railtie" diff --git a/activerecord/lib/active_record/railties/console_sandbox.rb b/activerecord/lib/active_record/railties/console_sandbox.rb index 604a220303b9..03286eacbb36 100644 --- a/activerecord/lib/active_record/railties/console_sandbox.rb +++ b/activerecord/lib/active_record/railties/console_sandbox.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ActiveRecord::Base.connection.begin_transaction(joinable: false) at_exit do diff --git a/activerecord/lib/active_record/railties/controller_runtime.rb b/activerecord/lib/active_record/railties/controller_runtime.rb index 8658188623e1..297f3fc8bc20 100644 --- a/activerecord/lib/active_record/railties/controller_runtime.rb +++ b/activerecord/lib/active_record/railties/controller_runtime.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attr_internal" require "active_record/log_subscriber" diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 711099e9e107..7c0d066e8822 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record" db_namespace = namespace :db do diff --git a/activerecord/lib/active_record/railties/jdbcmysql_error.rb b/activerecord/lib/active_record/railties/jdbcmysql_error.rb index d7cf4df339e0..f614c067d7ac 100644 --- a/activerecord/lib/active_record/railties/jdbcmysql_error.rb +++ b/activerecord/lib/active_record/railties/jdbcmysql_error.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true #FIXME Remove if ArJdbcMysql will give. module ArJdbcMySQL #:nodoc: class Error < StandardError #:nodoc: diff --git a/activerecord/lib/active_record/readonly_attributes.rb b/activerecord/lib/active_record/readonly_attributes.rb index af6473d250bc..7bf305eb31a7 100644 --- a/activerecord/lib/active_record/readonly_attributes.rb +++ b/activerecord/lib/active_record/readonly_attributes.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ReadonlyAttributes extend ActiveSupport::Concern diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb index 73761ed7ed5b..be7625618628 100644 --- a/activerecord/lib/active_record/reflection.rb +++ b/activerecord/lib/active_record/reflection.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "thread" require "active_support/core_ext/string/filters" require "active_support/deprecation" diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index 52f5d5f3e3bc..55b59eeb5438 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record \Relation class Relation diff --git a/activerecord/lib/active_record/relation/batches.rb b/activerecord/lib/active_record/relation/batches.rb index 13a2c3f51188..ac48ffb1bca4 100644 --- a/activerecord/lib/active_record/relation/batches.rb +++ b/activerecord/lib/active_record/relation/batches.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/relation/batches/batch_enumerator" module ActiveRecord diff --git a/activerecord/lib/active_record/relation/batches/batch_enumerator.rb b/activerecord/lib/active_record/relation/batches/batch_enumerator.rb index 3555779ec2c5..02c70d5cf08e 100644 --- a/activerecord/lib/active_record/relation/batches/batch_enumerator.rb +++ b/activerecord/lib/active_record/relation/batches/batch_enumerator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Batches class BatchEnumerator diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb index 8a54f8f2c3bd..6514c7bde8db 100644 --- a/activerecord/lib/active_record/relation/calculations.rb +++ b/activerecord/lib/active_record/relation/calculations.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Calculations # Count the records. diff --git a/activerecord/lib/active_record/relation/delegation.rb b/activerecord/lib/active_record/relation/delegation.rb index 48c4dcdef452..6d3b59d33953 100644 --- a/activerecord/lib/active_record/relation/delegation.rb +++ b/activerecord/lib/active_record/relation/delegation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Delegation # :nodoc: module DelegateCache # :nodoc: diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index df8909379f8a..caa65af50c11 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/filters" module ActiveRecord diff --git a/activerecord/lib/active_record/relation/from_clause.rb b/activerecord/lib/active_record/relation/from_clause.rb index 8945cb0cc56e..ea838b79a6e0 100644 --- a/activerecord/lib/active_record/relation/from_clause.rb +++ b/activerecord/lib/active_record/relation/from_clause.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class Relation class FromClause # :nodoc: diff --git a/activerecord/lib/active_record/relation/merger.rb b/activerecord/lib/active_record/relation/merger.rb index 5dac00724a6b..84c31e412674 100644 --- a/activerecord/lib/active_record/relation/merger.rb +++ b/activerecord/lib/active_record/relation/merger.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/keys" module ActiveRecord diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb index 7dea5deec5e3..72314180ddbc 100644 --- a/activerecord/lib/active_record/relation/predicate_builder.rb +++ b/activerecord/lib/active_record/relation/predicate_builder.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class PredicateBuilder # :nodoc: delegate :resolve_column_aliases, to: :table diff --git a/activerecord/lib/active_record/relation/predicate_builder/array_handler.rb b/activerecord/lib/active_record/relation/predicate_builder/array_handler.rb index 1068e700e292..4d0778df36b1 100644 --- a/activerecord/lib/active_record/relation/predicate_builder/array_handler.rb +++ b/activerecord/lib/active_record/relation/predicate_builder/array_handler.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class PredicateBuilder class ArrayHandler # :nodoc: diff --git a/activerecord/lib/active_record/relation/predicate_builder/association_query_value.rb b/activerecord/lib/active_record/relation/predicate_builder/association_query_value.rb index 3e19646ae587..66690d6b5c3d 100644 --- a/activerecord/lib/active_record/relation/predicate_builder/association_query_value.rb +++ b/activerecord/lib/active_record/relation/predicate_builder/association_query_value.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class PredicateBuilder class AssociationQueryValue # :nodoc: diff --git a/activerecord/lib/active_record/relation/predicate_builder/base_handler.rb b/activerecord/lib/active_record/relation/predicate_builder/base_handler.rb index 3bb103788546..3472b16cefbf 100644 --- a/activerecord/lib/active_record/relation/predicate_builder/base_handler.rb +++ b/activerecord/lib/active_record/relation/predicate_builder/base_handler.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class PredicateBuilder class BaseHandler # :nodoc: diff --git a/activerecord/lib/active_record/relation/predicate_builder/basic_object_handler.rb b/activerecord/lib/active_record/relation/predicate_builder/basic_object_handler.rb index 79cde00303a1..319060250616 100644 --- a/activerecord/lib/active_record/relation/predicate_builder/basic_object_handler.rb +++ b/activerecord/lib/active_record/relation/predicate_builder/basic_object_handler.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class PredicateBuilder class BasicObjectHandler # :nodoc: diff --git a/activerecord/lib/active_record/relation/predicate_builder/polymorphic_array_value.rb b/activerecord/lib/active_record/relation/predicate_builder/polymorphic_array_value.rb index 7029ae5f479c..503217775790 100644 --- a/activerecord/lib/active_record/relation/predicate_builder/polymorphic_array_value.rb +++ b/activerecord/lib/active_record/relation/predicate_builder/polymorphic_array_value.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class PredicateBuilder class PolymorphicArrayValue # :nodoc: diff --git a/activerecord/lib/active_record/relation/predicate_builder/range_handler.rb b/activerecord/lib/active_record/relation/predicate_builder/range_handler.rb index 5db778e19c07..ddd804b50881 100644 --- a/activerecord/lib/active_record/relation/predicate_builder/range_handler.rb +++ b/activerecord/lib/active_record/relation/predicate_builder/range_handler.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class PredicateBuilder class RangeHandler # :nodoc: diff --git a/activerecord/lib/active_record/relation/predicate_builder/relation_handler.rb b/activerecord/lib/active_record/relation/predicate_builder/relation_handler.rb index 8a910a82fe5d..4e1e644599b2 100644 --- a/activerecord/lib/active_record/relation/predicate_builder/relation_handler.rb +++ b/activerecord/lib/active_record/relation/predicate_builder/relation_handler.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class PredicateBuilder class RelationHandler # :nodoc: diff --git a/activerecord/lib/active_record/relation/query_attribute.rb b/activerecord/lib/active_record/relation/query_attribute.rb index a68e508fcc83..410a375e5276 100644 --- a/activerecord/lib/active_record/relation/query_attribute.rb +++ b/activerecord/lib/active_record/relation/query_attribute.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/attribute" module ActiveRecord diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index d44f6fd57231..4ddc933e3dfa 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/relation/from_clause" require "active_record/relation/query_attribute" require "active_record/relation/where_clause" diff --git a/activerecord/lib/active_record/relation/record_fetch_warning.rb b/activerecord/lib/active_record/relation/record_fetch_warning.rb index 31544c730e66..8e221f1570a4 100644 --- a/activerecord/lib/active_record/relation/record_fetch_warning.rb +++ b/activerecord/lib/active_record/relation/record_fetch_warning.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class Relation module RecordFetchWarning diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb index ada89b5ec3ed..8b7b01259e4c 100644 --- a/activerecord/lib/active_record/relation/spawn_methods.rb +++ b/activerecord/lib/active_record/relation/spawn_methods.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/except" require "active_support/core_ext/hash/slice" require "active_record/relation/merger" diff --git a/activerecord/lib/active_record/relation/where_clause.rb b/activerecord/lib/active_record/relation/where_clause.rb index 119910ee7968..a80975292803 100644 --- a/activerecord/lib/active_record/relation/where_clause.rb +++ b/activerecord/lib/active_record/relation/where_clause.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class Relation class WhereClause # :nodoc: diff --git a/activerecord/lib/active_record/relation/where_clause_factory.rb b/activerecord/lib/active_record/relation/where_clause_factory.rb index b862dd56a591..156088f53460 100644 --- a/activerecord/lib/active_record/relation/where_clause_factory.rb +++ b/activerecord/lib/active_record/relation/where_clause_factory.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class Relation class WhereClauseFactory # :nodoc: diff --git a/activerecord/lib/active_record/result.rb b/activerecord/lib/active_record/result.rb index 26b1d48e9eec..5e1c0bfefc29 100644 --- a/activerecord/lib/active_record/result.rb +++ b/activerecord/lib/active_record/result.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord ### # This class encapsulates a result returned from calling diff --git a/activerecord/lib/active_record/runtime_registry.rb b/activerecord/lib/active_record/runtime_registry.rb index b79eb2263f00..d068d8898eda 100644 --- a/activerecord/lib/active_record/runtime_registry.rb +++ b/activerecord/lib/active_record/runtime_registry.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/per_thread_registry" module ActiveRecord diff --git a/activerecord/lib/active_record/sanitization.rb b/activerecord/lib/active_record/sanitization.rb index 64bda1539c2a..a39e1a2e73a9 100644 --- a/activerecord/lib/active_record/sanitization.rb +++ b/activerecord/lib/active_record/sanitization.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Sanitization extend ActiveSupport::Concern diff --git a/activerecord/lib/active_record/schema.rb b/activerecord/lib/active_record/schema.rb index 5104427339cd..2578c5e3efb3 100644 --- a/activerecord/lib/active_record/schema.rb +++ b/activerecord/lib/active_record/schema.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record \Schema # diff --git a/activerecord/lib/active_record/schema_dumper.rb b/activerecord/lib/active_record/schema_dumper.rb index 66a2846f3a1d..767da6816d39 100644 --- a/activerecord/lib/active_record/schema_dumper.rb +++ b/activerecord/lib/active_record/schema_dumper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "stringio" module ActiveRecord diff --git a/activerecord/lib/active_record/schema_migration.rb b/activerecord/lib/active_record/schema_migration.rb index f59737afb01c..e6336dfde359 100644 --- a/activerecord/lib/active_record/schema_migration.rb +++ b/activerecord/lib/active_record/schema_migration.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/scoping/default" require "active_record/scoping/named" diff --git a/activerecord/lib/active_record/scoping.rb b/activerecord/lib/active_record/scoping.rb index 94e0ef6724d6..c2cd35ee3b4a 100644 --- a/activerecord/lib/active_record/scoping.rb +++ b/activerecord/lib/active_record/scoping.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/per_thread_registry" module ActiveRecord diff --git a/activerecord/lib/active_record/scoping/default.rb b/activerecord/lib/active_record/scoping/default.rb index 70b2693b28aa..eeb89c405adf 100644 --- a/activerecord/lib/active_record/scoping/default.rb +++ b/activerecord/lib/active_record/scoping/default.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Scoping module Default diff --git a/activerecord/lib/active_record/scoping/named.rb b/activerecord/lib/active_record/scoping/named.rb index b4026fabb21d..c16cbce1091b 100644 --- a/activerecord/lib/active_record/scoping/named.rb +++ b/activerecord/lib/active_record/scoping/named.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array" require "active_support/core_ext/hash/except" require "active_support/core_ext/kernel/singleton_class" diff --git a/activerecord/lib/active_record/secure_token.rb b/activerecord/lib/active_record/secure_token.rb index 115799cc2083..3b2d7e10bd6f 100644 --- a/activerecord/lib/active_record/secure_token.rb +++ b/activerecord/lib/active_record/secure_token.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module SecureToken extend ActiveSupport::Concern diff --git a/activerecord/lib/active_record/serialization.rb b/activerecord/lib/active_record/serialization.rb index db2bd0b55edd..1907defb2e3e 100644 --- a/activerecord/lib/active_record/serialization.rb +++ b/activerecord/lib/active_record/serialization.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord #:nodoc: # = Active Record \Serialization module Serialization diff --git a/activerecord/lib/active_record/statement_cache.rb b/activerecord/lib/active_record/statement_cache.rb index 1877489e55d6..fd04f9aedb5d 100644 --- a/activerecord/lib/active_record/statement_cache.rb +++ b/activerecord/lib/active_record/statement_cache.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # Statement cache is used to cache a single statement in order to avoid creating the AST again. # Initializing the cache is done by passing the statement in the create block: diff --git a/activerecord/lib/active_record/store.rb b/activerecord/lib/active_record/store.rb index 006afe7495bb..37888c28b52a 100644 --- a/activerecord/lib/active_record/store.rb +++ b/activerecord/lib/active_record/store.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/indifferent_access" module ActiveRecord diff --git a/activerecord/lib/active_record/suppressor.rb b/activerecord/lib/active_record/suppressor.rb index d9acb1a1dc97..02185c2e0baf 100644 --- a/activerecord/lib/active_record/suppressor.rb +++ b/activerecord/lib/active_record/suppressor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # ActiveRecord::Suppressor prevents the receiver from being saved during # a given block. diff --git a/activerecord/lib/active_record/table_metadata.rb b/activerecord/lib/active_record/table_metadata.rb index 71efc1829ad5..a5dd3008d0e4 100644 --- a/activerecord/lib/active_record/table_metadata.rb +++ b/activerecord/lib/active_record/table_metadata.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord class TableMetadata # :nodoc: delegate :foreign_type, :foreign_key, to: :association, prefix: true diff --git a/activerecord/lib/active_record/tasks/database_tasks.rb b/activerecord/lib/active_record/tasks/database_tasks.rb index ba686fc56277..bdfa683be4e4 100644 --- a/activerecord/lib/active_record/tasks/database_tasks.rb +++ b/activerecord/lib/active_record/tasks/database_tasks.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Tasks # :nodoc: class DatabaseAlreadyExists < StandardError; end # :nodoc: diff --git a/activerecord/lib/active_record/tasks/mysql_database_tasks.rb b/activerecord/lib/active_record/tasks/mysql_database_tasks.rb index c25d87dd3ea1..447bf09a4fc2 100644 --- a/activerecord/lib/active_record/tasks/mysql_database_tasks.rb +++ b/activerecord/lib/active_record/tasks/mysql_database_tasks.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Tasks # :nodoc: class MySQLDatabaseTasks # :nodoc: diff --git a/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb b/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb index 7f1a768d8b1e..e49480b27b45 100644 --- a/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb +++ b/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "tempfile" module ActiveRecord diff --git a/activerecord/lib/active_record/tasks/sqlite_database_tasks.rb b/activerecord/lib/active_record/tasks/sqlite_database_tasks.rb index 01562b21e93e..559142b57a98 100644 --- a/activerecord/lib/active_record/tasks/sqlite_database_tasks.rb +++ b/activerecord/lib/active_record/tasks/sqlite_database_tasks.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Tasks # :nodoc: class SQLiteDatabaseTasks # :nodoc: diff --git a/activerecord/lib/active_record/touch_later.rb b/activerecord/lib/active_record/touch_later.rb index cacde9c881c7..1e484e59e30b 100644 --- a/activerecord/lib/active_record/touch_later.rb +++ b/activerecord/lib/active_record/touch_later.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record Touch Later module TouchLater diff --git a/activerecord/lib/active_record/transactions.rb b/activerecord/lib/active_record/transactions.rb index 45795fa287f1..4e8d2a44e172 100644 --- a/activerecord/lib/active_record/transactions.rb +++ b/activerecord/lib/active_record/transactions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # See ActiveRecord::Transactions::ClassMethods for documentation. module Transactions diff --git a/activerecord/lib/active_record/translation.rb b/activerecord/lib/active_record/translation.rb index ddcb5f2a7afa..ecc508902c2b 100644 --- a/activerecord/lib/active_record/translation.rb +++ b/activerecord/lib/active_record/translation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Translation include ActiveModel::Translation diff --git a/activerecord/lib/active_record/type.rb b/activerecord/lib/active_record/type.rb index 9ed6c95bf97c..a179582e13c6 100644 --- a/activerecord/lib/active_record/type.rb +++ b/activerecord/lib/active_record/type.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_model/type" require "active_record/type/internal/timezone" diff --git a/activerecord/lib/active_record/type/adapter_specific_registry.rb b/activerecord/lib/active_record/type/adapter_specific_registry.rb index 7cc866f7a79c..f24b9b9a36d7 100644 --- a/activerecord/lib/active_record/type/adapter_specific_registry.rb +++ b/activerecord/lib/active_record/type/adapter_specific_registry.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_model/type/registry" module ActiveRecord diff --git a/activerecord/lib/active_record/type/date.rb b/activerecord/lib/active_record/type/date.rb index ccafed054efd..f1a40a8a6be8 100644 --- a/activerecord/lib/active_record/type/date.rb +++ b/activerecord/lib/active_record/type/date.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Type class Date < ActiveModel::Type::Date diff --git a/activerecord/lib/active_record/type/date_time.rb b/activerecord/lib/active_record/type/date_time.rb index 1fb9380ecd4d..dadd76dbe0c4 100644 --- a/activerecord/lib/active_record/type/date_time.rb +++ b/activerecord/lib/active_record/type/date_time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Type class DateTime < ActiveModel::Type::DateTime diff --git a/activerecord/lib/active_record/type/decimal_without_scale.rb b/activerecord/lib/active_record/type/decimal_without_scale.rb index 53a5e205da74..ed0a4cfb2315 100644 --- a/activerecord/lib/active_record/type/decimal_without_scale.rb +++ b/activerecord/lib/active_record/type/decimal_without_scale.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Type class DecimalWithoutScale < ActiveModel::Type::BigInteger # :nodoc: diff --git a/activerecord/lib/active_record/type/hash_lookup_type_map.rb b/activerecord/lib/active_record/type/hash_lookup_type_map.rb index 0145d5d6c189..96b6297132a6 100644 --- a/activerecord/lib/active_record/type/hash_lookup_type_map.rb +++ b/activerecord/lib/active_record/type/hash_lookup_type_map.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Type class HashLookupTypeMap < TypeMap # :nodoc: diff --git a/activerecord/lib/active_record/type/internal/timezone.rb b/activerecord/lib/active_record/type/internal/timezone.rb index 947e06158a26..0c7d8ed76ec4 100644 --- a/activerecord/lib/active_record/type/internal/timezone.rb +++ b/activerecord/lib/active_record/type/internal/timezone.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Type module Internal diff --git a/activerecord/lib/active_record/type/json.rb b/activerecord/lib/active_record/type/json.rb index c4732fe3888b..9aec74241b53 100644 --- a/activerecord/lib/active_record/type/json.rb +++ b/activerecord/lib/active_record/type/json.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Type class Json < ActiveModel::Type::Value diff --git a/activerecord/lib/active_record/type/serialized.rb b/activerecord/lib/active_record/type/serialized.rb index edbd20a6c152..96e7ad715236 100644 --- a/activerecord/lib/active_record/type/serialized.rb +++ b/activerecord/lib/active_record/type/serialized.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Type class Serialized < DelegateClass(ActiveModel::Type::Value) # :nodoc: diff --git a/activerecord/lib/active_record/type/text.rb b/activerecord/lib/active_record/type/text.rb index cb1949700a20..3d7dd630e32a 100644 --- a/activerecord/lib/active_record/type/text.rb +++ b/activerecord/lib/active_record/type/text.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Type class Text < ActiveModel::Type::String # :nodoc: diff --git a/activerecord/lib/active_record/type/time.rb b/activerecord/lib/active_record/type/time.rb index b9bac87c67f0..3ca7010c792d 100644 --- a/activerecord/lib/active_record/type/time.rb +++ b/activerecord/lib/active_record/type/time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Type class Time < ActiveModel::Type::Time diff --git a/activerecord/lib/active_record/type/type_map.rb b/activerecord/lib/active_record/type/type_map.rb index 7bce82a1fff4..f28caff991b4 100644 --- a/activerecord/lib/active_record/type/type_map.rb +++ b/activerecord/lib/active_record/type/type_map.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "concurrent/map" module ActiveRecord diff --git a/activerecord/lib/active_record/type/unsigned_integer.rb b/activerecord/lib/active_record/type/unsigned_integer.rb index 9ae0109f9f0d..45f5dc506e62 100644 --- a/activerecord/lib/active_record/type/unsigned_integer.rb +++ b/activerecord/lib/active_record/type/unsigned_integer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Type class UnsignedInteger < ActiveModel::Type::Integer # :nodoc: diff --git a/activerecord/lib/active_record/type_caster.rb b/activerecord/lib/active_record/type_caster.rb index f1686e4913d9..dbe91dc12bca 100644 --- a/activerecord/lib/active_record/type_caster.rb +++ b/activerecord/lib/active_record/type_caster.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_record/type_caster/map" require "active_record/type_caster/connection" diff --git a/activerecord/lib/active_record/type_caster/connection.rb b/activerecord/lib/active_record/type_caster/connection.rb index 9f7bbe8843f5..4f4570db58bc 100644 --- a/activerecord/lib/active_record/type_caster/connection.rb +++ b/activerecord/lib/active_record/type_caster/connection.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module TypeCaster class Connection # :nodoc: diff --git a/activerecord/lib/active_record/type_caster/map.rb b/activerecord/lib/active_record/type_caster/map.rb index 9f7972312587..fd3477a826b2 100644 --- a/activerecord/lib/active_record/type_caster/map.rb +++ b/activerecord/lib/active_record/type_caster/map.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module TypeCaster class Map # :nodoc: diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index 9633f226f0e3..4727221774a8 100644 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord # = Active Record \RecordInvalid # diff --git a/activerecord/lib/active_record/validations/absence.rb b/activerecord/lib/active_record/validations/absence.rb index 641d041f3d7c..57fbdb92ee9b 100644 --- a/activerecord/lib/active_record/validations/absence.rb +++ b/activerecord/lib/active_record/validations/absence.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Validations class AbsenceValidator < ActiveModel::Validations::AbsenceValidator # :nodoc: diff --git a/activerecord/lib/active_record/validations/associated.rb b/activerecord/lib/active_record/validations/associated.rb index c695965d7b29..d7752b428b0d 100644 --- a/activerecord/lib/active_record/validations/associated.rb +++ b/activerecord/lib/active_record/validations/associated.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Validations class AssociatedValidator < ActiveModel::EachValidator #:nodoc: diff --git a/activerecord/lib/active_record/validations/length.rb b/activerecord/lib/active_record/validations/length.rb index 0e0cebce4ad4..82a17b4807ca 100644 --- a/activerecord/lib/active_record/validations/length.rb +++ b/activerecord/lib/active_record/validations/length.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Validations class LengthValidator < ActiveModel::Validations::LengthValidator # :nodoc: diff --git a/activerecord/lib/active_record/validations/presence.rb b/activerecord/lib/active_record/validations/presence.rb index 7cfd55f51612..a8f8bc6b0297 100644 --- a/activerecord/lib/active_record/validations/presence.rb +++ b/activerecord/lib/active_record/validations/presence.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Validations class PresenceValidator < ActiveModel::Validations::PresenceValidator # :nodoc: diff --git a/activerecord/lib/active_record/validations/uniqueness.rb b/activerecord/lib/active_record/validations/uniqueness.rb index 154cf5f1a497..86eeb5d7c5e9 100644 --- a/activerecord/lib/active_record/validations/uniqueness.rb +++ b/activerecord/lib/active_record/validations/uniqueness.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module Validations class UniquenessValidator < ActiveModel::EachValidator # :nodoc: diff --git a/activerecord/lib/active_record/version.rb b/activerecord/lib/active_record/version.rb index 146cfacc180b..78e9169b2e65 100644 --- a/activerecord/lib/active_record/version.rb +++ b/activerecord/lib/active_record/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "gem_version" module ActiveRecord diff --git a/activerecord/lib/rails/generators/active_record.rb b/activerecord/lib/rails/generators/active_record.rb index a79b8eafeac4..aaa2a147024b 100644 --- a/activerecord/lib/rails/generators/active_record.rb +++ b/activerecord/lib/rails/generators/active_record.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rails/generators/named_base" require "rails/generators/active_model" require "rails/generators/active_record/migration" diff --git a/activerecord/lib/rails/generators/active_record/migration.rb b/activerecord/lib/rails/generators/active_record/migration.rb index 47c0981a49ed..6d07438dcb36 100644 --- a/activerecord/lib/rails/generators/active_record/migration.rb +++ b/activerecord/lib/rails/generators/active_record/migration.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rails/generators/migration" module ActiveRecord diff --git a/activerecord/lib/rails/generators/active_record/migration/migration_generator.rb b/activerecord/lib/rails/generators/active_record/migration/migration_generator.rb index 1f1c47499b06..61f507ddb31a 100644 --- a/activerecord/lib/rails/generators/active_record/migration/migration_generator.rb +++ b/activerecord/lib/rails/generators/active_record/migration/migration_generator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rails/generators/active_record" module ActiveRecord diff --git a/activerecord/lib/rails/generators/active_record/model/model_generator.rb b/activerecord/lib/rails/generators/active_record/model/model_generator.rb index 5cec07d2e3af..ee321089af2e 100644 --- a/activerecord/lib/rails/generators/active_record/model/model_generator.rb +++ b/activerecord/lib/rails/generators/active_record/model/model_generator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rails/generators/active_record" module ActiveRecord diff --git a/activerecord/test/active_record/connection_adapters/fake_adapter.rb b/activerecord/test/active_record/connection_adapters/fake_adapter.rb index b0d8050721bc..9391569f2f1c 100644 --- a/activerecord/test/active_record/connection_adapters/fake_adapter.rb +++ b/activerecord/test/active_record/connection_adapters/fake_adapter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ConnectionHandling def fake_connection(config) diff --git a/activerecord/test/cases/adapter_test.rb b/activerecord/test/cases/adapter_test.rb index a1fb6427f987..dd891cb2ed51 100644 --- a/activerecord/test/cases/adapter_test.rb +++ b/activerecord/test/cases/adapter_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/book" require "models/post" diff --git a/activerecord/test/cases/adapters/mysql2/active_schema_test.rb b/activerecord/test/cases/adapters/mysql2/active_schema_test.rb index 67e1efde2717..fdf83aaf8834 100644 --- a/activerecord/test/cases/adapters/mysql2/active_schema_test.rb +++ b/activerecord/test/cases/adapters/mysql2/active_schema_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/connection_helper" diff --git a/activerecord/test/cases/adapters/mysql2/bind_parameter_test.rb b/activerecord/test/cases/adapters/mysql2/bind_parameter_test.rb index 8f7c803a213f..9f3d1459f757 100644 --- a/activerecord/test/cases/adapters/mysql2/bind_parameter_test.rb +++ b/activerecord/test/cases/adapters/mysql2/bind_parameter_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activerecord/test/cases/adapters/mysql2/boolean_test.rb b/activerecord/test/cases/adapters/mysql2/boolean_test.rb index 58698d59dbe3..9267d15defa3 100644 --- a/activerecord/test/cases/adapters/mysql2/boolean_test.rb +++ b/activerecord/test/cases/adapters/mysql2/boolean_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class Mysql2BooleanTest < ActiveRecord::Mysql2TestCase diff --git a/activerecord/test/cases/adapters/mysql2/case_sensitivity_test.rb b/activerecord/test/cases/adapters/mysql2/case_sensitivity_test.rb index 50ba9ab83124..65dc3692132d 100644 --- a/activerecord/test/cases/adapters/mysql2/case_sensitivity_test.rb +++ b/activerecord/test/cases/adapters/mysql2/case_sensitivity_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class Mysql2CaseSensitivityTest < ActiveRecord::Mysql2TestCase diff --git a/activerecord/test/cases/adapters/mysql2/charset_collation_test.rb b/activerecord/test/cases/adapters/mysql2/charset_collation_test.rb index e4a6ed54821c..e77f4a90d456 100644 --- a/activerecord/test/cases/adapters/mysql2/charset_collation_test.rb +++ b/activerecord/test/cases/adapters/mysql2/charset_collation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/mysql2/connection_test.rb b/activerecord/test/cases/adapters/mysql2/connection_test.rb index a2faf43b0d40..c5ff145e743e 100644 --- a/activerecord/test/cases/adapters/mysql2/connection_test.rb +++ b/activerecord/test/cases/adapters/mysql2/connection_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/connection_helper" diff --git a/activerecord/test/cases/adapters/mysql2/datetime_precision_quoting_test.rb b/activerecord/test/cases/adapters/mysql2/datetime_precision_quoting_test.rb index c131a5169c1d..86e72c149cf5 100644 --- a/activerecord/test/cases/adapters/mysql2/datetime_precision_quoting_test.rb +++ b/activerecord/test/cases/adapters/mysql2/datetime_precision_quoting_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class Mysql2DatetimePrecisionQuotingTest < ActiveRecord::Mysql2TestCase diff --git a/activerecord/test/cases/adapters/mysql2/enum_test.rb b/activerecord/test/cases/adapters/mysql2/enum_test.rb index 7ad3e3ca2d3a..b811179c1bb0 100644 --- a/activerecord/test/cases/adapters/mysql2/enum_test.rb +++ b/activerecord/test/cases/adapters/mysql2/enum_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class Mysql2EnumTest < ActiveRecord::Mysql2TestCase diff --git a/activerecord/test/cases/adapters/mysql2/explain_test.rb b/activerecord/test/cases/adapters/mysql2/explain_test.rb index 7916921e5aa1..84c15af08dcd 100644 --- a/activerecord/test/cases/adapters/mysql2/explain_test.rb +++ b/activerecord/test/cases/adapters/mysql2/explain_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/developer" require "models/computer" diff --git a/activerecord/test/cases/adapters/mysql2/json_test.rb b/activerecord/test/cases/adapters/mysql2/json_test.rb index 26c69edc7b88..2d39db4ce21f 100644 --- a/activerecord/test/cases/adapters/mysql2/json_test.rb +++ b/activerecord/test/cases/adapters/mysql2/json_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "cases/json_shared_test_cases" diff --git a/activerecord/test/cases/adapters/mysql2/mysql2_adapter_test.rb b/activerecord/test/cases/adapters/mysql2/mysql2_adapter_test.rb index 565130c38faa..7ba388bee1ab 100644 --- a/activerecord/test/cases/adapters/mysql2/mysql2_adapter_test.rb +++ b/activerecord/test/cases/adapters/mysql2/mysql2_adapter_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/ddl_helper" diff --git a/activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb b/activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb index 251a50e41e13..4a421e2b9107 100644 --- a/activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb +++ b/activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class SchemaMigrationsTest < ActiveRecord::Mysql2TestCase diff --git a/activerecord/test/cases/adapters/mysql2/schema_test.rb b/activerecord/test/cases/adapters/mysql2/schema_test.rb index 1fad5585de52..c4bf58c13e25 100644 --- a/activerecord/test/cases/adapters/mysql2/schema_test.rb +++ b/activerecord/test/cases/adapters/mysql2/schema_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/comment" diff --git a/activerecord/test/cases/adapters/mysql2/sp_test.rb b/activerecord/test/cases/adapters/mysql2/sp_test.rb index 41825325351b..d4c4d02f792b 100644 --- a/activerecord/test/cases/adapters/mysql2/sp_test.rb +++ b/activerecord/test/cases/adapters/mysql2/sp_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/reply" diff --git a/activerecord/test/cases/adapters/mysql2/sql_types_test.rb b/activerecord/test/cases/adapters/mysql2/sql_types_test.rb index d6e7f29a5c5c..c41216645107 100644 --- a/activerecord/test/cases/adapters/mysql2/sql_types_test.rb +++ b/activerecord/test/cases/adapters/mysql2/sql_types_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class Mysql2SqlTypesTest < ActiveRecord::Mysql2TestCase diff --git a/activerecord/test/cases/adapters/mysql2/table_options_test.rb b/activerecord/test/cases/adapters/mysql2/table_options_test.rb index 61a8ce9bc0d2..54da2195d1e3 100644 --- a/activerecord/test/cases/adapters/mysql2/table_options_test.rb +++ b/activerecord/test/cases/adapters/mysql2/table_options_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/mysql2/transaction_test.rb b/activerecord/test/cases/adapters/mysql2/transaction_test.rb index 16101e38cb8b..e447e6ec8397 100644 --- a/activerecord/test/cases/adapters/mysql2/transaction_test.rb +++ b/activerecord/test/cases/adapters/mysql2/transaction_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/connection_helper" diff --git a/activerecord/test/cases/adapters/mysql2/unsigned_type_test.rb b/activerecord/test/cases/adapters/mysql2/unsigned_type_test.rb index 71dcfaa2413a..1703e8fef7e5 100644 --- a/activerecord/test/cases/adapters/mysql2/unsigned_type_test.rb +++ b/activerecord/test/cases/adapters/mysql2/unsigned_type_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/mysql2/virtual_column_test.rb b/activerecord/test/cases/adapters/mysql2/virtual_column_test.rb index 442a4fb7b5cb..85e283bfe192 100644 --- a/activerecord/test/cases/adapters/mysql2/virtual_column_test.rb +++ b/activerecord/test/cases/adapters/mysql2/virtual_column_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/postgresql/active_schema_test.rb b/activerecord/test/cases/adapters/postgresql/active_schema_test.rb index b787de84536e..441e84a11718 100644 --- a/activerecord/test/cases/adapters/postgresql/active_schema_test.rb +++ b/activerecord/test/cases/adapters/postgresql/active_schema_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class PostgresqlActiveSchemaTest < ActiveRecord::PostgreSQLTestCase diff --git a/activerecord/test/cases/adapters/postgresql/array_test.rb b/activerecord/test/cases/adapters/postgresql/array_test.rb index 121c62dadfdb..a642145726cd 100644 --- a/activerecord/test/cases/adapters/postgresql/array_test.rb +++ b/activerecord/test/cases/adapters/postgresql/array_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/postgresql/bit_string_test.rb b/activerecord/test/cases/adapters/postgresql/bit_string_test.rb index 7712e809a288..d7ed0aa8dd16 100644 --- a/activerecord/test/cases/adapters/postgresql/bit_string_test.rb +++ b/activerecord/test/cases/adapters/postgresql/bit_string_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/connection_helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/postgresql/bytea_test.rb b/activerecord/test/cases/adapters/postgresql/bytea_test.rb index 539c90f0bccb..7cb5c2442c18 100644 --- a/activerecord/test/cases/adapters/postgresql/bytea_test.rb +++ b/activerecord/test/cases/adapters/postgresql/bytea_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/postgresql/case_insensitive_test.rb b/activerecord/test/cases/adapters/postgresql/case_insensitive_test.rb index 03b44feab6ae..b6db6e5e286e 100644 --- a/activerecord/test/cases/adapters/postgresql/case_insensitive_test.rb +++ b/activerecord/test/cases/adapters/postgresql/case_insensitive_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class PostgresqlCaseInsensitiveTest < ActiveRecord::PostgreSQLTestCase diff --git a/activerecord/test/cases/adapters/postgresql/change_schema_test.rb b/activerecord/test/cases/adapters/postgresql/change_schema_test.rb index ea642069d215..9d7fddfc025b 100644 --- a/activerecord/test/cases/adapters/postgresql/change_schema_test.rb +++ b/activerecord/test/cases/adapters/postgresql/change_schema_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/adapters/postgresql/cidr_test.rb b/activerecord/test/cases/adapters/postgresql/cidr_test.rb index 52f2a0096c3f..fccd8b3c7b25 100644 --- a/activerecord/test/cases/adapters/postgresql/cidr_test.rb +++ b/activerecord/test/cases/adapters/postgresql/cidr_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "ipaddr" diff --git a/activerecord/test/cases/adapters/postgresql/citext_test.rb b/activerecord/test/cases/adapters/postgresql/citext_test.rb index ca95e4b6268e..ffdd2983c6b9 100644 --- a/activerecord/test/cases/adapters/postgresql/citext_test.rb +++ b/activerecord/test/cases/adapters/postgresql/citext_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/postgresql/collation_test.rb b/activerecord/test/cases/adapters/postgresql/collation_test.rb index a603221d8fb2..2929c9ad941f 100644 --- a/activerecord/test/cases/adapters/postgresql/collation_test.rb +++ b/activerecord/test/cases/adapters/postgresql/collation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/postgresql/composite_test.rb b/activerecord/test/cases/adapters/postgresql/composite_test.rb index 1da2a9e2ac07..9eb422a8a31b 100644 --- a/activerecord/test/cases/adapters/postgresql/composite_test.rb +++ b/activerecord/test/cases/adapters/postgresql/composite_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/connection_helper" diff --git a/activerecord/test/cases/adapters/postgresql/connection_test.rb b/activerecord/test/cases/adapters/postgresql/connection_test.rb index 32afe331fa82..3adae7e14639 100644 --- a/activerecord/test/cases/adapters/postgresql/connection_test.rb +++ b/activerecord/test/cases/adapters/postgresql/connection_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/connection_helper" diff --git a/activerecord/test/cases/adapters/postgresql/datatype_test.rb b/activerecord/test/cases/adapters/postgresql/datatype_test.rb index 0725fde5ae93..f9478688981b 100644 --- a/activerecord/test/cases/adapters/postgresql/datatype_test.rb +++ b/activerecord/test/cases/adapters/postgresql/datatype_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/ddl_helper" diff --git a/activerecord/test/cases/adapters/postgresql/domain_test.rb b/activerecord/test/cases/adapters/postgresql/domain_test.rb index f1eb8adb151d..b16e0f92655e 100644 --- a/activerecord/test/cases/adapters/postgresql/domain_test.rb +++ b/activerecord/test/cases/adapters/postgresql/domain_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/connection_helper" diff --git a/activerecord/test/cases/adapters/postgresql/enum_test.rb b/activerecord/test/cases/adapters/postgresql/enum_test.rb index 5e5a3158ba59..0f8ab8ab2387 100644 --- a/activerecord/test/cases/adapters/postgresql/enum_test.rb +++ b/activerecord/test/cases/adapters/postgresql/enum_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/connection_helper" diff --git a/activerecord/test/cases/adapters/postgresql/explain_test.rb b/activerecord/test/cases/adapters/postgresql/explain_test.rb index d79fbccf4743..8a0cf440fd41 100644 --- a/activerecord/test/cases/adapters/postgresql/explain_test.rb +++ b/activerecord/test/cases/adapters/postgresql/explain_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/developer" require "models/computer" diff --git a/activerecord/test/cases/adapters/postgresql/extension_migration_test.rb b/activerecord/test/cases/adapters/postgresql/extension_migration_test.rb index b56c22676311..ba2b4e1fbfff 100644 --- a/activerecord/test/cases/adapters/postgresql/extension_migration_test.rb +++ b/activerecord/test/cases/adapters/postgresql/extension_migration_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class PostgresqlExtensionMigrationTest < ActiveRecord::PostgreSQLTestCase diff --git a/activerecord/test/cases/adapters/postgresql/full_text_test.rb b/activerecord/test/cases/adapters/postgresql/full_text_test.rb index 5ddfe32007ba..fa8aadd224f5 100644 --- a/activerecord/test/cases/adapters/postgresql/full_text_test.rb +++ b/activerecord/test/cases/adapters/postgresql/full_text_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/postgresql/geometric_test.rb b/activerecord/test/cases/adapters/postgresql/geometric_test.rb index 3b6840a1c9f8..34836b242151 100644 --- a/activerecord/test/cases/adapters/postgresql/geometric_test.rb +++ b/activerecord/test/cases/adapters/postgresql/geometric_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/connection_helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/postgresql/hstore_test.rb b/activerecord/test/cases/adapters/postgresql/hstore_test.rb index f9cce10fb8f6..b547868b57aa 100644 --- a/activerecord/test/cases/adapters/postgresql/hstore_test.rb +++ b/activerecord/test/cases/adapters/postgresql/hstore_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/postgresql/infinity_test.rb b/activerecord/test/cases/adapters/postgresql/infinity_test.rb index b9e177e6ec87..df5c6888818d 100644 --- a/activerecord/test/cases/adapters/postgresql/infinity_test.rb +++ b/activerecord/test/cases/adapters/postgresql/infinity_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class PostgresqlInfinityTest < ActiveRecord::PostgreSQLTestCase diff --git a/activerecord/test/cases/adapters/postgresql/integer_test.rb b/activerecord/test/cases/adapters/postgresql/integer_test.rb index b4e55964b9cf..5557e869ad6f 100644 --- a/activerecord/test/cases/adapters/postgresql/integer_test.rb +++ b/activerecord/test/cases/adapters/postgresql/integer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_support/core_ext/numeric/bytes" diff --git a/activerecord/test/cases/adapters/postgresql/json_test.rb b/activerecord/test/cases/adapters/postgresql/json_test.rb index 6aa60630c281..4438f349cc20 100644 --- a/activerecord/test/cases/adapters/postgresql/json_test.rb +++ b/activerecord/test/cases/adapters/postgresql/json_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "cases/json_shared_test_cases" diff --git a/activerecord/test/cases/adapters/postgresql/ltree_test.rb b/activerecord/test/cases/adapters/postgresql/ltree_test.rb index 2b5ac1cac664..447d68316cf1 100644 --- a/activerecord/test/cases/adapters/postgresql/ltree_test.rb +++ b/activerecord/test/cases/adapters/postgresql/ltree_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/postgresql/money_test.rb b/activerecord/test/cases/adapters/postgresql/money_test.rb index 1b5d8362af11..530aeb0c2910 100644 --- a/activerecord/test/cases/adapters/postgresql/money_test.rb +++ b/activerecord/test/cases/adapters/postgresql/money_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/postgresql/network_test.rb b/activerecord/test/cases/adapters/postgresql/network_test.rb index a33b0ef8a7a7..2bbfb292c41c 100644 --- a/activerecord/test/cases/adapters/postgresql/network_test.rb +++ b/activerecord/test/cases/adapters/postgresql/network_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/postgresql/numbers_test.rb b/activerecord/test/cases/adapters/postgresql/numbers_test.rb index bfb2b7c27abc..82edf7db3fb6 100644 --- a/activerecord/test/cases/adapters/postgresql/numbers_test.rb +++ b/activerecord/test/cases/adapters/postgresql/numbers_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class PostgresqlNumberTest < ActiveRecord::PostgreSQLTestCase diff --git a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb index 76e0ad60feef..7c7bb0a942b1 100644 --- a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb +++ b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/ddl_helper" require "support/connection_helper" diff --git a/activerecord/test/cases/adapters/postgresql/prepared_statements_disabled_test.rb b/activerecord/test/cases/adapters/postgresql/prepared_statements_disabled_test.rb index 8c6269086685..0120e33f70af 100644 --- a/activerecord/test/cases/adapters/postgresql/prepared_statements_disabled_test.rb +++ b/activerecord/test/cases/adapters/postgresql/prepared_statements_disabled_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/computer" require "models/developer" diff --git a/activerecord/test/cases/adapters/postgresql/quoting_test.rb b/activerecord/test/cases/adapters/postgresql/quoting_test.rb index a1e966b91592..1205559558fb 100644 --- a/activerecord/test/cases/adapters/postgresql/quoting_test.rb +++ b/activerecord/test/cases/adapters/postgresql/quoting_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/adapters/postgresql/range_test.rb b/activerecord/test/cases/adapters/postgresql/range_test.rb index f411884dfd16..8de162a8a188 100644 --- a/activerecord/test/cases/adapters/postgresql/range_test.rb +++ b/activerecord/test/cases/adapters/postgresql/range_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/connection_helper" diff --git a/activerecord/test/cases/adapters/postgresql/referential_integrity_test.rb b/activerecord/test/cases/adapters/postgresql/referential_integrity_test.rb index 0ff04bfa2738..0b17c141c851 100644 --- a/activerecord/test/cases/adapters/postgresql/referential_integrity_test.rb +++ b/activerecord/test/cases/adapters/postgresql/referential_integrity_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/connection_helper" diff --git a/activerecord/test/cases/adapters/postgresql/rename_table_test.rb b/activerecord/test/cases/adapters/postgresql/rename_table_test.rb index e9e7f717ac5b..5b253999d5b2 100644 --- a/activerecord/test/cases/adapters/postgresql/rename_table_test.rb +++ b/activerecord/test/cases/adapters/postgresql/rename_table_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class PostgresqlRenameTableTest < ActiveRecord::PostgreSQLTestCase diff --git a/activerecord/test/cases/adapters/postgresql/schema_authorization_test.rb b/activerecord/test/cases/adapters/postgresql/schema_authorization_test.rb index f86a76e08a25..db7d8ba75136 100644 --- a/activerecord/test/cases/adapters/postgresql/schema_authorization_test.rb +++ b/activerecord/test/cases/adapters/postgresql/schema_authorization_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class SchemaThing < ActiveRecord::Base diff --git a/activerecord/test/cases/adapters/postgresql/schema_test.rb b/activerecord/test/cases/adapters/postgresql/schema_test.rb index f6b957476b3a..5438665d421e 100644 --- a/activerecord/test/cases/adapters/postgresql/schema_test.rb +++ b/activerecord/test/cases/adapters/postgresql/schema_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/default" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/postgresql/serial_test.rb b/activerecord/test/cases/adapters/postgresql/serial_test.rb index d711b3b729e8..4930d3f67abb 100644 --- a/activerecord/test/cases/adapters/postgresql/serial_test.rb +++ b/activerecord/test/cases/adapters/postgresql/serial_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/postgresql/statement_pool_test.rb b/activerecord/test/cases/adapters/postgresql/statement_pool_test.rb index 146b619a4b52..73cf91425b4f 100644 --- a/activerecord/test/cases/adapters/postgresql/statement_pool_test.rb +++ b/activerecord/test/cases/adapters/postgresql/statement_pool_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/adapters/postgresql/timestamp_test.rb b/activerecord/test/cases/adapters/postgresql/timestamp_test.rb index 962450aada3b..c7dec25f3ac4 100644 --- a/activerecord/test/cases/adapters/postgresql/timestamp_test.rb +++ b/activerecord/test/cases/adapters/postgresql/timestamp_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/developer" require "models/topic" diff --git a/activerecord/test/cases/adapters/postgresql/transaction_test.rb b/activerecord/test/cases/adapters/postgresql/transaction_test.rb index 9b42d0383dec..c1b19c11f532 100644 --- a/activerecord/test/cases/adapters/postgresql/transaction_test.rb +++ b/activerecord/test/cases/adapters/postgresql/transaction_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/connection_helper" require "concurrent/atomic/cyclic_barrier" diff --git a/activerecord/test/cases/adapters/postgresql/type_lookup_test.rb b/activerecord/test/cases/adapters/postgresql/type_lookup_test.rb index 784d77a8d1dc..688117722b28 100644 --- a/activerecord/test/cases/adapters/postgresql/type_lookup_test.rb +++ b/activerecord/test/cases/adapters/postgresql/type_lookup_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class PostgresqlTypeLookupTest < ActiveRecord::PostgreSQLTestCase diff --git a/activerecord/test/cases/adapters/postgresql/utils_test.rb b/activerecord/test/cases/adapters/postgresql/utils_test.rb index 9f9e3bda2f88..1a655d7843be 100644 --- a/activerecord/test/cases/adapters/postgresql/utils_test.rb +++ b/activerecord/test/cases/adapters/postgresql/utils_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_record/connection_adapters/postgresql/utils" diff --git a/activerecord/test/cases/adapters/postgresql/uuid_test.rb b/activerecord/test/cases/adapters/postgresql/uuid_test.rb index 8eddd81c38f3..49c570c91705 100644 --- a/activerecord/test/cases/adapters/postgresql/uuid_test.rb +++ b/activerecord/test/cases/adapters/postgresql/uuid_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/postgresql/xml_test.rb b/activerecord/test/cases/adapters/postgresql/xml_test.rb index 826b384fb379..b0720b5a6e58 100644 --- a/activerecord/test/cases/adapters/postgresql/xml_test.rb +++ b/activerecord/test/cases/adapters/postgresql/xml_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/sqlite3/collation_test.rb b/activerecord/test/cases/adapters/sqlite3/collation_test.rb index dd88ed3656cf..f3cbb408f195 100644 --- a/activerecord/test/cases/adapters/sqlite3/collation_test.rb +++ b/activerecord/test/cases/adapters/sqlite3/collation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/adapters/sqlite3/copy_table_test.rb b/activerecord/test/cases/adapters/sqlite3/copy_table_test.rb index e1cfd703e86b..cc1f74ed4102 100644 --- a/activerecord/test/cases/adapters/sqlite3/copy_table_test.rb +++ b/activerecord/test/cases/adapters/sqlite3/copy_table_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class CopyTableTest < ActiveRecord::SQLite3TestCase diff --git a/activerecord/test/cases/adapters/sqlite3/explain_test.rb b/activerecord/test/cases/adapters/sqlite3/explain_test.rb index 29d97ae78ce7..a3f6299756eb 100644 --- a/activerecord/test/cases/adapters/sqlite3/explain_test.rb +++ b/activerecord/test/cases/adapters/sqlite3/explain_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/developer" require "models/computer" diff --git a/activerecord/test/cases/adapters/sqlite3/quoting_test.rb b/activerecord/test/cases/adapters/sqlite3/quoting_test.rb index aefbb309e641..0a5bf7754c74 100644 --- a/activerecord/test/cases/adapters/sqlite3/quoting_test.rb +++ b/activerecord/test/cases/adapters/sqlite3/quoting_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "bigdecimal" require "securerandom" diff --git a/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb b/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb index 9a812e325ea3..7adba54836fd 100644 --- a/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb +++ b/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/owner" require "tempfile" diff --git a/activerecord/test/cases/adapters/sqlite3/sqlite3_create_folder_test.rb b/activerecord/test/cases/adapters/sqlite3/sqlite3_create_folder_test.rb index b1b4463bf10a..d23a7ac5329a 100644 --- a/activerecord/test/cases/adapters/sqlite3/sqlite3_create_folder_test.rb +++ b/activerecord/test/cases/adapters/sqlite3/sqlite3_create_folder_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/owner" diff --git a/activerecord/test/cases/adapters/sqlite3/statement_pool_test.rb b/activerecord/test/cases/adapters/sqlite3/statement_pool_test.rb index 37ff973397b0..76841c235aab 100644 --- a/activerecord/test/cases/adapters/sqlite3/statement_pool_test.rb +++ b/activerecord/test/cases/adapters/sqlite3/statement_pool_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class SQLite3StatementPoolTest < ActiveRecord::SQLite3TestCase diff --git a/activerecord/test/cases/aggregations_test.rb b/activerecord/test/cases/aggregations_test.rb index f8136fde722a..97be9c447a31 100644 --- a/activerecord/test/cases/aggregations_test.rb +++ b/activerecord/test/cases/aggregations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/customer" diff --git a/activerecord/test/cases/ar_schema_test.rb b/activerecord/test/cases/ar_schema_test.rb index 5b608d8e8335..aaae3736a991 100644 --- a/activerecord/test/cases/ar_schema_test.rb +++ b/activerecord/test/cases/ar_schema_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class ActiveRecordSchemaTest < ActiveRecord::TestCase diff --git a/activerecord/test/cases/associations/association_scope_test.rb b/activerecord/test/cases/associations/association_scope_test.rb index c54542ff7b3c..a57eb78a14f6 100644 --- a/activerecord/test/cases/associations/association_scope_test.rb +++ b/activerecord/test/cases/associations/association_scope_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/author" diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb index a727cc6e60dd..af3f40974d2f 100644 --- a/activerecord/test/cases/associations/belongs_to_associations_test.rb +++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/developer" require "models/project" diff --git a/activerecord/test/cases/associations/bidirectional_destroy_dependencies_test.rb b/activerecord/test/cases/associations/bidirectional_destroy_dependencies_test.rb index 8a0e04186466..eee327a0bcbd 100644 --- a/activerecord/test/cases/associations/bidirectional_destroy_dependencies_test.rb +++ b/activerecord/test/cases/associations/bidirectional_destroy_dependencies_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/content" diff --git a/activerecord/test/cases/associations/callbacks_test.rb b/activerecord/test/cases/associations/callbacks_test.rb index f9d1e4459509..b91fb5b7ed5b 100644 --- a/activerecord/test/cases/associations/callbacks_test.rb +++ b/activerecord/test/cases/associations/callbacks_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/author" diff --git a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb index 7b0445025cea..ea2582b5077c 100644 --- a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb +++ b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/comment" diff --git a/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb b/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb index 61f39b41363c..f6de62b1afac 100644 --- a/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb +++ b/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/tagging" diff --git a/activerecord/test/cases/associations/eager_load_nested_include_test.rb b/activerecord/test/cases/associations/eager_load_nested_include_test.rb index e9f551b6b219..83c85cd0224c 100644 --- a/activerecord/test/cases/associations/eager_load_nested_include_test.rb +++ b/activerecord/test/cases/associations/eager_load_nested_include_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/tag" diff --git a/activerecord/test/cases/associations/eager_singularization_test.rb b/activerecord/test/cases/associations/eager_singularization_test.rb index 16eff15026c8..860bb9ac54d7 100644 --- a/activerecord/test/cases/associations/eager_singularization_test.rb +++ b/activerecord/test/cases/associations/eager_singularization_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class EagerSingularizationTest < ActiveRecord::TestCase diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb index 55b294cfaae5..e0b137304bf1 100644 --- a/activerecord/test/cases/associations/eager_test.rb +++ b/activerecord/test/cases/associations/eager_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/tagging" diff --git a/activerecord/test/cases/associations/extension_test.rb b/activerecord/test/cases/associations/extension_test.rb index f707a170f5e4..d2f21583a70e 100644 --- a/activerecord/test/cases/associations/extension_test.rb +++ b/activerecord/test/cases/associations/extension_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/comment" diff --git a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb index f73005b3cb05..fa40bd2ff844 100644 --- a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/developer" require "models/computer" diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index a936017ae3e4..07354a237997 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/developer" require "models/computer" diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb index 1c2138a3d041..679442868816 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/person" diff --git a/activerecord/test/cases/associations/has_one_associations_test.rb b/activerecord/test/cases/associations/has_one_associations_test.rb index bf3b8dcd63e1..545eec7e5df1 100644 --- a/activerecord/test/cases/associations/has_one_associations_test.rb +++ b/activerecord/test/cases/associations/has_one_associations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/developer" require "models/computer" diff --git a/activerecord/test/cases/associations/has_one_through_associations_test.rb b/activerecord/test/cases/associations/has_one_through_associations_test.rb index 28b883586d20..0a74a9e710af 100644 --- a/activerecord/test/cases/associations/has_one_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_one_through_associations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/club" require "models/member_type" diff --git a/activerecord/test/cases/associations/inner_join_association_test.rb b/activerecord/test/cases/associations/inner_join_association_test.rb index ddf5bc6f0bf8..6fff4171c8d1 100644 --- a/activerecord/test/cases/associations/inner_join_association_test.rb +++ b/activerecord/test/cases/associations/inner_join_association_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/comment" diff --git a/activerecord/test/cases/associations/inverse_associations_test.rb b/activerecord/test/cases/associations/inverse_associations_test.rb index 467cc73ecda7..d8f7d3b21ce7 100644 --- a/activerecord/test/cases/associations/inverse_associations_test.rb +++ b/activerecord/test/cases/associations/inverse_associations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/man" require "models/face" diff --git a/activerecord/test/cases/associations/join_model_test.rb b/activerecord/test/cases/associations/join_model_test.rb index c078cef064e8..c2758b30a1e1 100644 --- a/activerecord/test/cases/associations/join_model_test.rb +++ b/activerecord/test/cases/associations/join_model_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/tag" require "models/tagging" diff --git a/activerecord/test/cases/associations/left_outer_join_association_test.rb b/activerecord/test/cases/associations/left_outer_join_association_test.rb index 6d3757f467cd..68c92869723c 100644 --- a/activerecord/test/cases/associations/left_outer_join_association_test.rb +++ b/activerecord/test/cases/associations/left_outer_join_association_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/comment" diff --git a/activerecord/test/cases/associations/nested_through_associations_test.rb b/activerecord/test/cases/associations/nested_through_associations_test.rb index 67ff7355b369..90b2d4bc07fa 100644 --- a/activerecord/test/cases/associations/nested_through_associations_test.rb +++ b/activerecord/test/cases/associations/nested_through_associations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/author" require "models/post" diff --git a/activerecord/test/cases/associations/required_test.rb b/activerecord/test/cases/associations/required_test.rb index 45e1803858a3..6cf2d8ac1219 100644 --- a/activerecord/test/cases/associations/required_test.rb +++ b/activerecord/test/cases/associations/required_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class RequiredAssociationsTest < ActiveRecord::TestCase diff --git a/activerecord/test/cases/associations_test.rb b/activerecord/test/cases/associations_test.rb index 2eb31326a5d6..ba2f4c11c80b 100644 --- a/activerecord/test/cases/associations_test.rb +++ b/activerecord/test/cases/associations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/computer" require "models/developer" diff --git a/activerecord/test/cases/attribute_decorators_test.rb b/activerecord/test/cases/attribute_decorators_test.rb index cfa6ed1da654..eb8efab6a571 100644 --- a/activerecord/test/cases/attribute_decorators_test.rb +++ b/activerecord/test/cases/attribute_decorators_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/attribute_methods/read_test.rb b/activerecord/test/cases/attribute_methods/read_test.rb index 1fc63a49d406..a366144e1719 100644 --- a/activerecord/test/cases/attribute_methods/read_test.rb +++ b/activerecord/test/cases/attribute_methods/read_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb index 4d24a980dccd..1f3a3652d7f2 100644 --- a/activerecord/test/cases/attribute_methods_test.rb +++ b/activerecord/test/cases/attribute_methods_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/minimalistic" require "models/developer" diff --git a/activerecord/test/cases/attribute_set_test.rb b/activerecord/test/cases/attribute_set_test.rb index bd4b200735af..80c67f171b05 100644 --- a/activerecord/test/cases/attribute_set_test.rb +++ b/activerecord/test/cases/attribute_set_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/attribute_test.rb b/activerecord/test/cases/attribute_test.rb index 7cf6b498c95e..0271ed5fb961 100644 --- a/activerecord/test/cases/attribute_test.rb +++ b/activerecord/test/cases/attribute_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/attributes_test.rb b/activerecord/test/cases/attributes_test.rb index 3705a6be8973..8aa515fe6e5f 100644 --- a/activerecord/test/cases/attributes_test.rb +++ b/activerecord/test/cases/attributes_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class OverloadedType < ActiveRecord::Base diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index 2203aa1788e1..db2a19ea62ad 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/bird" require "models/post" diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index dc32e995a44f..a26a4bbb61c2 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/author" diff --git a/activerecord/test/cases/batches_test.rb b/activerecord/test/cases/batches_test.rb index fbc3fbb44fdb..1f666a5d39d7 100644 --- a/activerecord/test/cases/batches_test.rb +++ b/activerecord/test/cases/batches_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/subscriber" diff --git a/activerecord/test/cases/binary_test.rb b/activerecord/test/cases/binary_test.rb index 1fc30e24d29e..324a74492cd8 100644 --- a/activerecord/test/cases/binary_test.rb +++ b/activerecord/test/cases/binary_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" # Without using prepared statements, it makes no sense to test diff --git a/activerecord/test/cases/bind_parameter_test.rb b/activerecord/test/cases/bind_parameter_test.rb index 5af44c27eb2f..8504f586ccec 100644 --- a/activerecord/test/cases/bind_parameter_test.rb +++ b/activerecord/test/cases/bind_parameter_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/author" diff --git a/activerecord/test/cases/cache_key_test.rb b/activerecord/test/cases/cache_key_test.rb index 7b8264e6e848..f0a1bb9e2246 100644 --- a/activerecord/test/cases/cache_key_test.rb +++ b/activerecord/test/cases/cache_key_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb index 80baaac30aff..478b9fe74244 100644 --- a/activerecord/test/cases/calculations_test.rb +++ b/activerecord/test/cases/calculations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/book" require "models/club" diff --git a/activerecord/test/cases/callbacks_test.rb b/activerecord/test/cases/callbacks_test.rb index b3c86586d01d..55deaa6947c5 100644 --- a/activerecord/test/cases/callbacks_test.rb +++ b/activerecord/test/cases/callbacks_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/developer" require "models/computer" diff --git a/activerecord/test/cases/clone_test.rb b/activerecord/test/cases/clone_test.rb index b89294c09410..fa0f53676e2c 100644 --- a/activerecord/test/cases/clone_test.rb +++ b/activerecord/test/cases/clone_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activerecord/test/cases/coders/json_test.rb b/activerecord/test/cases/coders/json_test.rb index d22d93d1291b..95e6fb3e7b31 100644 --- a/activerecord/test/cases/coders/json_test.rb +++ b/activerecord/test/cases/coders/json_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/coders/yaml_column_test.rb b/activerecord/test/cases/coders/yaml_column_test.rb index a26a72712da2..e3e85a58a4f7 100644 --- a/activerecord/test/cases/coders/yaml_column_test.rb +++ b/activerecord/test/cases/coders/yaml_column_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/collection_cache_key_test.rb b/activerecord/test/cases/collection_cache_key_test.rb index f344c77691b5..2d10a6841657 100644 --- a/activerecord/test/cases/collection_cache_key_test.rb +++ b/activerecord/test/cases/collection_cache_key_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/computer" require "models/developer" diff --git a/activerecord/test/cases/column_alias_test.rb b/activerecord/test/cases/column_alias_test.rb index 9893ba958056..506ae0575632 100644 --- a/activerecord/test/cases/column_alias_test.rb +++ b/activerecord/test/cases/column_alias_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activerecord/test/cases/column_definition_test.rb b/activerecord/test/cases/column_definition_test.rb index 90c8d21c43f6..fcb0952c1c08 100644 --- a/activerecord/test/cases/column_definition_test.rb +++ b/activerecord/test/cases/column_definition_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/comment_test.rb b/activerecord/test/cases/comment_test.rb index c23be52a6c00..5c91ac347cb4 100644 --- a/activerecord/test/cases/comment_test.rb +++ b/activerecord/test/cases/comment_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/connection_adapters/adapter_leasing_test.rb b/activerecord/test/cases/connection_adapters/adapter_leasing_test.rb index 64189381cb54..4f88b129af74 100644 --- a/activerecord/test/cases/connection_adapters/adapter_leasing_test.rb +++ b/activerecord/test/cases/connection_adapters/adapter_leasing_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/connection_adapters/connection_handler_test.rb b/activerecord/test/cases/connection_adapters/connection_handler_test.rb index 2a71f08d9052..f8725ddb0182 100644 --- a/activerecord/test/cases/connection_adapters/connection_handler_test.rb +++ b/activerecord/test/cases/connection_adapters/connection_handler_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/connection_adapters/connection_specification_test.rb b/activerecord/test/cases/connection_adapters/connection_specification_test.rb index 10a3521c793c..40998c06bfaf 100644 --- a/activerecord/test/cases/connection_adapters/connection_specification_test.rb +++ b/activerecord/test/cases/connection_adapters/connection_specification_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/connection_adapters/merge_and_resolve_default_url_config_test.rb b/activerecord/test/cases/connection_adapters/merge_and_resolve_default_url_config_test.rb index 8faa67255daa..7c98c80e39f5 100644 --- a/activerecord/test/cases/connection_adapters/merge_and_resolve_default_url_config_test.rb +++ b/activerecord/test/cases/connection_adapters/merge_and_resolve_default_url_config_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/connection_adapters/mysql_type_lookup_test.rb b/activerecord/test/cases/connection_adapters/mysql_type_lookup_test.rb index 3657b8340d6e..133632bac95c 100644 --- a/activerecord/test/cases/connection_adapters/mysql_type_lookup_test.rb +++ b/activerecord/test/cases/connection_adapters/mysql_type_lookup_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" if current_adapter?(:Mysql2Adapter) diff --git a/activerecord/test/cases/connection_adapters/schema_cache_test.rb b/activerecord/test/cases/connection_adapters/schema_cache_test.rb index 106323ccc966..3370818616dd 100644 --- a/activerecord/test/cases/connection_adapters/schema_cache_test.rb +++ b/activerecord/test/cases/connection_adapters/schema_cache_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/connection_adapters/type_lookup_test.rb b/activerecord/test/cases/connection_adapters/type_lookup_test.rb index a348c2d78325..251483da44de 100644 --- a/activerecord/test/cases/connection_adapters/type_lookup_test.rb +++ b/activerecord/test/cases/connection_adapters/type_lookup_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" unless current_adapter?(:PostgreSQLAdapter) # PostgreSQL does not use type strings for lookup diff --git a/activerecord/test/cases/connection_management_test.rb b/activerecord/test/cases/connection_management_test.rb index d1e946d40110..9bd0aab981c4 100644 --- a/activerecord/test/cases/connection_management_test.rb +++ b/activerecord/test/cases/connection_management_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "rack" diff --git a/activerecord/test/cases/connection_pool_test.rb b/activerecord/test/cases/connection_pool_test.rb index 00a0187b57f6..adbd158e7a57 100644 --- a/activerecord/test/cases/connection_pool_test.rb +++ b/activerecord/test/cases/connection_pool_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "concurrent/atomic/count_down_latch" diff --git a/activerecord/test/cases/connection_specification/resolver_test.rb b/activerecord/test/cases/connection_specification/resolver_test.rb index 13b5bae13cd4..3d972816276e 100644 --- a/activerecord/test/cases/connection_specification/resolver_test.rb +++ b/activerecord/test/cases/connection_specification/resolver_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/core_test.rb b/activerecord/test/cases/core_test.rb index 3735572898ba..0345608191b8 100644 --- a/activerecord/test/cases/core_test.rb +++ b/activerecord/test/cases/core_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/person" require "models/topic" diff --git a/activerecord/test/cases/counter_cache_test.rb b/activerecord/test/cases/counter_cache_test.rb index 46d7526cc024..14800e6b91e6 100644 --- a/activerecord/test/cases/counter_cache_test.rb +++ b/activerecord/test/cases/counter_cache_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/car" diff --git a/activerecord/test/cases/custom_locking_test.rb b/activerecord/test/cases/custom_locking_test.rb index 15c8b684e4eb..e17084395239 100644 --- a/activerecord/test/cases/custom_locking_test.rb +++ b/activerecord/test/cases/custom_locking_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/person" diff --git a/activerecord/test/cases/database_statements_test.rb b/activerecord/test/cases/database_statements_test.rb index 66035865be09..5df028d3972f 100644 --- a/activerecord/test/cases/database_statements_test.rb +++ b/activerecord/test/cases/database_statements_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class DatabaseStatementsTest < ActiveRecord::TestCase diff --git a/activerecord/test/cases/date_test.rb b/activerecord/test/cases/date_test.rb index 2edc0415cd39..202100ff6956 100644 --- a/activerecord/test/cases/date_test.rb +++ b/activerecord/test/cases/date_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activerecord/test/cases/date_time_precision_test.rb b/activerecord/test/cases/date_time_precision_test.rb index e4a2f9ee17c4..12b1858991f6 100644 --- a/activerecord/test/cases/date_time_precision_test.rb +++ b/activerecord/test/cases/date_time_precision_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/date_time_test.rb b/activerecord/test/cases/date_time_test.rb index ad7da9de703a..8753c95641d1 100644 --- a/activerecord/test/cases/date_time_test.rb +++ b/activerecord/test/cases/date_time_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/task" diff --git a/activerecord/test/cases/defaults_test.rb b/activerecord/test/cases/defaults_test.rb index 996d29868966..30cfa0744f79 100644 --- a/activerecord/test/cases/defaults_test.rb +++ b/activerecord/test/cases/defaults_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" require "models/default" diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb index f72e0d2eadd5..cc2724502b1d 100644 --- a/activerecord/test/cases/dirty_test.rb +++ b/activerecord/test/cases/dirty_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" # For booleans require "models/pirate" # For timestamps diff --git a/activerecord/test/cases/disconnected_test.rb b/activerecord/test/cases/disconnected_test.rb index c25089a4203f..92365351b1ec 100644 --- a/activerecord/test/cases/disconnected_test.rb +++ b/activerecord/test/cases/disconnected_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class TestRecord < ActiveRecord::Base diff --git a/activerecord/test/cases/dup_test.rb b/activerecord/test/cases/dup_test.rb index 000ed27efb21..76979dc79852 100644 --- a/activerecord/test/cases/dup_test.rb +++ b/activerecord/test/cases/dup_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/reply" require "models/topic" diff --git a/activerecord/test/cases/enum_test.rb b/activerecord/test/cases/enum_test.rb index 4ef9a125e634..8e13582f3ed3 100644 --- a/activerecord/test/cases/enum_test.rb +++ b/activerecord/test/cases/enum_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/author" require "models/book" diff --git a/activerecord/test/cases/errors_test.rb b/activerecord/test/cases/errors_test.rb index e90669e0c75a..45e28c4f0330 100644 --- a/activerecord/test/cases/errors_test.rb +++ b/activerecord/test/cases/errors_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class ErrorsTest < ActiveRecord::TestCase diff --git a/activerecord/test/cases/explain_subscriber_test.rb b/activerecord/test/cases/explain_subscriber_test.rb index ca87e0401259..0fb6bf2eedbb 100644 --- a/activerecord/test/cases/explain_subscriber_test.rb +++ b/activerecord/test/cases/explain_subscriber_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_record/explain_subscriber" require "active_record/explain_registry" diff --git a/activerecord/test/cases/explain_test.rb b/activerecord/test/cases/explain_test.rb index 4f6bd9327c2d..de3ec3666796 100644 --- a/activerecord/test/cases/explain_test.rb +++ b/activerecord/test/cases/explain_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/car" require "active_support/core_ext/string/strip" diff --git a/activerecord/test/cases/finder_respond_to_test.rb b/activerecord/test/cases/finder_respond_to_test.rb index 3eaa993d45cd..29d7dee3437c 100644 --- a/activerecord/test/cases/finder_respond_to_test.rb +++ b/activerecord/test/cases/finder_respond_to_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index 420f552ef664..752ac519a490 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/author" diff --git a/activerecord/test/cases/fixture_set/file_test.rb b/activerecord/test/cases/fixture_set/file_test.rb index 533edcc2e02c..c7058133b2b7 100644 --- a/activerecord/test/cases/fixture_set/file_test.rb +++ b/activerecord/test/cases/fixture_set/file_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "tempfile" diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb index b499e6092219..91d0908450cc 100644 --- a/activerecord/test/cases/fixtures_test.rb +++ b/activerecord/test/cases/fixtures_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/admin" require "models/admin/account" diff --git a/activerecord/test/cases/forbidden_attributes_protection_test.rb b/activerecord/test/cases/forbidden_attributes_protection_test.rb index ffa3f63e0dba..d11ec08deaab 100644 --- a/activerecord/test/cases/forbidden_attributes_protection_test.rb +++ b/activerecord/test/cases/forbidden_attributes_protection_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_support/core_ext/hash/indifferent_access" diff --git a/activerecord/test/cases/habtm_destroy_order_test.rb b/activerecord/test/cases/habtm_destroy_order_test.rb index 365d4576dddb..124e3216d068 100644 --- a/activerecord/test/cases/habtm_destroy_order_test.rb +++ b/activerecord/test/cases/habtm_destroy_order_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/lesson" require "models/student" diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb index 5a3b8e3fb511..84a784e6d56d 100644 --- a/activerecord/test/cases/helper.rb +++ b/activerecord/test/cases/helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "config" require "stringio" diff --git a/activerecord/test/cases/hot_compatibility_test.rb b/activerecord/test/cases/hot_compatibility_test.rb index e107ff236267..970ccc3601de 100644 --- a/activerecord/test/cases/hot_compatibility_test.rb +++ b/activerecord/test/cases/hot_compatibility_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/connection_helper" diff --git a/activerecord/test/cases/i18n_test.rb b/activerecord/test/cases/i18n_test.rb index 7f03c5b23de0..94b5e4ef2fa9 100644 --- a/activerecord/test/cases/i18n_test.rb +++ b/activerecord/test/cases/i18n_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/reply" diff --git a/activerecord/test/cases/inheritance_test.rb b/activerecord/test/cases/inheritance_test.rb index fb5a7bcc31f2..e73d9d0a2798 100644 --- a/activerecord/test/cases/inheritance_test.rb +++ b/activerecord/test/cases/inheritance_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/author" require "models/company" diff --git a/activerecord/test/cases/integration_test.rb b/activerecord/test/cases/integration_test.rb index 91049761265c..1075366fb1c4 100644 --- a/activerecord/test/cases/integration_test.rb +++ b/activerecord/test/cases/integration_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/company" require "models/developer" diff --git a/activerecord/test/cases/invalid_connection_test.rb b/activerecord/test/cases/invalid_connection_test.rb index 1367af2859f0..256ad594071f 100644 --- a/activerecord/test/cases/invalid_connection_test.rb +++ b/activerecord/test/cases/invalid_connection_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" if current_adapter?(:Mysql2Adapter) diff --git a/activerecord/test/cases/invertible_migration_test.rb b/activerecord/test/cases/invertible_migration_test.rb index cc3951e2bae5..a44a35120988 100644 --- a/activerecord/test/cases/invertible_migration_test.rb +++ b/activerecord/test/cases/invertible_migration_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class Horse < ActiveRecord::Base diff --git a/activerecord/test/cases/json_attribute_test.rb b/activerecord/test/cases/json_attribute_test.rb index e5848b45f8d7..c64e2c31de82 100644 --- a/activerecord/test/cases/json_attribute_test.rb +++ b/activerecord/test/cases/json_attribute_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "cases/json_shared_test_cases" diff --git a/activerecord/test/cases/json_serialization_test.rb b/activerecord/test/cases/json_serialization_test.rb index 9b4b61b16e08..2ca95fe3b41c 100644 --- a/activerecord/test/cases/json_serialization_test.rb +++ b/activerecord/test/cases/json_serialization_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/contact" require "models/post" diff --git a/activerecord/test/cases/json_shared_test_cases.rb b/activerecord/test/cases/json_shared_test_cases.rb index 9a1c1c3f3f5c..1eeefb78dd3f 100644 --- a/activerecord/test/cases/json_shared_test_cases.rb +++ b/activerecord/test/cases/json_shared_test_cases.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "support/schema_dumping_helper" module JSONSharedTestCases diff --git a/activerecord/test/cases/locking_test.rb b/activerecord/test/cases/locking_test.rb index 2fc52393f2bf..e67ec22c421c 100644 --- a/activerecord/test/cases/locking_test.rb +++ b/activerecord/test/cases/locking_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "thread" require "cases/helper" require "models/person" diff --git a/activerecord/test/cases/log_subscriber_test.rb b/activerecord/test/cases/log_subscriber_test.rb index b80257962c2c..0eaca0d0015a 100644 --- a/activerecord/test/cases/log_subscriber_test.rb +++ b/activerecord/test/cases/log_subscriber_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/binary" require "models/developer" diff --git a/activerecord/test/cases/migration/change_schema_test.rb b/activerecord/test/cases/migration/change_schema_test.rb index 1d305fa11f97..e706fc4f0808 100644 --- a/activerecord/test/cases/migration/change_schema_test.rb +++ b/activerecord/test/cases/migration/change_schema_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/migration/change_table_test.rb b/activerecord/test/cases/migration/change_table_test.rb index ec817a579b86..f1ca91887bb4 100644 --- a/activerecord/test/cases/migration/change_table_test.rb +++ b/activerecord/test/cases/migration/change_table_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/migration/helper" module ActiveRecord diff --git a/activerecord/test/cases/migration/column_attributes_test.rb b/activerecord/test/cases/migration/column_attributes_test.rb index 48df931543bf..5ef0847a644c 100644 --- a/activerecord/test/cases/migration/column_attributes_test.rb +++ b/activerecord/test/cases/migration/column_attributes_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/migration/helper" module ActiveRecord diff --git a/activerecord/test/cases/migration/column_positioning_test.rb b/activerecord/test/cases/migration/column_positioning_test.rb index f2162d91b108..bdbad431e88f 100644 --- a/activerecord/test/cases/migration/column_positioning_test.rb +++ b/activerecord/test/cases/migration/column_positioning_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/migration/columns_test.rb b/activerecord/test/cases/migration/columns_test.rb index 232988834525..c4751277f736 100644 --- a/activerecord/test/cases/migration/columns_test.rb +++ b/activerecord/test/cases/migration/columns_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/migration/helper" module ActiveRecord diff --git a/activerecord/test/cases/migration/command_recorder_test.rb b/activerecord/test/cases/migration/command_recorder_test.rb index 007926f1b9fa..be200a722527 100644 --- a/activerecord/test/cases/migration/command_recorder_test.rb +++ b/activerecord/test/cases/migration/command_recorder_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/migration/compatibility_test.rb b/activerecord/test/cases/migration/compatibility_test.rb index 596a21dcbca6..4321f967d200 100644 --- a/activerecord/test/cases/migration/compatibility_test.rb +++ b/activerecord/test/cases/migration/compatibility_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/migration/create_join_table_test.rb b/activerecord/test/cases/migration/create_join_table_test.rb index c4896f3d6e8d..0e9e880fe164 100644 --- a/activerecord/test/cases/migration/create_join_table_test.rb +++ b/activerecord/test/cases/migration/create_join_table_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/migration/foreign_key_test.rb b/activerecord/test/cases/migration/foreign_key_test.rb index 7762d37915ef..7a44b2db7534 100644 --- a/activerecord/test/cases/migration/foreign_key_test.rb +++ b/activerecord/test/cases/migration/foreign_key_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/migration/helper.rb b/activerecord/test/cases/migration/helper.rb index 9c0fa7339d92..e366ed92b1d1 100644 --- a/activerecord/test/cases/migration/helper.rb +++ b/activerecord/test/cases/migration/helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/migration/index_test.rb b/activerecord/test/cases/migration/index_test.rb index f10fcf139833..ccc0f4948f55 100644 --- a/activerecord/test/cases/migration/index_test.rb +++ b/activerecord/test/cases/migration/index_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/migration/logger_test.rb b/activerecord/test/cases/migration/logger_test.rb index 3d7c7ad469c8..9fe64b73a81a 100644 --- a/activerecord/test/cases/migration/logger_test.rb +++ b/activerecord/test/cases/migration/logger_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/migration/pending_migrations_test.rb b/activerecord/test/cases/migration/pending_migrations_test.rb index 6970fdcc87e2..0cb4b6cfa159 100644 --- a/activerecord/test/cases/migration/pending_migrations_test.rb +++ b/activerecord/test/cases/migration/pending_migrations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/migration/references_foreign_key_test.rb b/activerecord/test/cases/migration/references_foreign_key_test.rb index 718b9a0613e1..405fd7aaed74 100644 --- a/activerecord/test/cases/migration/references_foreign_key_test.rb +++ b/activerecord/test/cases/migration/references_foreign_key_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" if ActiveRecord::Base.connection.supports_foreign_keys_in_create? diff --git a/activerecord/test/cases/migration/references_index_test.rb b/activerecord/test/cases/migration/references_index_test.rb index 2866cabab680..2954f1e2752c 100644 --- a/activerecord/test/cases/migration/references_index_test.rb +++ b/activerecord/test/cases/migration/references_index_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/migration/references_statements_test.rb b/activerecord/test/cases/migration/references_statements_test.rb index e9eb9968cb5d..f8b373bdee78 100644 --- a/activerecord/test/cases/migration/references_statements_test.rb +++ b/activerecord/test/cases/migration/references_statements_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/migration/helper" module ActiveRecord diff --git a/activerecord/test/cases/migration/rename_table_test.rb b/activerecord/test/cases/migration/rename_table_test.rb index 5da3ad33a3e2..bee528ca8a2a 100644 --- a/activerecord/test/cases/migration/rename_table_test.rb +++ b/activerecord/test/cases/migration/rename_table_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/migration/helper" module ActiveRecord diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index 3a49a415804e..315e58668a0b 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "cases/migration/helper" require "bigdecimal/util" diff --git a/activerecord/test/cases/migrator_test.rb b/activerecord/test/cases/migrator_test.rb index 2e4b454a86ed..b93643922df3 100644 --- a/activerecord/test/cases/migrator_test.rb +++ b/activerecord/test/cases/migrator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "cases/migration/helper" diff --git a/activerecord/test/cases/mixin_test.rb b/activerecord/test/cases/mixin_test.rb index a8af8e30f746..82190c283ef2 100644 --- a/activerecord/test/cases/mixin_test.rb +++ b/activerecord/test/cases/mixin_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class Mixin < ActiveRecord::Base diff --git a/activerecord/test/cases/modules_test.rb b/activerecord/test/cases/modules_test.rb index f8a7bab35f60..514911cb13cb 100644 --- a/activerecord/test/cases/modules_test.rb +++ b/activerecord/test/cases/modules_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/company_in_module" require "models/shop" diff --git a/activerecord/test/cases/multiparameter_attributes_test.rb b/activerecord/test/cases/multiparameter_attributes_test.rb index ceb5724377ed..7a35b5dc8435 100644 --- a/activerecord/test/cases/multiparameter_attributes_test.rb +++ b/activerecord/test/cases/multiparameter_attributes_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/customer" diff --git a/activerecord/test/cases/multiple_db_test.rb b/activerecord/test/cases/multiple_db_test.rb index e3bb51bd775d..bfa5da765bbd 100644 --- a/activerecord/test/cases/multiple_db_test.rb +++ b/activerecord/test/cases/multiple_db_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/entrant" require "models/bird" diff --git a/activerecord/test/cases/nested_attributes_test.rb b/activerecord/test/cases/nested_attributes_test.rb index 154faa56aa53..aea65a7baf59 100644 --- a/activerecord/test/cases/nested_attributes_test.rb +++ b/activerecord/test/cases/nested_attributes_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/pirate" require "models/ship" diff --git a/activerecord/test/cases/nested_attributes_with_callbacks_test.rb b/activerecord/test/cases/nested_attributes_with_callbacks_test.rb index b9d2acbed236..905ddef063fb 100644 --- a/activerecord/test/cases/nested_attributes_with_callbacks_test.rb +++ b/activerecord/test/cases/nested_attributes_with_callbacks_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/pirate" require "models/bird" diff --git a/activerecord/test/cases/numeric_data_test.rb b/activerecord/test/cases/numeric_data_test.rb index 76b97033af18..b0a3d566bb2e 100644 --- a/activerecord/test/cases/numeric_data_test.rb +++ b/activerecord/test/cases/numeric_data_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/numeric_data" diff --git a/activerecord/test/cases/persistence_test.rb b/activerecord/test/cases/persistence_test.rb index 5895c517149f..8f0099ee481b 100644 --- a/activerecord/test/cases/persistence_test.rb +++ b/activerecord/test/cases/persistence_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/aircraft" require "models/post" diff --git a/activerecord/test/cases/pooled_connections_test.rb b/activerecord/test/cases/pooled_connections_test.rb index f1b0d087650f..d99318f1aa7f 100644 --- a/activerecord/test/cases/pooled_connections_test.rb +++ b/activerecord/test/cases/pooled_connections_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/project" require "timeout" diff --git a/activerecord/test/cases/primary_keys_test.rb b/activerecord/test/cases/primary_keys_test.rb index 56229b70bcef..61cd6b45a146 100644 --- a/activerecord/test/cases/primary_keys_test.rb +++ b/activerecord/test/cases/primary_keys_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" require "models/topic" diff --git a/activerecord/test/cases/query_cache_test.rb b/activerecord/test/cases/query_cache_test.rb index b018a7b6c06c..fb5305d288cb 100644 --- a/activerecord/test/cases/query_cache_test.rb +++ b/activerecord/test/cases/query_cache_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/task" diff --git a/activerecord/test/cases/quoting_test.rb b/activerecord/test/cases/quoting_test.rb index 0819776fbf02..4cfad9c21f50 100644 --- a/activerecord/test/cases/quoting_test.rb +++ b/activerecord/test/cases/quoting_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/readonly_test.rb b/activerecord/test/cases/readonly_test.rb index 24b678310d09..2e8d1089857a 100644 --- a/activerecord/test/cases/readonly_test.rb +++ b/activerecord/test/cases/readonly_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/author" require "models/post" diff --git a/activerecord/test/cases/reaper_test.rb b/activerecord/test/cases/reaper_test.rb index 249878b67da7..153311becedd 100644 --- a/activerecord/test/cases/reaper_test.rb +++ b/activerecord/test/cases/reaper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/reflection_test.rb b/activerecord/test/cases/reflection_test.rb index c1c2efb9c897..e27000472cde 100644 --- a/activerecord/test/cases/reflection_test.rb +++ b/activerecord/test/cases/reflection_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/customer" diff --git a/activerecord/test/cases/relation/delegation_test.rb b/activerecord/test/cases/relation/delegation_test.rb index 3b15f051b216..5945eab75aee 100644 --- a/activerecord/test/cases/relation/delegation_test.rb +++ b/activerecord/test/cases/relation/delegation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/comment" diff --git a/activerecord/test/cases/relation/merging_test.rb b/activerecord/test/cases/relation/merging_test.rb index 3901824aacf8..feb5604284f4 100644 --- a/activerecord/test/cases/relation/merging_test.rb +++ b/activerecord/test/cases/relation/merging_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/author" require "models/comment" diff --git a/activerecord/test/cases/relation/mutation_test.rb b/activerecord/test/cases/relation/mutation_test.rb index dea787c07fce..113ddaa780cf 100644 --- a/activerecord/test/cases/relation/mutation_test.rb +++ b/activerecord/test/cases/relation/mutation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" diff --git a/activerecord/test/cases/relation/or_test.rb b/activerecord/test/cases/relation/or_test.rb index 61b6601580f8..541feabeb672 100644 --- a/activerecord/test/cases/relation/or_test.rb +++ b/activerecord/test/cases/relation/or_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" diff --git a/activerecord/test/cases/relation/predicate_builder_test.rb b/activerecord/test/cases/relation/predicate_builder_test.rb index 48758dc1480f..94cd704a1440 100644 --- a/activerecord/test/cases/relation/predicate_builder_test.rb +++ b/activerecord/test/cases/relation/predicate_builder_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activerecord/test/cases/relation/record_fetch_warning_test.rb b/activerecord/test/cases/relation/record_fetch_warning_test.rb index 62ca0514318b..59eb524f5a8c 100644 --- a/activerecord/test/cases/relation/record_fetch_warning_test.rb +++ b/activerecord/test/cases/relation/record_fetch_warning_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "active_record/relation/record_fetch_warning" diff --git a/activerecord/test/cases/relation/where_chain_test.rb b/activerecord/test/cases/relation/where_chain_test.rb index 86e150ed79f3..351e9559471f 100644 --- a/activerecord/test/cases/relation/where_chain_test.rb +++ b/activerecord/test/cases/relation/where_chain_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/comment" diff --git a/activerecord/test/cases/relation/where_clause_test.rb b/activerecord/test/cases/relation/where_clause_test.rb index f8eb0dee91b9..59a700277459 100644 --- a/activerecord/test/cases/relation/where_clause_test.rb +++ b/activerecord/test/cases/relation/where_clause_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class ActiveRecord::Relation diff --git a/activerecord/test/cases/relation/where_test.rb b/activerecord/test/cases/relation/where_test.rb index 42dae4d56906..ac4fcfff1d50 100644 --- a/activerecord/test/cases/relation/where_test.rb +++ b/activerecord/test/cases/relation/where_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/author" require "models/binary" diff --git a/activerecord/test/cases/relation_test.rb b/activerecord/test/cases/relation_test.rb index a403824f1a57..f81b155657ef 100644 --- a/activerecord/test/cases/relation_test.rb +++ b/activerecord/test/cases/relation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/comment" diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 5767dec3156c..c804bbf3a5ca 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/tag" require "models/tagging" diff --git a/activerecord/test/cases/reload_models_test.rb b/activerecord/test/cases/reload_models_test.rb index 3f4c0c03e360..6c2f9fb5ab2b 100644 --- a/activerecord/test/cases/reload_models_test.rb +++ b/activerecord/test/cases/reload_models_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/owner" require "models/pet" diff --git a/activerecord/test/cases/reserved_word_test.rb b/activerecord/test/cases/reserved_word_test.rb index f3019a532621..44f7a2821535 100644 --- a/activerecord/test/cases/reserved_word_test.rb +++ b/activerecord/test/cases/reserved_word_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class ReservedWordTest < ActiveRecord::TestCase diff --git a/activerecord/test/cases/result_test.rb b/activerecord/test/cases/result_test.rb index 1a0b7c6ca7ae..b4044acd57d5 100644 --- a/activerecord/test/cases/result_test.rb +++ b/activerecord/test/cases/result_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/sanitize_test.rb b/activerecord/test/cases/sanitize_test.rb index 72f09186e24a..a0e7f4ae604c 100644 --- a/activerecord/test/cases/sanitize_test.rb +++ b/activerecord/test/cases/sanitize_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/binary" require "models/author" diff --git a/activerecord/test/cases/schema_dumper_test.rb b/activerecord/test/cases/schema_dumper_test.rb index 4c81e825fa03..86a0e938327d 100644 --- a/activerecord/test/cases/schema_dumper_test.rb +++ b/activerecord/test/cases/schema_dumper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/schema_loading_test.rb b/activerecord/test/cases/schema_loading_test.rb index 362370ac61b0..e3b7755f079a 100644 --- a/activerecord/test/cases/schema_loading_test.rb +++ b/activerecord/test/cases/schema_loading_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module SchemaLoadCounter diff --git a/activerecord/test/cases/scoping/default_scoping_test.rb b/activerecord/test/cases/scoping/default_scoping_test.rb index 89fb434b27d8..9919ed5e3fc9 100644 --- a/activerecord/test/cases/scoping/default_scoping_test.rb +++ b/activerecord/test/cases/scoping/default_scoping_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/comment" diff --git a/activerecord/test/cases/scoping/named_scoping_test.rb b/activerecord/test/cases/scoping/named_scoping_test.rb index 483ea7128dd3..ea338a984788 100644 --- a/activerecord/test/cases/scoping/named_scoping_test.rb +++ b/activerecord/test/cases/scoping/named_scoping_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/topic" diff --git a/activerecord/test/cases/scoping/relation_scoping_test.rb b/activerecord/test/cases/scoping/relation_scoping_test.rb index 10553bf057ed..644e7eb692d2 100644 --- a/activerecord/test/cases/scoping/relation_scoping_test.rb +++ b/activerecord/test/cases/scoping/relation_scoping_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/post" require "models/author" diff --git a/activerecord/test/cases/secure_token_test.rb b/activerecord/test/cases/secure_token_test.rb index 7b9cbee40a31..987ae3074f86 100644 --- a/activerecord/test/cases/secure_token_test.rb +++ b/activerecord/test/cases/secure_token_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/user" diff --git a/activerecord/test/cases/serialization_test.rb b/activerecord/test/cases/serialization_test.rb index ec33ad38f21f..82e0311d8402 100644 --- a/activerecord/test/cases/serialization_test.rb +++ b/activerecord/test/cases/serialization_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/contact" require "models/topic" diff --git a/activerecord/test/cases/serialized_attribute_test.rb b/activerecord/test/cases/serialized_attribute_test.rb index e1bdaab5cf31..6525730350af 100644 --- a/activerecord/test/cases/serialized_attribute_test.rb +++ b/activerecord/test/cases/serialized_attribute_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/reply" diff --git a/activerecord/test/cases/statement_cache_test.rb b/activerecord/test/cases/statement_cache_test.rb index fab3648564e1..ee1a8bfc36f0 100644 --- a/activerecord/test/cases/statement_cache_test.rb +++ b/activerecord/test/cases/statement_cache_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/book" require "models/liquid" diff --git a/activerecord/test/cases/store_test.rb b/activerecord/test/cases/store_test.rb index 633a8a0ebc53..0ece0632feb3 100644 --- a/activerecord/test/cases/store_test.rb +++ b/activerecord/test/cases/store_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/admin" require "models/admin/user" diff --git a/activerecord/test/cases/suppressor_test.rb b/activerecord/test/cases/suppressor_test.rb index a7d16b7cdba3..bc854613224f 100644 --- a/activerecord/test/cases/suppressor_test.rb +++ b/activerecord/test/cases/suppressor_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/notification" require "models/user" diff --git a/activerecord/test/cases/tasks/database_tasks_test.rb b/activerecord/test/cases/tasks/database_tasks_test.rb index c47c97e9d92f..b8280c4aaf89 100644 --- a/activerecord/test/cases/tasks/database_tasks_test.rb +++ b/activerecord/test/cases/tasks/database_tasks_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_record/tasks/database_tasks" diff --git a/activerecord/test/cases/tasks/mysql_rake_test.rb b/activerecord/test/cases/tasks/mysql_rake_test.rb index 9c6fb143766a..02c0cfbb92ea 100644 --- a/activerecord/test/cases/tasks/mysql_rake_test.rb +++ b/activerecord/test/cases/tasks/mysql_rake_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_record/tasks/database_tasks" diff --git a/activerecord/test/cases/tasks/postgresql_rake_test.rb b/activerecord/test/cases/tasks/postgresql_rake_test.rb index a2e968aedfab..9369d1eedbf2 100644 --- a/activerecord/test/cases/tasks/postgresql_rake_test.rb +++ b/activerecord/test/cases/tasks/postgresql_rake_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_record/tasks/database_tasks" diff --git a/activerecord/test/cases/tasks/sqlite_rake_test.rb b/activerecord/test/cases/tasks/sqlite_rake_test.rb index ccb3834fee9e..0deedad671ea 100644 --- a/activerecord/test/cases/tasks/sqlite_rake_test.rb +++ b/activerecord/test/cases/tasks/sqlite_rake_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_record/tasks/database_tasks" require "pathname" diff --git a/activerecord/test/cases/test_case.rb b/activerecord/test/cases/test_case.rb index 9f594fef8508..247d0ec3d175 100644 --- a/activerecord/test/cases/test_case.rb +++ b/activerecord/test/cases/test_case.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/test_case" require "active_support/testing/autorun" require "active_support/testing/method_call_assertions" diff --git a/activerecord/test/cases/test_fixtures_test.rb b/activerecord/test/cases/test_fixtures_test.rb index 58d3bea3a2af..e542716563ee 100644 --- a/activerecord/test/cases/test_fixtures_test.rb +++ b/activerecord/test/cases/test_fixtures_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class TestFixturesTest < ActiveRecord::TestCase diff --git a/activerecord/test/cases/time_precision_test.rb b/activerecord/test/cases/time_precision_test.rb index 09c585167eeb..3a8f8af0e60b 100644 --- a/activerecord/test/cases/time_precision_test.rb +++ b/activerecord/test/cases/time_precision_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/timestamp_test.rb b/activerecord/test/cases/timestamp_test.rb index 39b40e34118f..0f58c96504b6 100644 --- a/activerecord/test/cases/timestamp_test.rb +++ b/activerecord/test/cases/timestamp_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "support/ddl_helper" require "models/developer" diff --git a/activerecord/test/cases/touch_later_test.rb b/activerecord/test/cases/touch_later_test.rb index d1e8c649d946..24b5e8886feb 100644 --- a/activerecord/test/cases/touch_later_test.rb +++ b/activerecord/test/cases/touch_later_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/invoice" require "models/line_item" diff --git a/activerecord/test/cases/transaction_callbacks_test.rb b/activerecord/test/cases/transaction_callbacks_test.rb index eaa4dd09a978..aa0d8f5e6504 100644 --- a/activerecord/test/cases/transaction_callbacks_test.rb +++ b/activerecord/test/cases/transaction_callbacks_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/owner" require "models/pet" diff --git a/activerecord/test/cases/transaction_isolation_test.rb b/activerecord/test/cases/transaction_isolation_test.rb index 58abfadaf492..380d7dbb0a98 100644 --- a/activerecord/test/cases/transaction_isolation_test.rb +++ b/activerecord/test/cases/transaction_isolation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" unless ActiveRecord::Base.connection.supports_transaction_isolation? diff --git a/activerecord/test/cases/transactions_test.rb b/activerecord/test/cases/transactions_test.rb index 79ba306ef537..ced60459554f 100644 --- a/activerecord/test/cases/transactions_test.rb +++ b/activerecord/test/cases/transactions_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/reply" diff --git a/activerecord/test/cases/type/adapter_specific_registry_test.rb b/activerecord/test/cases/type/adapter_specific_registry_test.rb index 8b836b479397..a723a952ea0e 100644 --- a/activerecord/test/cases/type/adapter_specific_registry_test.rb +++ b/activerecord/test/cases/type/adapter_specific_registry_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/type/date_time_test.rb b/activerecord/test/cases/type/date_time_test.rb index 6848619ecec0..930758756460 100644 --- a/activerecord/test/cases/type/date_time_test.rb +++ b/activerecord/test/cases/type/date_time_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/task" diff --git a/activerecord/test/cases/type/integer_test.rb b/activerecord/test/cases/type/integer_test.rb index 368b6d7199e9..13d6d2093ba6 100644 --- a/activerecord/test/cases/type/integer_test.rb +++ b/activerecord/test/cases/type/integer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/company" diff --git a/activerecord/test/cases/type/string_test.rb b/activerecord/test/cases/type/string_test.rb index a95da864fad6..899d7ae767e9 100644 --- a/activerecord/test/cases/type/string_test.rb +++ b/activerecord/test/cases/type/string_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/type/type_map_test.rb b/activerecord/test/cases/type/type_map_test.rb index 2959d36466d1..f171175b2a36 100644 --- a/activerecord/test/cases/type/type_map_test.rb +++ b/activerecord/test/cases/type/type_map_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/type/unsigned_integer_test.rb b/activerecord/test/cases/type/unsigned_integer_test.rb index 1cd4dbc2c539..b0a60a2b3dce 100644 --- a/activerecord/test/cases/type/unsigned_integer_test.rb +++ b/activerecord/test/cases/type/unsigned_integer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/type_test.rb b/activerecord/test/cases/type_test.rb index d45a9b314150..0f9f698760d2 100644 --- a/activerecord/test/cases/type_test.rb +++ b/activerecord/test/cases/type_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class TypeTest < ActiveRecord::TestCase diff --git a/activerecord/test/cases/types_test.rb b/activerecord/test/cases/types_test.rb index 11476ea0ef94..ea55bb00cdb9 100644 --- a/activerecord/test/cases/types_test.rb +++ b/activerecord/test/cases/types_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" module ActiveRecord diff --git a/activerecord/test/cases/unconnected_test.rb b/activerecord/test/cases/unconnected_test.rb index b210584644f6..30efd03955e0 100644 --- a/activerecord/test/cases/unconnected_test.rb +++ b/activerecord/test/cases/unconnected_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class TestRecord < ActiveRecord::Base diff --git a/activerecord/test/cases/validations/absence_validation_test.rb b/activerecord/test/cases/validations/absence_validation_test.rb index 870619e4e785..051f14dbb7d7 100644 --- a/activerecord/test/cases/validations/absence_validation_test.rb +++ b/activerecord/test/cases/validations/absence_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/face" require "models/interest" diff --git a/activerecord/test/cases/validations/association_validation_test.rb b/activerecord/test/cases/validations/association_validation_test.rb index f5ceb27d9795..0935dc8c323f 100644 --- a/activerecord/test/cases/validations/association_validation_test.rb +++ b/activerecord/test/cases/validations/association_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/reply" diff --git a/activerecord/test/cases/validations/i18n_generate_message_validation_test.rb b/activerecord/test/cases/validations/i18n_generate_message_validation_test.rb index a57065ba753a..fdfd56889764 100644 --- a/activerecord/test/cases/validations/i18n_generate_message_validation_test.rb +++ b/activerecord/test/cases/validations/i18n_generate_message_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activerecord/test/cases/validations/i18n_validation_test.rb b/activerecord/test/cases/validations/i18n_validation_test.rb index fd88a3ea674f..a020c877e7b6 100644 --- a/activerecord/test/cases/validations/i18n_validation_test.rb +++ b/activerecord/test/cases/validations/i18n_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/reply" diff --git a/activerecord/test/cases/validations/length_validation_test.rb b/activerecord/test/cases/validations/length_validation_test.rb index ba45c6dcc1e6..7f840dfa7cbf 100644 --- a/activerecord/test/cases/validations/length_validation_test.rb +++ b/activerecord/test/cases/validations/length_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/owner" require "models/pet" diff --git a/activerecord/test/cases/validations/presence_validation_test.rb b/activerecord/test/cases/validations/presence_validation_test.rb index 13956e26ec10..dee8528124de 100644 --- a/activerecord/test/cases/validations/presence_validation_test.rb +++ b/activerecord/test/cases/validations/presence_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/man" require "models/face" diff --git a/activerecord/test/cases/validations/uniqueness_validation_test.rb b/activerecord/test/cases/validations/uniqueness_validation_test.rb index 28605d2f8e68..e943d037208c 100644 --- a/activerecord/test/cases/validations/uniqueness_validation_test.rb +++ b/activerecord/test/cases/validations/uniqueness_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/reply" diff --git a/activerecord/test/cases/validations_repair_helper.rb b/activerecord/test/cases/validations_repair_helper.rb index b30666d8769d..30299fd2c679 100644 --- a/activerecord/test/cases/validations_repair_helper.rb +++ b/activerecord/test/cases/validations_repair_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveRecord module ValidationsRepairHelper extend ActiveSupport::Concern diff --git a/activerecord/test/cases/validations_test.rb b/activerecord/test/cases/validations_test.rb index a305aa295a49..fc9678211a6b 100644 --- a/activerecord/test/cases/validations_test.rb +++ b/activerecord/test/cases/validations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/reply" diff --git a/activerecord/test/cases/view_test.rb b/activerecord/test/cases/view_test.rb index 1d21a2454fa9..89b72ec336ff 100644 --- a/activerecord/test/cases/view_test.rb +++ b/activerecord/test/cases/view_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/book" require "support/schema_dumping_helper" diff --git a/activerecord/test/cases/yaml_serialization_test.rb b/activerecord/test/cases/yaml_serialization_test.rb index bfc13d683d3e..6b9f632f22ea 100644 --- a/activerecord/test/cases/yaml_serialization_test.rb +++ b/activerecord/test/cases/yaml_serialization_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/reply" diff --git a/activerecord/test/config.rb b/activerecord/test/config.rb index a65e6ff776b4..d0d19333005a 100644 --- a/activerecord/test/config.rb +++ b/activerecord/test/config.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true TEST_ROOT = __dir__ ASSETS_ROOT = TEST_ROOT + "/assets" FIXTURES_ROOT = TEST_ROOT + "/fixtures" diff --git a/activerecord/test/migrations/10_urban/9_add_expressions.rb b/activerecord/test/migrations/10_urban/9_add_expressions.rb index e908c9eabc88..db9fda3e05ef 100644 --- a/activerecord/test/migrations/10_urban/9_add_expressions.rb +++ b/activerecord/test/migrations/10_urban/9_add_expressions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class AddExpressions < ActiveRecord::Migration::Current def self.up create_table("expressions") do |t| diff --git a/activerecord/test/migrations/decimal/1_give_me_big_numbers.rb b/activerecord/test/migrations/decimal/1_give_me_big_numbers.rb index 43c79bc20ba5..f13f72eb4e16 100644 --- a/activerecord/test/migrations/decimal/1_give_me_big_numbers.rb +++ b/activerecord/test/migrations/decimal/1_give_me_big_numbers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class GiveMeBigNumbers < ActiveRecord::Migration::Current def self.up create_table :big_numbers do |table| diff --git a/activerecord/test/migrations/magic/1_currencies_have_symbols.rb b/activerecord/test/migrations/magic/1_currencies_have_symbols.rb index d4b0e6cd954b..d8a864b213c6 100644 --- a/activerecord/test/migrations/magic/1_currencies_have_symbols.rb +++ b/activerecord/test/migrations/magic/1_currencies_have_symbols.rb @@ -1,9 +1,10 @@ +# frozen_string_literal: true # coding: ISO-8859-15 class CurrenciesHaveSymbols < ActiveRecord::Migration::Current def self.up - # We use € for default currency symbol - add_column "currencies", "symbol", :string, default: "€" + # We use € for default currency symbol + add_column "currencies", "symbol", :string, default: "€" end def self.down diff --git a/activerecord/test/migrations/missing/1000_people_have_middle_names.rb b/activerecord/test/migrations/missing/1000_people_have_middle_names.rb index e046944e3146..a1a5dcbac2d9 100644 --- a/activerecord/test/migrations/missing/1000_people_have_middle_names.rb +++ b/activerecord/test/migrations/missing/1000_people_have_middle_names.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class PeopleHaveMiddleNames < ActiveRecord::Migration::Current def self.up add_column "people", "middle_name", :string diff --git a/activerecord/test/migrations/missing/1_people_have_last_names.rb b/activerecord/test/migrations/missing/1_people_have_last_names.rb index 50fe2a9c8e17..1480b4b8f36f 100644 --- a/activerecord/test/migrations/missing/1_people_have_last_names.rb +++ b/activerecord/test/migrations/missing/1_people_have_last_names.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class PeopleHaveLastNames < ActiveRecord::Migration::Current def self.up add_column "people", "last_name", :string diff --git a/activerecord/test/migrations/missing/3_we_need_reminders.rb b/activerecord/test/migrations/missing/3_we_need_reminders.rb index d7c63ac892fc..e69296a31f36 100644 --- a/activerecord/test/migrations/missing/3_we_need_reminders.rb +++ b/activerecord/test/migrations/missing/3_we_need_reminders.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class WeNeedReminders < ActiveRecord::Migration::Current def self.up create_table("reminders") do |t| diff --git a/activerecord/test/migrations/missing/4_innocent_jointable.rb b/activerecord/test/migrations/missing/4_innocent_jointable.rb index bd3bf2157646..0c021c6162cf 100644 --- a/activerecord/test/migrations/missing/4_innocent_jointable.rb +++ b/activerecord/test/migrations/missing/4_innocent_jointable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class InnocentJointable < ActiveRecord::Migration::Current def self.up create_table("people_reminders", id: false) do |t| diff --git a/activerecord/test/migrations/rename/1_we_need_things.rb b/activerecord/test/migrations/rename/1_we_need_things.rb index 9dce01acfda4..411d6f9646da 100644 --- a/activerecord/test/migrations/rename/1_we_need_things.rb +++ b/activerecord/test/migrations/rename/1_we_need_things.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class WeNeedThings < ActiveRecord::Migration::Current def self.up create_table("things") do |t| diff --git a/activerecord/test/migrations/rename/2_rename_things.rb b/activerecord/test/migrations/rename/2_rename_things.rb index cb8484e7dcd5..99b1cec7f599 100644 --- a/activerecord/test/migrations/rename/2_rename_things.rb +++ b/activerecord/test/migrations/rename/2_rename_things.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class RenameThings < ActiveRecord::Migration::Current def self.up rename_table "things", "awesome_things" diff --git a/activerecord/test/migrations/to_copy/1_people_have_hobbies.rb b/activerecord/test/migrations/to_copy/1_people_have_hobbies.rb index 76734bcd7d62..65b92fbb8590 100644 --- a/activerecord/test/migrations/to_copy/1_people_have_hobbies.rb +++ b/activerecord/test/migrations/to_copy/1_people_have_hobbies.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class PeopleHaveHobbies < ActiveRecord::Migration::Current def self.up add_column "people", "hobbies", :text diff --git a/activerecord/test/migrations/to_copy/2_people_have_descriptions.rb b/activerecord/test/migrations/to_copy/2_people_have_descriptions.rb index 7f883dbb4591..7a3bede29ab8 100644 --- a/activerecord/test/migrations/to_copy/2_people_have_descriptions.rb +++ b/activerecord/test/migrations/to_copy/2_people_have_descriptions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class PeopleHaveDescriptions < ActiveRecord::Migration::Current def self.up add_column "people", "description", :text diff --git a/activerecord/test/migrations/to_copy2/1_create_articles.rb b/activerecord/test/migrations/to_copy2/1_create_articles.rb index 2e9f5ec6bc07..3a82d15aeafd 100644 --- a/activerecord/test/migrations/to_copy2/1_create_articles.rb +++ b/activerecord/test/migrations/to_copy2/1_create_articles.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CreateArticles < ActiveRecord::Migration::Current def self.up end diff --git a/activerecord/test/migrations/to_copy2/2_create_comments.rb b/activerecord/test/migrations/to_copy2/2_create_comments.rb index d361847d4b29..fb1032f8dd77 100644 --- a/activerecord/test/migrations/to_copy2/2_create_comments.rb +++ b/activerecord/test/migrations/to_copy2/2_create_comments.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CreateComments < ActiveRecord::Migration::Current def self.up end diff --git a/activerecord/test/migrations/to_copy_with_name_collision/1_people_have_hobbies.rb b/activerecord/test/migrations/to_copy_with_name_collision/1_people_have_hobbies.rb index 1a863367dde1..ea106d5be49b 100644 --- a/activerecord/test/migrations/to_copy_with_name_collision/1_people_have_hobbies.rb +++ b/activerecord/test/migrations/to_copy_with_name_collision/1_people_have_hobbies.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class PeopleHaveHobbies < ActiveRecord::Migration::Current def self.up add_column "people", "hobbies", :string diff --git a/activerecord/test/migrations/to_copy_with_timestamps/20090101010101_people_have_hobbies.rb b/activerecord/test/migrations/to_copy_with_timestamps/20090101010101_people_have_hobbies.rb index 76734bcd7d62..65b92fbb8590 100644 --- a/activerecord/test/migrations/to_copy_with_timestamps/20090101010101_people_have_hobbies.rb +++ b/activerecord/test/migrations/to_copy_with_timestamps/20090101010101_people_have_hobbies.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class PeopleHaveHobbies < ActiveRecord::Migration::Current def self.up add_column "people", "hobbies", :text diff --git a/activerecord/test/migrations/to_copy_with_timestamps/20090101010202_people_have_descriptions.rb b/activerecord/test/migrations/to_copy_with_timestamps/20090101010202_people_have_descriptions.rb index 7f883dbb4591..7a3bede29ab8 100644 --- a/activerecord/test/migrations/to_copy_with_timestamps/20090101010202_people_have_descriptions.rb +++ b/activerecord/test/migrations/to_copy_with_timestamps/20090101010202_people_have_descriptions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class PeopleHaveDescriptions < ActiveRecord::Migration::Current def self.up add_column "people", "description", :text diff --git a/activerecord/test/migrations/to_copy_with_timestamps2/20090101010101_create_articles.rb b/activerecord/test/migrations/to_copy_with_timestamps2/20090101010101_create_articles.rb index 2e9f5ec6bc07..3a82d15aeafd 100644 --- a/activerecord/test/migrations/to_copy_with_timestamps2/20090101010101_create_articles.rb +++ b/activerecord/test/migrations/to_copy_with_timestamps2/20090101010101_create_articles.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CreateArticles < ActiveRecord::Migration::Current def self.up end diff --git a/activerecord/test/migrations/to_copy_with_timestamps2/20090101010202_create_comments.rb b/activerecord/test/migrations/to_copy_with_timestamps2/20090101010202_create_comments.rb index d361847d4b29..fb1032f8dd77 100644 --- a/activerecord/test/migrations/to_copy_with_timestamps2/20090101010202_create_comments.rb +++ b/activerecord/test/migrations/to_copy_with_timestamps2/20090101010202_create_comments.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CreateComments < ActiveRecord::Migration::Current def self.up end diff --git a/activerecord/test/migrations/valid/1_valid_people_have_last_names.rb b/activerecord/test/migrations/valid/1_valid_people_have_last_names.rb index c450211d8cc7..1d2193469cc8 100644 --- a/activerecord/test/migrations/valid/1_valid_people_have_last_names.rb +++ b/activerecord/test/migrations/valid/1_valid_people_have_last_names.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ValidPeopleHaveLastNames < ActiveRecord::Migration::Current def self.up add_column "people", "last_name", :string diff --git a/activerecord/test/migrations/valid/2_we_need_reminders.rb b/activerecord/test/migrations/valid/2_we_need_reminders.rb index d7c63ac892fc..e69296a31f36 100644 --- a/activerecord/test/migrations/valid/2_we_need_reminders.rb +++ b/activerecord/test/migrations/valid/2_we_need_reminders.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class WeNeedReminders < ActiveRecord::Migration::Current def self.up create_table("reminders") do |t| diff --git a/activerecord/test/migrations/valid/3_innocent_jointable.rb b/activerecord/test/migrations/valid/3_innocent_jointable.rb index bd3bf2157646..0c021c6162cf 100644 --- a/activerecord/test/migrations/valid/3_innocent_jointable.rb +++ b/activerecord/test/migrations/valid/3_innocent_jointable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class InnocentJointable < ActiveRecord::Migration::Current def self.up create_table("people_reminders", id: false) do |t| diff --git a/activerecord/test/migrations/valid_with_subdirectories/1_valid_people_have_last_names.rb b/activerecord/test/migrations/valid_with_subdirectories/1_valid_people_have_last_names.rb index c450211d8cc7..1d2193469cc8 100644 --- a/activerecord/test/migrations/valid_with_subdirectories/1_valid_people_have_last_names.rb +++ b/activerecord/test/migrations/valid_with_subdirectories/1_valid_people_have_last_names.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ValidPeopleHaveLastNames < ActiveRecord::Migration::Current def self.up add_column "people", "last_name", :string diff --git a/activerecord/test/migrations/valid_with_subdirectories/sub/2_we_need_reminders.rb b/activerecord/test/migrations/valid_with_subdirectories/sub/2_we_need_reminders.rb index d7c63ac892fc..e69296a31f36 100644 --- a/activerecord/test/migrations/valid_with_subdirectories/sub/2_we_need_reminders.rb +++ b/activerecord/test/migrations/valid_with_subdirectories/sub/2_we_need_reminders.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class WeNeedReminders < ActiveRecord::Migration::Current def self.up create_table("reminders") do |t| diff --git a/activerecord/test/migrations/valid_with_subdirectories/sub1/3_innocent_jointable.rb b/activerecord/test/migrations/valid_with_subdirectories/sub1/3_innocent_jointable.rb index bd3bf2157646..0c021c6162cf 100644 --- a/activerecord/test/migrations/valid_with_subdirectories/sub1/3_innocent_jointable.rb +++ b/activerecord/test/migrations/valid_with_subdirectories/sub1/3_innocent_jointable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class InnocentJointable < ActiveRecord::Migration::Current def self.up create_table("people_reminders", id: false) do |t| diff --git a/activerecord/test/migrations/valid_with_timestamps/20100101010101_valid_with_timestamps_people_have_last_names.rb b/activerecord/test/migrations/valid_with_timestamps/20100101010101_valid_with_timestamps_people_have_last_names.rb index 9fd27593f018..f7ef1a9769b7 100644 --- a/activerecord/test/migrations/valid_with_timestamps/20100101010101_valid_with_timestamps_people_have_last_names.rb +++ b/activerecord/test/migrations/valid_with_timestamps/20100101010101_valid_with_timestamps_people_have_last_names.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ValidWithTimestampsPeopleHaveLastNames < ActiveRecord::Migration::Current def self.up add_column "people", "last_name", :string diff --git a/activerecord/test/migrations/valid_with_timestamps/20100201010101_valid_with_timestamps_we_need_reminders.rb b/activerecord/test/migrations/valid_with_timestamps/20100201010101_valid_with_timestamps_we_need_reminders.rb index 4a5992113693..7732032c5d6f 100644 --- a/activerecord/test/migrations/valid_with_timestamps/20100201010101_valid_with_timestamps_we_need_reminders.rb +++ b/activerecord/test/migrations/valid_with_timestamps/20100201010101_valid_with_timestamps_we_need_reminders.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ValidWithTimestampsWeNeedReminders < ActiveRecord::Migration::Current def self.up create_table("reminders") do |t| diff --git a/activerecord/test/migrations/valid_with_timestamps/20100301010101_valid_with_timestamps_innocent_jointable.rb b/activerecord/test/migrations/valid_with_timestamps/20100301010101_valid_with_timestamps_innocent_jointable.rb index be24de6d7033..cf652c008afc 100644 --- a/activerecord/test/migrations/valid_with_timestamps/20100301010101_valid_with_timestamps_innocent_jointable.rb +++ b/activerecord/test/migrations/valid_with_timestamps/20100301010101_valid_with_timestamps_innocent_jointable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ValidWithTimestampsInnocentJointable < ActiveRecord::Migration::Current def self.up create_table("people_reminders", id: false) do |t| diff --git a/activerecord/test/migrations/version_check/20131219224947_migration_version_check.rb b/activerecord/test/migrations/version_check/20131219224947_migration_version_check.rb index 6f314c881ccf..ceb0cc98bfb3 100644 --- a/activerecord/test/migrations/version_check/20131219224947_migration_version_check.rb +++ b/activerecord/test/migrations/version_check/20131219224947_migration_version_check.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class MigrationVersionCheck < ActiveRecord::Migration::Current def self.up raise "incorrect migration version" unless version == 20131219224947 diff --git a/activerecord/test/models/admin.rb b/activerecord/test/models/admin.rb index bc3ce2344762..6c8a6eddb0b4 100644 --- a/activerecord/test/models/admin.rb +++ b/activerecord/test/models/admin.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Admin def self.table_name_prefix "admin_" diff --git a/activerecord/test/models/admin/account.rb b/activerecord/test/models/admin/account.rb index bd23192d204c..2dddfa8fe95b 100644 --- a/activerecord/test/models/admin/account.rb +++ b/activerecord/test/models/admin/account.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Admin::Account < ActiveRecord::Base has_many :users end diff --git a/activerecord/test/models/admin/randomly_named_c1.rb b/activerecord/test/models/admin/randomly_named_c1.rb index b64ae7fc41f4..dc1c8c66d742 100644 --- a/activerecord/test/models/admin/randomly_named_c1.rb +++ b/activerecord/test/models/admin/randomly_named_c1.rb @@ -1,7 +1,8 @@ -class Admin::ClassNameThatDoesNotFollowCONVENTIONS1 < ActiveRecord::Base - self.table_name = :randomly_named_table2 -end - -class Admin::ClassNameThatDoesNotFollowCONVENTIONS2 < ActiveRecord::Base - self.table_name = :randomly_named_table3 -end +# frozen_string_literal: true +class Admin::ClassNameThatDoesNotFollowCONVENTIONS1 < ActiveRecord::Base + self.table_name = :randomly_named_table2 +end + +class Admin::ClassNameThatDoesNotFollowCONVENTIONS2 < ActiveRecord::Base + self.table_name = :randomly_named_table3 +end diff --git a/activerecord/test/models/admin/user.rb b/activerecord/test/models/admin/user.rb index a76e4b6795f5..1157ca266c32 100644 --- a/activerecord/test/models/admin/user.rb +++ b/activerecord/test/models/admin/user.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Admin::User < ActiveRecord::Base class Coder def initialize(default = {}) diff --git a/activerecord/test/models/aircraft.rb b/activerecord/test/models/aircraft.rb index ebd42ff824f6..02421afe340c 100644 --- a/activerecord/test/models/aircraft.rb +++ b/activerecord/test/models/aircraft.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Aircraft < ActiveRecord::Base self.pluralize_table_names = false has_many :engines, foreign_key: "car_id" diff --git a/activerecord/test/models/arunit2_model.rb b/activerecord/test/models/arunit2_model.rb index 04b8b15d3d12..80a8ecc5d827 100644 --- a/activerecord/test/models/arunit2_model.rb +++ b/activerecord/test/models/arunit2_model.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ARUnit2Model < ActiveRecord::Base self.abstract_class = true end diff --git a/activerecord/test/models/author.rb b/activerecord/test/models/author.rb index 2d9cba77e0ad..c3278846d664 100644 --- a/activerecord/test/models/author.rb +++ b/activerecord/test/models/author.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Author < ActiveRecord::Base has_many :posts has_many :serialized_posts diff --git a/activerecord/test/models/auto_id.rb b/activerecord/test/models/auto_id.rb index 82c6544bd55a..56479b49eb02 100644 --- a/activerecord/test/models/auto_id.rb +++ b/activerecord/test/models/auto_id.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class AutoId < ActiveRecord::Base self.table_name = "auto_id_tests" self.primary_key = "auto_id" diff --git a/activerecord/test/models/autoloadable/extra_firm.rb b/activerecord/test/models/autoloadable/extra_firm.rb index 5578ba0d9b7a..54c421e45915 100644 --- a/activerecord/test/models/autoloadable/extra_firm.rb +++ b/activerecord/test/models/autoloadable/extra_firm.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class ExtraFirm < Company end diff --git a/activerecord/test/models/binary.rb b/activerecord/test/models/binary.rb index 39b2f5090a61..4b1212705b2d 100644 --- a/activerecord/test/models/binary.rb +++ b/activerecord/test/models/binary.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class Binary < ActiveRecord::Base end diff --git a/activerecord/test/models/bird.rb b/activerecord/test/models/bird.rb index 24b839135d04..ba923b43166e 100644 --- a/activerecord/test/models/bird.rb +++ b/activerecord/test/models/bird.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Bird < ActiveRecord::Base belongs_to :pirate validates_presence_of :name diff --git a/activerecord/test/models/book.rb b/activerecord/test/models/book.rb index 6466e1b341f6..46d5d94da3a6 100644 --- a/activerecord/test/models/book.rb +++ b/activerecord/test/models/book.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Book < ActiveRecord::Base belongs_to :author diff --git a/activerecord/test/models/boolean.rb b/activerecord/test/models/boolean.rb index 0da228aac2f8..e2f1bb8a9a2e 100644 --- a/activerecord/test/models/boolean.rb +++ b/activerecord/test/models/boolean.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Boolean < ActiveRecord::Base def has_fun super diff --git a/activerecord/test/models/bulb.rb b/activerecord/test/models/bulb.rb index 113d21cb8497..ad9806db5563 100644 --- a/activerecord/test/models/bulb.rb +++ b/activerecord/test/models/bulb.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Bulb < ActiveRecord::Base default_scope { where(name: "defaulty") } belongs_to :car, touch: true diff --git a/activerecord/test/models/cake_designer.rb b/activerecord/test/models/cake_designer.rb index 9c57ef573ae2..20fa26a556a7 100644 --- a/activerecord/test/models/cake_designer.rb +++ b/activerecord/test/models/cake_designer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CakeDesigner < ActiveRecord::Base has_one :chef, as: :employable end diff --git a/activerecord/test/models/car.rb b/activerecord/test/models/car.rb index 92bff7ff9647..3c3d9295b0b1 100644 --- a/activerecord/test/models/car.rb +++ b/activerecord/test/models/car.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Car < ActiveRecord::Base has_many :bulbs has_many :all_bulbs, -> { unscope where: :name }, class_name: "Bulb" diff --git a/activerecord/test/models/carrier.rb b/activerecord/test/models/carrier.rb index 230be118c335..bf8055fbd702 100644 --- a/activerecord/test/models/carrier.rb +++ b/activerecord/test/models/carrier.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class Carrier < ActiveRecord::Base end diff --git a/activerecord/test/models/cat.rb b/activerecord/test/models/cat.rb index dfdde186419e..4c76ec86cf95 100644 --- a/activerecord/test/models/cat.rb +++ b/activerecord/test/models/cat.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Cat < ActiveRecord::Base self.abstract_class = true diff --git a/activerecord/test/models/categorization.rb b/activerecord/test/models/categorization.rb index b99383d0b19e..87b81e1e2d54 100644 --- a/activerecord/test/models/categorization.rb +++ b/activerecord/test/models/categorization.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Categorization < ActiveRecord::Base belongs_to :post belongs_to :category, counter_cache: true diff --git a/activerecord/test/models/category.rb b/activerecord/test/models/category.rb index 4b2840c653e7..392fe94fe79f 100644 --- a/activerecord/test/models/category.rb +++ b/activerecord/test/models/category.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Category < ActiveRecord::Base has_and_belongs_to_many :posts has_and_belongs_to_many :special_posts, class_name: "Post" diff --git a/activerecord/test/models/chef.rb b/activerecord/test/models/chef.rb index 9d3dd01016ae..daa208ff5fe5 100644 --- a/activerecord/test/models/chef.rb +++ b/activerecord/test/models/chef.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Chef < ActiveRecord::Base belongs_to :employable, polymorphic: true has_many :recipes diff --git a/activerecord/test/models/citation.rb b/activerecord/test/models/citation.rb index 7d06387f565a..8a6c300a28c1 100644 --- a/activerecord/test/models/citation.rb +++ b/activerecord/test/models/citation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Citation < ActiveRecord::Base belongs_to :reference_of, class_name: "Book", foreign_key: :book2_id end diff --git a/activerecord/test/models/club.rb b/activerecord/test/models/club.rb index 49d7b24a3b9e..cdd5b377929d 100644 --- a/activerecord/test/models/club.rb +++ b/activerecord/test/models/club.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Club < ActiveRecord::Base has_one :membership has_many :memberships, inverse_of: false diff --git a/activerecord/test/models/college.rb b/activerecord/test/models/college.rb index c9dbe1ecc208..70c0cd153456 100644 --- a/activerecord/test/models/college.rb +++ b/activerecord/test/models/college.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_dependency "models/arunit2_model" require "active_support/core_ext/object/with_options" diff --git a/activerecord/test/models/column.rb b/activerecord/test/models/column.rb index 499358b4cf47..08e1a4ae2dc6 100644 --- a/activerecord/test/models/column.rb +++ b/activerecord/test/models/column.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Column < ActiveRecord::Base belongs_to :record end diff --git a/activerecord/test/models/column_name.rb b/activerecord/test/models/column_name.rb index 460eb4fe20e5..3b4452c3c28d 100644 --- a/activerecord/test/models/column_name.rb +++ b/activerecord/test/models/column_name.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ColumnName < ActiveRecord::Base self.table_name = "colnametests" end diff --git a/activerecord/test/models/comment.rb b/activerecord/test/models/comment.rb index eecf92304623..6c10ec08582e 100644 --- a/activerecord/test/models/comment.rb +++ b/activerecord/test/models/comment.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Comment < ActiveRecord::Base scope :limit_by, lambda { |l| limit(l) } scope :containing_the_letter_e, -> { where("comments.body LIKE '%e%'") } diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb index c6a5bf1c921a..8a6d909188bb 100644 --- a/activerecord/test/models/company.rb +++ b/activerecord/test/models/company.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class AbstractCompany < ActiveRecord::Base self.abstract_class = true end diff --git a/activerecord/test/models/company_in_module.rb b/activerecord/test/models/company_in_module.rb index 0782c1eff40e..2e7295eed149 100644 --- a/activerecord/test/models/company_in_module.rb +++ b/activerecord/test/models/company_in_module.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/with_options" module MyApplication diff --git a/activerecord/test/models/computer.rb b/activerecord/test/models/computer.rb index 1c9856e1af4d..f2998d362a66 100644 --- a/activerecord/test/models/computer.rb +++ b/activerecord/test/models/computer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Computer < ActiveRecord::Base belongs_to :developer, foreign_key: "developer" end diff --git a/activerecord/test/models/contact.rb b/activerecord/test/models/contact.rb index 47bbbbfd8ba5..0a095301bd0d 100644 --- a/activerecord/test/models/contact.rb +++ b/activerecord/test/models/contact.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ContactFakeColumns def self.extended(base) base.class_eval do diff --git a/activerecord/test/models/content.rb b/activerecord/test/models/content.rb index 68db2127d886..f2913be22df1 100644 --- a/activerecord/test/models/content.rb +++ b/activerecord/test/models/content.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Content < ActiveRecord::Base self.table_name = "content" has_one :content_position, dependent: :destroy diff --git a/activerecord/test/models/contract.rb b/activerecord/test/models/contract.rb index 32bd581377c0..e4bace0e32d5 100644 --- a/activerecord/test/models/contract.rb +++ b/activerecord/test/models/contract.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Contract < ActiveRecord::Base belongs_to :company belongs_to :developer diff --git a/activerecord/test/models/country.rb b/activerecord/test/models/country.rb index 7912719dddce..5c1c6dc4925e 100644 --- a/activerecord/test/models/country.rb +++ b/activerecord/test/models/country.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Country < ActiveRecord::Base self.primary_key = :country_id diff --git a/activerecord/test/models/course.rb b/activerecord/test/models/course.rb index 348f2bf1e0e3..0af33ed85fb5 100644 --- a/activerecord/test/models/course.rb +++ b/activerecord/test/models/course.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_dependency "models/arunit2_model" class Course < ARUnit2Model diff --git a/activerecord/test/models/customer.rb b/activerecord/test/models/customer.rb index 3d40cb1ace3a..2eb4c720a641 100644 --- a/activerecord/test/models/customer.rb +++ b/activerecord/test/models/customer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Customer < ActiveRecord::Base cattr_accessor :gps_conversion_was_run diff --git a/activerecord/test/models/customer_carrier.rb b/activerecord/test/models/customer_carrier.rb index 37186903ffc7..3d236da43d35 100644 --- a/activerecord/test/models/customer_carrier.rb +++ b/activerecord/test/models/customer_carrier.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CustomerCarrier < ActiveRecord::Base cattr_accessor :current_customer diff --git a/activerecord/test/models/dashboard.rb b/activerecord/test/models/dashboard.rb index 1b3b54545fda..fe54e9d6fcc5 100644 --- a/activerecord/test/models/dashboard.rb +++ b/activerecord/test/models/dashboard.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Dashboard < ActiveRecord::Base self.primary_key = :dashboard_id end diff --git a/activerecord/test/models/default.rb b/activerecord/test/models/default.rb index 887e9cc999e7..6f87ee74f78f 100644 --- a/activerecord/test/models/default.rb +++ b/activerecord/test/models/default.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class Default < ActiveRecord::Base end diff --git a/activerecord/test/models/department.rb b/activerecord/test/models/department.rb index 08004a0ed368..e8cdae897635 100644 --- a/activerecord/test/models/department.rb +++ b/activerecord/test/models/department.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Department < ActiveRecord::Base has_many :chefs belongs_to :hotel diff --git a/activerecord/test/models/developer.rb b/activerecord/test/models/developer.rb index 654830ba1181..aa7798c582c5 100644 --- a/activerecord/test/models/developer.rb +++ b/activerecord/test/models/developer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "ostruct" module DeveloperProjectsAssociationExtension2 diff --git a/activerecord/test/models/dog.rb b/activerecord/test/models/dog.rb index b02b8447b83d..08eeb6b75e29 100644 --- a/activerecord/test/models/dog.rb +++ b/activerecord/test/models/dog.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Dog < ActiveRecord::Base belongs_to :breeder, class_name: "DogLover", counter_cache: :bred_dogs_count belongs_to :trainer, class_name: "DogLover", counter_cache: :trained_dogs_count diff --git a/activerecord/test/models/dog_lover.rb b/activerecord/test/models/dog_lover.rb index 2c5be94aea44..75e43bda8afe 100644 --- a/activerecord/test/models/dog_lover.rb +++ b/activerecord/test/models/dog_lover.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class DogLover < ActiveRecord::Base has_many :trained_dogs, class_name: "Dog", foreign_key: :trainer_id, dependent: :destroy has_many :bred_dogs, class_name: "Dog", foreign_key: :breeder_id diff --git a/activerecord/test/models/doubloon.rb b/activerecord/test/models/doubloon.rb index 72725046660b..e18868e02290 100644 --- a/activerecord/test/models/doubloon.rb +++ b/activerecord/test/models/doubloon.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class AbstractDoubloon < ActiveRecord::Base # This has functionality that might be shared by multiple classes. diff --git a/activerecord/test/models/drink_designer.rb b/activerecord/test/models/drink_designer.rb index 2db968ef1161..9de6e3d618e7 100644 --- a/activerecord/test/models/drink_designer.rb +++ b/activerecord/test/models/drink_designer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class DrinkDesigner < ActiveRecord::Base has_one :chef, as: :employable end diff --git a/activerecord/test/models/edge.rb b/activerecord/test/models/edge.rb index e61d25c9bc18..9711ea6da919 100644 --- a/activerecord/test/models/edge.rb +++ b/activerecord/test/models/edge.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # This class models an edge in a directed graph. class Edge < ActiveRecord::Base belongs_to :source, class_name: "Vertex", foreign_key: "source_id" diff --git a/activerecord/test/models/electron.rb b/activerecord/test/models/electron.rb index 6fc270673f49..1828d173bb25 100644 --- a/activerecord/test/models/electron.rb +++ b/activerecord/test/models/electron.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Electron < ActiveRecord::Base belongs_to :molecule diff --git a/activerecord/test/models/engine.rb b/activerecord/test/models/engine.rb index eada171f6a6a..144bf7159bab 100644 --- a/activerecord/test/models/engine.rb +++ b/activerecord/test/models/engine.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Engine < ActiveRecord::Base belongs_to :my_car, class_name: "Car", foreign_key: "car_id", counter_cache: :engines_count end diff --git a/activerecord/test/models/entrant.rb b/activerecord/test/models/entrant.rb index 4682ce48c851..77095e28c578 100644 --- a/activerecord/test/models/entrant.rb +++ b/activerecord/test/models/entrant.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Entrant < ActiveRecord::Base belongs_to :course end diff --git a/activerecord/test/models/essay.rb b/activerecord/test/models/essay.rb index 1f9772870ef7..302a86290789 100644 --- a/activerecord/test/models/essay.rb +++ b/activerecord/test/models/essay.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Essay < ActiveRecord::Base belongs_to :author belongs_to :writer, primary_key: :name, polymorphic: true diff --git a/activerecord/test/models/event.rb b/activerecord/test/models/event.rb index 365ab32b0b89..ac9bc63f34d2 100644 --- a/activerecord/test/models/event.rb +++ b/activerecord/test/models/event.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Event < ActiveRecord::Base validates_uniqueness_of :title end diff --git a/activerecord/test/models/eye.rb b/activerecord/test/models/eye.rb index f53c34e4b101..a7410e8aa924 100644 --- a/activerecord/test/models/eye.rb +++ b/activerecord/test/models/eye.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Eye < ActiveRecord::Base attr_reader :after_create_callbacks_stack attr_reader :after_update_callbacks_stack diff --git a/activerecord/test/models/face.rb b/activerecord/test/models/face.rb index 5913bfa969d3..3c78bf928452 100644 --- a/activerecord/test/models/face.rb +++ b/activerecord/test/models/face.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Face < ActiveRecord::Base belongs_to :man, inverse_of: :face belongs_to :polymorphic_man, polymorphic: true, inverse_of: :polymorphic_face diff --git a/activerecord/test/models/family.rb b/activerecord/test/models/family.rb index 5ae5a78c9552..24bc3cc45744 100644 --- a/activerecord/test/models/family.rb +++ b/activerecord/test/models/family.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Family < ActiveRecord::Base has_many :family_trees, -> { where(token: nil) } has_many :members, through: :family_trees diff --git a/activerecord/test/models/family_tree.rb b/activerecord/test/models/family_tree.rb index cd9829fedddc..94a905246ad0 100644 --- a/activerecord/test/models/family_tree.rb +++ b/activerecord/test/models/family_tree.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class FamilyTree < ActiveRecord::Base belongs_to :member, class_name: "User", foreign_key: "member_id" belongs_to :family diff --git a/activerecord/test/models/friendship.rb b/activerecord/test/models/friendship.rb index 578382b494b1..e9ecfe7e2588 100644 --- a/activerecord/test/models/friendship.rb +++ b/activerecord/test/models/friendship.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Friendship < ActiveRecord::Base belongs_to :friend, class_name: "Person" # friend_too exists to test a bug, and probably shouldn't be used elsewhere diff --git a/activerecord/test/models/guid.rb b/activerecord/test/models/guid.rb index 05653ba498b9..8653b617b10a 100644 --- a/activerecord/test/models/guid.rb +++ b/activerecord/test/models/guid.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class Guid < ActiveRecord::Base end diff --git a/activerecord/test/models/guitar.rb b/activerecord/test/models/guitar.rb index cd068ff53da3..a1a32262725e 100644 --- a/activerecord/test/models/guitar.rb +++ b/activerecord/test/models/guitar.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Guitar < ActiveRecord::Base has_many :tuning_pegs, index_errors: true accepts_nested_attributes_for :tuning_pegs diff --git a/activerecord/test/models/hotel.rb b/activerecord/test/models/hotel.rb index 7bc717c89155..1d20d17e3b03 100644 --- a/activerecord/test/models/hotel.rb +++ b/activerecord/test/models/hotel.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hotel < ActiveRecord::Base has_many :departments has_many :chefs, through: :departments diff --git a/activerecord/test/models/image.rb b/activerecord/test/models/image.rb index 7ae8e4a7f6ab..1efe679022ba 100644 --- a/activerecord/test/models/image.rb +++ b/activerecord/test/models/image.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Image < ActiveRecord::Base belongs_to :imageable, foreign_key: :imageable_identifier, foreign_type: :imageable_class end diff --git a/activerecord/test/models/interest.rb b/activerecord/test/models/interest.rb index ec79416ee7f8..10e855be4d5a 100644 --- a/activerecord/test/models/interest.rb +++ b/activerecord/test/models/interest.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Interest < ActiveRecord::Base belongs_to :man, inverse_of: :interests belongs_to :polymorphic_man, polymorphic: true, inverse_of: :polymorphic_interests diff --git a/activerecord/test/models/invoice.rb b/activerecord/test/models/invoice.rb index 4be5a001934e..df37e2a9e154 100644 --- a/activerecord/test/models/invoice.rb +++ b/activerecord/test/models/invoice.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Invoice < ActiveRecord::Base has_many :line_items, autosave: true before_save { |record| record.balance = record.line_items.map(&:amount).sum } diff --git a/activerecord/test/models/item.rb b/activerecord/test/models/item.rb index 336fb1769a5e..86a1fc625edf 100644 --- a/activerecord/test/models/item.rb +++ b/activerecord/test/models/item.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class AbstractItem < ActiveRecord::Base self.abstract_class = true has_one :tagging, as: :taggable diff --git a/activerecord/test/models/job.rb b/activerecord/test/models/job.rb index bbaef2792c95..6c4dff4bcd5c 100644 --- a/activerecord/test/models/job.rb +++ b/activerecord/test/models/job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Job < ActiveRecord::Base has_many :references has_many :people, through: :references diff --git a/activerecord/test/models/joke.rb b/activerecord/test/models/joke.rb index eeb5818a1fb5..5c2443036a1e 100644 --- a/activerecord/test/models/joke.rb +++ b/activerecord/test/models/joke.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Joke < ActiveRecord::Base self.table_name = "funny_jokes" end diff --git a/activerecord/test/models/keyboard.rb b/activerecord/test/models/keyboard.rb index bcede53ec98d..d179de8e1c7f 100644 --- a/activerecord/test/models/keyboard.rb +++ b/activerecord/test/models/keyboard.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Keyboard < ActiveRecord::Base self.primary_key = "key_number" end diff --git a/activerecord/test/models/legacy_thing.rb b/activerecord/test/models/legacy_thing.rb index eead181a0e81..948d575bb893 100644 --- a/activerecord/test/models/legacy_thing.rb +++ b/activerecord/test/models/legacy_thing.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class LegacyThing < ActiveRecord::Base self.locking_column = :version end diff --git a/activerecord/test/models/lesson.rb b/activerecord/test/models/lesson.rb index 4c88153068e3..086ff55b4216 100644 --- a/activerecord/test/models/lesson.rb +++ b/activerecord/test/models/lesson.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class LessonError < Exception end diff --git a/activerecord/test/models/line_item.rb b/activerecord/test/models/line_item.rb index 93f7cceb13a7..1ef2eda97a08 100644 --- a/activerecord/test/models/line_item.rb +++ b/activerecord/test/models/line_item.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class LineItem < ActiveRecord::Base belongs_to :invoice, touch: true end diff --git a/activerecord/test/models/liquid.rb b/activerecord/test/models/liquid.rb index 69d4d7df1a48..9440292c7844 100644 --- a/activerecord/test/models/liquid.rb +++ b/activerecord/test/models/liquid.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Liquid < ActiveRecord::Base self.table_name = :liquid has_many :molecules, -> { distinct } diff --git a/activerecord/test/models/man.rb b/activerecord/test/models/man.rb index d2436a735c4b..bf81aa9fc6b3 100644 --- a/activerecord/test/models/man.rb +++ b/activerecord/test/models/man.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Man < ActiveRecord::Base has_one :face, inverse_of: :man has_one :polymorphic_face, class_name: "Face", as: :polymorphic_man, inverse_of: :polymorphic_man diff --git a/activerecord/test/models/matey.rb b/activerecord/test/models/matey.rb index 80ee5f47c5ec..00311f78fe03 100644 --- a/activerecord/test/models/matey.rb +++ b/activerecord/test/models/matey.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Matey < ActiveRecord::Base belongs_to :pirate belongs_to :target, class_name: "Pirate" diff --git a/activerecord/test/models/member.rb b/activerecord/test/models/member.rb index 36f2461b84f5..99a037e0f6e0 100644 --- a/activerecord/test/models/member.rb +++ b/activerecord/test/models/member.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Member < ActiveRecord::Base has_one :current_membership has_one :selected_membership diff --git a/activerecord/test/models/member_detail.rb b/activerecord/test/models/member_detail.rb index 157130986c86..8311d202da62 100644 --- a/activerecord/test/models/member_detail.rb +++ b/activerecord/test/models/member_detail.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class MemberDetail < ActiveRecord::Base belongs_to :member, inverse_of: false belongs_to :organization diff --git a/activerecord/test/models/member_type.rb b/activerecord/test/models/member_type.rb index a13561c72ab0..3c159a885a4e 100644 --- a/activerecord/test/models/member_type.rb +++ b/activerecord/test/models/member_type.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class MemberType < ActiveRecord::Base has_many :members end diff --git a/activerecord/test/models/membership.rb b/activerecord/test/models/membership.rb index 0f8be0ad859b..bd957f1de872 100644 --- a/activerecord/test/models/membership.rb +++ b/activerecord/test/models/membership.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Membership < ActiveRecord::Base enum type: %i(Membership CurrentMembership SuperMembership SelectedMembership TenantMembership) belongs_to :member diff --git a/activerecord/test/models/mentor.rb b/activerecord/test/models/mentor.rb index 66504b4e911f..9e52d39e46dc 100644 --- a/activerecord/test/models/mentor.rb +++ b/activerecord/test/models/mentor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Mentor < ActiveRecord::Base has_many :developers end diff --git a/activerecord/test/models/minimalistic.rb b/activerecord/test/models/minimalistic.rb index 2e3f8e081a67..c31eea65c903 100644 --- a/activerecord/test/models/minimalistic.rb +++ b/activerecord/test/models/minimalistic.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class Minimalistic < ActiveRecord::Base end diff --git a/activerecord/test/models/minivan.rb b/activerecord/test/models/minivan.rb index e9b05dadf282..4d04d808a954 100644 --- a/activerecord/test/models/minivan.rb +++ b/activerecord/test/models/minivan.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Minivan < ActiveRecord::Base self.primary_key = :minivan_id diff --git a/activerecord/test/models/mixed_case_monkey.rb b/activerecord/test/models/mixed_case_monkey.rb index 1c350066655b..552de2c18cd7 100644 --- a/activerecord/test/models/mixed_case_monkey.rb +++ b/activerecord/test/models/mixed_case_monkey.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class MixedCaseMonkey < ActiveRecord::Base belongs_to :man end diff --git a/activerecord/test/models/mocktail_designer.rb b/activerecord/test/models/mocktail_designer.rb index 77b44651a3e6..fc9fc4c942b7 100644 --- a/activerecord/test/models/mocktail_designer.rb +++ b/activerecord/test/models/mocktail_designer.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class MocktailDesigner < DrinkDesigner end diff --git a/activerecord/test/models/molecule.rb b/activerecord/test/models/molecule.rb index 26870c8f887b..8e0f6eb6eeee 100644 --- a/activerecord/test/models/molecule.rb +++ b/activerecord/test/models/molecule.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Molecule < ActiveRecord::Base belongs_to :liquid has_many :electrons diff --git a/activerecord/test/models/movie.rb b/activerecord/test/models/movie.rb index 0302abad1eba..fc620656e43c 100644 --- a/activerecord/test/models/movie.rb +++ b/activerecord/test/models/movie.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Movie < ActiveRecord::Base self.primary_key = "movieid" diff --git a/activerecord/test/models/node.rb b/activerecord/test/models/node.rb index 459ea8cf9532..3422a9ea3a1f 100644 --- a/activerecord/test/models/node.rb +++ b/activerecord/test/models/node.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Node < ActiveRecord::Base belongs_to :tree, touch: true belongs_to :parent, class_name: "Node", touch: true, optional: true diff --git a/activerecord/test/models/non_primary_key.rb b/activerecord/test/models/non_primary_key.rb index 1cafb096085e..4a5fdb88b88b 100644 --- a/activerecord/test/models/non_primary_key.rb +++ b/activerecord/test/models/non_primary_key.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class NonPrimaryKey < ActiveRecord::Base end diff --git a/activerecord/test/models/notification.rb b/activerecord/test/models/notification.rb index 82edc64b683d..9e8ce108d501 100644 --- a/activerecord/test/models/notification.rb +++ b/activerecord/test/models/notification.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Notification < ActiveRecord::Base validates_presence_of :message end diff --git a/activerecord/test/models/numeric_data.rb b/activerecord/test/models/numeric_data.rb index c6e025a9ce38..8998495101d7 100644 --- a/activerecord/test/models/numeric_data.rb +++ b/activerecord/test/models/numeric_data.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class NumericData < ActiveRecord::Base self.table_name = "numeric_data" # Decimal columns with 0 scale being automatically treated as integers diff --git a/activerecord/test/models/order.rb b/activerecord/test/models/order.rb index 699be53959e5..c8693586a0e9 100644 --- a/activerecord/test/models/order.rb +++ b/activerecord/test/models/order.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Order < ActiveRecord::Base belongs_to :billing, class_name: "Customer", foreign_key: "billing_customer_id" belongs_to :shipping, class_name: "Customer", foreign_key: "shipping_customer_id" diff --git a/activerecord/test/models/organization.rb b/activerecord/test/models/organization.rb index 462830dadc10..c08a01994b11 100644 --- a/activerecord/test/models/organization.rb +++ b/activerecord/test/models/organization.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Organization < ActiveRecord::Base has_many :member_details has_many :members, through: :member_details diff --git a/activerecord/test/models/other_dog.rb b/activerecord/test/models/other_dog.rb index 418caf34be86..a836d9de1ab3 100644 --- a/activerecord/test/models/other_dog.rb +++ b/activerecord/test/models/other_dog.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_dependency "models/arunit2_model" class OtherDog < ARUnit2Model diff --git a/activerecord/test/models/owner.rb b/activerecord/test/models/owner.rb index 21fc9b6eb8cd..f6190fe5af7c 100644 --- a/activerecord/test/models/owner.rb +++ b/activerecord/test/models/owner.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Owner < ActiveRecord::Base self.primary_key = :owner_id has_many :pets, -> { order "pets.name desc" } diff --git a/activerecord/test/models/parrot.rb b/activerecord/test/models/parrot.rb index 1e5f9285a866..4a027fa0bbb1 100644 --- a/activerecord/test/models/parrot.rb +++ b/activerecord/test/models/parrot.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Parrot < ActiveRecord::Base self.inheritance_column = :parrot_sti_class diff --git a/activerecord/test/models/person.rb b/activerecord/test/models/person.rb index 18994d6f18d5..c1ea965a6e10 100644 --- a/activerecord/test/models/person.rb +++ b/activerecord/test/models/person.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Person < ActiveRecord::Base has_many :readers has_many :secure_readers diff --git a/activerecord/test/models/personal_legacy_thing.rb b/activerecord/test/models/personal_legacy_thing.rb index adde7a504a6a..1a70aa7e7be1 100644 --- a/activerecord/test/models/personal_legacy_thing.rb +++ b/activerecord/test/models/personal_legacy_thing.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class PersonalLegacyThing < ActiveRecord::Base self.locking_column = :version belongs_to :person, counter_cache: true diff --git a/activerecord/test/models/pet.rb b/activerecord/test/models/pet.rb index 51a3e428152b..f0d82ddfc988 100644 --- a/activerecord/test/models/pet.rb +++ b/activerecord/test/models/pet.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Pet < ActiveRecord::Base attr_accessor :current_user diff --git a/activerecord/test/models/pet_treasure.rb b/activerecord/test/models/pet_treasure.rb index 1fe7807ffe28..2d552bf50c3e 100644 --- a/activerecord/test/models/pet_treasure.rb +++ b/activerecord/test/models/pet_treasure.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class PetTreasure < ActiveRecord::Base self.table_name = "pets_treasures" diff --git a/activerecord/test/models/pirate.rb b/activerecord/test/models/pirate.rb index c532ab426e66..21fe1b784765 100644 --- a/activerecord/test/models/pirate.rb +++ b/activerecord/test/models/pirate.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Pirate < ActiveRecord::Base belongs_to :parrot, validate: true belongs_to :non_validated_parrot, class_name: "Parrot" diff --git a/activerecord/test/models/possession.rb b/activerecord/test/models/possession.rb index 0226336c164b..d8c2a5f21fe6 100644 --- a/activerecord/test/models/possession.rb +++ b/activerecord/test/models/possession.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Possession < ActiveRecord::Base self.table_name = "having" end diff --git a/activerecord/test/models/post.rb b/activerecord/test/models/post.rb index ed64e0ee5201..534ba47c9868 100644 --- a/activerecord/test/models/post.rb +++ b/activerecord/test/models/post.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Post < ActiveRecord::Base class CategoryPost < ActiveRecord::Base self.table_name = "categories_posts" diff --git a/activerecord/test/models/price_estimate.rb b/activerecord/test/models/price_estimate.rb index ce086e40a346..abdff640c706 100644 --- a/activerecord/test/models/price_estimate.rb +++ b/activerecord/test/models/price_estimate.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class PriceEstimate < ActiveRecord::Base belongs_to :estimate_of, polymorphic: true belongs_to :thing, polymorphic: true diff --git a/activerecord/test/models/professor.rb b/activerecord/test/models/professor.rb index 4dfb1a9602b7..6ec183bb07bc 100644 --- a/activerecord/test/models/professor.rb +++ b/activerecord/test/models/professor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_dependency "models/arunit2_model" class Professor < ARUnit2Model diff --git a/activerecord/test/models/project.rb b/activerecord/test/models/project.rb index 4fbd986e4051..e30f1d729ab9 100644 --- a/activerecord/test/models/project.rb +++ b/activerecord/test/models/project.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Project < ActiveRecord::Base belongs_to :mentor has_and_belongs_to_many :developers, -> { distinct.order "developers.name desc, developers.id desc" } diff --git a/activerecord/test/models/publisher.rb b/activerecord/test/models/publisher.rb index 0d4a7f92351a..55cf0e42a571 100644 --- a/activerecord/test/models/publisher.rb +++ b/activerecord/test/models/publisher.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true module Publisher end diff --git a/activerecord/test/models/publisher/article.rb b/activerecord/test/models/publisher/article.rb index d73a8eb93612..43b88117e002 100644 --- a/activerecord/test/models/publisher/article.rb +++ b/activerecord/test/models/publisher/article.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Publisher::Article < ActiveRecord::Base has_and_belongs_to_many :magazines has_and_belongs_to_many :tags diff --git a/activerecord/test/models/publisher/magazine.rb b/activerecord/test/models/publisher/magazine.rb index 82e1a14008ec..25e34aca9933 100644 --- a/activerecord/test/models/publisher/magazine.rb +++ b/activerecord/test/models/publisher/magazine.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Publisher::Magazine < ActiveRecord::Base has_and_belongs_to_many :articles end diff --git a/activerecord/test/models/randomly_named_c1.rb b/activerecord/test/models/randomly_named_c1.rb index d4be1e13b459..1cd2ca1bb87c 100644 --- a/activerecord/test/models/randomly_named_c1.rb +++ b/activerecord/test/models/randomly_named_c1.rb @@ -1,3 +1,4 @@ -class ClassNameThatDoesNotFollowCONVENTIONS < ActiveRecord::Base - self.table_name = :randomly_named_table1 -end +# frozen_string_literal: true +class ClassNameThatDoesNotFollowCONVENTIONS < ActiveRecord::Base + self.table_name = :randomly_named_table1 +end diff --git a/activerecord/test/models/rating.rb b/activerecord/test/models/rating.rb index 7420821db031..753df20e8d8e 100644 --- a/activerecord/test/models/rating.rb +++ b/activerecord/test/models/rating.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Rating < ActiveRecord::Base belongs_to :comment has_many :taggings, as: :taggable diff --git a/activerecord/test/models/reader.rb b/activerecord/test/models/reader.rb index 7c5a159fe0c3..05a17eca8b9c 100644 --- a/activerecord/test/models/reader.rb +++ b/activerecord/test/models/reader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Reader < ActiveRecord::Base belongs_to :post belongs_to :person, inverse_of: :readers diff --git a/activerecord/test/models/recipe.rb b/activerecord/test/models/recipe.rb index c3872306035c..8f81807340d7 100644 --- a/activerecord/test/models/recipe.rb +++ b/activerecord/test/models/recipe.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Recipe < ActiveRecord::Base belongs_to :chef end diff --git a/activerecord/test/models/record.rb b/activerecord/test/models/record.rb index f77ac9fc039d..81d5baa6b1ed 100644 --- a/activerecord/test/models/record.rb +++ b/activerecord/test/models/record.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class Record < ActiveRecord::Base end diff --git a/activerecord/test/models/reference.rb b/activerecord/test/models/reference.rb index e2bb980fed5a..5daa48d8ce9a 100644 --- a/activerecord/test/models/reference.rb +++ b/activerecord/test/models/reference.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Reference < ActiveRecord::Base belongs_to :person belongs_to :job diff --git a/activerecord/test/models/reply.rb b/activerecord/test/models/reply.rb index a2d169292ad0..f3372e81fd8f 100644 --- a/activerecord/test/models/reply.rb +++ b/activerecord/test/models/reply.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "models/topic" class Reply < Topic diff --git a/activerecord/test/models/ship.rb b/activerecord/test/models/ship.rb index 77a7b2231502..0ee8da78dba7 100644 --- a/activerecord/test/models/ship.rb +++ b/activerecord/test/models/ship.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Ship < ActiveRecord::Base self.record_timestamps = false diff --git a/activerecord/test/models/ship_part.rb b/activerecord/test/models/ship_part.rb index 1a633b8d776f..67c089a7d080 100644 --- a/activerecord/test/models/ship_part.rb +++ b/activerecord/test/models/ship_part.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ShipPart < ActiveRecord::Base belongs_to :ship has_many :trinkets, class_name: "Treasure", as: :looter diff --git a/activerecord/test/models/shop.rb b/activerecord/test/models/shop.rb index f9d23d13b022..819af853ada4 100644 --- a/activerecord/test/models/shop.rb +++ b/activerecord/test/models/shop.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Shop class Collection < ActiveRecord::Base has_many :products, dependent: :nullify diff --git a/activerecord/test/models/shop_account.rb b/activerecord/test/models/shop_account.rb index 1580e8b20cba..cb00e202f0fa 100644 --- a/activerecord/test/models/shop_account.rb +++ b/activerecord/test/models/shop_account.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ShopAccount < ActiveRecord::Base belongs_to :customer belongs_to :customer_carrier diff --git a/activerecord/test/models/speedometer.rb b/activerecord/test/models/speedometer.rb index 497c3aba9a98..b34e3c16fcc3 100644 --- a/activerecord/test/models/speedometer.rb +++ b/activerecord/test/models/speedometer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Speedometer < ActiveRecord::Base self.primary_key = :speedometer_id belongs_to :dashboard diff --git a/activerecord/test/models/sponsor.rb b/activerecord/test/models/sponsor.rb index 3f142b25fe23..cfcd1f762a9f 100644 --- a/activerecord/test/models/sponsor.rb +++ b/activerecord/test/models/sponsor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Sponsor < ActiveRecord::Base belongs_to :sponsor_club, class_name: "Club", foreign_key: "club_id" belongs_to :sponsorable, polymorphic: true diff --git a/activerecord/test/models/string_key_object.rb b/activerecord/test/models/string_key_object.rb index f084ec1bdced..94c7fb7582d2 100644 --- a/activerecord/test/models/string_key_object.rb +++ b/activerecord/test/models/string_key_object.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class StringKeyObject < ActiveRecord::Base self.primary_key = :id end diff --git a/activerecord/test/models/student.rb b/activerecord/test/models/student.rb index 28a0b6c99bcf..888a0ae481e5 100644 --- a/activerecord/test/models/student.rb +++ b/activerecord/test/models/student.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Student < ActiveRecord::Base has_and_belongs_to_many :lessons belongs_to :college diff --git a/activerecord/test/models/subscriber.rb b/activerecord/test/models/subscriber.rb index a820329003fd..8ef679486dc0 100644 --- a/activerecord/test/models/subscriber.rb +++ b/activerecord/test/models/subscriber.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Subscriber < ActiveRecord::Base self.primary_key = "nick" has_many :subscriptions diff --git a/activerecord/test/models/subscription.rb b/activerecord/test/models/subscription.rb index 1cedf6deaedc..e21083641311 100644 --- a/activerecord/test/models/subscription.rb +++ b/activerecord/test/models/subscription.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Subscription < ActiveRecord::Base belongs_to :subscriber, counter_cache: :books_count belongs_to :book diff --git a/activerecord/test/models/tag.rb b/activerecord/test/models/tag.rb index c907aea10fc6..6c59dc6183af 100644 --- a/activerecord/test/models/tag.rb +++ b/activerecord/test/models/tag.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Tag < ActiveRecord::Base has_many :taggings has_many :taggables, through: :taggings diff --git a/activerecord/test/models/tagging.rb b/activerecord/test/models/tagging.rb index f739b4a19740..0060b96f7304 100644 --- a/activerecord/test/models/tagging.rb +++ b/activerecord/test/models/tagging.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # test that attr_readonly isn't called on the :taggable polymorphic association module Taggable end diff --git a/activerecord/test/models/task.rb b/activerecord/test/models/task.rb index e36989dd560b..1ab1048bdbca 100644 --- a/activerecord/test/models/task.rb +++ b/activerecord/test/models/task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Task < ActiveRecord::Base def updated_at ending diff --git a/activerecord/test/models/topic.rb b/activerecord/test/models/topic.rb index d9381ac9cfa8..a74263428b63 100644 --- a/activerecord/test/models/topic.rb +++ b/activerecord/test/models/topic.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Topic < ActiveRecord::Base scope :base, -> { all } scope :written_before, lambda { |time| diff --git a/activerecord/test/models/toy.rb b/activerecord/test/models/toy.rb index ddc7048a56d4..97b877caea34 100644 --- a/activerecord/test/models/toy.rb +++ b/activerecord/test/models/toy.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Toy < ActiveRecord::Base self.primary_key = :toy_id belongs_to :pet diff --git a/activerecord/test/models/traffic_light.rb b/activerecord/test/models/traffic_light.rb index a6b7edb88284..595b1cb716a7 100644 --- a/activerecord/test/models/traffic_light.rb +++ b/activerecord/test/models/traffic_light.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class TrafficLight < ActiveRecord::Base serialize :state, Array serialize :long_state, Array diff --git a/activerecord/test/models/treasure.rb b/activerecord/test/models/treasure.rb index fb2a5d44e2ff..3f2162a63d0c 100644 --- a/activerecord/test/models/treasure.rb +++ b/activerecord/test/models/treasure.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Treasure < ActiveRecord::Base has_and_belongs_to_many :parrots belongs_to :looter, polymorphic: true diff --git a/activerecord/test/models/treaty.rb b/activerecord/test/models/treaty.rb index 373cd48f7194..a6c227c84e8f 100644 --- a/activerecord/test/models/treaty.rb +++ b/activerecord/test/models/treaty.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Treaty < ActiveRecord::Base self.primary_key = :treaty_id diff --git a/activerecord/test/models/tree.rb b/activerecord/test/models/tree.rb index dc29cccc9ca4..844c2693ecc2 100644 --- a/activerecord/test/models/tree.rb +++ b/activerecord/test/models/tree.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Tree < ActiveRecord::Base has_many :nodes, dependent: :destroy end diff --git a/activerecord/test/models/tuning_peg.rb b/activerecord/test/models/tuning_peg.rb index 1252d6dc1d58..4fee61c565b8 100644 --- a/activerecord/test/models/tuning_peg.rb +++ b/activerecord/test/models/tuning_peg.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class TuningPeg < ActiveRecord::Base belongs_to :guitar validates_numericality_of :pitch diff --git a/activerecord/test/models/tyre.rb b/activerecord/test/models/tyre.rb index e50a21ca68ac..03ba9d3364c2 100644 --- a/activerecord/test/models/tyre.rb +++ b/activerecord/test/models/tyre.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Tyre < ActiveRecord::Base belongs_to :car diff --git a/activerecord/test/models/user.rb b/activerecord/test/models/user.rb index 5089a795f453..3ceacc5e7fcf 100644 --- a/activerecord/test/models/user.rb +++ b/activerecord/test/models/user.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "models/job" class User < ActiveRecord::Base diff --git a/activerecord/test/models/uuid_child.rb b/activerecord/test/models/uuid_child.rb index a3d0962ad68f..eaa380ba2041 100644 --- a/activerecord/test/models/uuid_child.rb +++ b/activerecord/test/models/uuid_child.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class UuidChild < ActiveRecord::Base belongs_to :uuid_parent end diff --git a/activerecord/test/models/uuid_item.rb b/activerecord/test/models/uuid_item.rb index 2353e402137e..bb152c381ac7 100644 --- a/activerecord/test/models/uuid_item.rb +++ b/activerecord/test/models/uuid_item.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class UuidItem < ActiveRecord::Base end diff --git a/activerecord/test/models/uuid_parent.rb b/activerecord/test/models/uuid_parent.rb index 5634f22d0c5c..f654a964e079 100644 --- a/activerecord/test/models/uuid_parent.rb +++ b/activerecord/test/models/uuid_parent.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class UuidParent < ActiveRecord::Base has_many :uuid_children end diff --git a/activerecord/test/models/vegetables.rb b/activerecord/test/models/vegetables.rb index a4590d06e047..c97b6b939dc4 100644 --- a/activerecord/test/models/vegetables.rb +++ b/activerecord/test/models/vegetables.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Vegetable < ActiveRecord::Base validates_presence_of :name diff --git a/activerecord/test/models/vehicle.rb b/activerecord/test/models/vehicle.rb index 855bc4e325c7..61e18b2e40b9 100644 --- a/activerecord/test/models/vehicle.rb +++ b/activerecord/test/models/vehicle.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Vehicle < ActiveRecord::Base self.abstract_class = true default_scope -> { where("tires_count IS NOT NULL") } diff --git a/activerecord/test/models/vertex.rb b/activerecord/test/models/vertex.rb index 3d19433b6fa8..b90f71cec6e5 100644 --- a/activerecord/test/models/vertex.rb +++ b/activerecord/test/models/vertex.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # This class models a vertex in a directed graph. class Vertex < ActiveRecord::Base has_many :sink_edges, class_name: "Edge", foreign_key: "source_id" diff --git a/activerecord/test/models/warehouse_thing.rb b/activerecord/test/models/warehouse_thing.rb index f20bd1a24529..684af49f2fea 100644 --- a/activerecord/test/models/warehouse_thing.rb +++ b/activerecord/test/models/warehouse_thing.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class WarehouseThing < ActiveRecord::Base self.table_name = "warehouse-things" diff --git a/activerecord/test/models/wheel.rb b/activerecord/test/models/wheel.rb index cba2b3e5188e..f2fecf95456c 100644 --- a/activerecord/test/models/wheel.rb +++ b/activerecord/test/models/wheel.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Wheel < ActiveRecord::Base belongs_to :wheelable, polymorphic: true, counter_cache: true end diff --git a/activerecord/test/models/without_table.rb b/activerecord/test/models/without_table.rb index 7c0fc286e148..77a471e682b8 100644 --- a/activerecord/test/models/without_table.rb +++ b/activerecord/test/models/without_table.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class WithoutTable < ActiveRecord::Base default_scope -> { where(published: true) } end diff --git a/activerecord/test/models/zine.rb b/activerecord/test/models/zine.rb index 3f2b348b46bd..4c72cbb242e0 100644 --- a/activerecord/test/models/zine.rb +++ b/activerecord/test/models/zine.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Zine < ActiveRecord::Base has_many :interests, inverse_of: :zine end diff --git a/activerecord/test/schema/mysql2_specific_schema.rb b/activerecord/test/schema/mysql2_specific_schema.rb index 90a314c83cfd..f55b030ebf39 100644 --- a/activerecord/test/schema/mysql2_specific_schema.rb +++ b/activerecord/test/schema/mysql2_specific_schema.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ActiveRecord::Schema.define do if ActiveRecord::Base.connection.version >= "5.6.0" diff --git a/activerecord/test/schema/oracle_specific_schema.rb b/activerecord/test/schema/oracle_specific_schema.rb index 264d9b89107d..9129981708db 100644 --- a/activerecord/test/schema/oracle_specific_schema.rb +++ b/activerecord/test/schema/oracle_specific_schema.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ActiveRecord::Schema.define do execute "drop table test_oracle_defaults" rescue nil diff --git a/activerecord/test/schema/postgresql_specific_schema.rb b/activerecord/test/schema/postgresql_specific_schema.rb index e56e8fa36aa3..dbf0972b4be5 100644 --- a/activerecord/test/schema/postgresql_specific_schema.rb +++ b/activerecord/test/schema/postgresql_specific_schema.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ActiveRecord::Schema.define do enable_extension!("uuid-ossp", ActiveRecord::Base.connection) diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index f534e9c00e18..d4f029ff16ea 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ActiveRecord::Schema.define do # ------------------------------------------------------------------- # # # diff --git a/activerecord/test/support/config.rb b/activerecord/test/support/config.rb index aaff408b41b1..e385d7fff789 100644 --- a/activerecord/test/support/config.rb +++ b/activerecord/test/support/config.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "yaml" require "erb" require "fileutils" diff --git a/activerecord/test/support/connection.rb b/activerecord/test/support/connection.rb index 1a609e13c386..06a037d3d0f6 100644 --- a/activerecord/test/support/connection.rb +++ b/activerecord/test/support/connection.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/logger" require "models/college" require "models/course" diff --git a/activerecord/test/support/connection_helper.rb b/activerecord/test/support/connection_helper.rb index 4a19e5df44af..5e37a4a991c8 100644 --- a/activerecord/test/support/connection_helper.rb +++ b/activerecord/test/support/connection_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ConnectionHelper def run_without_connection original_connection = ActiveRecord::Base.remove_connection diff --git a/activerecord/test/support/ddl_helper.rb b/activerecord/test/support/ddl_helper.rb index 43cb235e0162..3a07316637e5 100644 --- a/activerecord/test/support/ddl_helper.rb +++ b/activerecord/test/support/ddl_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module DdlHelper def with_example_table(connection, table_name, definition = nil) connection.execute("CREATE TABLE #{table_name}(#{definition})") diff --git a/activerecord/test/support/schema_dumping_helper.rb b/activerecord/test/support/schema_dumping_helper.rb index 666c1b6a1495..1a3f67f3edf3 100644 --- a/activerecord/test/support/schema_dumping_helper.rb +++ b/activerecord/test/support/schema_dumping_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module SchemaDumpingHelper def dump_table_schema(table, connection = ActiveRecord::Base.connection) old_ignore_tables = ActiveRecord::SchemaDumper.ignore_tables diff --git a/activesupport/Rakefile b/activesupport/Rakefile index 2e1c50cc3dfa..8691a3403568 100644 --- a/activesupport/Rakefile +++ b/activesupport/Rakefile @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rake/testtask" task default: :test diff --git a/activesupport/activesupport.gemspec b/activesupport/activesupport.gemspec index 16e912694c58..4470de7ec1b4 100644 --- a/activesupport/activesupport.gemspec +++ b/activesupport/activesupport.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/activesupport/bin/generate_tables b/activesupport/bin/generate_tables index 6f62593f1428..18199b2171db 100755 --- a/activesupport/bin/generate_tables +++ b/activesupport/bin/generate_tables @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true begin $:.unshift(File.expand_path("../lib", __dir__)) diff --git a/activesupport/bin/test b/activesupport/bin/test index 470ce93f103c..c53377cc970f 100755 --- a/activesupport/bin/test +++ b/activesupport/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/activesupport/lib/active_support.rb b/activesupport/lib/active_support.rb index a667fbb54a12..d99e8ac4a595 100644 --- a/activesupport/lib/active_support.rb +++ b/activesupport/lib/active_support.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true #-- # Copyright (c) 2005-2017 David Heinemeier Hansson # diff --git a/activesupport/lib/active_support/all.rb b/activesupport/lib/active_support/all.rb index 72a23075af79..00f3639a4280 100644 --- a/activesupport/lib/active_support/all.rb +++ b/activesupport/lib/active_support/all.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support" require "active_support/time" require "active_support/core_ext" diff --git a/activesupport/lib/active_support/array_inquirer.rb b/activesupport/lib/active_support/array_inquirer.rb index befa1746c6cd..6dad208e430a 100644 --- a/activesupport/lib/active_support/array_inquirer.rb +++ b/activesupport/lib/active_support/array_inquirer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport # Wrapping an array in an +ArrayInquirer+ gives a friendlier way to check # its string-like contents: diff --git a/activesupport/lib/active_support/backtrace_cleaner.rb b/activesupport/lib/active_support/backtrace_cleaner.rb index e47c90597f3e..1ffa2c05a233 100644 --- a/activesupport/lib/active_support/backtrace_cleaner.rb +++ b/activesupport/lib/active_support/backtrace_cleaner.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport # Backtraces often include many lines that are not relevant for the context # under review. This makes it hard to find the signal amongst the backtrace diff --git a/activesupport/lib/active_support/benchmarkable.rb b/activesupport/lib/active_support/benchmarkable.rb index 70493c8da77b..a5413932ef44 100644 --- a/activesupport/lib/active_support/benchmarkable.rb +++ b/activesupport/lib/active_support/benchmarkable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/benchmark" require "active_support/core_ext/hash/keys" diff --git a/activesupport/lib/active_support/builder.rb b/activesupport/lib/active_support/builder.rb index 0f010c5d964b..a7582a4f0012 100644 --- a/activesupport/lib/active_support/builder.rb +++ b/activesupport/lib/active_support/builder.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require "builder" rescue LoadError => e diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index 3847d8b7aef5..729119d87ad6 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "zlib" require "active_support/core_ext/array/extract_options" require "active_support/core_ext/array/wrap" diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index 945f50a56e88..82f457dcc9cc 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/marshal" require "active_support/core_ext/file/atomic" require "active_support/core_ext/string/conversions" diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb index 06fa9f67ade1..66d571adcb91 100644 --- a/activesupport/lib/active_support/cache/mem_cache_store.rb +++ b/activesupport/lib/active_support/cache/mem_cache_store.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require "dalli" rescue LoadError => e diff --git a/activesupport/lib/active_support/cache/memory_store.rb b/activesupport/lib/active_support/cache/memory_store.rb index 56fe1457d0e8..e1fee725955c 100644 --- a/activesupport/lib/active_support/cache/memory_store.rb +++ b/activesupport/lib/active_support/cache/memory_store.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "monitor" module ActiveSupport diff --git a/activesupport/lib/active_support/cache/null_store.rb b/activesupport/lib/active_support/cache/null_store.rb index 550659fc5613..10ffbb84eadf 100644 --- a/activesupport/lib/active_support/cache/null_store.rb +++ b/activesupport/lib/active_support/cache/null_store.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module Cache # A cache store implementation which doesn't actually store anything. Useful in diff --git a/activesupport/lib/active_support/cache/strategy/local_cache.rb b/activesupport/lib/active_support/cache/strategy/local_cache.rb index 69b3a93a050b..2cd24bdfcc7b 100644 --- a/activesupport/lib/active_support/cache/strategy/local_cache.rb +++ b/activesupport/lib/active_support/cache/strategy/local_cache.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/duplicable" require "active_support/core_ext/string/inflections" require "active_support/per_thread_registry" diff --git a/activesupport/lib/active_support/cache/strategy/local_cache_middleware.rb b/activesupport/lib/active_support/cache/strategy/local_cache_middleware.rb index 4c3679e4bf40..a53e268a92de 100644 --- a/activesupport/lib/active_support/cache/strategy/local_cache_middleware.rb +++ b/activesupport/lib/active_support/cache/strategy/local_cache_middleware.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rack/body_proxy" require "rack/utils" diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index df18c3519961..d05fd9ee1508 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/concern" require "active_support/descendants_tracker" require "active_support/core_ext/array/extract_options" diff --git a/activesupport/lib/active_support/concern.rb b/activesupport/lib/active_support/concern.rb index 0403eb70cab0..f1dcda7dfa76 100644 --- a/activesupport/lib/active_support/concern.rb +++ b/activesupport/lib/active_support/concern.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport # A typical module looks like this: # diff --git a/activesupport/lib/active_support/concurrency/share_lock.rb b/activesupport/lib/active_support/concurrency/share_lock.rb index 4318523b07f1..060b16f2d66d 100644 --- a/activesupport/lib/active_support/concurrency/share_lock.rb +++ b/activesupport/lib/active_support/concurrency/share_lock.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "thread" require "monitor" diff --git a/activesupport/lib/active_support/configurable.rb b/activesupport/lib/active_support/configurable.rb index f72a893bccb3..ab069217468c 100644 --- a/activesupport/lib/active_support/configurable.rb +++ b/activesupport/lib/active_support/configurable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/concern" require "active_support/ordered_options" require "active_support/core_ext/array/extract_options" diff --git a/activesupport/lib/active_support/core_ext.rb b/activesupport/lib/active_support/core_ext.rb index 42e0acf66a04..784cdc4a7854 100644 --- a/activesupport/lib/active_support/core_ext.rb +++ b/activesupport/lib/active_support/core_ext.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Dir.glob(File.expand_path("core_ext/*.rb", __dir__)).each do |path| require path end diff --git a/activesupport/lib/active_support/core_ext/array.rb b/activesupport/lib/active_support/core_ext/array.rb index e908386a1ca1..3f588559021f 100644 --- a/activesupport/lib/active_support/core_ext/array.rb +++ b/activesupport/lib/active_support/core_ext/array.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array/wrap" require "active_support/core_ext/array/access" require "active_support/core_ext/array/conversions" diff --git a/activesupport/lib/active_support/core_ext/array/access.rb b/activesupport/lib/active_support/core_ext/array/access.rb index fca33c9d6917..b6e576ad29c1 100644 --- a/activesupport/lib/active_support/core_ext/array/access.rb +++ b/activesupport/lib/active_support/core_ext/array/access.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Array # Returns the tail of the array from +position+. # diff --git a/activesupport/lib/active_support/core_ext/array/conversions.rb b/activesupport/lib/active_support/core_ext/array/conversions.rb index cac15e11001a..3d00046d026d 100644 --- a/activesupport/lib/active_support/core_ext/array/conversions.rb +++ b/activesupport/lib/active_support/core_ext/array/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/xml_mini" require "active_support/core_ext/hash/keys" require "active_support/core_ext/string/inflections" diff --git a/activesupport/lib/active_support/core_ext/array/extract_options.rb b/activesupport/lib/active_support/core_ext/array/extract_options.rb index 9008a0df2ae0..8204d42cafb3 100644 --- a/activesupport/lib/active_support/core_ext/array/extract_options.rb +++ b/activesupport/lib/active_support/core_ext/array/extract_options.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hash # By default, only instances of Hash itself are extractable. # Subclasses of Hash may implement this method and return diff --git a/activesupport/lib/active_support/core_ext/array/grouping.rb b/activesupport/lib/active_support/core_ext/array/grouping.rb index 0d798e5c4e55..706c57669198 100644 --- a/activesupport/lib/active_support/core_ext/array/grouping.rb +++ b/activesupport/lib/active_support/core_ext/array/grouping.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Array # Splits or iterates over the array in groups of size +number+, # padding any remaining slots with +fill_with+ unless it is +false+. diff --git a/activesupport/lib/active_support/core_ext/array/inquiry.rb b/activesupport/lib/active_support/core_ext/array/inquiry.rb index 66fa5fcd0c97..81082f71286a 100644 --- a/activesupport/lib/active_support/core_ext/array/inquiry.rb +++ b/activesupport/lib/active_support/core_ext/array/inquiry.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/array_inquirer" class Array diff --git a/activesupport/lib/active_support/core_ext/array/prepend_and_append.rb b/activesupport/lib/active_support/core_ext/array/prepend_and_append.rb index 88a34128c980..2dd154776537 100644 --- a/activesupport/lib/active_support/core_ext/array/prepend_and_append.rb +++ b/activesupport/lib/active_support/core_ext/array/prepend_and_append.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Array # The human way of thinking about adding stuff to the end of a list is with append. alias_method :append, :push unless [].respond_to?(:append) diff --git a/activesupport/lib/active_support/core_ext/array/wrap.rb b/activesupport/lib/active_support/core_ext/array/wrap.rb index b611d34c2779..adb25718e428 100644 --- a/activesupport/lib/active_support/core_ext/array/wrap.rb +++ b/activesupport/lib/active_support/core_ext/array/wrap.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Array # Wraps its argument in an array unless it is already an array (or array-like). # diff --git a/activesupport/lib/active_support/core_ext/benchmark.rb b/activesupport/lib/active_support/core_ext/benchmark.rb index 2300953860fd..2db6e5f1c5f1 100644 --- a/activesupport/lib/active_support/core_ext/benchmark.rb +++ b/activesupport/lib/active_support/core_ext/benchmark.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "benchmark" class << Benchmark diff --git a/activesupport/lib/active_support/core_ext/big_decimal.rb b/activesupport/lib/active_support/core_ext/big_decimal.rb index 7b4f87f10e4e..b02bae8804a1 100644 --- a/activesupport/lib/active_support/core_ext/big_decimal.rb +++ b/activesupport/lib/active_support/core_ext/big_decimal.rb @@ -1 +1,2 @@ +# frozen_string_literal: true require "active_support/core_ext/big_decimal/conversions" diff --git a/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb b/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb index decd4e1699c2..1729f0053059 100644 --- a/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb +++ b/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "bigdecimal" require "bigdecimal/util" diff --git a/activesupport/lib/active_support/core_ext/class.rb b/activesupport/lib/active_support/core_ext/class.rb index 6a19e862d065..059f0a90974b 100644 --- a/activesupport/lib/active_support/core_ext/class.rb +++ b/activesupport/lib/active_support/core_ext/class.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true require "active_support/core_ext/class/attribute" require "active_support/core_ext/class/subclasses" diff --git a/activesupport/lib/active_support/core_ext/class/attribute.rb b/activesupport/lib/active_support/core_ext/class/attribute.rb index 8caddcd5c319..2fd4b18d3f71 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/kernel/singleton_class" require "active_support/core_ext/module/remove_method" require "active_support/core_ext/array/extract_options" diff --git a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb index 0f767925ed62..fb92c5d3d1b6 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # cattr_* became mattr_* aliases in 7dfbd91b0780fbd6a1dd9bfbc176e10894871d2d, # but we keep this around for libraries that directly require it knowing they # want cattr_*. No need to deprecate. diff --git a/activesupport/lib/active_support/core_ext/class/subclasses.rb b/activesupport/lib/active_support/core_ext/class/subclasses.rb index 62397d9508cf..f92ccdbf8825 100644 --- a/activesupport/lib/active_support/core_ext/class/subclasses.rb +++ b/activesupport/lib/active_support/core_ext/class/subclasses.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/anonymous" require "active_support/core_ext/module/reachable" diff --git a/activesupport/lib/active_support/core_ext/date.rb b/activesupport/lib/active_support/core_ext/date.rb index 4f66804da285..1598be9ba685 100644 --- a/activesupport/lib/active_support/core_ext/date.rb +++ b/activesupport/lib/active_support/core_ext/date.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/date/acts_like" require "active_support/core_ext/date/blank" require "active_support/core_ext/date/calculations" diff --git a/activesupport/lib/active_support/core_ext/date/acts_like.rb b/activesupport/lib/active_support/core_ext/date/acts_like.rb index 46fe99ad4776..6c125d279c98 100644 --- a/activesupport/lib/active_support/core_ext/date/acts_like.rb +++ b/activesupport/lib/active_support/core_ext/date/acts_like.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/acts_like" class Date diff --git a/activesupport/lib/active_support/core_ext/date/blank.rb b/activesupport/lib/active_support/core_ext/date/blank.rb index edd284712638..a28e726902a7 100644 --- a/activesupport/lib/active_support/core_ext/date/blank.rb +++ b/activesupport/lib/active_support/core_ext/date/blank.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" class Date #:nodoc: diff --git a/activesupport/lib/active_support/core_ext/date/calculations.rb b/activesupport/lib/active_support/core_ext/date/calculations.rb index d6f60cac0439..c0f4fdae8051 100644 --- a/activesupport/lib/active_support/core_ext/date/calculations.rb +++ b/activesupport/lib/active_support/core_ext/date/calculations.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" require "active_support/duration" require "active_support/core_ext/object/acts_like" diff --git a/activesupport/lib/active_support/core_ext/date/conversions.rb b/activesupport/lib/active_support/core_ext/date/conversions.rb index 0f59c754fedc..a36d5d844de4 100644 --- a/activesupport/lib/active_support/core_ext/date/conversions.rb +++ b/activesupport/lib/active_support/core_ext/date/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" require "active_support/inflector/methods" require "active_support/core_ext/date/zones" diff --git a/activesupport/lib/active_support/core_ext/date/zones.rb b/activesupport/lib/active_support/core_ext/date/zones.rb index da23fe489214..6aa0852e0754 100644 --- a/activesupport/lib/active_support/core_ext/date/zones.rb +++ b/activesupport/lib/active_support/core_ext/date/zones.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" require "active_support/core_ext/date_and_time/zones" diff --git a/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb b/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb index e2e1d3e35914..1fa629e01751 100644 --- a/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/try" module DateAndTime diff --git a/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb b/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb index 2d45e16546b7..078ac8822999 100644 --- a/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb +++ b/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" module DateAndTime diff --git a/activesupport/lib/active_support/core_ext/date_and_time/zones.rb b/activesupport/lib/active_support/core_ext/date_and_time/zones.rb index edd724f1d026..4cc94d4ecef6 100644 --- a/activesupport/lib/active_support/core_ext/date_and_time/zones.rb +++ b/activesupport/lib/active_support/core_ext/date_and_time/zones.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module DateAndTime module Zones # Returns the simultaneous time in Time.zone if a zone is given or diff --git a/activesupport/lib/active_support/core_ext/date_time.rb b/activesupport/lib/active_support/core_ext/date_time.rb index 6fd498f86458..5f238079c08d 100644 --- a/activesupport/lib/active_support/core_ext/date_time.rb +++ b/activesupport/lib/active_support/core_ext/date_time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/date_time/acts_like" require "active_support/core_ext/date_time/blank" require "active_support/core_ext/date_time/calculations" diff --git a/activesupport/lib/active_support/core_ext/date_time/acts_like.rb b/activesupport/lib/active_support/core_ext/date_time/acts_like.rb index 6f50f55a5312..774ff692c432 100644 --- a/activesupport/lib/active_support/core_ext/date_time/acts_like.rb +++ b/activesupport/lib/active_support/core_ext/date_time/acts_like.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" require "active_support/core_ext/object/acts_like" diff --git a/activesupport/lib/active_support/core_ext/date_time/blank.rb b/activesupport/lib/active_support/core_ext/date_time/blank.rb index b475fd926d37..874c7554a3b8 100644 --- a/activesupport/lib/active_support/core_ext/date_time/blank.rb +++ b/activesupport/lib/active_support/core_ext/date_time/blank.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" class DateTime #:nodoc: diff --git a/activesupport/lib/active_support/core_ext/date_time/calculations.rb b/activesupport/lib/active_support/core_ext/date_time/calculations.rb index 7a9eb8c26683..91289175ed94 100644 --- a/activesupport/lib/active_support/core_ext/date_time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/date_time/calculations.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" class DateTime diff --git a/activesupport/lib/active_support/core_ext/date_time/compatibility.rb b/activesupport/lib/active_support/core_ext/date_time/compatibility.rb index 870391aeaa53..fd97fbce9881 100644 --- a/activesupport/lib/active_support/core_ext/date_time/compatibility.rb +++ b/activesupport/lib/active_support/core_ext/date_time/compatibility.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/date_and_time/compatibility" require "active_support/core_ext/module/remove_method" diff --git a/activesupport/lib/active_support/core_ext/date_time/conversions.rb b/activesupport/lib/active_support/core_ext/date_time/conversions.rb index d9b3743858de..5c515bebbf1d 100644 --- a/activesupport/lib/active_support/core_ext/date_time/conversions.rb +++ b/activesupport/lib/active_support/core_ext/date_time/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" require "active_support/inflector/methods" require "active_support/core_ext/time/conversions" diff --git a/activesupport/lib/active_support/core_ext/digest/uuid.rb b/activesupport/lib/active_support/core_ext/digest/uuid.rb index e6d60e3267fb..26a300feb62b 100644 --- a/activesupport/lib/active_support/core_ext/digest/uuid.rb +++ b/activesupport/lib/active_support/core_ext/digest/uuid.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "securerandom" module Digest diff --git a/activesupport/lib/active_support/core_ext/enumerable.rb b/activesupport/lib/active_support/core_ext/enumerable.rb index 3a4ae6cb8ba6..a744b78e1ccc 100644 --- a/activesupport/lib/active_support/core_ext/enumerable.rb +++ b/activesupport/lib/active_support/core_ext/enumerable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Enumerable # Enumerable#sum was added in Ruby 2.4, but it only works with Numeric elements # when we omit an identity. diff --git a/activesupport/lib/active_support/core_ext/file.rb b/activesupport/lib/active_support/core_ext/file.rb index 6d99bad2afb3..a1272c02e28a 100644 --- a/activesupport/lib/active_support/core_ext/file.rb +++ b/activesupport/lib/active_support/core_ext/file.rb @@ -1 +1,2 @@ +# frozen_string_literal: true require "active_support/core_ext/file/atomic" diff --git a/activesupport/lib/active_support/core_ext/file/atomic.rb b/activesupport/lib/active_support/core_ext/file/atomic.rb index 8d6c0d368523..5b30e933579a 100644 --- a/activesupport/lib/active_support/core_ext/file/atomic.rb +++ b/activesupport/lib/active_support/core_ext/file/atomic.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "fileutils" class File diff --git a/activesupport/lib/active_support/core_ext/hash.rb b/activesupport/lib/active_support/core_ext/hash.rb index c819307e8a5f..5d9fe68bb69c 100644 --- a/activesupport/lib/active_support/core_ext/hash.rb +++ b/activesupport/lib/active_support/core_ext/hash.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/compact" require "active_support/core_ext/hash/conversions" require "active_support/core_ext/hash/deep_merge" diff --git a/activesupport/lib/active_support/core_ext/hash/compact.rb b/activesupport/lib/active_support/core_ext/hash/compact.rb index e357284be099..ddccbe7d16a1 100644 --- a/activesupport/lib/active_support/core_ext/hash/compact.rb +++ b/activesupport/lib/active_support/core_ext/hash/compact.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hash unless Hash.instance_methods(false).include?(:compact) # Returns a hash with non +nil+ values. diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb index 2a58a7f1ca93..f33a52ae2b34 100644 --- a/activesupport/lib/active_support/core_ext/hash/conversions.rb +++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/xml_mini" require "active_support/time" require "active_support/core_ext/object/blank" diff --git a/activesupport/lib/active_support/core_ext/hash/deep_merge.rb b/activesupport/lib/active_support/core_ext/hash/deep_merge.rb index 9c9faf67eab3..1c6627a5973d 100644 --- a/activesupport/lib/active_support/core_ext/hash/deep_merge.rb +++ b/activesupport/lib/active_support/core_ext/hash/deep_merge.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hash # Returns a new hash with +self+ and +other_hash+ merged recursively. # diff --git a/activesupport/lib/active_support/core_ext/hash/except.rb b/activesupport/lib/active_support/core_ext/hash/except.rb index 2f6d38c1f6e7..e31c7c61e478 100644 --- a/activesupport/lib/active_support/core_ext/hash/except.rb +++ b/activesupport/lib/active_support/core_ext/hash/except.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hash # Returns a hash that includes everything except given keys. # hash = { a: true, b: false, c: nil } diff --git a/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb index 3e1ccecb6c0a..74e606dcc72e 100644 --- a/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +++ b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/hash_with_indifferent_access" class Hash diff --git a/activesupport/lib/active_support/core_ext/hash/keys.rb b/activesupport/lib/active_support/core_ext/hash/keys.rb index b7089357a890..b38ea9ba5084 100644 --- a/activesupport/lib/active_support/core_ext/hash/keys.rb +++ b/activesupport/lib/active_support/core_ext/hash/keys.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hash # Returns a new hash with all keys converted using the +block+ operation. # diff --git a/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb b/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb index 061c959442fa..2055d06385a3 100644 --- a/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb +++ b/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hash # Merges the caller into +other_hash+. For example, # diff --git a/activesupport/lib/active_support/core_ext/hash/slice.rb b/activesupport/lib/active_support/core_ext/hash/slice.rb index 161b00dfb386..bd370931e411 100644 --- a/activesupport/lib/active_support/core_ext/hash/slice.rb +++ b/activesupport/lib/active_support/core_ext/hash/slice.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hash # Slices a hash to include only the given keys. Returns a hash containing # the given keys. diff --git a/activesupport/lib/active_support/core_ext/hash/transform_values.rb b/activesupport/lib/active_support/core_ext/hash/transform_values.rb index 2f693bff0c89..b6e2734193ce 100644 --- a/activesupport/lib/active_support/core_ext/hash/transform_values.rb +++ b/activesupport/lib/active_support/core_ext/hash/transform_values.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hash # Returns a new hash with the results of running +block+ once for every value. # The keys are unchanged. diff --git a/activesupport/lib/active_support/core_ext/integer.rb b/activesupport/lib/active_support/core_ext/integer.rb index 8f0c55f9d317..21c6d9e0cc23 100644 --- a/activesupport/lib/active_support/core_ext/integer.rb +++ b/activesupport/lib/active_support/core_ext/integer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/integer/multiple" require "active_support/core_ext/integer/inflections" require "active_support/core_ext/integer/time" diff --git a/activesupport/lib/active_support/core_ext/integer/inflections.rb b/activesupport/lib/active_support/core_ext/integer/inflections.rb index bc21b655337b..945817793db2 100644 --- a/activesupport/lib/active_support/core_ext/integer/inflections.rb +++ b/activesupport/lib/active_support/core_ext/integer/inflections.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/inflector" class Integer diff --git a/activesupport/lib/active_support/core_ext/integer/multiple.rb b/activesupport/lib/active_support/core_ext/integer/multiple.rb index c668c7c2ebbb..2e4d78e66c5c 100644 --- a/activesupport/lib/active_support/core_ext/integer/multiple.rb +++ b/activesupport/lib/active_support/core_ext/integer/multiple.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Integer # Check whether the integer is evenly divisible by the argument. # diff --git a/activesupport/lib/active_support/core_ext/integer/time.rb b/activesupport/lib/active_support/core_ext/integer/time.rb index 74baae363944..be0958a49504 100644 --- a/activesupport/lib/active_support/core_ext/integer/time.rb +++ b/activesupport/lib/active_support/core_ext/integer/time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/duration" require "active_support/core_ext/numeric/time" diff --git a/activesupport/lib/active_support/core_ext/kernel.rb b/activesupport/lib/active_support/core_ext/kernel.rb index 3d41ff787636..9e75d29cab7c 100644 --- a/activesupport/lib/active_support/core_ext/kernel.rb +++ b/activesupport/lib/active_support/core_ext/kernel.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/kernel/agnostics" require "active_support/core_ext/kernel/concern" require "active_support/core_ext/kernel/reporting" diff --git a/activesupport/lib/active_support/core_ext/kernel/agnostics.rb b/activesupport/lib/active_support/core_ext/kernel/agnostics.rb index 64837d87aaab..84a48979c4ff 100644 --- a/activesupport/lib/active_support/core_ext/kernel/agnostics.rb +++ b/activesupport/lib/active_support/core_ext/kernel/agnostics.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Object # Makes backticks behave (somewhat more) similarly on all platforms. # On win32 `nonexistent_command` raises Errno::ENOENT; on Unix, the diff --git a/activesupport/lib/active_support/core_ext/kernel/concern.rb b/activesupport/lib/active_support/core_ext/kernel/concern.rb index 307a7f7a63dd..9d170e0a64ee 100644 --- a/activesupport/lib/active_support/core_ext/kernel/concern.rb +++ b/activesupport/lib/active_support/core_ext/kernel/concern.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/concerning" module Kernel diff --git a/activesupport/lib/active_support/core_ext/kernel/reporting.rb b/activesupport/lib/active_support/core_ext/kernel/reporting.rb index c02618d5f39d..822efb5aaea7 100644 --- a/activesupport/lib/active_support/core_ext/kernel/reporting.rb +++ b/activesupport/lib/active_support/core_ext/kernel/reporting.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Kernel module_function diff --git a/activesupport/lib/active_support/core_ext/kernel/singleton_class.rb b/activesupport/lib/active_support/core_ext/kernel/singleton_class.rb index 9bbf1bbd7362..5f9c008f6ef9 100644 --- a/activesupport/lib/active_support/core_ext/kernel/singleton_class.rb +++ b/activesupport/lib/active_support/core_ext/kernel/singleton_class.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Kernel # class_eval on an object acts like singleton_class.class_eval. def class_eval(*args, &block) diff --git a/activesupport/lib/active_support/core_ext/load_error.rb b/activesupport/lib/active_support/core_ext/load_error.rb index d27348701013..55177efdafe9 100644 --- a/activesupport/lib/active_support/core_ext/load_error.rb +++ b/activesupport/lib/active_support/core_ext/load_error.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class LoadError REGEXPS = [ /^no such file to load -- (.+)$/i, diff --git a/activesupport/lib/active_support/core_ext/marshal.rb b/activesupport/lib/active_support/core_ext/marshal.rb index bba2b3be2e68..13b1d0cf95e3 100644 --- a/activesupport/lib/active_support/core_ext/marshal.rb +++ b/activesupport/lib/active_support/core_ext/marshal.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module MarshalWithAutoloading # :nodoc: def load(source, proc = nil) diff --git a/activesupport/lib/active_support/core_ext/module.rb b/activesupport/lib/active_support/core_ext/module.rb index 293025555726..6fe85c30a675 100644 --- a/activesupport/lib/active_support/core_ext/module.rb +++ b/activesupport/lib/active_support/core_ext/module.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/aliasing" require "active_support/core_ext/module/introspection" require "active_support/core_ext/module/anonymous" diff --git a/activesupport/lib/active_support/core_ext/module/aliasing.rb b/activesupport/lib/active_support/core_ext/module/aliasing.rb index c48bd3354a5f..62eb9e4c766f 100644 --- a/activesupport/lib/active_support/core_ext/module/aliasing.rb +++ b/activesupport/lib/active_support/core_ext/module/aliasing.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Module # Allows you to make aliases for attributes, which includes # getter, setter, and a predicate. diff --git a/activesupport/lib/active_support/core_ext/module/anonymous.rb b/activesupport/lib/active_support/core_ext/module/anonymous.rb index 510c9a5430db..7d10240199cc 100644 --- a/activesupport/lib/active_support/core_ext/module/anonymous.rb +++ b/activesupport/lib/active_support/core_ext/module/anonymous.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Module # A module may or may not have a name. # diff --git a/activesupport/lib/active_support/core_ext/module/attr_internal.rb b/activesupport/lib/active_support/core_ext/module/attr_internal.rb index 5081d5f7a3b7..8d37460dbca8 100644 --- a/activesupport/lib/active_support/core_ext/module/attr_internal.rb +++ b/activesupport/lib/active_support/core_ext/module/attr_internal.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Module # Declares an attribute reader backed by an internally-named instance variable. def attr_internal_reader(*attrs) diff --git a/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb b/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb index 9244cfa157f7..927675537471 100644 --- a/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +++ b/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array/extract_options" require "active_support/core_ext/regexp" diff --git a/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb b/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb index 1e82b4acc252..348563b1f70f 100644 --- a/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb +++ b/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array/extract_options" require "active_support/core_ext/regexp" diff --git a/activesupport/lib/active_support/core_ext/module/concerning.rb b/activesupport/lib/active_support/core_ext/module/concerning.rb index 97b0a382cebd..bc22e3169b8d 100644 --- a/activesupport/lib/active_support/core_ext/module/concerning.rb +++ b/activesupport/lib/active_support/core_ext/module/concerning.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/concern" class Module diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb index 13f3894e6c23..ccc33609b7da 100644 --- a/activesupport/lib/active_support/core_ext/module/delegation.rb +++ b/activesupport/lib/active_support/core_ext/module/delegation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "set" require "active_support/core_ext/regexp" diff --git a/activesupport/lib/active_support/core_ext/module/deprecation.rb b/activesupport/lib/active_support/core_ext/module/deprecation.rb index f3f2e7f5fcd8..98dfaad7606d 100644 --- a/activesupport/lib/active_support/core_ext/module/deprecation.rb +++ b/activesupport/lib/active_support/core_ext/module/deprecation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Module # deprecate :foo # deprecate bar: 'message' diff --git a/activesupport/lib/active_support/core_ext/module/introspection.rb b/activesupport/lib/active_support/core_ext/module/introspection.rb index ca20a6d4c5d0..1e1c3870f5cc 100644 --- a/activesupport/lib/active_support/core_ext/module/introspection.rb +++ b/activesupport/lib/active_support/core_ext/module/introspection.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/inflector" class Module diff --git a/activesupport/lib/active_support/core_ext/module/reachable.rb b/activesupport/lib/active_support/core_ext/module/reachable.rb index b89a38f26cc9..8cb09dd2598f 100644 --- a/activesupport/lib/active_support/core_ext/module/reachable.rb +++ b/activesupport/lib/active_support/core_ext/module/reachable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/anonymous" require "active_support/core_ext/string/inflections" diff --git a/activesupport/lib/active_support/core_ext/module/remove_method.rb b/activesupport/lib/active_support/core_ext/module/remove_method.rb index d5ec16d68a7c..c17808b2444e 100644 --- a/activesupport/lib/active_support/core_ext/module/remove_method.rb +++ b/activesupport/lib/active_support/core_ext/module/remove_method.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Module # Removes the named method, if it exists. def remove_possible_method(method) diff --git a/activesupport/lib/active_support/core_ext/name_error.rb b/activesupport/lib/active_support/core_ext/name_error.rb index 6b447d772b30..1bcb6ded3c6a 100644 --- a/activesupport/lib/active_support/core_ext/name_error.rb +++ b/activesupport/lib/active_support/core_ext/name_error.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class NameError # Extract the name of the missing constant from the exception message. # diff --git a/activesupport/lib/active_support/core_ext/numeric.rb b/activesupport/lib/active_support/core_ext/numeric.rb index 6062f9e3a8d0..402e9d4323a8 100644 --- a/activesupport/lib/active_support/core_ext/numeric.rb +++ b/activesupport/lib/active_support/core_ext/numeric.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/numeric/bytes" require "active_support/core_ext/numeric/time" require "active_support/core_ext/numeric/inquiry" diff --git a/activesupport/lib/active_support/core_ext/numeric/bytes.rb b/activesupport/lib/active_support/core_ext/numeric/bytes.rb index dfbca3247442..23e1e39dd833 100644 --- a/activesupport/lib/active_support/core_ext/numeric/bytes.rb +++ b/activesupport/lib/active_support/core_ext/numeric/bytes.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Numeric KILOBYTE = 1024 MEGABYTE = KILOBYTE * 1024 diff --git a/activesupport/lib/active_support/core_ext/numeric/conversions.rb b/activesupport/lib/active_support/core_ext/numeric/conversions.rb index 4f6621693ee9..bedfe5ce32ed 100644 --- a/activesupport/lib/active_support/core_ext/numeric/conversions.rb +++ b/activesupport/lib/active_support/core_ext/numeric/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/big_decimal/conversions" require "active_support/number_helper" require "active_support/core_ext/module/deprecation" diff --git a/activesupport/lib/active_support/core_ext/numeric/inquiry.rb b/activesupport/lib/active_support/core_ext/numeric/inquiry.rb index ec7970118910..baccf8784802 100644 --- a/activesupport/lib/active_support/core_ext/numeric/inquiry.rb +++ b/activesupport/lib/active_support/core_ext/numeric/inquiry.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true unless 1.respond_to?(:positive?) # TODO: Remove this file when we drop support to ruby < 2.3 class Numeric # Returns true if the number is positive. diff --git a/activesupport/lib/active_support/core_ext/numeric/time.rb b/activesupport/lib/active_support/core_ext/numeric/time.rb index 2e6c70d41832..95f73fb336cb 100644 --- a/activesupport/lib/active_support/core_ext/numeric/time.rb +++ b/activesupport/lib/active_support/core_ext/numeric/time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/duration" require "active_support/core_ext/time/calculations" require "active_support/core_ext/time/acts_like" diff --git a/activesupport/lib/active_support/core_ext/object.rb b/activesupport/lib/active_support/core_ext/object.rb index 58bbf7860113..f3cd8b0898e3 100644 --- a/activesupport/lib/active_support/core_ext/object.rb +++ b/activesupport/lib/active_support/core_ext/object.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/acts_like" require "active_support/core_ext/object/blank" require "active_support/core_ext/object/duplicable" diff --git a/activesupport/lib/active_support/core_ext/object/acts_like.rb b/activesupport/lib/active_support/core_ext/object/acts_like.rb index 3912cc5acebe..b856e1ba160c 100644 --- a/activesupport/lib/active_support/core_ext/object/acts_like.rb +++ b/activesupport/lib/active_support/core_ext/object/acts_like.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Object # A duck-type assistant method. For example, Active Support extends Date # to define an acts_like_date? method, and extends Time to define diff --git a/activesupport/lib/active_support/core_ext/object/blank.rb b/activesupport/lib/active_support/core_ext/object/blank.rb index bdb50ee2918e..3ad4605235c4 100644 --- a/activesupport/lib/active_support/core_ext/object/blank.rb +++ b/activesupport/lib/active_support/core_ext/object/blank.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/regexp" class Object diff --git a/activesupport/lib/active_support/core_ext/object/conversions.rb b/activesupport/lib/active_support/core_ext/object/conversions.rb index 918ebcdc9f1b..2626d9ed294a 100644 --- a/activesupport/lib/active_support/core_ext/object/conversions.rb +++ b/activesupport/lib/active_support/core_ext/object/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/to_param" require "active_support/core_ext/object/to_query" require "active_support/core_ext/array/conversions" diff --git a/activesupport/lib/active_support/core_ext/object/deep_dup.rb b/activesupport/lib/active_support/core_ext/object/deep_dup.rb index 5ac649e55219..ce1f7654488a 100644 --- a/activesupport/lib/active_support/core_ext/object/deep_dup.rb +++ b/activesupport/lib/active_support/core_ext/object/deep_dup.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/duplicable" class Object diff --git a/activesupport/lib/active_support/core_ext/object/duplicable.rb b/activesupport/lib/active_support/core_ext/object/duplicable.rb index b028df97eec9..0838b1fb7062 100644 --- a/activesupport/lib/active_support/core_ext/object/duplicable.rb +++ b/activesupport/lib/active_support/core_ext/object/duplicable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true #-- # Most objects are cloneable, but not all. For example you can't dup methods: # diff --git a/activesupport/lib/active_support/core_ext/object/inclusion.rb b/activesupport/lib/active_support/core_ext/object/inclusion.rb index 98bf820d362e..525ddcb575a3 100644 --- a/activesupport/lib/active_support/core_ext/object/inclusion.rb +++ b/activesupport/lib/active_support/core_ext/object/inclusion.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Object # Returns true if this object is included in the argument. Argument must be # any object which responds to +#include?+. Usage: diff --git a/activesupport/lib/active_support/core_ext/object/instance_variables.rb b/activesupport/lib/active_support/core_ext/object/instance_variables.rb index 593a7a49401c..0a0612521071 100644 --- a/activesupport/lib/active_support/core_ext/object/instance_variables.rb +++ b/activesupport/lib/active_support/core_ext/object/instance_variables.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Object # Returns a hash with string keys that maps instance variable names without "@" to their # corresponding values. diff --git a/activesupport/lib/active_support/core_ext/object/json.rb b/activesupport/lib/active_support/core_ext/object/json.rb index 1c4d18144378..87e5cdce0dff 100644 --- a/activesupport/lib/active_support/core_ext/object/json.rb +++ b/activesupport/lib/active_support/core_ext/object/json.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Hack to load json gem first so we can overwrite its to_json. require "json" require "bigdecimal" diff --git a/activesupport/lib/active_support/core_ext/object/to_param.rb b/activesupport/lib/active_support/core_ext/object/to_param.rb index 5eeaf03163d2..58e60b5d4e01 100644 --- a/activesupport/lib/active_support/core_ext/object/to_param.rb +++ b/activesupport/lib/active_support/core_ext/object/to_param.rb @@ -1 +1,2 @@ +# frozen_string_literal: true require "active_support/core_ext/object/to_query" diff --git a/activesupport/lib/active_support/core_ext/object/to_query.rb b/activesupport/lib/active_support/core_ext/object/to_query.rb index a3a3abacbb5a..f85e0eaa6feb 100644 --- a/activesupport/lib/active_support/core_ext/object/to_query.rb +++ b/activesupport/lib/active_support/core_ext/object/to_query.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cgi" class Object diff --git a/activesupport/lib/active_support/core_ext/object/try.rb b/activesupport/lib/active_support/core_ext/object/try.rb index b2be619b2df0..952fba4541b5 100644 --- a/activesupport/lib/active_support/core_ext/object/try.rb +++ b/activesupport/lib/active_support/core_ext/object/try.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "delegate" module ActiveSupport diff --git a/activesupport/lib/active_support/core_ext/object/with_options.rb b/activesupport/lib/active_support/core_ext/object/with_options.rb index 3a44e0863011..bc3075b5f116 100644 --- a/activesupport/lib/active_support/core_ext/object/with_options.rb +++ b/activesupport/lib/active_support/core_ext/object/with_options.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/option_merger" class Object diff --git a/activesupport/lib/active_support/core_ext/range.rb b/activesupport/lib/active_support/core_ext/range.rb index 3190e3ff7619..9d84cbcec210 100644 --- a/activesupport/lib/active_support/core_ext/range.rb +++ b/activesupport/lib/active_support/core_ext/range.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/range/conversions" require "active_support/core_ext/range/include_range" require "active_support/core_ext/range/overlaps" diff --git a/activesupport/lib/active_support/core_ext/range/conversions.rb b/activesupport/lib/active_support/core_ext/range/conversions.rb index 69ea046cb6af..5038a15cdff4 100644 --- a/activesupport/lib/active_support/core_ext/range/conversions.rb +++ b/activesupport/lib/active_support/core_ext/range/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport::RangeWithFormat RANGE_FORMATS = { db: Proc.new { |start, stop| "BETWEEN '#{start.to_s(:db)}' AND '#{stop.to_s(:db)}'" } diff --git a/activesupport/lib/active_support/core_ext/range/each.rb b/activesupport/lib/active_support/core_ext/range/each.rb index dc6dad5ceddc..aeea8c867b43 100644 --- a/activesupport/lib/active_support/core_ext/range/each.rb +++ b/activesupport/lib/active_support/core_ext/range/each.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module EachTimeWithZone #:nodoc: def each(&block) diff --git a/activesupport/lib/active_support/core_ext/range/include_range.rb b/activesupport/lib/active_support/core_ext/range/include_range.rb index c69e1e3fb954..d307750a23ab 100644 --- a/activesupport/lib/active_support/core_ext/range/include_range.rb +++ b/activesupport/lib/active_support/core_ext/range/include_range.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module IncludeWithRange #:nodoc: # Extends the default Range#include? to support range comparisons. diff --git a/activesupport/lib/active_support/core_ext/range/overlaps.rb b/activesupport/lib/active_support/core_ext/range/overlaps.rb index 603657c1807d..ecdfbd803bcd 100644 --- a/activesupport/lib/active_support/core_ext/range/overlaps.rb +++ b/activesupport/lib/active_support/core_ext/range/overlaps.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Range # Compare two ranges and see if they overlap each other # (1..5).overlaps?(4..6) # => true diff --git a/activesupport/lib/active_support/core_ext/regexp.rb b/activesupport/lib/active_support/core_ext/regexp.rb index d77d01bf42e6..23b337ba67cf 100644 --- a/activesupport/lib/active_support/core_ext/regexp.rb +++ b/activesupport/lib/active_support/core_ext/regexp.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Regexp #:nodoc: def multiline? options & MULTILINE == MULTILINE diff --git a/activesupport/lib/active_support/core_ext/securerandom.rb b/activesupport/lib/active_support/core_ext/securerandom.rb index a57685bea14c..033ac356bdd4 100644 --- a/activesupport/lib/active_support/core_ext/securerandom.rb +++ b/activesupport/lib/active_support/core_ext/securerandom.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "securerandom" module SecureRandom diff --git a/activesupport/lib/active_support/core_ext/string.rb b/activesupport/lib/active_support/core_ext/string.rb index 4cb320087573..cfac17f81050 100644 --- a/activesupport/lib/active_support/core_ext/string.rb +++ b/activesupport/lib/active_support/core_ext/string.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/conversions" require "active_support/core_ext/string/filters" require "active_support/core_ext/string/multibyte" diff --git a/activesupport/lib/active_support/core_ext/string/access.rb b/activesupport/lib/active_support/core_ext/string/access.rb index 6133826f3775..11f4bf8052c2 100644 --- a/activesupport/lib/active_support/core_ext/string/access.rb +++ b/activesupport/lib/active_support/core_ext/string/access.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class String # If you pass a single integer, returns a substring of one character at that # position. The first character of the string is at position 0, the next at diff --git a/activesupport/lib/active_support/core_ext/string/behavior.rb b/activesupport/lib/active_support/core_ext/string/behavior.rb index 710f1f467040..e63888991dbc 100644 --- a/activesupport/lib/active_support/core_ext/string/behavior.rb +++ b/activesupport/lib/active_support/core_ext/string/behavior.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class String # Enables more predictable duck-typing on String-like classes. See Object#acts_like?. def acts_like_string? diff --git a/activesupport/lib/active_support/core_ext/string/conversions.rb b/activesupport/lib/active_support/core_ext/string/conversions.rb index 221b4969cc40..79668312c585 100644 --- a/activesupport/lib/active_support/core_ext/string/conversions.rb +++ b/activesupport/lib/active_support/core_ext/string/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" require "active_support/core_ext/time/calculations" diff --git a/activesupport/lib/active_support/core_ext/string/exclude.rb b/activesupport/lib/active_support/core_ext/string/exclude.rb index 0ac684f6ee42..2893a6eeedb0 100644 --- a/activesupport/lib/active_support/core_ext/string/exclude.rb +++ b/activesupport/lib/active_support/core_ext/string/exclude.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class String # The inverse of String#include?. Returns true if the string # does not include the other string. diff --git a/activesupport/lib/active_support/core_ext/string/filters.rb b/activesupport/lib/active_support/core_ext/string/filters.rb index a9ec2eb84279..e05cf024f6d8 100644 --- a/activesupport/lib/active_support/core_ext/string/filters.rb +++ b/activesupport/lib/active_support/core_ext/string/filters.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class String # Returns the string, first removing all whitespace on both ends of # the string, and then changing remaining consecutive whitespace diff --git a/activesupport/lib/active_support/core_ext/string/indent.rb b/activesupport/lib/active_support/core_ext/string/indent.rb index d7b58301d3ef..a38198a8e651 100644 --- a/activesupport/lib/active_support/core_ext/string/indent.rb +++ b/activesupport/lib/active_support/core_ext/string/indent.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class String # Same as +indent+, except it indents the receiver in-place. # diff --git a/activesupport/lib/active_support/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb index b27cfe53f400..63bb52b2da7f 100644 --- a/activesupport/lib/active_support/core_ext/string/inflections.rb +++ b/activesupport/lib/active_support/core_ext/string/inflections.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/inflector/methods" require "active_support/inflector/transliterate" diff --git a/activesupport/lib/active_support/core_ext/string/inquiry.rb b/activesupport/lib/active_support/core_ext/string/inquiry.rb index c95d83beaef4..874efc6ae345 100644 --- a/activesupport/lib/active_support/core_ext/string/inquiry.rb +++ b/activesupport/lib/active_support/core_ext/string/inquiry.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/string_inquirer" class String diff --git a/activesupport/lib/active_support/core_ext/string/multibyte.rb b/activesupport/lib/active_support/core_ext/string/multibyte.rb index 1c73182259e6..aee0bb4bf3f8 100644 --- a/activesupport/lib/active_support/core_ext/string/multibyte.rb +++ b/activesupport/lib/active_support/core_ext/string/multibyte.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/multibyte" class String diff --git a/activesupport/lib/active_support/core_ext/string/output_safety.rb b/activesupport/lib/active_support/core_ext/string/output_safety.rb index 94ce3f6a615d..c26f1edc8864 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "erb" require "active_support/core_ext/kernel/singleton_class" require "active_support/multibyte/unicode" diff --git a/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb b/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb index 641acf62d0d8..f072fbf7d785 100644 --- a/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb +++ b/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class String alias_method :starts_with?, :start_with? alias_method :ends_with?, :end_with? diff --git a/activesupport/lib/active_support/core_ext/string/strip.rb b/activesupport/lib/active_support/core_ext/string/strip.rb index bb62e6c0ba3a..979b6bd76748 100644 --- a/activesupport/lib/active_support/core_ext/string/strip.rb +++ b/activesupport/lib/active_support/core_ext/string/strip.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class String # Strips indentation in heredocs. # diff --git a/activesupport/lib/active_support/core_ext/string/zones.rb b/activesupport/lib/active_support/core_ext/string/zones.rb index de5a28e4f7f6..a327bdc782db 100644 --- a/activesupport/lib/active_support/core_ext/string/zones.rb +++ b/activesupport/lib/active_support/core_ext/string/zones.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/conversions" require "active_support/core_ext/time/zones" diff --git a/activesupport/lib/active_support/core_ext/time.rb b/activesupport/lib/active_support/core_ext/time.rb index b1ae4a45d9ae..92f5cdde9f2c 100644 --- a/activesupport/lib/active_support/core_ext/time.rb +++ b/activesupport/lib/active_support/core_ext/time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/time/acts_like" require "active_support/core_ext/time/calculations" require "active_support/core_ext/time/compatibility" diff --git a/activesupport/lib/active_support/core_ext/time/acts_like.rb b/activesupport/lib/active_support/core_ext/time/acts_like.rb index cf4b2539c532..fb81cd41afd7 100644 --- a/activesupport/lib/active_support/core_ext/time/acts_like.rb +++ b/activesupport/lib/active_support/core_ext/time/acts_like.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/acts_like" class Time diff --git a/activesupport/lib/active_support/core_ext/time/calculations.rb b/activesupport/lib/active_support/core_ext/time/calculations.rb index d3f23f4663e7..011291f693b7 100644 --- a/activesupport/lib/active_support/core_ext/time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/time/calculations.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/duration" require "active_support/core_ext/time/conversions" require "active_support/time_with_zone" diff --git a/activesupport/lib/active_support/core_ext/time/compatibility.rb b/activesupport/lib/active_support/core_ext/time/compatibility.rb index 45e86b77cea3..9acd18d0122d 100644 --- a/activesupport/lib/active_support/core_ext/time/compatibility.rb +++ b/activesupport/lib/active_support/core_ext/time/compatibility.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/date_and_time/compatibility" require "active_support/core_ext/module/remove_method" diff --git a/activesupport/lib/active_support/core_ext/time/conversions.rb b/activesupport/lib/active_support/core_ext/time/conversions.rb index 595bda6b4f9f..e07bc5a93a9a 100644 --- a/activesupport/lib/active_support/core_ext/time/conversions.rb +++ b/activesupport/lib/active_support/core_ext/time/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/inflector/methods" require "active_support/values/time_zone" diff --git a/activesupport/lib/active_support/core_ext/time/zones.rb b/activesupport/lib/active_support/core_ext/time/zones.rb index 87b5ad903a13..93e57ae4f209 100644 --- a/activesupport/lib/active_support/core_ext/time/zones.rb +++ b/activesupport/lib/active_support/core_ext/time/zones.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/time_with_zone" require "active_support/core_ext/time/acts_like" require "active_support/core_ext/date_and_time/zones" diff --git a/activesupport/lib/active_support/core_ext/uri.rb b/activesupport/lib/active_support/core_ext/uri.rb index 342a5fcd522a..f93dbdf2cd21 100644 --- a/activesupport/lib/active_support/core_ext/uri.rb +++ b/activesupport/lib/active_support/core_ext/uri.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "uri" str = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E" # Ni-ho-nn-go in UTF-8, means Japanese. parser = URI::Parser.new diff --git a/activesupport/lib/active_support/current_attributes.rb b/activesupport/lib/active_support/current_attributes.rb index 872b0663c7b9..185770048666 100644 --- a/activesupport/lib/active_support/current_attributes.rb +++ b/activesupport/lib/active_support/current_attributes.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport # Abstract super class that provides a thread-isolated attributes singleton, which resets automatically # before and after each request. This allows you to keep all the per-request attributes easily diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 3cd8f3d0ac97..d6adb38aa073 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "set" require "thread" require "concurrent/map" diff --git a/activesupport/lib/active_support/dependencies/autoload.rb b/activesupport/lib/active_support/dependencies/autoload.rb index 13036d521dc0..e5663c3d2bdc 100644 --- a/activesupport/lib/active_support/dependencies/autoload.rb +++ b/activesupport/lib/active_support/dependencies/autoload.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/inflector/methods" module ActiveSupport diff --git a/activesupport/lib/active_support/dependencies/interlock.rb b/activesupport/lib/active_support/dependencies/interlock.rb index e4e18439c55f..12ecc6f7cbae 100644 --- a/activesupport/lib/active_support/dependencies/interlock.rb +++ b/activesupport/lib/active_support/dependencies/interlock.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/concurrency/share_lock" module ActiveSupport #:nodoc: diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb index 35cddcfde695..17b0ee194313 100644 --- a/activesupport/lib/active_support/deprecation.rb +++ b/activesupport/lib/active_support/deprecation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "singleton" module ActiveSupport diff --git a/activesupport/lib/active_support/deprecation/behaviors.rb b/activesupport/lib/active_support/deprecation/behaviors.rb index a9a182f212bc..32e8cc9f0f25 100644 --- a/activesupport/lib/active_support/deprecation/behaviors.rb +++ b/activesupport/lib/active_support/deprecation/behaviors.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/notifications" module ActiveSupport diff --git a/activesupport/lib/active_support/deprecation/constant_accessor.rb b/activesupport/lib/active_support/deprecation/constant_accessor.rb index 2b19de365f95..bbf3b670464c 100644 --- a/activesupport/lib/active_support/deprecation/constant_accessor.rb +++ b/activesupport/lib/active_support/deprecation/constant_accessor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/inflector/methods" module ActiveSupport diff --git a/activesupport/lib/active_support/deprecation/instance_delegator.rb b/activesupport/lib/active_support/deprecation/instance_delegator.rb index 6d390f3b372e..1e5314b6f47c 100644 --- a/activesupport/lib/active_support/deprecation/instance_delegator.rb +++ b/activesupport/lib/active_support/deprecation/instance_delegator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/kernel/singleton_class" require "active_support/core_ext/module/delegation" diff --git a/activesupport/lib/active_support/deprecation/method_wrappers.rb b/activesupport/lib/active_support/deprecation/method_wrappers.rb index 930d71e8d281..1aa6f8c12bd9 100644 --- a/activesupport/lib/active_support/deprecation/method_wrappers.rb +++ b/activesupport/lib/active_support/deprecation/method_wrappers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/aliasing" require "active_support/core_ext/array/extract_options" diff --git a/activesupport/lib/active_support/deprecation/proxy_wrappers.rb b/activesupport/lib/active_support/deprecation/proxy_wrappers.rb index ce39e9a232fd..151c5c44ac8e 100644 --- a/activesupport/lib/active_support/deprecation/proxy_wrappers.rb +++ b/activesupport/lib/active_support/deprecation/proxy_wrappers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/inflector/methods" require "active_support/core_ext/regexp" diff --git a/activesupport/lib/active_support/deprecation/reporting.rb b/activesupport/lib/active_support/deprecation/reporting.rb index 140bdccbb35f..f190e47b640a 100644 --- a/activesupport/lib/active_support/deprecation/reporting.rb +++ b/activesupport/lib/active_support/deprecation/reporting.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rbconfig" module ActiveSupport diff --git a/activesupport/lib/active_support/descendants_tracker.rb b/activesupport/lib/active_support/descendants_tracker.rb index 27861e01d00c..4f759f2f26b1 100644 --- a/activesupport/lib/active_support/descendants_tracker.rb +++ b/activesupport/lib/active_support/descendants_tracker.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport # This module provides an internal implementation to track descendants # which is faster than iterating through ObjectSpace. diff --git a/activesupport/lib/active_support/duration.rb b/activesupport/lib/active_support/duration.rb index 39deb2313f5a..16f16c6db03f 100644 --- a/activesupport/lib/active_support/duration.rb +++ b/activesupport/lib/active_support/duration.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array/conversions" require "active_support/core_ext/module/delegation" require "active_support/core_ext/object/acts_like" diff --git a/activesupport/lib/active_support/duration/iso8601_parser.rb b/activesupport/lib/active_support/duration/iso8601_parser.rb index e96cb8e8831b..f07a7817f93d 100644 --- a/activesupport/lib/active_support/duration/iso8601_parser.rb +++ b/activesupport/lib/active_support/duration/iso8601_parser.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "strscan" require "active_support/core_ext/regexp" diff --git a/activesupport/lib/active_support/duration/iso8601_serializer.rb b/activesupport/lib/active_support/duration/iso8601_serializer.rb index e5d458b3ab5d..71d2cf91f4a5 100644 --- a/activesupport/lib/active_support/duration/iso8601_serializer.rb +++ b/activesupport/lib/active_support/duration/iso8601_serializer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/blank" require "active_support/core_ext/hash/transform_values" diff --git a/activesupport/lib/active_support/evented_file_update_checker.rb b/activesupport/lib/active_support/evented_file_update_checker.rb index f59f5d17dc50..3c456beac66c 100644 --- a/activesupport/lib/active_support/evented_file_update_checker.rb +++ b/activesupport/lib/active_support/evented_file_update_checker.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "set" require "pathname" require "concurrent/atomic/atomic_boolean" diff --git a/activesupport/lib/active_support/execution_wrapper.rb b/activesupport/lib/active_support/execution_wrapper.rb index ca88e7876b30..f78a25fd3664 100644 --- a/activesupport/lib/active_support/execution_wrapper.rb +++ b/activesupport/lib/active_support/execution_wrapper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/callbacks" module ActiveSupport diff --git a/activesupport/lib/active_support/executor.rb b/activesupport/lib/active_support/executor.rb index a6400cae0a4d..caf59e91aa4a 100644 --- a/activesupport/lib/active_support/executor.rb +++ b/activesupport/lib/active_support/executor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/execution_wrapper" module ActiveSupport diff --git a/activesupport/lib/active_support/file_update_checker.rb b/activesupport/lib/active_support/file_update_checker.rb index 2b5e3c13509c..6565696a8421 100644 --- a/activesupport/lib/active_support/file_update_checker.rb +++ b/activesupport/lib/active_support/file_update_checker.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/time/calculations" module ActiveSupport diff --git a/activesupport/lib/active_support/gem_version.rb b/activesupport/lib/active_support/gem_version.rb index 371a39a5e6e9..d6015b016169 100644 --- a/activesupport/lib/active_support/gem_version.rb +++ b/activesupport/lib/active_support/gem_version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport # Returns the version of the currently loaded Active Support as a Gem::Version. def self.gem_version diff --git a/activesupport/lib/active_support/gzip.rb b/activesupport/lib/active_support/gzip.rb index 95a86889ec5e..fd9263500c36 100644 --- a/activesupport/lib/active_support/gzip.rb +++ b/activesupport/lib/active_support/gzip.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "zlib" require "stringio" diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb index 3b185dd86ba2..c5646656a9bc 100644 --- a/activesupport/lib/active_support/hash_with_indifferent_access.rb +++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/keys" require "active_support/core_ext/hash/reverse_merge" diff --git a/activesupport/lib/active_support/i18n.rb b/activesupport/lib/active_support/i18n.rb index 1a1f1a125721..6732381ecac2 100644 --- a/activesupport/lib/active_support/i18n.rb +++ b/activesupport/lib/active_support/i18n.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/deep_merge" require "active_support/core_ext/hash/except" require "active_support/core_ext/hash/slice" diff --git a/activesupport/lib/active_support/i18n_railtie.rb b/activesupport/lib/active_support/i18n_railtie.rb index 51fe6f341825..6ae702518c73 100644 --- a/activesupport/lib/active_support/i18n_railtie.rb +++ b/activesupport/lib/active_support/i18n_railtie.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support" require "active_support/file_update_checker" require "active_support/core_ext/array/wrap" diff --git a/activesupport/lib/active_support/inflections.rb b/activesupport/lib/active_support/inflections.rb index afa7d1f32536..29a829bec4aa 100644 --- a/activesupport/lib/active_support/inflections.rb +++ b/activesupport/lib/active_support/inflections.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/inflector/inflections" #-- diff --git a/activesupport/lib/active_support/inflector.rb b/activesupport/lib/active_support/inflector.rb index 48631b16a83e..cae91dc5e323 100644 --- a/activesupport/lib/active_support/inflector.rb +++ b/activesupport/lib/active_support/inflector.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # in case active_support/inflector is required without the rest of active_support require "active_support/inflector/inflections" require "active_support/inflector/transliterate" diff --git a/activesupport/lib/active_support/inflector/inflections.rb b/activesupport/lib/active_support/inflector/inflections.rb index c47a2e34e16f..589135980432 100644 --- a/activesupport/lib/active_support/inflector/inflections.rb +++ b/activesupport/lib/active_support/inflector/inflections.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "concurrent/map" require "active_support/core_ext/array/prepend_and_append" require "active_support/core_ext/regexp" diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index ff1a0cb8c71e..bdcb101f2968 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/inflections" require "active_support/core_ext/regexp" diff --git a/activesupport/lib/active_support/inflector/transliterate.rb b/activesupport/lib/active_support/inflector/transliterate.rb index de6dd2720bda..94ea63506687 100644 --- a/activesupport/lib/active_support/inflector/transliterate.rb +++ b/activesupport/lib/active_support/inflector/transliterate.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/multibyte" require "active_support/i18n" diff --git a/activesupport/lib/active_support/json.rb b/activesupport/lib/active_support/json.rb index da938d1555d5..7b776ed36107 100644 --- a/activesupport/lib/active_support/json.rb +++ b/activesupport/lib/active_support/json.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true require "active_support/json/decoding" require "active_support/json/encoding" diff --git a/activesupport/lib/active_support/json/decoding.rb b/activesupport/lib/active_support/json/decoding.rb index f487fa0c652b..84dc30cbdbde 100644 --- a/activesupport/lib/active_support/json/decoding.rb +++ b/activesupport/lib/active_support/json/decoding.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" require "active_support/core_ext/module/delegation" require "json" diff --git a/activesupport/lib/active_support/json/encoding.rb b/activesupport/lib/active_support/json/encoding.rb index defaf3f395a4..56d14a23d383 100644 --- a/activesupport/lib/active_support/json/encoding.rb +++ b/activesupport/lib/active_support/json/encoding.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/json" require "active_support/core_ext/module/delegation" diff --git a/activesupport/lib/active_support/key_generator.rb b/activesupport/lib/active_support/key_generator.rb index 23ab804eb1c8..a0b2a70ee3c1 100644 --- a/activesupport/lib/active_support/key_generator.rb +++ b/activesupport/lib/active_support/key_generator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "concurrent/map" require "openssl" diff --git a/activesupport/lib/active_support/lazy_load_hooks.rb b/activesupport/lib/active_support/lazy_load_hooks.rb index 720ed47331fe..b1fc6b331b90 100644 --- a/activesupport/lib/active_support/lazy_load_hooks.rb +++ b/activesupport/lib/active_support/lazy_load_hooks.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport # lazy_load_hooks allows Rails to lazily load a lot of components and thus # making the app boot faster. Because of this feature now there is no need to diff --git a/activesupport/lib/active_support/log_subscriber.rb b/activesupport/lib/active_support/log_subscriber.rb index a05758d6aa50..449239208b71 100644 --- a/activesupport/lib/active_support/log_subscriber.rb +++ b/activesupport/lib/active_support/log_subscriber.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" require "active_support/core_ext/class/attribute" require "active_support/subscriber" diff --git a/activesupport/lib/active_support/log_subscriber/test_helper.rb b/activesupport/lib/active_support/log_subscriber/test_helper.rb index 953ee77c2abc..57d522c12dea 100644 --- a/activesupport/lib/active_support/log_subscriber/test_helper.rb +++ b/activesupport/lib/active_support/log_subscriber/test_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/log_subscriber" require "active_support/logger" require "active_support/notifications" diff --git a/activesupport/lib/active_support/logger.rb b/activesupport/lib/active_support/logger.rb index ea09d7d2df01..7bf835a72755 100644 --- a/activesupport/lib/active_support/logger.rb +++ b/activesupport/lib/active_support/logger.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/logger_silence" require "active_support/logger_thread_safe_level" require "logger" diff --git a/activesupport/lib/active_support/logger_silence.rb b/activesupport/lib/active_support/logger_silence.rb index 9c64afaacaa0..d2dc2af7fecf 100644 --- a/activesupport/lib/active_support/logger_silence.rb +++ b/activesupport/lib/active_support/logger_silence.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/concern" require "active_support/core_ext/module/attribute_accessors" require "concurrent" diff --git a/activesupport/lib/active_support/logger_thread_safe_level.rb b/activesupport/lib/active_support/logger_thread_safe_level.rb index 7fb175dea640..c64ae4d95aa8 100644 --- a/activesupport/lib/active_support/logger_thread_safe_level.rb +++ b/activesupport/lib/active_support/logger_thread_safe_level.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/concern" module ActiveSupport diff --git a/activesupport/lib/active_support/message_encryptor.rb b/activesupport/lib/active_support/message_encryptor.rb index e576766c642d..c03d8a22d5d5 100644 --- a/activesupport/lib/active_support/message_encryptor.rb +++ b/activesupport/lib/active_support/message_encryptor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "openssl" require "base64" require "active_support/core_ext/array/extract_options" diff --git a/activesupport/lib/active_support/message_verifier.rb b/activesupport/lib/active_support/message_verifier.rb index 8419e858c675..15945185a457 100644 --- a/activesupport/lib/active_support/message_verifier.rb +++ b/activesupport/lib/active_support/message_verifier.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "base64" require "active_support/core_ext/object/blank" require "active_support/security_utils" diff --git a/activesupport/lib/active_support/multibyte.rb b/activesupport/lib/active_support/multibyte.rb index f7c7befee0e7..0a3418ae9585 100644 --- a/activesupport/lib/active_support/multibyte.rb +++ b/activesupport/lib/active_support/multibyte.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport #:nodoc: module Multibyte autoload :Chars, "active_support/multibyte/chars" diff --git a/activesupport/lib/active_support/multibyte/chars.rb b/activesupport/lib/active_support/multibyte/chars.rb index 8c584665562b..efe052a4e479 100644 --- a/activesupport/lib/active_support/multibyte/chars.rb +++ b/activesupport/lib/active_support/multibyte/chars.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/json" require "active_support/core_ext/string/access" require "active_support/core_ext/string/behavior" diff --git a/activesupport/lib/active_support/multibyte/unicode.rb b/activesupport/lib/active_support/multibyte/unicode.rb index 8223e45e5a3e..92575b1c9bbb 100644 --- a/activesupport/lib/active_support/multibyte/unicode.rb +++ b/activesupport/lib/active_support/multibyte/unicode.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module Multibyte module Unicode diff --git a/activesupport/lib/active_support/notifications.rb b/activesupport/lib/active_support/notifications.rb index 37dfdc042270..e1230c052b8b 100644 --- a/activesupport/lib/active_support/notifications.rb +++ b/activesupport/lib/active_support/notifications.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/notifications/instrumenter" require "active_support/notifications/fanout" require "active_support/per_thread_registry" diff --git a/activesupport/lib/active_support/notifications/fanout.rb b/activesupport/lib/active_support/notifications/fanout.rb index 9da115f552af..b69d1bcd25f5 100644 --- a/activesupport/lib/active_support/notifications/fanout.rb +++ b/activesupport/lib/active_support/notifications/fanout.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "mutex_m" require "concurrent/map" diff --git a/activesupport/lib/active_support/notifications/instrumenter.rb b/activesupport/lib/active_support/notifications/instrumenter.rb index e11e2e068983..00936f5b9ed4 100644 --- a/activesupport/lib/active_support/notifications/instrumenter.rb +++ b/activesupport/lib/active_support/notifications/instrumenter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "securerandom" module ActiveSupport diff --git a/activesupport/lib/active_support/number_helper.rb b/activesupport/lib/active_support/number_helper.rb index 9cb2821cb6f1..965664eb651f 100644 --- a/activesupport/lib/active_support/number_helper.rb +++ b/activesupport/lib/active_support/number_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module NumberHelper extend ActiveSupport::Autoload diff --git a/activesupport/lib/active_support/number_helper/number_converter.rb b/activesupport/lib/active_support/number_helper/number_converter.rb index ce363287cf12..33f1aab85287 100644 --- a/activesupport/lib/active_support/number_helper/number_converter.rb +++ b/activesupport/lib/active_support/number_helper/number_converter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/big_decimal/conversions" require "active_support/core_ext/object/blank" require "active_support/core_ext/hash/keys" diff --git a/activesupport/lib/active_support/number_helper/number_to_currency_converter.rb b/activesupport/lib/active_support/number_helper/number_to_currency_converter.rb index 0f9dce722fa3..f3c0030ad7b2 100644 --- a/activesupport/lib/active_support/number_helper/number_to_currency_converter.rb +++ b/activesupport/lib/active_support/number_helper/number_to_currency_converter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/numeric/inquiry" module ActiveSupport diff --git a/activesupport/lib/active_support/number_helper/number_to_delimited_converter.rb b/activesupport/lib/active_support/number_helper/number_to_delimited_converter.rb index e3b35531b11f..620e6b42829a 100644 --- a/activesupport/lib/active_support/number_helper/number_to_delimited_converter.rb +++ b/activesupport/lib/active_support/number_helper/number_to_delimited_converter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module NumberHelper class NumberToDelimitedConverter < NumberConverter #:nodoc: diff --git a/activesupport/lib/active_support/number_helper/number_to_human_converter.rb b/activesupport/lib/active_support/number_helper/number_to_human_converter.rb index 040343b5dd15..852a76fbb69c 100644 --- a/activesupport/lib/active_support/number_helper/number_to_human_converter.rb +++ b/activesupport/lib/active_support/number_helper/number_to_human_converter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module NumberHelper class NumberToHumanConverter < NumberConverter # :nodoc: diff --git a/activesupport/lib/active_support/number_helper/number_to_human_size_converter.rb b/activesupport/lib/active_support/number_helper/number_to_human_size_converter.rb index f263dbe9f8c7..a1ebb92fe7cc 100644 --- a/activesupport/lib/active_support/number_helper/number_to_human_size_converter.rb +++ b/activesupport/lib/active_support/number_helper/number_to_human_size_converter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module NumberHelper class NumberToHumanSizeConverter < NumberConverter #:nodoc: diff --git a/activesupport/lib/active_support/number_helper/number_to_percentage_converter.rb b/activesupport/lib/active_support/number_helper/number_to_percentage_converter.rb index ac647ca9b7ee..9285d7d93f81 100644 --- a/activesupport/lib/active_support/number_helper/number_to_percentage_converter.rb +++ b/activesupport/lib/active_support/number_helper/number_to_percentage_converter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module NumberHelper class NumberToPercentageConverter < NumberConverter # :nodoc: diff --git a/activesupport/lib/active_support/number_helper/number_to_phone_converter.rb b/activesupport/lib/active_support/number_helper/number_to_phone_converter.rb index 1de9f50f34da..a60e21643347 100644 --- a/activesupport/lib/active_support/number_helper/number_to_phone_converter.rb +++ b/activesupport/lib/active_support/number_helper/number_to_phone_converter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module NumberHelper class NumberToPhoneConverter < NumberConverter #:nodoc: diff --git a/activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb b/activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb index c32d85a45f6c..6e8b5ee653a2 100644 --- a/activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb +++ b/activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module NumberHelper class NumberToRoundedConverter < NumberConverter # :nodoc: diff --git a/activesupport/lib/active_support/number_helper/rounding_helper.rb b/activesupport/lib/active_support/number_helper/rounding_helper.rb index 63b48444a62d..f5d5f4664bc0 100644 --- a/activesupport/lib/active_support/number_helper/rounding_helper.rb +++ b/activesupport/lib/active_support/number_helper/rounding_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module NumberHelper class RoundingHelper # :nodoc: diff --git a/activesupport/lib/active_support/option_merger.rb b/activesupport/lib/active_support/option_merger.rb index 0f2caa98f203..cbbab957b12c 100644 --- a/activesupport/lib/active_support/option_merger.rb +++ b/activesupport/lib/active_support/option_merger.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/deep_merge" module ActiveSupport diff --git a/activesupport/lib/active_support/ordered_hash.rb b/activesupport/lib/active_support/ordered_hash.rb index 3aa0a14f0413..b07b89447ef2 100644 --- a/activesupport/lib/active_support/ordered_hash.rb +++ b/activesupport/lib/active_support/ordered_hash.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "yaml" YAML.add_builtin_type("omap") do |type, val| diff --git a/activesupport/lib/active_support/ordered_options.rb b/activesupport/lib/active_support/ordered_options.rb index 04d6dfaf9cce..957d427af2e4 100644 --- a/activesupport/lib/active_support/ordered_options.rb +++ b/activesupport/lib/active_support/ordered_options.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/blank" module ActiveSupport diff --git a/activesupport/lib/active_support/per_thread_registry.rb b/activesupport/lib/active_support/per_thread_registry.rb index 02431704d33c..362d7e45cc94 100644 --- a/activesupport/lib/active_support/per_thread_registry.rb +++ b/activesupport/lib/active_support/per_thread_registry.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/delegation" module ActiveSupport diff --git a/activesupport/lib/active_support/proxy_object.rb b/activesupport/lib/active_support/proxy_object.rb index 20a0fd8e6201..df84ab6225e3 100644 --- a/activesupport/lib/active_support/proxy_object.rb +++ b/activesupport/lib/active_support/proxy_object.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport # A class with no predefined methods that behaves similarly to Builder's # BlankSlate. Used for proxy classes. diff --git a/activesupport/lib/active_support/rails.rb b/activesupport/lib/active_support/rails.rb index f6b018f0d377..793baabe83e5 100644 --- a/activesupport/lib/active_support/rails.rb +++ b/activesupport/lib/active_support/rails.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # This is private interface. # # Rails components cherry pick from Active Support as needed, but there are a diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb index 45bc51311b7d..b65a177f1123 100644 --- a/activesupport/lib/active_support/railtie.rb +++ b/activesupport/lib/active_support/railtie.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support" require "active_support/i18n_railtie" diff --git a/activesupport/lib/active_support/reloader.rb b/activesupport/lib/active_support/reloader.rb index 9558146201f4..ea0b64fb0b95 100644 --- a/activesupport/lib/active_support/reloader.rb +++ b/activesupport/lib/active_support/reloader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/execution_wrapper" module ActiveSupport diff --git a/activesupport/lib/active_support/rescuable.rb b/activesupport/lib/active_support/rescuable.rb index 826832ba7dec..0d746f4dda70 100644 --- a/activesupport/lib/active_support/rescuable.rb +++ b/activesupport/lib/active_support/rescuable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/concern" require "active_support/core_ext/class/attribute" require "active_support/core_ext/string/inflections" diff --git a/activesupport/lib/active_support/security_utils.rb b/activesupport/lib/active_support/security_utils.rb index b655d64449e6..2e61a72213ef 100644 --- a/activesupport/lib/active_support/security_utils.rb +++ b/activesupport/lib/active_support/security_utils.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "digest" module ActiveSupport diff --git a/activesupport/lib/active_support/string_inquirer.rb b/activesupport/lib/active_support/string_inquirer.rb index 90eac89c9e8b..03bcbb2555fa 100644 --- a/activesupport/lib/active_support/string_inquirer.rb +++ b/activesupport/lib/active_support/string_inquirer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport # Wrapping a string in this class gives you a prettier way to test # for equality. The value returned by Rails.env is wrapped diff --git a/activesupport/lib/active_support/subscriber.rb b/activesupport/lib/active_support/subscriber.rb index 292413975504..09ab992dd584 100644 --- a/activesupport/lib/active_support/subscriber.rb +++ b/activesupport/lib/active_support/subscriber.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/per_thread_registry" require "active_support/notifications" diff --git a/activesupport/lib/active_support/tagged_logging.rb b/activesupport/lib/active_support/tagged_logging.rb index ad134c49b603..42e2917bda80 100644 --- a/activesupport/lib/active_support/tagged_logging.rb +++ b/activesupport/lib/active_support/tagged_logging.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/delegation" require "active_support/core_ext/object/blank" require "logger" diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb index 3de4ccc1dafd..156c83995018 100644 --- a/activesupport/lib/active_support/test_case.rb +++ b/activesupport/lib/active_support/test_case.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true gem "minitest" # make sure we get the gem, not stdlib require "minitest" require "active_support/testing/tagged_logging" diff --git a/activesupport/lib/active_support/testing/assertions.rb b/activesupport/lib/active_support/testing/assertions.rb index 28e1df887025..d7bb5e5bdf59 100644 --- a/activesupport/lib/active_support/testing/assertions.rb +++ b/activesupport/lib/active_support/testing/assertions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module Testing module Assertions diff --git a/activesupport/lib/active_support/testing/autorun.rb b/activesupport/lib/active_support/testing/autorun.rb index a18788f38e9c..40ae696a34c1 100644 --- a/activesupport/lib/active_support/testing/autorun.rb +++ b/activesupport/lib/active_support/testing/autorun.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true gem "minitest" require "minitest" diff --git a/activesupport/lib/active_support/testing/constant_lookup.rb b/activesupport/lib/active_support/testing/constant_lookup.rb index 647395d2b33d..107770b63b16 100644 --- a/activesupport/lib/active_support/testing/constant_lookup.rb +++ b/activesupport/lib/active_support/testing/constant_lookup.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/concern" require "active_support/inflector" diff --git a/activesupport/lib/active_support/testing/declarative.rb b/activesupport/lib/active_support/testing/declarative.rb index 53ab3ebf78aa..601f6fb16d33 100644 --- a/activesupport/lib/active_support/testing/declarative.rb +++ b/activesupport/lib/active_support/testing/declarative.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module Testing module Declarative diff --git a/activesupport/lib/active_support/testing/deprecation.rb b/activesupport/lib/active_support/testing/deprecation.rb index 58911570e804..1c50abecfdf8 100644 --- a/activesupport/lib/active_support/testing/deprecation.rb +++ b/activesupport/lib/active_support/testing/deprecation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/deprecation" require "active_support/core_ext/regexp" diff --git a/activesupport/lib/active_support/testing/file_fixtures.rb b/activesupport/lib/active_support/testing/file_fixtures.rb index affb84cda5a4..56f80fb5479d 100644 --- a/activesupport/lib/active_support/testing/file_fixtures.rb +++ b/activesupport/lib/active_support/testing/file_fixtures.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module Testing # Adds simple access to sample files called file fixtures. diff --git a/activesupport/lib/active_support/testing/isolation.rb b/activesupport/lib/active_support/testing/isolation.rb index 54c3263efacf..4d43c0608502 100644 --- a/activesupport/lib/active_support/testing/isolation.rb +++ b/activesupport/lib/active_support/testing/isolation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module Testing module Isolation diff --git a/activesupport/lib/active_support/testing/method_call_assertions.rb b/activesupport/lib/active_support/testing/method_call_assertions.rb index 6b07416fdc2b..d33224e9c33c 100644 --- a/activesupport/lib/active_support/testing/method_call_assertions.rb +++ b/activesupport/lib/active_support/testing/method_call_assertions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "minitest/mock" module ActiveSupport diff --git a/activesupport/lib/active_support/testing/setup_and_teardown.rb b/activesupport/lib/active_support/testing/setup_and_teardown.rb index 358c79c32151..cd1b7bd83209 100644 --- a/activesupport/lib/active_support/testing/setup_and_teardown.rb +++ b/activesupport/lib/active_support/testing/setup_and_teardown.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/concern" require "active_support/callbacks" diff --git a/activesupport/lib/active_support/testing/stream.rb b/activesupport/lib/active_support/testing/stream.rb index 1d06b945591f..4e8303f05857 100644 --- a/activesupport/lib/active_support/testing/stream.rb +++ b/activesupport/lib/active_support/testing/stream.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module Testing module Stream #:nodoc: diff --git a/activesupport/lib/active_support/testing/tagged_logging.rb b/activesupport/lib/active_support/testing/tagged_logging.rb index afdff87b4588..3ca45b4ab5cc 100644 --- a/activesupport/lib/active_support/testing/tagged_logging.rb +++ b/activesupport/lib/active_support/testing/tagged_logging.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module Testing # Logs a "PostsControllerTest: test name" heading before each test to diff --git a/activesupport/lib/active_support/testing/time_helpers.rb b/activesupport/lib/active_support/testing/time_helpers.rb index 3d9ff99729b8..463aef7705c6 100644 --- a/activesupport/lib/active_support/testing/time_helpers.rb +++ b/activesupport/lib/active_support/testing/time_helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/strip" # for strip_heredoc require "active_support/core_ext/time/calculations" require "concurrent/map" diff --git a/activesupport/lib/active_support/time.rb b/activesupport/lib/active_support/time.rb index 7658228ca681..557f082948d9 100644 --- a/activesupport/lib/active_support/time.rb +++ b/activesupport/lib/active_support/time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport autoload :Duration, "active_support/duration" autoload :TimeWithZone, "active_support/time_with_zone" diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index ecb9fb6785ac..21eb33176a49 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/duration" require "active_support/values/time_zone" require "active_support/core_ext/object/acts_like" diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index 96a541a4ef74..06d7f990ae09 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "tzinfo" require "concurrent/map" require "active_support/core_ext/object/blank" diff --git a/activesupport/lib/active_support/version.rb b/activesupport/lib/active_support/version.rb index 20b91ac911f3..e2afb871e76e 100644 --- a/activesupport/lib/active_support/version.rb +++ b/activesupport/lib/active_support/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "gem_version" module ActiveSupport diff --git a/activesupport/lib/active_support/xml_mini.rb b/activesupport/lib/active_support/xml_mini.rb index 782fb4128845..df651c576606 100644 --- a/activesupport/lib/active_support/xml_mini.rb +++ b/activesupport/lib/active_support/xml_mini.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "time" require "base64" require "bigdecimal" diff --git a/activesupport/lib/active_support/xml_mini/jdom.rb b/activesupport/lib/active_support/xml_mini/jdom.rb index a7939b3185ad..328917275d2c 100644 --- a/activesupport/lib/active_support/xml_mini/jdom.rb +++ b/activesupport/lib/active_support/xml_mini/jdom.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true raise "JRuby is required to use the JDOM backend for XmlMini" unless RUBY_PLATFORM.include?("java") require "jruby" diff --git a/activesupport/lib/active_support/xml_mini/libxml.rb b/activesupport/lib/active_support/xml_mini/libxml.rb index d849cdfa6b29..0d3eae25cc14 100644 --- a/activesupport/lib/active_support/xml_mini/libxml.rb +++ b/activesupport/lib/active_support/xml_mini/libxml.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "libxml" require "active_support/core_ext/object/blank" require "stringio" diff --git a/activesupport/lib/active_support/xml_mini/libxmlsax.rb b/activesupport/lib/active_support/xml_mini/libxmlsax.rb index f3d485da2f5f..fa2be15beaa7 100644 --- a/activesupport/lib/active_support/xml_mini/libxmlsax.rb +++ b/activesupport/lib/active_support/xml_mini/libxmlsax.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "libxml" require "active_support/core_ext/object/blank" require "stringio" diff --git a/activesupport/lib/active_support/xml_mini/nokogiri.rb b/activesupport/lib/active_support/xml_mini/nokogiri.rb index 63466c08b216..6578cc2b4ec9 100644 --- a/activesupport/lib/active_support/xml_mini/nokogiri.rb +++ b/activesupport/lib/active_support/xml_mini/nokogiri.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require "nokogiri" rescue LoadError => e diff --git a/activesupport/lib/active_support/xml_mini/nokogirisax.rb b/activesupport/lib/active_support/xml_mini/nokogirisax.rb index 54e15e6a5ff2..e754ec08a3b4 100644 --- a/activesupport/lib/active_support/xml_mini/nokogirisax.rb +++ b/activesupport/lib/active_support/xml_mini/nokogirisax.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require "nokogiri" rescue LoadError => e diff --git a/activesupport/lib/active_support/xml_mini/rexml.rb b/activesupport/lib/active_support/xml_mini/rexml.rb index 03fa910fa551..ced362c29515 100644 --- a/activesupport/lib/active_support/xml_mini/rexml.rb +++ b/activesupport/lib/active_support/xml_mini/rexml.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/kernel/reporting" require "active_support/core_ext/object/blank" require "stringio" diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb index c4f34c0abfdd..300427262984 100644 --- a/activesupport/test/abstract_unit.rb +++ b/activesupport/test/abstract_unit.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ORIG_ARGV = ARGV.dup require "active_support/core_ext/kernel/reporting" diff --git a/activesupport/test/array_inquirer_test.rb b/activesupport/test/array_inquirer_test.rb index 5b2bc8290596..c674a80d2932 100644 --- a/activesupport/test/array_inquirer_test.rb +++ b/activesupport/test/array_inquirer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/array" diff --git a/activesupport/test/autoload_test.rb b/activesupport/test/autoload_test.rb index 6c8aa3e0555e..65838041ea08 100644 --- a/activesupport/test/autoload_test.rb +++ b/activesupport/test/autoload_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class TestAutoloadModule < ActiveSupport::TestCase diff --git a/activesupport/test/autoloading_fixtures/a/b.rb b/activesupport/test/autoloading_fixtures/a/b.rb index 0dbbbbd181e5..8f2d83719da4 100644 --- a/activesupport/test/autoloading_fixtures/a/b.rb +++ b/activesupport/test/autoloading_fixtures/a/b.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class A::B end diff --git a/activesupport/test/autoloading_fixtures/a/c/d.rb b/activesupport/test/autoloading_fixtures/a/c/d.rb index 2c0ec5f182c2..fd50bb95c6f3 100644 --- a/activesupport/test/autoloading_fixtures/a/c/d.rb +++ b/activesupport/test/autoloading_fixtures/a/c/d.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class A::C::D end diff --git a/activesupport/test/autoloading_fixtures/a/c/em/f.rb b/activesupport/test/autoloading_fixtures/a/c/em/f.rb index 3ff1b7efa0b5..298b63c9164d 100644 --- a/activesupport/test/autoloading_fixtures/a/c/em/f.rb +++ b/activesupport/test/autoloading_fixtures/a/c/em/f.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class A::C::EM::F end diff --git a/activesupport/test/autoloading_fixtures/application.rb b/activesupport/test/autoloading_fixtures/application.rb index d7d3096dcb22..ae3ccf487ebd 100644 --- a/activesupport/test/autoloading_fixtures/application.rb +++ b/activesupport/test/autoloading_fixtures/application.rb @@ -1 +1,2 @@ +# frozen_string_literal: true ApplicationController = 10 diff --git a/activesupport/test/autoloading_fixtures/circular1.rb b/activesupport/test/autoloading_fixtures/circular1.rb index a45761f06691..f6041bde77ff 100644 --- a/activesupport/test/autoloading_fixtures/circular1.rb +++ b/activesupport/test/autoloading_fixtures/circular1.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true silence_warnings do Circular2 end diff --git a/activesupport/test/autoloading_fixtures/circular2.rb b/activesupport/test/autoloading_fixtures/circular2.rb index c847fa500143..178bbca3bdc8 100644 --- a/activesupport/test/autoloading_fixtures/circular2.rb +++ b/activesupport/test/autoloading_fixtures/circular2.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Circular1 class Circular2 diff --git a/activesupport/test/autoloading_fixtures/class_folder.rb b/activesupport/test/autoloading_fixtures/class_folder.rb index 6ee818221421..48c2993600c8 100644 --- a/activesupport/test/autoloading_fixtures/class_folder.rb +++ b/activesupport/test/autoloading_fixtures/class_folder.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ClassFolder ConstantInClassFolder = "indeed" end diff --git a/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb b/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb index 4df069cab654..866d3547f6fb 100644 --- a/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb +++ b/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ClassFolder::ClassFolderSubclass < ClassFolder ConstantInClassFolder = "indeed" end diff --git a/activesupport/test/autoloading_fixtures/class_folder/inline_class.rb b/activesupport/test/autoloading_fixtures/class_folder/inline_class.rb index 8235e907240d..6c20a3a9a7b6 100644 --- a/activesupport/test/autoloading_fixtures/class_folder/inline_class.rb +++ b/activesupport/test/autoloading_fixtures/class_folder/inline_class.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class ClassFolder::InlineClass end diff --git a/activesupport/test/autoloading_fixtures/class_folder/nested_class.rb b/activesupport/test/autoloading_fixtures/class_folder/nested_class.rb index 57a13d89ea2d..ee35eac3fccc 100644 --- a/activesupport/test/autoloading_fixtures/class_folder/nested_class.rb +++ b/activesupport/test/autoloading_fixtures/class_folder/nested_class.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ClassFolder class NestedClass end diff --git a/activesupport/test/autoloading_fixtures/conflict.rb b/activesupport/test/autoloading_fixtures/conflict.rb index d7f42b5d5fa7..6731ea51d82b 100644 --- a/activesupport/test/autoloading_fixtures/conflict.rb +++ b/activesupport/test/autoloading_fixtures/conflict.rb @@ -1 +1,2 @@ +# frozen_string_literal: true Conflict = 2 diff --git a/activesupport/test/autoloading_fixtures/counting_loader.rb b/activesupport/test/autoloading_fixtures/counting_loader.rb index 4225c4412c7a..2a4001b815f8 100644 --- a/activesupport/test/autoloading_fixtures/counting_loader.rb +++ b/activesupport/test/autoloading_fixtures/counting_loader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true $counting_loaded_times ||= 0 $counting_loaded_times += 1 diff --git a/activesupport/test/autoloading_fixtures/cross_site_dependency.rb b/activesupport/test/autoloading_fixtures/cross_site_dependency.rb index de941bf2718b..4eff14e8880f 100644 --- a/activesupport/test/autoloading_fixtures/cross_site_dependency.rb +++ b/activesupport/test/autoloading_fixtures/cross_site_dependency.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class CrossSiteDependency end diff --git a/activesupport/test/autoloading_fixtures/d.rb b/activesupport/test/autoloading_fixtures/d.rb index 52850e1e1a05..c4217362d89c 100644 --- a/activesupport/test/autoloading_fixtures/d.rb +++ b/activesupport/test/autoloading_fixtures/d.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class D end diff --git a/activesupport/test/autoloading_fixtures/em.rb b/activesupport/test/autoloading_fixtures/em.rb index e47024999ebf..38bb323e9e88 100644 --- a/activesupport/test/autoloading_fixtures/em.rb +++ b/activesupport/test/autoloading_fixtures/em.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class EM end diff --git a/activesupport/test/autoloading_fixtures/html/some_class.rb b/activesupport/test/autoloading_fixtures/html/some_class.rb index b43d15d8917a..495372fef32b 100644 --- a/activesupport/test/autoloading_fixtures/html/some_class.rb +++ b/activesupport/test/autoloading_fixtures/html/some_class.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module HTML class SomeClass end diff --git a/activesupport/test/autoloading_fixtures/load_path/loaded_constant.rb b/activesupport/test/autoloading_fixtures/load_path/loaded_constant.rb index d2c4f6b0c5e4..e5f73d9f0cd1 100644 --- a/activesupport/test/autoloading_fixtures/load_path/loaded_constant.rb +++ b/activesupport/test/autoloading_fixtures/load_path/loaded_constant.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true module LoadedConstant end diff --git a/activesupport/test/autoloading_fixtures/loads_constant.rb b/activesupport/test/autoloading_fixtures/loads_constant.rb index 0b30dc8bca76..cb7b381de3c3 100644 --- a/activesupport/test/autoloading_fixtures/loads_constant.rb +++ b/activesupport/test/autoloading_fixtures/loads_constant.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module LoadsConstant end diff --git a/activesupport/test/autoloading_fixtures/module_folder/inline_class.rb b/activesupport/test/autoloading_fixtures/module_folder/inline_class.rb index ca834370467a..5ed98cd4cf0c 100644 --- a/activesupport/test/autoloading_fixtures/module_folder/inline_class.rb +++ b/activesupport/test/autoloading_fixtures/module_folder/inline_class.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class ModuleFolder::InlineClass end diff --git a/activesupport/test/autoloading_fixtures/module_folder/nested_class.rb b/activesupport/test/autoloading_fixtures/module_folder/nested_class.rb index fc4076bd0a63..afed4b0a7e92 100644 --- a/activesupport/test/autoloading_fixtures/module_folder/nested_class.rb +++ b/activesupport/test/autoloading_fixtures/module_folder/nested_class.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ModuleFolder class NestedClass end diff --git a/activesupport/test/autoloading_fixtures/module_folder/nested_sibling.rb b/activesupport/test/autoloading_fixtures/module_folder/nested_sibling.rb index 04c426833e1a..a16cc566dd3a 100644 --- a/activesupport/test/autoloading_fixtures/module_folder/nested_sibling.rb +++ b/activesupport/test/autoloading_fixtures/module_folder/nested_sibling.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class ModuleFolder::NestedSibling end diff --git a/activesupport/test/autoloading_fixtures/module_with_custom_const_missing/a/b.rb b/activesupport/test/autoloading_fixtures/module_with_custom_const_missing/a/b.rb index 4f2020c50358..a6ed49e0be4f 100644 --- a/activesupport/test/autoloading_fixtures/module_with_custom_const_missing/a/b.rb +++ b/activesupport/test/autoloading_fixtures/module_with_custom_const_missing/a/b.rb @@ -1 +1,2 @@ +# frozen_string_literal: true ModuleWithCustomConstMissing::A::B = "10" diff --git a/activesupport/test/autoloading_fixtures/multiple_constant_file.rb b/activesupport/test/autoloading_fixtures/multiple_constant_file.rb index a9ff4eb89cbb..33d371c830d7 100644 --- a/activesupport/test/autoloading_fixtures/multiple_constant_file.rb +++ b/activesupport/test/autoloading_fixtures/multiple_constant_file.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true MultipleConstantFile = 10 SiblingConstant = MultipleConstantFile * 2 diff --git a/activesupport/test/autoloading_fixtures/prepend.rb b/activesupport/test/autoloading_fixtures/prepend.rb index 3134d1df2bcb..1bef4ab5b3c6 100644 --- a/activesupport/test/autoloading_fixtures/prepend.rb +++ b/activesupport/test/autoloading_fixtures/prepend.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class SubClassConflict end diff --git a/activesupport/test/autoloading_fixtures/prepend/sub_class_conflict.rb b/activesupport/test/autoloading_fixtures/prepend/sub_class_conflict.rb index 090dda30434a..d76b575b0685 100644 --- a/activesupport/test/autoloading_fixtures/prepend/sub_class_conflict.rb +++ b/activesupport/test/autoloading_fixtures/prepend/sub_class_conflict.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class Prepend::SubClassConflict end diff --git a/activesupport/test/autoloading_fixtures/raises_arbitrary_exception.rb b/activesupport/test/autoloading_fixtures/raises_arbitrary_exception.rb index e477ab21d02a..814c41c00486 100644 --- a/activesupport/test/autoloading_fixtures/raises_arbitrary_exception.rb +++ b/activesupport/test/autoloading_fixtures/raises_arbitrary_exception.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true RaisesArbitraryException = 1 _ = A::B # Autoloading recursion, also expected to be watched and discarded. diff --git a/activesupport/test/autoloading_fixtures/raises_name_error.rb b/activesupport/test/autoloading_fixtures/raises_name_error.rb index a49960abf0e2..051f839994d6 100644 --- a/activesupport/test/autoloading_fixtures/raises_name_error.rb +++ b/activesupport/test/autoloading_fixtures/raises_name_error.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class RaisesNameError FooBarBaz end diff --git a/activesupport/test/autoloading_fixtures/raises_no_method_error.rb b/activesupport/test/autoloading_fixtures/raises_no_method_error.rb index e1b8fce24a12..1db51879c70f 100644 --- a/activesupport/test/autoloading_fixtures/raises_no_method_error.rb +++ b/activesupport/test/autoloading_fixtures/raises_no_method_error.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class RaisesNoMethodError self.foobar_method_doesnt_exist end diff --git a/activesupport/test/autoloading_fixtures/requires_constant.rb b/activesupport/test/autoloading_fixtures/requires_constant.rb index f04dcc4091f1..a26e265f71bc 100644 --- a/activesupport/test/autoloading_fixtures/requires_constant.rb +++ b/activesupport/test/autoloading_fixtures/requires_constant.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "loaded_constant" module RequiresConstant diff --git a/activesupport/test/autoloading_fixtures/should_not_be_required.rb b/activesupport/test/autoloading_fixtures/should_not_be_required.rb index 1fcf170cc551..c1fada821335 100644 --- a/activesupport/test/autoloading_fixtures/should_not_be_required.rb +++ b/activesupport/test/autoloading_fixtures/should_not_be_required.rb @@ -1 +1,2 @@ +# frozen_string_literal: true ShouldNotBeAutoloaded = 0 diff --git a/activesupport/test/autoloading_fixtures/throws.rb b/activesupport/test/autoloading_fixtures/throws.rb index e1d96cc512a3..431111afbe24 100644 --- a/activesupport/test/autoloading_fixtures/throws.rb +++ b/activesupport/test/autoloading_fixtures/throws.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Throws = 1 _ = A::B # Autoloading recursion, expected to be discarded. diff --git a/activesupport/test/autoloading_fixtures/typo.rb b/activesupport/test/autoloading_fixtures/typo.rb index 0ffe07c2b369..0b74d73f3ff6 100644 --- a/activesupport/test/autoloading_fixtures/typo.rb +++ b/activesupport/test/autoloading_fixtures/typo.rb @@ -1 +1,2 @@ +# frozen_string_literal: true TypO = 1 diff --git a/activesupport/test/benchmarkable_test.rb b/activesupport/test/benchmarkable_test.rb index 210b9cb9fd27..cb8cb89a30c0 100644 --- a/activesupport/test/benchmarkable_test.rb +++ b/activesupport/test/benchmarkable_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class BenchmarkableTest < ActiveSupport::TestCase diff --git a/activesupport/test/broadcast_logger_test.rb b/activesupport/test/broadcast_logger_test.rb index 184d0ebddd06..c91e3f770f36 100644 --- a/activesupport/test/broadcast_logger_test.rb +++ b/activesupport/test/broadcast_logger_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActiveSupport diff --git a/activesupport/test/cache/behaviors.rb b/activesupport/test/cache/behaviors.rb index efd045ac5e97..c94cbc1156c8 100644 --- a/activesupport/test/cache/behaviors.rb +++ b/activesupport/test/cache/behaviors.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "behaviors/autoloading_cache_behavior" require_relative "behaviors/cache_delete_matched_behavior" require_relative "behaviors/cache_increment_decrement_behavior" diff --git a/activesupport/test/cache/behaviors/autoloading_cache_behavior.rb b/activesupport/test/cache/behaviors/autoloading_cache_behavior.rb index 5f8af331f651..41a3a873b645 100644 --- a/activesupport/test/cache/behaviors/autoloading_cache_behavior.rb +++ b/activesupport/test/cache/behaviors/autoloading_cache_behavior.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "dependencies_test_helpers" module AutoloadingCacheBehavior diff --git a/activesupport/test/cache/behaviors/cache_delete_matched_behavior.rb b/activesupport/test/cache/behaviors/cache_delete_matched_behavior.rb index b872eb027982..b2cd919da9ea 100644 --- a/activesupport/test/cache/behaviors/cache_delete_matched_behavior.rb +++ b/activesupport/test/cache/behaviors/cache_delete_matched_behavior.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module CacheDeleteMatchedBehavior def test_delete_matched @cache.write("foo", "bar") diff --git a/activesupport/test/cache/behaviors/cache_increment_decrement_behavior.rb b/activesupport/test/cache/behaviors/cache_increment_decrement_behavior.rb index 0d3233956531..45f92f10b254 100644 --- a/activesupport/test/cache/behaviors/cache_increment_decrement_behavior.rb +++ b/activesupport/test/cache/behaviors/cache_increment_decrement_behavior.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module CacheIncrementDecrementBehavior def test_increment @cache.write("foo", 1, raw: true) diff --git a/activesupport/test/cache/behaviors/cache_store_behavior.rb b/activesupport/test/cache/behaviors/cache_store_behavior.rb index 03c366e16485..4e86622199df 100644 --- a/activesupport/test/cache/behaviors/cache_store_behavior.rb +++ b/activesupport/test/cache/behaviors/cache_store_behavior.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Tests the base functionality that should be identical across all cache stores. module CacheStoreBehavior def test_should_read_and_write_strings diff --git a/activesupport/test/cache/behaviors/cache_store_version_behavior.rb b/activesupport/test/cache/behaviors/cache_store_version_behavior.rb index a0170c896f3c..82f392c86a2a 100644 --- a/activesupport/test/cache/behaviors/cache_store_version_behavior.rb +++ b/activesupport/test/cache/behaviors/cache_store_version_behavior.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module CacheStoreVersionBehavior ModelWithKeyAndVersion = Struct.new(:cache_key, :cache_version) diff --git a/activesupport/test/cache/behaviors/encoded_key_cache_behavior.rb b/activesupport/test/cache/behaviors/encoded_key_cache_behavior.rb index 4d8e2946b292..9fab1f966dd4 100644 --- a/activesupport/test/cache/behaviors/encoded_key_cache_behavior.rb +++ b/activesupport/test/cache/behaviors/encoded_key_cache_behavior.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # https://rails.lighthouseapp.com/projects/8994/tickets/6225-memcachestore-cant-deal-with-umlauts-and-special-characters # The error is caused by character encodings that can't be compared with ASCII-8BIT regular expressions and by special # characters like the umlaut in UTF-8. diff --git a/activesupport/test/cache/behaviors/local_cache_behavior.rb b/activesupport/test/cache/behaviors/local_cache_behavior.rb index 8530296374c7..730f0306b86e 100644 --- a/activesupport/test/cache/behaviors/local_cache_behavior.rb +++ b/activesupport/test/cache/behaviors/local_cache_behavior.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module LocalCacheBehavior def test_local_writes_are_persistent_on_the_remote_cache retval = @cache.with_local_cache do diff --git a/activesupport/test/cache/cache_entry_test.rb b/activesupport/test/cache/cache_entry_test.rb index e446e39b10d7..4a8fc5bed37b 100644 --- a/activesupport/test/cache/cache_entry_test.rb +++ b/activesupport/test/cache/cache_entry_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/cache" diff --git a/activesupport/test/cache/cache_key_test.rb b/activesupport/test/cache/cache_key_test.rb index 149d0f66ee99..2111624153da 100644 --- a/activesupport/test/cache/cache_key_test.rb +++ b/activesupport/test/cache/cache_key_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/cache" diff --git a/activesupport/test/cache/cache_store_logger_test.rb b/activesupport/test/cache/cache_store_logger_test.rb index 621cfebb1005..3014c4d57fb5 100644 --- a/activesupport/test/cache/cache_store_logger_test.rb +++ b/activesupport/test/cache/cache_store_logger_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/cache" diff --git a/activesupport/test/cache/cache_store_namespace_test.rb b/activesupport/test/cache/cache_store_namespace_test.rb index e395c88271d5..8df048aad08c 100644 --- a/activesupport/test/cache/cache_store_namespace_test.rb +++ b/activesupport/test/cache/cache_store_namespace_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/cache" diff --git a/activesupport/test/cache/cache_store_setting_test.rb b/activesupport/test/cache/cache_store_setting_test.rb index cb9b006abe2e..cc126ec9309c 100644 --- a/activesupport/test/cache/cache_store_setting_test.rb +++ b/activesupport/test/cache/cache_store_setting_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/cache" require "dalli" diff --git a/activesupport/test/cache/cache_store_write_multi_test.rb b/activesupport/test/cache/cache_store_write_multi_test.rb index 16e3f3b842da..9355dde0f422 100644 --- a/activesupport/test/cache/cache_store_write_multi_test.rb +++ b/activesupport/test/cache/cache_store_write_multi_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/cache" diff --git a/activesupport/test/cache/local_cache_middleware_test.rb b/activesupport/test/cache/local_cache_middleware_test.rb index 352502fb4304..3f0bd40fbd53 100644 --- a/activesupport/test/cache/local_cache_middleware_test.rb +++ b/activesupport/test/cache/local_cache_middleware_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/cache" diff --git a/activesupport/test/cache/stores/file_store_test.rb b/activesupport/test/cache/stores/file_store_test.rb index 48b304fe6e7c..6ba25bbaec95 100644 --- a/activesupport/test/cache/stores/file_store_test.rb +++ b/activesupport/test/cache/stores/file_store_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/cache" require_relative "../behaviors" diff --git a/activesupport/test/cache/stores/mem_cache_store_test.rb b/activesupport/test/cache/stores/mem_cache_store_test.rb index 2dd5264818f0..e188f5f88121 100644 --- a/activesupport/test/cache/stores/mem_cache_store_test.rb +++ b/activesupport/test/cache/stores/mem_cache_store_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/cache" require_relative "../behaviors" diff --git a/activesupport/test/cache/stores/memory_store_test.rb b/activesupport/test/cache/stores/memory_store_test.rb index 3dd1646d5677..e8dfe24a2fc7 100644 --- a/activesupport/test/cache/stores/memory_store_test.rb +++ b/activesupport/test/cache/stores/memory_store_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/cache" require_relative "../behaviors" diff --git a/activesupport/test/cache/stores/null_store_test.rb b/activesupport/test/cache/stores/null_store_test.rb index 23c4e64ee4c4..0945aceee3f7 100644 --- a/activesupport/test/cache/stores/null_store_test.rb +++ b/activesupport/test/cache/stores/null_store_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/cache" require_relative "../behaviors" diff --git a/activesupport/test/callback_inheritance_test.rb b/activesupport/test/callback_inheritance_test.rb index 9e2f7527e0e6..8872a162823e 100644 --- a/activesupport/test/callback_inheritance_test.rb +++ b/activesupport/test/callback_inheritance_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class GrandParent diff --git a/activesupport/test/callbacks_test.rb b/activesupport/test/callbacks_test.rb index 4f00afb581c3..9d924cabb23a 100644 --- a/activesupport/test/callbacks_test.rb +++ b/activesupport/test/callbacks_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module CallbacksTest diff --git a/activesupport/test/class_cache_test.rb b/activesupport/test/class_cache_test.rb index 004b4dc9ce73..b3ca3748c2b6 100644 --- a/activesupport/test/class_cache_test.rb +++ b/activesupport/test/class_cache_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/dependencies" diff --git a/activesupport/test/clean_backtrace_test.rb b/activesupport/test/clean_backtrace_test.rb index 5ed518cdb07e..7bbc54dfcc49 100644 --- a/activesupport/test/clean_backtrace_test.rb +++ b/activesupport/test/clean_backtrace_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class BacktraceCleanerFilterTest < ActiveSupport::TestCase diff --git a/activesupport/test/clean_logger_test.rb b/activesupport/test/clean_logger_test.rb index cf37fc56395c..923a1cb67135 100644 --- a/activesupport/test/clean_logger_test.rb +++ b/activesupport/test/clean_logger_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "stringio" require "active_support/logger" diff --git a/activesupport/test/concern_test.rb b/activesupport/test/concern_test.rb index 7a5a5414a766..e05704393d56 100644 --- a/activesupport/test/concern_test.rb +++ b/activesupport/test/concern_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/concern" diff --git a/activesupport/test/configurable_test.rb b/activesupport/test/configurable_test.rb index 3cd6d2d4d090..bd3452334a89 100644 --- a/activesupport/test/configurable_test.rb +++ b/activesupport/test/configurable_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/configurable" diff --git a/activesupport/test/constantize_test_cases.rb b/activesupport/test/constantize_test_cases.rb index 32b720bcbbcd..fa23fd6b6540 100644 --- a/activesupport/test/constantize_test_cases.rb +++ b/activesupport/test/constantize_test_cases.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "dependencies_test_helpers" module Ace diff --git a/activesupport/test/core_ext/array/access_test.rb b/activesupport/test/core_ext/array/access_test.rb index a38ea36d0068..08af9e1b5524 100644 --- a/activesupport/test/core_ext/array/access_test.rb +++ b/activesupport/test/core_ext/array/access_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/array" diff --git a/activesupport/test/core_ext/array/conversions_test.rb b/activesupport/test/core_ext/array/conversions_test.rb index 29e661a99bfb..33d051c51439 100644 --- a/activesupport/test/core_ext/array/conversions_test.rb +++ b/activesupport/test/core_ext/array/conversions_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/array" require "active_support/core_ext/big_decimal" diff --git a/activesupport/test/core_ext/array/extract_options_test.rb b/activesupport/test/core_ext/array/extract_options_test.rb index 1651bee0f604..09bf97ae6c6d 100644 --- a/activesupport/test/core_ext/array/extract_options_test.rb +++ b/activesupport/test/core_ext/array/extract_options_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/array" require "active_support/core_ext/hash" diff --git a/activesupport/test/core_ext/array/grouping_test.rb b/activesupport/test/core_ext/array/grouping_test.rb index 4c6aadba8c50..daf47e9a9f6a 100644 --- a/activesupport/test/core_ext/array/grouping_test.rb +++ b/activesupport/test/core_ext/array/grouping_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/array" diff --git a/activesupport/test/core_ext/array/prepend_append_test.rb b/activesupport/test/core_ext/array/prepend_append_test.rb index 763e26191dd5..3b38acf56ca4 100644 --- a/activesupport/test/core_ext/array/prepend_append_test.rb +++ b/activesupport/test/core_ext/array/prepend_append_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/array" diff --git a/activesupport/test/core_ext/array/wrap_test.rb b/activesupport/test/core_ext/array/wrap_test.rb index ae846cb3f265..451f9db2edf1 100644 --- a/activesupport/test/core_ext/array/wrap_test.rb +++ b/activesupport/test/core_ext/array/wrap_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/array" diff --git a/activesupport/test/core_ext/bigdecimal_test.rb b/activesupport/test/core_ext/bigdecimal_test.rb index 43b659546f71..dbd0762574e6 100644 --- a/activesupport/test/core_ext/bigdecimal_test.rb +++ b/activesupport/test/core_ext/bigdecimal_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/big_decimal" diff --git a/activesupport/test/core_ext/class/attribute_test.rb b/activesupport/test/core_ext/class/attribute_test.rb index f16043c612a0..2933b62c58bd 100644 --- a/activesupport/test/core_ext/class/attribute_test.rb +++ b/activesupport/test/core_ext/class/attribute_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/class/attribute" diff --git a/activesupport/test/core_ext/class_test.rb b/activesupport/test/core_ext/class_test.rb index a7905196ae3d..c0cabea8fd65 100644 --- a/activesupport/test/core_ext/class_test.rb +++ b/activesupport/test/core_ext/class_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/class" require "set" diff --git a/activesupport/test/core_ext/date_and_time_behavior.rb b/activesupport/test/core_ext/date_and_time_behavior.rb index 6c77e8f3136e..8d908968ef8b 100644 --- a/activesupport/test/core_ext/date_and_time_behavior.rb +++ b/activesupport/test/core_ext/date_and_time_behavior.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module DateAndTimeBehavior diff --git a/activesupport/test/core_ext/date_and_time_compatibility_test.rb b/activesupport/test/core_ext/date_and_time_compatibility_test.rb index 6c6205a4d2d3..04b93105d5ec 100644 --- a/activesupport/test/core_ext/date_and_time_compatibility_test.rb +++ b/activesupport/test/core_ext/date_and_time_compatibility_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/time" require "time_zone_test_helpers" diff --git a/activesupport/test/core_ext/date_ext_test.rb b/activesupport/test/core_ext/date_ext_test.rb index 50bb1004f7c4..7c6e70593600 100644 --- a/activesupport/test/core_ext/date_ext_test.rb +++ b/activesupport/test/core_ext/date_ext_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/time" require "core_ext/date_and_time_behavior" diff --git a/activesupport/test/core_ext/date_time_ext_test.rb b/activesupport/test/core_ext/date_time_ext_test.rb index 276fa2bfd3aa..beddfe458471 100644 --- a/activesupport/test/core_ext/date_time_ext_test.rb +++ b/activesupport/test/core_ext/date_time_ext_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/time" require "core_ext/date_and_time_behavior" diff --git a/activesupport/test/core_ext/digest/uuid_test.rb b/activesupport/test/core_ext/digest/uuid_test.rb index 866a03259a20..ea3605bf9c59 100644 --- a/activesupport/test/core_ext/digest/uuid_test.rb +++ b/activesupport/test/core_ext/digest/uuid_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/digest/uuid" diff --git a/activesupport/test/core_ext/duration_test.rb b/activesupport/test/core_ext/duration_test.rb index cd1b505c3489..32c0ce43175b 100644 --- a/activesupport/test/core_ext/duration_test.rb +++ b/activesupport/test/core_ext/duration_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/inflector" require "active_support/time" diff --git a/activesupport/test/core_ext/enumerable_test.rb b/activesupport/test/core_ext/enumerable_test.rb index 0b345ecf0fa8..3259109b0e6f 100644 --- a/activesupport/test/core_ext/enumerable_test.rb +++ b/activesupport/test/core_ext/enumerable_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/array" require "active_support/core_ext/enumerable" diff --git a/activesupport/test/core_ext/file_test.rb b/activesupport/test/core_ext/file_test.rb index df5d09acd021..67b1a04429e7 100644 --- a/activesupport/test/core_ext/file_test.rb +++ b/activesupport/test/core_ext/file_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/file" diff --git a/activesupport/test/core_ext/hash/transform_keys_test.rb b/activesupport/test/core_ext/hash/transform_keys_test.rb index 7a11d827f8e7..f329246bdd0c 100644 --- a/activesupport/test/core_ext/hash/transform_keys_test.rb +++ b/activesupport/test/core_ext/hash/transform_keys_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/hash/keys" diff --git a/activesupport/test/core_ext/hash/transform_values_test.rb b/activesupport/test/core_ext/hash/transform_values_test.rb index f2ac4ce6cecb..4eb6999510d7 100644 --- a/activesupport/test/core_ext/hash/transform_values_test.rb +++ b/activesupport/test/core_ext/hash/transform_values_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/hash/indifferent_access" require "active_support/core_ext/hash/transform_values" diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb index 18da5fcf5f85..c533c002a4d9 100644 --- a/activesupport/test/core_ext/hash_ext_test.rb +++ b/activesupport/test/core_ext/hash_ext_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/hash" require "bigdecimal" diff --git a/activesupport/test/core_ext/integer_ext_test.rb b/activesupport/test/core_ext/integer_ext_test.rb index 137e8ce85f75..a7ea084e7f2d 100644 --- a/activesupport/test/core_ext/integer_ext_test.rb +++ b/activesupport/test/core_ext/integer_ext_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/integer" diff --git a/activesupport/test/core_ext/kernel/concern_test.rb b/activesupport/test/core_ext/kernel/concern_test.rb index e7e4f99d7e64..1f4fb8029cf5 100644 --- a/activesupport/test/core_ext/kernel/concern_test.rb +++ b/activesupport/test/core_ext/kernel/concern_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/kernel/concern" diff --git a/activesupport/test/core_ext/kernel_test.rb b/activesupport/test/core_ext/kernel_test.rb index 26f5088ede59..875598f61160 100644 --- a/activesupport/test/core_ext/kernel_test.rb +++ b/activesupport/test/core_ext/kernel_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/kernel" diff --git a/activesupport/test/core_ext/load_error_test.rb b/activesupport/test/core_ext/load_error_test.rb index 44ff6bb051ac..3d003fd1d5ea 100644 --- a/activesupport/test/core_ext/load_error_test.rb +++ b/activesupport/test/core_ext/load_error_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/load_error" diff --git a/activesupport/test/core_ext/marshal_test.rb b/activesupport/test/core_ext/marshal_test.rb index cabeed2fae70..d17a6fe7f1fc 100644 --- a/activesupport/test/core_ext/marshal_test.rb +++ b/activesupport/test/core_ext/marshal_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/marshal" require "dependencies_test_helpers" diff --git a/activesupport/test/core_ext/module/anonymous_test.rb b/activesupport/test/core_ext/module/anonymous_test.rb index f885444284b3..d667bc0a3420 100644 --- a/activesupport/test/core_ext/module/anonymous_test.rb +++ b/activesupport/test/core_ext/module/anonymous_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/module/anonymous" diff --git a/activesupport/test/core_ext/module/attr_internal_test.rb b/activesupport/test/core_ext/module/attr_internal_test.rb index 8458e278ee64..12dc2f101af4 100644 --- a/activesupport/test/core_ext/module/attr_internal_test.rb +++ b/activesupport/test/core_ext/module/attr_internal_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/module/attr_internal" diff --git a/activesupport/test/core_ext/module/attribute_accessor_per_thread_test.rb b/activesupport/test/core_ext/module/attribute_accessor_per_thread_test.rb index af240bc38dde..e8587e342457 100644 --- a/activesupport/test/core_ext/module/attribute_accessor_per_thread_test.rb +++ b/activesupport/test/core_ext/module/attribute_accessor_per_thread_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/module/attribute_accessors_per_thread" diff --git a/activesupport/test/core_ext/module/attribute_accessor_test.rb b/activesupport/test/core_ext/module/attribute_accessor_test.rb index 9b185e938197..2cf33fcc1256 100644 --- a/activesupport/test/core_ext/module/attribute_accessor_test.rb +++ b/activesupport/test/core_ext/module/attribute_accessor_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/module/attribute_accessors" diff --git a/activesupport/test/core_ext/module/attribute_aliasing_test.rb b/activesupport/test/core_ext/module/attribute_aliasing_test.rb index fdfa86885141..9e5edda77a00 100644 --- a/activesupport/test/core_ext/module/attribute_aliasing_test.rb +++ b/activesupport/test/core_ext/module/attribute_aliasing_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/module/aliasing" diff --git a/activesupport/test/core_ext/module/concerning_test.rb b/activesupport/test/core_ext/module/concerning_test.rb index 098036828adb..64accc06fc53 100644 --- a/activesupport/test/core_ext/module/concerning_test.rb +++ b/activesupport/test/core_ext/module/concerning_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/module/concerning" diff --git a/activesupport/test/core_ext/module/introspection_test.rb b/activesupport/test/core_ext/module/introspection_test.rb index db383850cd29..589c9455ed0d 100644 --- a/activesupport/test/core_ext/module/introspection_test.rb +++ b/activesupport/test/core_ext/module/introspection_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/module/introspection" diff --git a/activesupport/test/core_ext/module/reachable_test.rb b/activesupport/test/core_ext/module/reachable_test.rb index 487c7dee1637..f8970bc9f40d 100644 --- a/activesupport/test/core_ext/module/reachable_test.rb +++ b/activesupport/test/core_ext/module/reachable_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/module/reachable" diff --git a/activesupport/test/core_ext/module/remove_method_test.rb b/activesupport/test/core_ext/module/remove_method_test.rb index 0c627f1e74ad..327c66e3eca2 100644 --- a/activesupport/test/core_ext/module/remove_method_test.rb +++ b/activesupport/test/core_ext/module/remove_method_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/module/remove_method" diff --git a/activesupport/test/core_ext/module_test.rb b/activesupport/test/core_ext/module_test.rb index a4d4444d6964..b683c4e1105f 100644 --- a/activesupport/test/core_ext/module_test.rb +++ b/activesupport/test/core_ext/module_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/module" diff --git a/activesupport/test/core_ext/name_error_test.rb b/activesupport/test/core_ext/name_error_test.rb index fdb9493d3c83..a99b20602d32 100644 --- a/activesupport/test/core_ext/name_error_test.rb +++ b/activesupport/test/core_ext/name_error_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/name_error" diff --git a/activesupport/test/core_ext/numeric_ext_test.rb b/activesupport/test/core_ext/numeric_ext_test.rb index 3cfbe6e7e672..d4e03a90a4eb 100644 --- a/activesupport/test/core_ext/numeric_ext_test.rb +++ b/activesupport/test/core_ext/numeric_ext_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/time" require "active_support/core_ext/numeric" diff --git a/activesupport/test/core_ext/object/acts_like_test.rb b/activesupport/test/core_ext/object/acts_like_test.rb index 631f4e63a8b5..1f1b71f748ff 100644 --- a/activesupport/test/core_ext/object/acts_like_test.rb +++ b/activesupport/test/core_ext/object/acts_like_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/object" diff --git a/activesupport/test/core_ext/object/blank_test.rb b/activesupport/test/core_ext/object/blank_test.rb index 7fd3fed0428a..fbd96893f649 100644 --- a/activesupport/test/core_ext/object/blank_test.rb +++ b/activesupport/test/core_ext/object/blank_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/object/blank" diff --git a/activesupport/test/core_ext/object/deep_dup_test.rb b/activesupport/test/core_ext/object/deep_dup_test.rb index f247ee16deb5..d6f0a71c5b50 100644 --- a/activesupport/test/core_ext/object/deep_dup_test.rb +++ b/activesupport/test/core_ext/object/deep_dup_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/object" diff --git a/activesupport/test/core_ext/object/duplicable_test.rb b/activesupport/test/core_ext/object/duplicable_test.rb index 68b01299809a..7607e98b0c5b 100644 --- a/activesupport/test/core_ext/object/duplicable_test.rb +++ b/activesupport/test/core_ext/object/duplicable_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "bigdecimal" require "active_support/core_ext/object/duplicable" diff --git a/activesupport/test/core_ext/object/inclusion_test.rb b/activesupport/test/core_ext/object/inclusion_test.rb index 955686d6aac9..b706e6b90f22 100644 --- a/activesupport/test/core_ext/object/inclusion_test.rb +++ b/activesupport/test/core_ext/object/inclusion_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/object/inclusion" diff --git a/activesupport/test/core_ext/object/instance_variables_test.rb b/activesupport/test/core_ext/object/instance_variables_test.rb index 5bdb2fbc35a1..df38282fb0cd 100644 --- a/activesupport/test/core_ext/object/instance_variables_test.rb +++ b/activesupport/test/core_ext/object/instance_variables_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/object" diff --git a/activesupport/test/core_ext/object/json_cherry_pick_test.rb b/activesupport/test/core_ext/object/json_cherry_pick_test.rb index dd4e90918e18..9f3f92a74b99 100644 --- a/activesupport/test/core_ext/object/json_cherry_pick_test.rb +++ b/activesupport/test/core_ext/object/json_cherry_pick_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" # These test cases were added to test that cherry-picking the json extensions diff --git a/activesupport/test/core_ext/object/json_gem_encoding_test.rb b/activesupport/test/core_ext/object/json_gem_encoding_test.rb index f5016d0c2ae7..3ff34e448ea1 100644 --- a/activesupport/test/core_ext/object/json_gem_encoding_test.rb +++ b/activesupport/test/core_ext/object/json_gem_encoding_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "json" require "json/encoding_test_cases" diff --git a/activesupport/test/core_ext/object/to_param_test.rb b/activesupport/test/core_ext/object/to_param_test.rb index 56246b24f322..e446092abeec 100644 --- a/activesupport/test/core_ext/object/to_param_test.rb +++ b/activesupport/test/core_ext/object/to_param_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/object/to_param" diff --git a/activesupport/test/core_ext/object/to_query_test.rb b/activesupport/test/core_ext/object/to_query_test.rb index 298c8bf373d7..44147d47cfdf 100644 --- a/activesupport/test/core_ext/object/to_query_test.rb +++ b/activesupport/test/core_ext/object/to_query_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/ordered_hash" require "active_support/core_ext/object/to_query" diff --git a/activesupport/test/core_ext/object/try_test.rb b/activesupport/test/core_ext/object/try_test.rb index 5c8bf59952fe..fe437f626068 100644 --- a/activesupport/test/core_ext/object/try_test.rb +++ b/activesupport/test/core_ext/object/try_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/object" diff --git a/activesupport/test/core_ext/range_ext_test.rb b/activesupport/test/core_ext/range_ext_test.rb index d166c7309ce3..693de2755dd2 100644 --- a/activesupport/test/core_ext/range_ext_test.rb +++ b/activesupport/test/core_ext/range_ext_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/time" require "active_support/core_ext/numeric" diff --git a/activesupport/test/core_ext/regexp_ext_test.rb b/activesupport/test/core_ext/regexp_ext_test.rb index e569a9f23439..c937dad1db5c 100644 --- a/activesupport/test/core_ext/regexp_ext_test.rb +++ b/activesupport/test/core_ext/regexp_ext_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/regexp" diff --git a/activesupport/test/core_ext/secure_random_test.rb b/activesupport/test/core_ext/secure_random_test.rb index fc25f6ab41f4..b2ac4640abb2 100644 --- a/activesupport/test/core_ext/secure_random_test.rb +++ b/activesupport/test/core_ext/secure_random_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/securerandom" diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb index a98951e88990..ed5854b8ffae 100644 --- a/activesupport/test/core_ext/string_ext_test.rb +++ b/activesupport/test/core_ext/string_ext_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" require "abstract_unit" require "timeout" diff --git a/activesupport/test/core_ext/time_ext_test.rb b/activesupport/test/core_ext/time_ext_test.rb index 625a5bffb87b..f1c6fa4f8c2e 100644 --- a/activesupport/test/core_ext/time_ext_test.rb +++ b/activesupport/test/core_ext/time_ext_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/time" require "core_ext/date_and_time_behavior" diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb index 70ae793cda02..9401b9be0760 100644 --- a/activesupport/test/core_ext/time_with_zone_test.rb +++ b/activesupport/test/core_ext/time_with_zone_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/time" require "time_zone_test_helpers" diff --git a/activesupport/test/core_ext/uri_ext_test.rb b/activesupport/test/core_ext/uri_ext_test.rb index 0f13ca9c0e79..555716d1c323 100644 --- a/activesupport/test/core_ext/uri_ext_test.rb +++ b/activesupport/test/core_ext/uri_ext_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "uri" require "active_support/core_ext/uri" diff --git a/activesupport/test/current_attributes_test.rb b/activesupport/test/current_attributes_test.rb index 67ef6ef61973..f19578713591 100644 --- a/activesupport/test/current_attributes_test.rb +++ b/activesupport/test/current_attributes_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class CurrentAttributesTest < ActiveSupport::TestCase diff --git a/activesupport/test/dependencies/check_warnings.rb b/activesupport/test/dependencies/check_warnings.rb index 03c3dca1d62b..d177dce29585 100644 --- a/activesupport/test/dependencies/check_warnings.rb +++ b/activesupport/test/dependencies/check_warnings.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true $check_warnings_load_count += 1 $checked_verbose = $VERBOSE diff --git a/activesupport/test/dependencies/conflict.rb b/activesupport/test/dependencies/conflict.rb index 7eff49bbfa2c..a7199a093b4c 100644 --- a/activesupport/test/dependencies/conflict.rb +++ b/activesupport/test/dependencies/conflict.rb @@ -1 +1,2 @@ +# frozen_string_literal: true Conflict = 1 diff --git a/activesupport/test/dependencies/cross_site_depender.rb b/activesupport/test/dependencies/cross_site_depender.rb index fbc3b64f56ca..b414058e2786 100644 --- a/activesupport/test/dependencies/cross_site_depender.rb +++ b/activesupport/test/dependencies/cross_site_depender.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CrossSiteDepender CrossSiteDependency end diff --git a/activesupport/test/dependencies/mutual_one.rb b/activesupport/test/dependencies/mutual_one.rb index 05f08f82d378..f739ce274481 100644 --- a/activesupport/test/dependencies/mutual_one.rb +++ b/activesupport/test/dependencies/mutual_one.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true $mutual_dependencies_count += 1 require_dependency "mutual_two" require_dependency "mutual_two.rb" diff --git a/activesupport/test/dependencies/mutual_two.rb b/activesupport/test/dependencies/mutual_two.rb index 1d87d334af20..30034be6d1ed 100644 --- a/activesupport/test/dependencies/mutual_two.rb +++ b/activesupport/test/dependencies/mutual_two.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true $mutual_dependencies_count += 1 require_dependency "mutual_one.rb" require_dependency "mutual_one" diff --git a/activesupport/test/dependencies/raises_exception.rb b/activesupport/test/dependencies/raises_exception.rb index 0a56680fe38e..ce9050e57251 100644 --- a/activesupport/test/dependencies/raises_exception.rb +++ b/activesupport/test/dependencies/raises_exception.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true $raises_exception_load_count += 1 raise Exception, "Loading me failed, so do not add to loaded or history." $raises_exception_load_count += 1 diff --git a/activesupport/test/dependencies/raises_exception_without_blame_file.rb b/activesupport/test/dependencies/raises_exception_without_blame_file.rb index 7c3856b1e610..7fb2a5c8bc85 100644 --- a/activesupport/test/dependencies/raises_exception_without_blame_file.rb +++ b/activesupport/test/dependencies/raises_exception_without_blame_file.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true exception = Exception.new("I am not blamable!") class << exception undef_method(:blame_file!) diff --git a/activesupport/test/dependencies/requires_nonexistent0.rb b/activesupport/test/dependencies/requires_nonexistent0.rb index 7f8a0d841972..86a66203f84e 100644 --- a/activesupport/test/dependencies/requires_nonexistent0.rb +++ b/activesupport/test/dependencies/requires_nonexistent0.rb @@ -1 +1,2 @@ +# frozen_string_literal: true require "RMagickDontExistDude" diff --git a/activesupport/test/dependencies/requires_nonexistent1.rb b/activesupport/test/dependencies/requires_nonexistent1.rb index 0055177d6708..a3ec7ce4ef86 100644 --- a/activesupport/test/dependencies/requires_nonexistent1.rb +++ b/activesupport/test/dependencies/requires_nonexistent1.rb @@ -1 +1,2 @@ +# frozen_string_literal: true require_dependency "requires_nonexistent0" diff --git a/activesupport/test/dependencies/service_one.rb b/activesupport/test/dependencies/service_one.rb index afc304226902..614929774114 100644 --- a/activesupport/test/dependencies/service_one.rb +++ b/activesupport/test/dependencies/service_one.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true $loaded_service_one ||= 0 $loaded_service_one += 1 diff --git a/activesupport/test/dependencies/service_two.rb b/activesupport/test/dependencies/service_two.rb index aabfc3c553fc..4c013f1fe385 100644 --- a/activesupport/test/dependencies/service_two.rb +++ b/activesupport/test/dependencies/service_two.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class ServiceTwo end diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb index 1ea36418ff0e..1aad7fc0ec8a 100644 --- a/activesupport/test/dependencies_test.rb +++ b/activesupport/test/dependencies_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "pp" require "active_support/dependencies" diff --git a/activesupport/test/dependencies_test_helpers.rb b/activesupport/test/dependencies_test_helpers.rb index 451195a143ba..9ba8f3b9b57a 100644 --- a/activesupport/test/dependencies_test_helpers.rb +++ b/activesupport/test/dependencies_test_helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module DependenciesTestHelpers def with_loading(*from) old_mechanism, ActiveSupport::Dependencies.mechanism = ActiveSupport::Dependencies.mechanism, :load diff --git a/activesupport/test/deprecation/method_wrappers_test.rb b/activesupport/test/deprecation/method_wrappers_test.rb index 85d057bb022e..33ce4aaeca78 100644 --- a/activesupport/test/deprecation/method_wrappers_test.rb +++ b/activesupport/test/deprecation/method_wrappers_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/deprecation" diff --git a/activesupport/test/deprecation/proxy_wrappers_test.rb b/activesupport/test/deprecation/proxy_wrappers_test.rb index 67afd75c44d1..ff38a8165dd3 100644 --- a/activesupport/test/deprecation/proxy_wrappers_test.rb +++ b/activesupport/test/deprecation/proxy_wrappers_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/deprecation" diff --git a/activesupport/test/deprecation_test.rb b/activesupport/test/deprecation_test.rb index 257cb50fb2e7..22e0ef9afc78 100644 --- a/activesupport/test/deprecation_test.rb +++ b/activesupport/test/deprecation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/testing/stream" diff --git a/activesupport/test/descendants_tracker_test_cases.rb b/activesupport/test/descendants_tracker_test_cases.rb index cf349d53ee4a..abae3f588032 100644 --- a/activesupport/test/descendants_tracker_test_cases.rb +++ b/activesupport/test/descendants_tracker_test_cases.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "set" module DescendantsTrackerTestCases diff --git a/activesupport/test/descendants_tracker_with_autoloading_test.rb b/activesupport/test/descendants_tracker_with_autoloading_test.rb index e202667a8a05..021093956fd4 100644 --- a/activesupport/test/descendants_tracker_with_autoloading_test.rb +++ b/activesupport/test/descendants_tracker_with_autoloading_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/descendants_tracker" require "active_support/dependencies" diff --git a/activesupport/test/descendants_tracker_without_autoloading_test.rb b/activesupport/test/descendants_tracker_without_autoloading_test.rb index 72adc30aceee..cadd21be92c2 100644 --- a/activesupport/test/descendants_tracker_without_autoloading_test.rb +++ b/activesupport/test/descendants_tracker_without_autoloading_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/descendants_tracker" require "descendants_tracker_test_cases" diff --git a/activesupport/test/evented_file_update_checker_test.rb b/activesupport/test/evented_file_update_checker_test.rb index f33a5f576451..9450bcb814fb 100644 --- a/activesupport/test/evented_file_update_checker_test.rb +++ b/activesupport/test/evented_file_update_checker_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "pathname" require "file_update_checker_shared_tests" diff --git a/activesupport/test/executor_test.rb b/activesupport/test/executor_test.rb index 7fefc066b33f..c522ea9b5279 100644 --- a/activesupport/test/executor_test.rb +++ b/activesupport/test/executor_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ExecutorTest < ActiveSupport::TestCase diff --git a/activesupport/test/file_update_checker_shared_tests.rb b/activesupport/test/file_update_checker_shared_tests.rb index 361e7e2349ea..90ef886b08c5 100644 --- a/activesupport/test/file_update_checker_shared_tests.rb +++ b/activesupport/test/file_update_checker_shared_tests.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "fileutils" module FileUpdateCheckerSharedTests diff --git a/activesupport/test/file_update_checker_test.rb b/activesupport/test/file_update_checker_test.rb index 55b0b4664473..5a4e3bebf264 100644 --- a/activesupport/test/file_update_checker_test.rb +++ b/activesupport/test/file_update_checker_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "file_update_checker_shared_tests" diff --git a/activesupport/test/fixtures/autoload/another_class.rb b/activesupport/test/fixtures/autoload/another_class.rb index ab6e075ab47f..f61698823cdb 100644 --- a/activesupport/test/fixtures/autoload/another_class.rb +++ b/activesupport/test/fixtures/autoload/another_class.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class Fixtures::AnotherClass end diff --git a/activesupport/test/fixtures/autoload/some_class.rb b/activesupport/test/fixtures/autoload/some_class.rb index 30d41eb0bf3d..a3b5f831add9 100644 --- a/activesupport/test/fixtures/autoload/some_class.rb +++ b/activesupport/test/fixtures/autoload/some_class.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class Fixtures::Autoload::SomeClass end diff --git a/activesupport/test/gzip_test.rb b/activesupport/test/gzip_test.rb index 33e0cd2a04c9..592578fedd02 100644 --- a/activesupport/test/gzip_test.rb +++ b/activesupport/test/gzip_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/object/blank" diff --git a/activesupport/test/hash_with_indifferent_access_test.rb b/activesupport/test/hash_with_indifferent_access_test.rb index d68add46cd91..b71839a5a227 100644 --- a/activesupport/test/hash_with_indifferent_access_test.rb +++ b/activesupport/test/hash_with_indifferent_access_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/hash" require "bigdecimal" diff --git a/activesupport/test/i18n_test.rb b/activesupport/test/i18n_test.rb index 7d88d2dc6bc6..58ccbdf108ca 100644 --- a/activesupport/test/i18n_test.rb +++ b/activesupport/test/i18n_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/time" require "active_support/core_ext/array/conversions" diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb index ef956eda9014..b22054ebee60 100644 --- a/activesupport/test/inflector_test.rb +++ b/activesupport/test/inflector_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/inflector" diff --git a/activesupport/test/inflector_test_cases.rb b/activesupport/test/inflector_test_cases.rb index d61ca3fc1868..9b0d2867c2d3 100644 --- a/activesupport/test/inflector_test_cases.rb +++ b/activesupport/test/inflector_test_cases.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module InflectorTestCases SingularToPlural = { "search" => "searches", diff --git a/activesupport/test/json/decoding_test.rb b/activesupport/test/json/decoding_test.rb index 6f5051c31295..52687a003f8f 100644 --- a/activesupport/test/json/decoding_test.rb +++ b/activesupport/test/json/decoding_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/json" require "active_support/time" diff --git a/activesupport/test/json/encoding_test.rb b/activesupport/test/json/encoding_test.rb index 6d8f7cfbd044..314c11b2fcda 100644 --- a/activesupport/test/json/encoding_test.rb +++ b/activesupport/test/json/encoding_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "securerandom" require "abstract_unit" require "active_support/core_ext/string/inflections" diff --git a/activesupport/test/json/encoding_test_cases.rb b/activesupport/test/json/encoding_test_cases.rb index 7e4775cec8f3..2b64aa624deb 100644 --- a/activesupport/test/json/encoding_test_cases.rb +++ b/activesupport/test/json/encoding_test_cases.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "bigdecimal" require "date" require "time" diff --git a/activesupport/test/key_generator_test.rb b/activesupport/test/key_generator_test.rb index 89db9563ac72..ae7018274a0d 100644 --- a/activesupport/test/key_generator_test.rb +++ b/activesupport/test/key_generator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" begin diff --git a/activesupport/test/lazy_load_hooks_test.rb b/activesupport/test/lazy_load_hooks_test.rb index 3b1959a1c9f9..761fe460940e 100644 --- a/activesupport/test/lazy_load_hooks_test.rb +++ b/activesupport/test/lazy_load_hooks_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class LazyLoadHooksTest < ActiveSupport::TestCase diff --git a/activesupport/test/log_subscriber_test.rb b/activesupport/test/log_subscriber_test.rb index f6496ef7d6a0..f30932452fb7 100644 --- a/activesupport/test/log_subscriber_test.rb +++ b/activesupport/test/log_subscriber_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/log_subscriber/test_helper" diff --git a/activesupport/test/logger_test.rb b/activesupport/test/logger_test.rb index 3f0478340160..6b698ede6740 100644 --- a/activesupport/test/logger_test.rb +++ b/activesupport/test/logger_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "multibyte_test_helpers" require "stringio" diff --git a/activesupport/test/message_encryptor_test.rb b/activesupport/test/message_encryptor_test.rb index 4c3515b5e11d..33ab7620da08 100644 --- a/activesupport/test/message_encryptor_test.rb +++ b/activesupport/test/message_encryptor_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "openssl" require "active_support/time" diff --git a/activesupport/test/message_verifier_test.rb b/activesupport/test/message_verifier_test.rb index d6109c761d9d..d2964aeb7e50 100644 --- a/activesupport/test/message_verifier_test.rb +++ b/activesupport/test/message_verifier_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "openssl" require "active_support/time" diff --git a/activesupport/test/multibyte_chars_test.rb b/activesupport/test/multibyte_chars_test.rb index d80d3409866f..5d1743db1daa 100644 --- a/activesupport/test/multibyte_chars_test.rb +++ b/activesupport/test/multibyte_chars_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "multibyte_test_helpers" require "active_support/core_ext/string/multibyte" diff --git a/activesupport/test/multibyte_conformance_test.rb b/activesupport/test/multibyte_conformance_test.rb index ef1a26135f29..be89c85c79f8 100644 --- a/activesupport/test/multibyte_conformance_test.rb +++ b/activesupport/test/multibyte_conformance_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "multibyte_test_helpers" diff --git a/activesupport/test/multibyte_grapheme_break_conformance_test.rb b/activesupport/test/multibyte_grapheme_break_conformance_test.rb index b3328987aedb..855626e77945 100644 --- a/activesupport/test/multibyte_grapheme_break_conformance_test.rb +++ b/activesupport/test/multibyte_grapheme_break_conformance_test.rb @@ -1,4 +1,5 @@ # encoding: utf-8 +# frozen_string_literal: true require "abstract_unit" require "multibyte_test_helpers" diff --git a/activesupport/test/multibyte_normalization_conformance_test.rb b/activesupport/test/multibyte_normalization_conformance_test.rb index ebc9f92d23ce..deb94a7aa35c 100644 --- a/activesupport/test/multibyte_normalization_conformance_test.rb +++ b/activesupport/test/multibyte_normalization_conformance_test.rb @@ -1,4 +1,5 @@ # encoding: utf-8 +# frozen_string_literal: true require "abstract_unit" require "multibyte_test_helpers" diff --git a/activesupport/test/multibyte_proxy_test.rb b/activesupport/test/multibyte_proxy_test.rb index c303097f80c4..27d5cea836f5 100644 --- a/activesupport/test/multibyte_proxy_test.rb +++ b/activesupport/test/multibyte_proxy_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class MultibyteProxyText < ActiveSupport::TestCase diff --git a/activesupport/test/multibyte_test_helpers.rb b/activesupport/test/multibyte_test_helpers.rb index a70516bb0823..8e7587fa4eb3 100644 --- a/activesupport/test/multibyte_test_helpers.rb +++ b/activesupport/test/multibyte_test_helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module MultibyteTestHelpers class Downloader def self.download(from, to) diff --git a/activesupport/test/multibyte_unicode_database_test.rb b/activesupport/test/multibyte_unicode_database_test.rb index 372478293083..0defa6dc54b1 100644 --- a/activesupport/test/multibyte_unicode_database_test.rb +++ b/activesupport/test/multibyte_unicode_database_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class MultibyteUnicodeDatabaseTest < ActiveSupport::TestCase diff --git a/activesupport/test/notifications/evented_notification_test.rb b/activesupport/test/notifications/evented_notification_test.rb index 24c5befec336..1fd50d540bcc 100644 --- a/activesupport/test/notifications/evented_notification_test.rb +++ b/activesupport/test/notifications/evented_notification_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" module ActiveSupport diff --git a/activesupport/test/notifications/instrumenter_test.rb b/activesupport/test/notifications/instrumenter_test.rb index 7eacc5cbe78b..122afa1caebe 100644 --- a/activesupport/test/notifications/instrumenter_test.rb +++ b/activesupport/test/notifications/instrumenter_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/notifications/instrumenter" diff --git a/activesupport/test/notifications_test.rb b/activesupport/test/notifications_test.rb index 11f743519f7a..d92c059f364d 100644 --- a/activesupport/test/notifications_test.rb +++ b/activesupport/test/notifications_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/module/delegation" diff --git a/activesupport/test/number_helper_i18n_test.rb b/activesupport/test/number_helper_i18n_test.rb index a1d1c41dc289..b5ac343390b7 100644 --- a/activesupport/test/number_helper_i18n_test.rb +++ b/activesupport/test/number_helper_i18n_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/number_helper" require "active_support/core_ext/hash/keys" diff --git a/activesupport/test/number_helper_test.rb b/activesupport/test/number_helper_test.rb index 4caf1428ead3..db99ba649feb 100644 --- a/activesupport/test/number_helper_test.rb +++ b/activesupport/test/number_helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/number_helper" require "active_support/core_ext/string/output_safety" diff --git a/activesupport/test/option_merger_test.rb b/activesupport/test/option_merger_test.rb index c5a6d304eec7..90291d6ea8cf 100644 --- a/activesupport/test/option_merger_test.rb +++ b/activesupport/test/option_merger_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/object/with_options" diff --git a/activesupport/test/ordered_hash_test.rb b/activesupport/test/ordered_hash_test.rb index 2cefab383226..5d7b83d7a2e2 100644 --- a/activesupport/test/ordered_hash_test.rb +++ b/activesupport/test/ordered_hash_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/json" require "active_support/core_ext/object/json" diff --git a/activesupport/test/ordered_options_test.rb b/activesupport/test/ordered_options_test.rb index 04179112894b..7ff8e01540aa 100644 --- a/activesupport/test/ordered_options_test.rb +++ b/activesupport/test/ordered_options_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/ordered_options" diff --git a/activesupport/test/reloader_test.rb b/activesupport/test/reloader_test.rb index bdd80307c7cc..8dafbff04cb7 100644 --- a/activesupport/test/reloader_test.rb +++ b/activesupport/test/reloader_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class ReloaderTest < ActiveSupport::TestCase diff --git a/activesupport/test/rescuable_test.rb b/activesupport/test/rescuable_test.rb index 3bdd1651e7cc..96ed3718aff4 100644 --- a/activesupport/test/rescuable_test.rb +++ b/activesupport/test/rescuable_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class WraithAttack < StandardError diff --git a/activesupport/test/safe_buffer_test.rb b/activesupport/test/safe_buffer_test.rb index 36c068b91fae..5a0f6539a4e1 100644 --- a/activesupport/test/safe_buffer_test.rb +++ b/activesupport/test/safe_buffer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/string/inflections" require "yaml" diff --git a/activesupport/test/security_utils_test.rb b/activesupport/test/security_utils_test.rb index e8f762da228b..34f2eea919b9 100644 --- a/activesupport/test/security_utils_test.rb +++ b/activesupport/test/security_utils_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/security_utils" diff --git a/activesupport/test/share_lock_test.rb b/activesupport/test/share_lock_test.rb index a5970591fad9..7d850b475740 100644 --- a/activesupport/test/share_lock_test.rb +++ b/activesupport/test/share_lock_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "concurrent/atomic/count_down_latch" require "active_support/concurrency/share_lock" diff --git a/activesupport/test/string_inquirer_test.rb b/activesupport/test/string_inquirer_test.rb index 79a715349c5a..ba9791886d20 100644 --- a/activesupport/test/string_inquirer_test.rb +++ b/activesupport/test/string_inquirer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class StringInquirerTest < ActiveSupport::TestCase diff --git a/activesupport/test/subscriber_test.rb b/activesupport/test/subscriber_test.rb index 9127da35d43d..33f89d237e42 100644 --- a/activesupport/test/subscriber_test.rb +++ b/activesupport/test/subscriber_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/subscriber" diff --git a/activesupport/test/tagged_logging_test.rb b/activesupport/test/tagged_logging_test.rb index 2469e827d434..e35ddba74bdb 100644 --- a/activesupport/test/tagged_logging_test.rb +++ b/activesupport/test/tagged_logging_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/logger" require "active_support/tagged_logging" diff --git a/activesupport/test/test_case_test.rb b/activesupport/test/test_case_test.rb index 40dfbe25429b..bc83fc3f0747 100644 --- a/activesupport/test/test_case_test.rb +++ b/activesupport/test/test_case_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class AssertDifferenceTest < ActiveSupport::TestCase diff --git a/activesupport/test/testing/constant_lookup_test.rb b/activesupport/test/testing/constant_lookup_test.rb index 00e69fcdb5c6..02ef708a6302 100644 --- a/activesupport/test/testing/constant_lookup_test.rb +++ b/activesupport/test/testing/constant_lookup_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "dependencies_test_helpers" diff --git a/activesupport/test/testing/file_fixtures_test.rb b/activesupport/test/testing/file_fixtures_test.rb index 9f28252c31e8..cc00e7f113e7 100644 --- a/activesupport/test/testing/file_fixtures_test.rb +++ b/activesupport/test/testing/file_fixtures_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "pathname" diff --git a/activesupport/test/testing/method_call_assertions_test.rb b/activesupport/test/testing/method_call_assertions_test.rb index 7887933b1550..3912c19b809b 100644 --- a/activesupport/test/testing/method_call_assertions_test.rb +++ b/activesupport/test/testing/method_call_assertions_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/testing/method_call_assertions" diff --git a/activesupport/test/time_travel_test.rb b/activesupport/test/time_travel_test.rb index 9d354f14f4b9..616015b74e33 100644 --- a/activesupport/test/time_travel_test.rb +++ b/activesupport/test/time_travel_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/date_time" require "active_support/core_ext/numeric/time" diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb index de111cc40e6e..f1a1e44a8fdd 100644 --- a/activesupport/test/time_zone_test.rb +++ b/activesupport/test/time_zone_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/time" require "time_zone_test_helpers" diff --git a/activesupport/test/time_zone_test_helpers.rb b/activesupport/test/time_zone_test_helpers.rb index e1d615d154f8..118dc38b5c98 100644 --- a/activesupport/test/time_zone_test_helpers.rb +++ b/activesupport/test/time_zone_test_helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module TimeZoneTestHelpers def with_tz_default(tz = nil) old_tz = Time.zone diff --git a/activesupport/test/transliterate_test.rb b/activesupport/test/transliterate_test.rb index 466b69bceff6..1359fe8a8d70 100644 --- a/activesupport/test/transliterate_test.rb +++ b/activesupport/test/transliterate_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/inflector/transliterate" diff --git a/activesupport/test/xml_mini/jdom_engine_test.rb b/activesupport/test/xml_mini/jdom_engine_test.rb index fc35ac113bfc..ae78a0e54783 100644 --- a/activesupport/test/xml_mini/jdom_engine_test.rb +++ b/activesupport/test/xml_mini/jdom_engine_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "xml_mini_engine_test" XMLMiniEngineTest.run_with_platform("java") do diff --git a/activesupport/test/xml_mini/libxml_engine_test.rb b/activesupport/test/xml_mini/libxml_engine_test.rb index f3394ad7f290..64ef5b61a1ce 100644 --- a/activesupport/test/xml_mini/libxml_engine_test.rb +++ b/activesupport/test/xml_mini/libxml_engine_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "xml_mini_engine_test" XMLMiniEngineTest.run_with_gem("libxml") do diff --git a/activesupport/test/xml_mini/libxmlsax_engine_test.rb b/activesupport/test/xml_mini/libxmlsax_engine_test.rb index f457e160d6ea..deeb01eefe0f 100644 --- a/activesupport/test/xml_mini/libxmlsax_engine_test.rb +++ b/activesupport/test/xml_mini/libxmlsax_engine_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "xml_mini_engine_test" XMLMiniEngineTest.run_with_gem("libxml") do diff --git a/activesupport/test/xml_mini/nokogiri_engine_test.rb b/activesupport/test/xml_mini/nokogiri_engine_test.rb index 3151e75fc06b..10062577f606 100644 --- a/activesupport/test/xml_mini/nokogiri_engine_test.rb +++ b/activesupport/test/xml_mini/nokogiri_engine_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "xml_mini_engine_test" XMLMiniEngineTest.run_with_gem("nokogiri") do diff --git a/activesupport/test/xml_mini/nokogirisax_engine_test.rb b/activesupport/test/xml_mini/nokogirisax_engine_test.rb index 7dafbdaf48d7..9d298b77d3eb 100644 --- a/activesupport/test/xml_mini/nokogirisax_engine_test.rb +++ b/activesupport/test/xml_mini/nokogirisax_engine_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "xml_mini_engine_test" XMLMiniEngineTest.run_with_gem("nokogiri") do diff --git a/activesupport/test/xml_mini/rexml_engine_test.rb b/activesupport/test/xml_mini/rexml_engine_test.rb index c51f0d3c2091..29a9dbfbebb1 100644 --- a/activesupport/test/xml_mini/rexml_engine_test.rb +++ b/activesupport/test/xml_mini/rexml_engine_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "xml_mini_engine_test" class REXMLEngineTest < XMLMiniEngineTest diff --git a/activesupport/test/xml_mini/xml_mini_engine_test.rb b/activesupport/test/xml_mini/xml_mini_engine_test.rb index 244e0b0d3a24..6e6be2ff0a8c 100644 --- a/activesupport/test/xml_mini/xml_mini_engine_test.rb +++ b/activesupport/test/xml_mini/xml_mini_engine_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/xml_mini" require "active_support/core_ext/hash/conversions" diff --git a/activesupport/test/xml_mini_test.rb b/activesupport/test/xml_mini_test.rb index b8caa1d74c0a..cf66e9ff41b8 100644 --- a/activesupport/test/xml_mini_test.rb +++ b/activesupport/test/xml_mini_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "active_support/xml_mini" require "active_support/builder" diff --git a/ci/travis.rb b/ci/travis.rb index bb87c8f4ad6a..6e64adcd88f0 100755 --- a/ci/travis.rb +++ b/ci/travis.rb @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true require "fileutils" include FileUtils diff --git a/guides/Rakefile b/guides/Rakefile index 3a6f10040f42..653255a6b509 100644 --- a/guides/Rakefile +++ b/guides/Rakefile @@ -1,3 +1,4 @@ +# frozen_string_literal: true namespace :guides do desc 'Generate guides (for authors), use ONLY=foo to process just "foo.md"' task generate: "generate:html" diff --git a/guides/bug_report_templates/action_controller_gem.rb b/guides/bug_report_templates/action_controller_gem.rb index 8b7aa893fd4d..49fe6c61c210 100644 --- a/guides/bug_report_templates/action_controller_gem.rb +++ b/guides/bug_report_templates/action_controller_gem.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/action_controller_master.rb b/guides/bug_report_templates/action_controller_master.rb index 3dd66c95ec5b..1aca491f03fa 100644 --- a/guides/bug_report_templates/action_controller_master.rb +++ b/guides/bug_report_templates/action_controller_master.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/active_job_gem.rb b/guides/bug_report_templates/active_job_gem.rb index 252b270a0cc1..7184e47df739 100644 --- a/guides/bug_report_templates/active_job_gem.rb +++ b/guides/bug_report_templates/active_job_gem.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/active_job_master.rb b/guides/bug_report_templates/active_job_master.rb index 7591470440a7..75b15958dcde 100644 --- a/guides/bug_report_templates/active_job_master.rb +++ b/guides/bug_report_templates/active_job_master.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/active_record_gem.rb b/guides/bug_report_templates/active_record_gem.rb index 61d4e8d39553..e5d1ff24f65b 100644 --- a/guides/bug_report_templates/active_record_gem.rb +++ b/guides/bug_report_templates/active_record_gem.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/active_record_master.rb b/guides/bug_report_templates/active_record_master.rb index 8bbc1ef19e61..66f923e52a06 100644 --- a/guides/bug_report_templates/active_record_master.rb +++ b/guides/bug_report_templates/active_record_master.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/active_record_migrations_gem.rb b/guides/bug_report_templates/active_record_migrations_gem.rb index 00ba3c1cd6d4..2d7b3ef05ef6 100644 --- a/guides/bug_report_templates/active_record_migrations_gem.rb +++ b/guides/bug_report_templates/active_record_migrations_gem.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/active_record_migrations_master.rb b/guides/bug_report_templates/active_record_migrations_master.rb index 52c9028b0f3a..363360828dcd 100644 --- a/guides/bug_report_templates/active_record_migrations_master.rb +++ b/guides/bug_report_templates/active_record_migrations_master.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/benchmark.rb b/guides/bug_report_templates/benchmark.rb index 54433b34dddd..91466f56e0a9 100644 --- a/guides/bug_report_templates/benchmark.rb +++ b/guides/bug_report_templates/benchmark.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/generic_gem.rb b/guides/bug_report_templates/generic_gem.rb index 4dcd04ea2741..d22af83e258c 100644 --- a/guides/bug_report_templates/generic_gem.rb +++ b/guides/bug_report_templates/generic_gem.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/generic_master.rb b/guides/bug_report_templates/generic_master.rb index ed45726e926d..168b6398437a 100644 --- a/guides/bug_report_templates/generic_master.rb +++ b/guides/bug_report_templates/generic_master.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require "bundler/inline" rescue LoadError => e diff --git a/guides/rails_guides.rb b/guides/rails_guides.rb index 0f611c8f2b8a..52e66d53245e 100644 --- a/guides/rails_guides.rb +++ b/guides/rails_guides.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true $:.unshift __dir__ as_lib = File.expand_path("../activesupport/lib", __dir__) diff --git a/guides/rails_guides/generator.rb b/guides/rails_guides/generator.rb index 35f014747cbb..04ab89093ac8 100644 --- a/guides/rails_guides/generator.rb +++ b/guides/rails_guides/generator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "set" require "fileutils" diff --git a/guides/rails_guides/helpers.rb b/guides/rails_guides/helpers.rb index 520aa7f7ccab..f68e1f597fac 100644 --- a/guides/rails_guides/helpers.rb +++ b/guides/rails_guides/helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "yaml" module RailsGuides diff --git a/guides/rails_guides/indexer.rb b/guides/rails_guides/indexer.rb index c58b6b85a220..63dbfd5e2c52 100644 --- a/guides/rails_guides/indexer.rb +++ b/guides/rails_guides/indexer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/blank" require "active_support/core_ext/string/inflections" diff --git a/guides/rails_guides/kindle.rb b/guides/rails_guides/kindle.rb index 9536d0bd3bdd..87a369a15a5f 100644 --- a/guides/rails_guides/kindle.rb +++ b/guides/rails_guides/kindle.rb @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true require "kindlerb" require "nokogiri" diff --git a/guides/rails_guides/levenshtein.rb b/guides/rails_guides/levenshtein.rb index 40c6a5c372dd..90bb40dfc28d 100644 --- a/guides/rails_guides/levenshtein.rb +++ b/guides/rails_guides/levenshtein.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module RailsGuides module Levenshtein # This code is based directly on the Text gem implementation. diff --git a/guides/rails_guides/markdown.rb b/guides/rails_guides/markdown.rb index 02d58601c4ed..cad66b5d6d70 100644 --- a/guides/rails_guides/markdown.rb +++ b/guides/rails_guides/markdown.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "redcarpet" require "nokogiri" require "rails_guides/markdown/renderer" diff --git a/guides/rails_guides/markdown/renderer.rb b/guides/rails_guides/markdown/renderer.rb index 7ac3d417a43c..583a8d348f67 100644 --- a/guides/rails_guides/markdown/renderer.rb +++ b/guides/rails_guides/markdown/renderer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module RailsGuides class Markdown class Renderer < Redcarpet::Render::HTML diff --git a/guides/w3c_validator.rb b/guides/w3c_validator.rb index 4671e040ca61..a97599ad3bc5 100644 --- a/guides/w3c_validator.rb +++ b/guides/w3c_validator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # --------------------------------------------------------------------------- # # This script validates the generated guides against the W3C Validator. diff --git a/rails.gemspec b/rails.gemspec index 91316f089f19..d3b4b6651e79 100644 --- a/rails.gemspec +++ b/rails.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/Rakefile b/railties/Rakefile index d6284b7dc510..9e251d842bdb 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 470ce93f103c..c53377cc970f 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 a5635c2297af..79af4db6b676 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 6d8bf289434e..168722a16f9a 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 7606ea0e46b4..d46c78dc7d29 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 dcc491783c15..27aaf1b96d8b 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 49267c2329cf..27936d31824b 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 525d5f0161a5..20e10c9c5522 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 39ca2db8e1a1..b00351738e78 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 dc0491035dc9..ea4c6014b6b2 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 fb635c6ae897..164fcfb282ca 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 63300ffef378..c8c13210d839 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 c027d066634d..0c7598e561e8 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 e02ef629f223..32dc74db431c 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 f7d112900a98..4ca1e7dcbdf0 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 3bd18ebfb514..abc8a9341471 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 973b746068bb..f262d2f6a1db 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 70dce268f170..50394cbd51e8 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 d0194af197fd..94decda16408 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 ee020b58f97e..a929b660df37 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 a00e58997c9c..90978ef59c9d 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 4f074df47316..eed2e0a9916e 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 4a92f72f165e..af93bf53caf5 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 05eac3415532..53041327572d 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 fff0119c6566..9bdb2398c0ff 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 7675d3b3d1e2..217ac5979a68 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 ec5854092335..8bb88d267f63 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 5bfbe58d97d1..cd4de73f5c2b 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 281732a936b8..61ef40899633 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 9dd7ad10129d..5e1062f0bc30 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 90d37217fc8d..68ca9f1c010a 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 207dd5d995cd..07e17a439ff1 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 b40ab006af58..b342b9bd4fb8 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 075b1fd23d12..7e57355fe545 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 6864a9726b64..e2f41032ee6d 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 5f077a5bcbeb..bdc4059c7b80 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 ebb4ae795ac3..a4985a0e6cbd 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 dce85cf12dc8..6243813ff8ab 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 ac745594eecb..f8057ffabe71 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 fc7d4909f67c..088fb6fe0d5b 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 affadc8e0919..b9d349b24fad 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 a33f71dc5b87..19b6632dbc9f 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 f69275a34a6e..a8169e53a055 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 2732485c5aec..6ed55aafa0ae 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 b9ef63243a36..493b6988a533 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 0c40173c38e3..40bafc4078fb 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 9969a1475d67..f34a46db898e 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 2ecf994a5cbf..0ee72a83f0b4 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 7bacf2e0baaf..68af9946e532 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 Gem::Version def self.gem_version diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index 8f15f3a594e6..796d7c4af170 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 5cf0985050dd..e8bc76c69ad1 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 d06609e91e3b..5f18368f45fd 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 2679d06fe470..6f61a7a04132 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 8429b6c7b87d..dc5c5c12f39e 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 e7f51dba9963..c0e9e1c751b9 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 af7b5cf609f3..7ceee5a12a72 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 cf534030f90c..868a5b364535 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 97d9ab29d4ce..ce2c482eb56c 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 36ecfea09bf4..bedf1d40a135 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 3f1d9932f6a3..bfac10184e35 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 0d77ef21da1d..3b3567b16c74 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 baed7bf1e307..c906457661f1 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 52a71b58cd72..c2d35be5760f 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 82481169c3d6..7246cf3af7ad 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 6f87a18660e0..e25290b3230b 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 aef66adb64a0..e54240b86feb 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 45b9e7bdffbf..03411d282211 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 95d00c2d3978..ab9822419968 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 06bdb8b5cefb..993ef27e8c87 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 1da2fbc1a5d9..1c8da5df8b8f 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 299a7da5f10c..4a71cdca8909 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 e48b1b6fb3ec..62230008ad55 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 70770ddcb805..56c4b3613423 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 fca2a8fef48d..c294c932b002 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 c32a8a079a41..ffa04cc029f8 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 445235852dc8..f60b1099a83e 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 5ac5164af0ed..a36e2cedc019 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 42705107ae7b..66e5e6e4dbdb 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 12d6bc85b2db..b78a12f92614 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 cf97c22160c7..44ac488665b1 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 901120e89285..382d33252f5c 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 bb96bdf0ddb9..f93b32584416 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 e7cb722473f2..41511b49a213 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 575af80303be..e851854ae7b1 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 722efcf49201..ef4ed0e53e74 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 ac528d94f162..b136bc740fc3 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 6b6e09445325..1cb60481a458 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 6674a15fa3b4..506dda4e62d6 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 9d065c129753..4810986f8334 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 6975252b9922..c35fd258a097 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 67bff8e4f9c3..60954d02c745 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 99495d5247fe..f4327c0c35da 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 f1c9b6da5b0a..2f02efca236b 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 292db3512104..72ba5ce65053 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 0514957d9ccd..7242bc0d0dbd 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 1cabf4e28cdf..abfa3340ae06 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 ce0e42e60d92..e66d7dc64f3c 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 73102a283fbe..ca2ad244b506 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 db08d578c0e5..2641f778ead8 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 8b553aea79cd..172b2ad172a6 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 a2615d5efd53..c25b0912f684 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 7ff55ef5bf07..0e0ecf094420 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 6bdb673215f2..d6a06d1aa769 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 Rails::Paths system. diff --git a/railties/lib/rails/plugin/test.rb b/railties/lib/rails/plugin/test.rb index ff043b488e63..88a24d4a4c1a 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 a4c4527a7220..ce08a23e2fe6 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 853fc2605159..577182c609f3 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 eca83355598f..910f9b5d09c3 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 2a8295426ee2..e58586cfa873 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 aecc81c491d4..f5702f8b9e4b 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 b212835df79c..f99767c97c07 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 c7a8676d7be8..c9524a643cef 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 e9088c44ce0d..5e17bc7211da 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 c0a50e5bdafa..0bdd1efd0716 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 9a69eb993465..802ef93bf3d9 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 334e968123dc..5f6070ae42f9 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 177b138090d1..fb9f6ce1c2f1 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 80720a42ff00..d63af956bccc 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 6522f2ae5a92..fa475c06be56 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 ba796845d7eb..39b08f543386 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 fd98be1ea9ae..d0d061bf7d6b 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 29ea0ff8041d..4ac7f60fe977 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 03177d995427..05840f6562d0 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 215fb2ceb5ba..ac04b84d871e 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 cb569be58bde..c80f44a7ce4c 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 d42a890cb619..95769a38beb0 100644 --- a/railties/lib/rails/tasks/tmp.rake +++ b/railties/lib/rails/tasks/tmp.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true namespace :tmp do desc "Clear cache and socket files from tmp/ (narrow w/ tmp:cache:clear, tmp:sockets:clear)" task clear: ["tmp:cache:clear", "tmp:sockets:clear"] diff --git a/railties/lib/rails/tasks/yarn.rake b/railties/lib/rails/tasks/yarn.rake index 87476b1b8cab..1d3a69e455da 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 81537d813e58..fe198f4d9961 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 32ba7447013f..e60c003380c5 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 5d0cf1305fae..9ebd635461e2 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 443e7434219b..f1cbbcea2d95 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 1cc27f7b6cf4..d92415c7d99b 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 92e5fcf0bcf3..20062012098c 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 33408081f16e..d79a52557fb3 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 3d8e8291d187..6391949aac81 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 b757dc72efff..0ce4d9e934d4 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 2df303750c3f..2195e9905916 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 2d4c7a0f0b85..e04bce24cba7 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 85f5502b4df0..6210215dc8a0 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 3e17a1efa55d..1ce77fba9f65 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 f38cacd6da01..8e7f50b8def8 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 0fb995900f1f..a9009531aadb 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 8360b7bf4b9b..71b33c15a4ca 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 06767167a989..e73c2a992c75 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 057d47387002..7dc9d0083fe6 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 5653ec0be1de..a10eb5185194 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 fe581db286a5..9732216b9290 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 0c3fe8bfa359..f92dd60a7cd7 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 eb2c578f9179..c15e057b19ad 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 36926c50ffbd..6acaea07dd0c 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 cee198bd0178..4bf01c6f9e83 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 dbefb22837cd..29f6bab2563a 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 b847ac6b361f..0be4280f3825 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 1118e5037ac5..73fc9f63c091 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 c75a25bc6f8a..3572fd68eb38 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 f5c013dab6e7..7fc5adddaa34 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 93b5263bf787..cbb265bb7c1a 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 1e4b5d086c6b..725a35aac1bc 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 fe07ad3cbe1c..af917209436e 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 c34d9d6ee740..68d97e9a961f 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 4938402fdceb..d1bad10fdcf0 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 a14ea589ed55..028309d8e475 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 5cd3e4325e23..9a0a5f72656b 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 0a6e5b52e91e..64a3cbbfa198 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 26b810af7368..9e832b6892a5 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 515205296c39..1c7db1bb9d9e 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 6e6996a6ba9a..148043d5cbc6 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 e71bcbc536cf..cb4d1d22af0d 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 2943e9ee5dd4..bf9e96cf4516 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 c63f23fa0acc..d5e556663552 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 4f992d9c8d8a..1556e5d5dbe3 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 40488a6aabbc..ec476addf43c 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 fdd3c71fe8f6..431492fb64d7 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 51dfe2ef9808..1cf780178fad 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 e7ffea2e711a..a500c551043a 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 6ebd2d5461a5..640a0008e738 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_test.rb b/railties/test/application/rake_test.rb index 1b64a0a1ca08..a3508a4a12ff 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 ccafc5b6f13d..67843a09fa35 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 6742da20cc2b..28a5ecb7ace2 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 0c45bc398ad1..9611797765eb 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 8e0712fca2d9..91a6229cc40b 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 32d2a6857cfc..c57cf548f7a2 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 37f129475c08..c7d7db8a756f 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 6b419ae7aedf..ff3751446cf5 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 f71e56f32328..e72963ee91a2 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 25a8a40d2715..3e7be58e9c2e 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 e6e3943117f0..8cc59f1154e0 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 ebfc4d0ba97f..02a508fea734 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 4fc082e4cad6..6fca08ad7902 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 0f8c5dbb797d..3041f9233d8d 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 be610f3b476c..c06100cde235 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 722323efdcf2..a0d2535c7789 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 559ce726939e..ca2293d65f15 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 b1c937143f23..e3811f0ea427 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 248afa2d2cfb..9a2629a9f2e6 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 1f64d5fda354..72f300887778 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 636bc1a8abf9..23b1b41541d4 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 636bc1a8abf9..23b1b41541d4 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 e4378bbd1a51..934f1b9bca34 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 1139350b9402..5f29d43851e2 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 ef3e9edbed9b..587cbf3e304f 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 0905fa9631d5..422e19e388bb 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 701515440ac2..df2cdadaeabe 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 d1de8c56fa27..d7e4a8fdca0c 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 c14a1a8784bf..eccba912363f 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 03b29be907bb..2e212b0e711f 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 a19e0f0dd8f9..86b99ec6f1c3 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 8a8c9a35ce0f..2f4ea8ed28dc 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 7f4295a20fe6..61f28c073152 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 1c02c67e42b1..55b910b2dd95 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 af68a9c49fb1..ef09b172ffa1 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 af86a0136f48..d573b3b8036c 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 c7b0237f02c2..3d2d39bba5d7 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 21fdcab19f8b..32651d81aeeb 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 97847c862492..29d6c0f4fc0e 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 5ff8bb0357be..c5d8412307a5 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 4444b3a56ec3..f9bfee2fa1ba 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 5fb331e19791..73fb2a86c8c1 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 d9e6e0a85ad3..683cd13cfb94 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 9358b63bd411..dc586f60b40d 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 68d158eb394b..4981ee999ec1 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 2ff03ea65eaa..13c3956ae8fe 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 6fe6e4ca07ec..0a70be0677bd 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 f41969fc4682..2a85f985ee68 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 3015b5363bba..d775faad368b 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 1caabbe6b129..7d63431436f4 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 88ae930554ce..35cfeeabf62b 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 f8512f91572a..2aef4e6584c1 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 8ac90e348413..81768b890f78 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 0bdd2a77d224..58f60404c4a7 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 e976e5818037..45b02e663d67 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 9971626f9f4f..ff510e931219 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 bc76cead1880..0141701b52c5 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 5e758799641a..5fd0a6c7d1d7 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 462236024453..03c1c78ef403 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 2285534bb9b6..1896dc5c8721 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 680dc2608e19..0a330ea4e966 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 e07627f36d04..766a50f6a046 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 4b67c91cc50d..e942a983b655 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 7496b5f84ab9..2e910d1d170b 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 7fff3bb46525..e2bd4a823049 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 c0b03d0c1549..1f82ec3bbbce 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 f3db0a51d230..0ec21fc90ebc 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 33b4bc6a3afe..cd14cbe7a6ee 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 d795629ccd41..bae87e6a1cc2 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 383adcc55d6e..e29e3c828e0d 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 e382a7a87371..19d2a2e4f6a7 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 5c691b9ec4ad..22c2697577ec 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 6639e55382a0..b4efe50038e4 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 30cd52526691..be77af813469 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 36c8ef1fd935..030303525b95 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 98201394cd7d..dc462fe0f404 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 86a482e09106..393da344a142 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 diff --git a/tasks/release.rb b/tasks/release.rb index 038fdc584acf..38689a5799d9 100644 --- a/tasks/release.rb +++ b/tasks/release.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true FRAMEWORKS = %w( activesupport activemodel activerecord actionview actionpack activejob actionmailer actioncable railties ) FRAMEWORK_NAMES = Hash.new { |h, k| k.split(/(?<=active|action)/).map(&:capitalize).join(" ") } diff --git a/tools/console b/tools/console index 58c76fb1b601..ff52308a90ae 100755 --- a/tools/console +++ b/tools/console @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true require "bundler" Bundler.setup diff --git a/tools/profile b/tools/profile index 01e513c67a93..ccbd8cfa4630 100755 --- a/tools/profile +++ b/tools/profile @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true # Profile require calls giving information about the time and the files that are called # when loading the provided file. # diff --git a/tools/test.rb b/tools/test.rb index 52e9c1919823..189997229bd1 100644 --- a/tools/test.rb +++ b/tools/test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true $: << File.expand_path("test", COMPONENT_ROOT) require "bundler" diff --git a/version.rb b/version.rb index 7bacf2e0baaf..68af9946e532 100644 --- a/version.rb +++ b/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Rails # Returns the version of the currently loaded Rails as a Gem::Version def self.gem_version