diff options
author | Matthew Draper <matthew@trebex.net> | 2017-07-02 01:08:37 +0930 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2017-07-02 01:11:50 +0930 |
commit | 3420a14590c0e6915d8b6c242887f74adb4120f9 (patch) | |
tree | 7ae54681e3e2b18555603c39c50b01f3707ef9a7 /actionmailer | |
parent | afb66a5a598ce4ac74ad84b125a5abf046dcf5aa (diff) | |
parent | cfade1ec7ee7b5b51f3c1578e3474f9c156f2971 (diff) | |
download | rails-3420a14590c0e6915d8b6c242887f74adb4120f9.tar.gz rails-3420a14590c0e6915d8b6c242887f74adb4120f9.tar.bz2 rails-3420a14590c0e6915d8b6c242887f74adb4120f9.zip |
Merge pull request #29540 from kirs/rubocop-frozen-string
Enforce frozen string in Rubocop
Diffstat (limited to 'actionmailer')
42 files changed, 42 insertions, 0 deletions
diff --git a/actionmailer/Rakefile b/actionmailer/Rakefile index 6f05d236d9..942c14b2d6 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 ae908ddda7..66022602e3 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 470ce93f10..c53377cc97 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 8e59f033d0..16dfe53e18 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 f8aa54bd44..782c369961 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 d97a73d65a..c17715bac2 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 a617daa87e..010edf5800 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 93ae10fd70..f4897e2b98 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 f5594ef928..c9bf5b3f75 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 <tt>Gem::Version</tt>. 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 980415afe0..925926ba46 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 2c058ccf66..4f8aa98aaf 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 e04fc08866..69b6aebd8f 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 0b54e12431..a13a8a7ebe 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 3acacc1f14..5a1adfca8f 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 4f72eca930..8053bf9eba 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 913df8cf93..65a23e1ae7 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 f2eabfa057..7e8a9642b6 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 9ead03a40c..1aee49d791 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 c30fb1fc18..dad260d1b6 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 8452d6370e..b0cfa19891 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 bc21b07109..335f991dec 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 dbfdb07e6e..f71ca117d2 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 bf14fe0853..0a99e0c8f3 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 812df01a34..e2b614c568 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 06d4ea197c..1aee95b45a 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 e76466439e..d491bba905 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 f64a69019f..23a501862c 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 4f09339800..df7e969042 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 799c6144d7..fabc7c3669 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 6042548aef..da1241a4e2 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 73059d782d..ac66a733c6 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 1cf15128d2..a59000382c 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 2a8884959c..a339ef190d 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 92d3cff7c9..fa548b98e5 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 cae4ec2f48..21eded8d05 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 4c0fae6d91..94f8da2201 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 2487db9eb9..f69615e768 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 51f10b0bf1..58675e6d37 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 e988fffcb9..4a53df37fa 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 193d107b0a..fa8a55163c 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 876e9b0634..cbb7572fd8 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 6dbfb3a1ff..08c1bf1d23 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" |