diff --git a/Gemfile b/Gemfile index 57494b93..f5689e34 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source "https://rubygems.org" gemspec diff --git a/Rakefile b/Rakefile index bbf71663..6e2ab180 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require 'bundler/gem_tasks' require 'rake/testtask' diff --git a/app/controllers/devise/confirmations_controller.rb b/app/controllers/devise/confirmations_controller.rb index 4981545a..3069c6ef 100644 --- a/app/controllers/devise/confirmations_controller.rb +++ b/app/controllers/devise/confirmations_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Devise::ConfirmationsController < DeviseController # GET /resource/confirmation/new def new diff --git a/app/controllers/devise/omniauth_callbacks_controller.rb b/app/controllers/devise/omniauth_callbacks_controller.rb index d5b2c094..5f3f89d7 100644 --- a/app/controllers/devise/omniauth_callbacks_controller.rb +++ b/app/controllers/devise/omniauth_callbacks_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Devise::OmniauthCallbacksController < DeviseController prepend_before_action { request.env["devise.skip_timeout"] = true } diff --git a/app/controllers/devise/passwords_controller.rb b/app/controllers/devise/passwords_controller.rb index f4291c76..010199a7 100644 --- a/app/controllers/devise/passwords_controller.rb +++ b/app/controllers/devise/passwords_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Devise::PasswordsController < DeviseController prepend_before_action :require_no_authentication # Render the #edit only if coming from a reset password email link diff --git a/app/controllers/devise/registrations_controller.rb b/app/controllers/devise/registrations_controller.rb index 31ba0887..ca2bb34c 100644 --- a/app/controllers/devise/registrations_controller.rb +++ b/app/controllers/devise/registrations_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Devise::RegistrationsController < DeviseController prepend_before_action :require_no_authentication, only: [:new, :create, :cancel] prepend_before_action :authenticate_scope!, only: [:edit, :update, :destroy] diff --git a/app/controllers/devise/sessions_controller.rb b/app/controllers/devise/sessions_controller.rb index d04c3aa8..9090b002 100644 --- a/app/controllers/devise/sessions_controller.rb +++ b/app/controllers/devise/sessions_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Devise::SessionsController < DeviseController prepend_before_action :require_no_authentication, only: [:new, :create] prepend_before_action :allow_params_authentication!, only: :create diff --git a/app/controllers/devise/unlocks_controller.rb b/app/controllers/devise/unlocks_controller.rb index 179c9525..1d04d622 100644 --- a/app/controllers/devise/unlocks_controller.rb +++ b/app/controllers/devise/unlocks_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Devise::UnlocksController < DeviseController prepend_before_action :require_no_authentication diff --git a/app/controllers/devise_controller.rb b/app/controllers/devise_controller.rb index 0679a62e..702b97bd 100644 --- a/app/controllers/devise_controller.rb +++ b/app/controllers/devise_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # All Devise controllers are inherited from here. class DeviseController < Devise.parent_controller.constantize include Devise::Controllers::ScopedViews diff --git a/app/helpers/devise_helper.rb b/app/helpers/devise_helper.rb index f2d07261..c29120f7 100644 --- a/app/helpers/devise_helper.rb +++ b/app/helpers/devise_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DeviseHelper # A simple way to show error messages for the current devise resource. If you need # to customize this method, you can either overwrite it in your application helpers or diff --git a/app/mailers/devise/mailer.rb b/app/mailers/devise/mailer.rb index 857a8bc6..11ef449c 100644 --- a/app/mailers/devise/mailer.rb +++ b/app/mailers/devise/mailer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if defined?(ActionMailer) class Devise::Mailer < Devise.parent_mailer.constantize include Devise::Mailers::Helpers diff --git a/devise.gemspec b/devise.gemspec index 3e67230b..18a43002 100644 --- a/devise.gemspec +++ b/devise.gemspec @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # -*- encoding: utf-8 -*- $:.push File.expand_path("../lib", __FILE__) require "devise/version" diff --git a/gemfiles/Gemfile.rails-4.1-stable b/gemfiles/Gemfile.rails-4.1-stable index 2dde99dd..28416032 100644 --- a/gemfiles/Gemfile.rails-4.1-stable +++ b/gemfiles/Gemfile.rails-4.1-stable @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source "https://rubygems.org" gemspec path: ".." diff --git a/gemfiles/Gemfile.rails-4.2-stable b/gemfiles/Gemfile.rails-4.2-stable index 8165a950..7856859f 100644 --- a/gemfiles/Gemfile.rails-4.2-stable +++ b/gemfiles/Gemfile.rails-4.2-stable @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source "https://rubygems.org" gemspec path: ".." diff --git a/gemfiles/Gemfile.rails-5.0-stable b/gemfiles/Gemfile.rails-5.0-stable index af0e3b47..6ae87244 100644 --- a/gemfiles/Gemfile.rails-5.0-stable +++ b/gemfiles/Gemfile.rails-5.0-stable @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source "https://rubygems.org" gemspec path: ".." diff --git a/guides/bug_report_templates/integration_test.rb b/guides/bug_report_templates/integration_test.rb index 6fea86bb..b3eecd22 100644 --- a/guides/bug_report_templates/integration_test.rb +++ b/guides/bug_report_templates/integration_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin require 'bundler/inline' rescue LoadError => e diff --git a/lib/devise.rb b/lib/devise.rb index 3627f2da..16049382 100755 --- a/lib/devise.rb +++ b/lib/devise.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rails' require 'active_support/core_ext/numeric/time' require 'active_support/dependencies' diff --git a/lib/devise/controllers/helpers.rb b/lib/devise/controllers/helpers.rb index 81d5e385..7e67660a 100644 --- a/lib/devise/controllers/helpers.rb +++ b/lib/devise/controllers/helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module Controllers # Those helpers are convenience methods added to ApplicationController. diff --git a/lib/devise/controllers/rememberable.rb b/lib/devise/controllers/rememberable.rb index 02bdaf11..420a2f78 100644 --- a/lib/devise/controllers/rememberable.rb +++ b/lib/devise/controllers/rememberable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module Controllers # A module that may be optionally included in a controller in order diff --git a/lib/devise/controllers/scoped_views.rb b/lib/devise/controllers/scoped_views.rb index 7ba965e5..989d3879 100644 --- a/lib/devise/controllers/scoped_views.rb +++ b/lib/devise/controllers/scoped_views.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module Controllers module ScopedViews diff --git a/lib/devise/controllers/sign_in_out.rb b/lib/devise/controllers/sign_in_out.rb index 77c5987b..2d38ab23 100644 --- a/lib/devise/controllers/sign_in_out.rb +++ b/lib/devise/controllers/sign_in_out.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module Controllers # Provide sign in and sign out functionality. diff --git a/lib/devise/controllers/store_location.rb b/lib/devise/controllers/store_location.rb index 91655a35..fa8cb342 100644 --- a/lib/devise/controllers/store_location.rb +++ b/lib/devise/controllers/store_location.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "uri" module Devise diff --git a/lib/devise/controllers/url_helpers.rb b/lib/devise/controllers/url_helpers.rb index fed1383f..3da36423 100644 --- a/lib/devise/controllers/url_helpers.rb +++ b/lib/devise/controllers/url_helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module Controllers # Create url helpers to be used with resource/scope configuration. Acts as diff --git a/lib/devise/delegator.rb b/lib/devise/delegator.rb index 361d4cff..d04f15f1 100644 --- a/lib/devise/delegator.rb +++ b/lib/devise/delegator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise # Checks the scope in the given environment and returns the associated failure app. class Delegator diff --git a/lib/devise/encryptor.rb b/lib/devise/encryptor.rb index 19651d7b..7a53bef3 100644 --- a/lib/devise/encryptor.rb +++ b/lib/devise/encryptor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'bcrypt' module Devise diff --git a/lib/devise/failure_app.rb b/lib/devise/failure_app.rb index 4f7a3ddc..047c5c3f 100644 --- a/lib/devise/failure_app.rb +++ b/lib/devise/failure_app.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "action_controller/metal" module Devise diff --git a/lib/devise/hooks/activatable.rb b/lib/devise/hooks/activatable.rb index 805c2c57..b2eaea19 100644 --- a/lib/devise/hooks/activatable.rb +++ b/lib/devise/hooks/activatable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Deny user access whenever their account is not active yet. # We need this as hook to validate the user activity on each request # and in case the user is using other strategies beside Devise ones. diff --git a/lib/devise/hooks/csrf_cleaner.rb b/lib/devise/hooks/csrf_cleaner.rb index 28d4aea8..d725fbc4 100644 --- a/lib/devise/hooks/csrf_cleaner.rb +++ b/lib/devise/hooks/csrf_cleaner.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Warden::Manager.after_authentication do |record, warden, options| clean_up_for_winning_strategy = !warden.winning_strategy.respond_to?(:clean_up_csrf?) || warden.winning_strategy.clean_up_csrf? diff --git a/lib/devise/hooks/forgetable.rb b/lib/devise/hooks/forgetable.rb index 50e2062c..317dc547 100644 --- a/lib/devise/hooks/forgetable.rb +++ b/lib/devise/hooks/forgetable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Before logout hook to forget the user in the given scope, if it responds # to forget_me! Also clear remember token to ensure the user won't be # remembered again. Notice that we forget the user unless the record is not persisted. diff --git a/lib/devise/hooks/lockable.rb b/lib/devise/hooks/lockable.rb index c9d4df14..a73a1752 100644 --- a/lib/devise/hooks/lockable.rb +++ b/lib/devise/hooks/lockable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # After each sign in, if resource responds to failed_attempts, sets it to 0 # This is only triggered when the user is explicitly set (with set_user) Warden::Manager.after_set_user except: :fetch do |record, warden, options| diff --git a/lib/devise/hooks/proxy.rb b/lib/devise/hooks/proxy.rb index 24de988e..96b3a07e 100644 --- a/lib/devise/hooks/proxy.rb +++ b/lib/devise/hooks/proxy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module Hooks # A small warden proxy so we can remember, forget and diff --git a/lib/devise/hooks/rememberable.rb b/lib/devise/hooks/rememberable.rb index 077be534..345f2f24 100644 --- a/lib/devise/hooks/rememberable.rb +++ b/lib/devise/hooks/rememberable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Warden::Manager.after_set_user except: :fetch do |record, warden, options| scope = options[:scope] if record.respond_to?(:remember_me) && options[:store] != false && diff --git a/lib/devise/hooks/timeoutable.rb b/lib/devise/hooks/timeoutable.rb index 1bfa07d7..41b1fde8 100644 --- a/lib/devise/hooks/timeoutable.rb +++ b/lib/devise/hooks/timeoutable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Each time a record is set we check whether its session has already timed out # or not, based on last request time. If so, the record is logged out and # redirected to the sign in page. Also, each time the request comes and the diff --git a/lib/devise/hooks/trackable.rb b/lib/devise/hooks/trackable.rb index 9bb21288..53ac30dd 100644 --- a/lib/devise/hooks/trackable.rb +++ b/lib/devise/hooks/trackable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # After each sign in, update sign in time, sign in count and sign in IP. # This is only triggered when the user is explicitly set (with set_user) # and on authentication. Retrieving the user from session (:fetch) does diff --git a/lib/devise/mailers/helpers.rb b/lib/devise/mailers/helpers.rb index 12cac733..f6997462 100644 --- a/lib/devise/mailers/helpers.rb +++ b/lib/devise/mailers/helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module Mailers module Helpers diff --git a/lib/devise/mapping.rb b/lib/devise/mapping.rb index af4a1412..7692020f 100644 --- a/lib/devise/mapping.rb +++ b/lib/devise/mapping.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise # Responsible for handling devise mappings and routes configuration. Each # resource configured by devise_for in routes is actually creating a mapping diff --git a/lib/devise/models.rb b/lib/devise/models.rb index 6419814d..4d50fa24 100644 --- a/lib/devise/models.rb +++ b/lib/devise/models.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module Models class MissingAttribute < StandardError diff --git a/lib/devise/models/authenticatable.rb b/lib/devise/models/authenticatable.rb index 1246d90d..0ed15041 100644 --- a/lib/devise/models/authenticatable.rb +++ b/lib/devise/models/authenticatable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'active_model/version' require 'devise/hooks/activatable' require 'devise/hooks/csrf_cleaner' diff --git a/lib/devise/models/confirmable.rb b/lib/devise/models/confirmable.rb index 726b8fa9..5dfcd772 100644 --- a/lib/devise/models/confirmable.rb +++ b/lib/devise/models/confirmable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module Models # Confirmable is responsible to verify if an account is already confirmed to diff --git a/lib/devise/models/database_authenticatable.rb b/lib/devise/models/database_authenticatable.rb index 69967239..a91b21ca 100644 --- a/lib/devise/models/database_authenticatable.rb +++ b/lib/devise/models/database_authenticatable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'devise/strategies/database_authenticatable' module Devise diff --git a/lib/devise/models/lockable.rb b/lib/devise/models/lockable.rb index fe05b255..b97d12d3 100644 --- a/lib/devise/models/lockable.rb +++ b/lib/devise/models/lockable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "devise/hooks/lockable" module Devise diff --git a/lib/devise/models/omniauthable.rb b/lib/devise/models/omniauthable.rb index c1faf37a..c0fe1e54 100644 --- a/lib/devise/models/omniauthable.rb +++ b/lib/devise/models/omniauthable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'devise/omniauth' module Devise diff --git a/lib/devise/models/recoverable.rb b/lib/devise/models/recoverable.rb index 7857b686..75318d50 100644 --- a/lib/devise/models/recoverable.rb +++ b/lib/devise/models/recoverable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module Models diff --git a/lib/devise/models/registerable.rb b/lib/devise/models/registerable.rb index 1f10dd2e..3965ee5c 100644 --- a/lib/devise/models/registerable.rb +++ b/lib/devise/models/registerable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module Models # Registerable is responsible for everything related to registering a new diff --git a/lib/devise/models/rememberable.rb b/lib/devise/models/rememberable.rb index 5b72ebba..5a175013 100644 --- a/lib/devise/models/rememberable.rb +++ b/lib/devise/models/rememberable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'devise/strategies/rememberable' require 'devise/hooks/rememberable' require 'devise/hooks/forgetable' diff --git a/lib/devise/models/timeoutable.rb b/lib/devise/models/timeoutable.rb index d589e24a..ee187dbf 100644 --- a/lib/devise/models/timeoutable.rb +++ b/lib/devise/models/timeoutable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'devise/hooks/timeoutable' module Devise diff --git a/lib/devise/models/trackable.rb b/lib/devise/models/trackable.rb index adee0eaa..9a3056e9 100644 --- a/lib/devise/models/trackable.rb +++ b/lib/devise/models/trackable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'devise/hooks/trackable' module Devise diff --git a/lib/devise/models/validatable.rb b/lib/devise/models/validatable.rb index 1ad2e70e..91890fb5 100644 --- a/lib/devise/models/validatable.rb +++ b/lib/devise/models/validatable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module Models # Validatable creates all needed validations for a user email and password. diff --git a/lib/devise/modules.rb b/lib/devise/modules.rb index 2af8820b..d8cde834 100644 --- a/lib/devise/modules.rb +++ b/lib/devise/modules.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'active_support/core_ext/object/with_options' Devise.with_options model: true do |d| diff --git a/lib/devise/omniauth.rb b/lib/devise/omniauth.rb index ff342fd7..63ea6ca5 100644 --- a/lib/devise/omniauth.rb +++ b/lib/devise/omniauth.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin require "omniauth" require "omniauth/version" diff --git a/lib/devise/omniauth/config.rb b/lib/devise/omniauth/config.rb index e22d701c..2d3749ff 100644 --- a/lib/devise/omniauth/config.rb +++ b/lib/devise/omniauth/config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module OmniAuth class StrategyNotFound < NameError diff --git a/lib/devise/omniauth/url_helpers.rb b/lib/devise/omniauth/url_helpers.rb index f2cc3dbc..72eac65e 100644 --- a/lib/devise/omniauth/url_helpers.rb +++ b/lib/devise/omniauth/url_helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module OmniAuth module UrlHelpers diff --git a/lib/devise/orm/active_record.rb b/lib/devise/orm/active_record.rb index de114825..0fecf64e 100644 --- a/lib/devise/orm/active_record.rb +++ b/lib/devise/orm/active_record.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'orm_adapter/adapters/active_record' ActiveSupport.on_load(:active_record) do diff --git a/lib/devise/orm/mongoid.rb b/lib/devise/orm/mongoid.rb index cc2f1c55..034501ef 100644 --- a/lib/devise/orm/mongoid.rb +++ b/lib/devise/orm/mongoid.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + ActiveSupport.on_load(:mongoid) do require 'orm_adapter/adapters/mongoid' diff --git a/lib/devise/parameter_filter.rb b/lib/devise/parameter_filter.rb index 63d06f90..d61e66d1 100644 --- a/lib/devise/parameter_filter.rb +++ b/lib/devise/parameter_filter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise class ParameterFilter def initialize(case_insensitive_keys, strip_whitespace_keys) diff --git a/lib/devise/parameter_sanitizer.rb b/lib/devise/parameter_sanitizer.rb index 0f6faee6..91060c66 100644 --- a/lib/devise/parameter_sanitizer.rb +++ b/lib/devise/parameter_sanitizer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise # The +ParameterSanitizer+ deals with permitting specific parameters values # for each +Devise+ scope in the application. diff --git a/lib/devise/rails.rb b/lib/devise/rails.rb index 6321c71d..d23aade5 100644 --- a/lib/devise/rails.rb +++ b/lib/devise/rails.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'devise/rails/routes' require 'devise/rails/warden_compat' diff --git a/lib/devise/rails/routes.rb b/lib/devise/rails/routes.rb index 9a02363e..2d177b25 100644 --- a/lib/devise/rails/routes.rb +++ b/lib/devise/rails/routes.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "active_support/core_ext/object/try" require "active_support/core_ext/hash/slice" diff --git a/lib/devise/rails/warden_compat.rb b/lib/devise/rails/warden_compat.rb index 553e8e44..3db7ecae 100644 --- a/lib/devise/rails/warden_compat.rb +++ b/lib/devise/rails/warden_compat.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Warden::Mixins::Common def request @request ||= ActionDispatch::Request.new(env) diff --git a/lib/devise/strategies/authenticatable.rb b/lib/devise/strategies/authenticatable.rb index 13249e82..afcbef0b 100644 --- a/lib/devise/strategies/authenticatable.rb +++ b/lib/devise/strategies/authenticatable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'devise/strategies/base' module Devise diff --git a/lib/devise/strategies/base.rb b/lib/devise/strategies/base.rb index ee5c8c7f..998e6a36 100644 --- a/lib/devise/strategies/base.rb +++ b/lib/devise/strategies/base.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module Strategies # Base strategy for Devise. Responsible for verifying correct scope and mapping. diff --git a/lib/devise/strategies/database_authenticatable.rb b/lib/devise/strategies/database_authenticatable.rb index 3d8f4072..fe9812ab 100644 --- a/lib/devise/strategies/database_authenticatable.rb +++ b/lib/devise/strategies/database_authenticatable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'devise/strategies/authenticatable' module Devise diff --git a/lib/devise/strategies/rememberable.rb b/lib/devise/strategies/rememberable.rb index 3a09a6b4..fe20804f 100644 --- a/lib/devise/strategies/rememberable.rb +++ b/lib/devise/strategies/rememberable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'devise/strategies/authenticatable' module Devise diff --git a/lib/devise/test/controller_helpers.rb b/lib/devise/test/controller_helpers.rb index 89060e57..a5447f09 100644 --- a/lib/devise/test/controller_helpers.rb +++ b/lib/devise/test/controller_helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module Test # `Devise::Test::ControllerHelpers` provides a facility to test controllers diff --git a/lib/devise/test/integration_helpers.rb b/lib/devise/test/integration_helpers.rb index e39b6792..99731389 100644 --- a/lib/devise/test/integration_helpers.rb +++ b/lib/devise/test/integration_helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise # Devise::Test::IntegrationHelpers is a helper module for facilitating # authentication on Rails integration tests to bypass the required steps for diff --git a/lib/devise/test_helpers.rb b/lib/devise/test_helpers.rb index fbaed4cd..c5b52fad 100644 --- a/lib/devise/test_helpers.rb +++ b/lib/devise/test_helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module TestHelpers def self.included(base) diff --git a/lib/devise/time_inflector.rb b/lib/devise/time_inflector.rb index 94795afd..db3f6558 100644 --- a/lib/devise/time_inflector.rb +++ b/lib/devise/time_inflector.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "active_support/core_ext/module/delegation" module Devise diff --git a/lib/devise/token_generator.rb b/lib/devise/token_generator.rb index 636a1e78..9eb74a04 100644 --- a/lib/devise/token_generator.rb +++ b/lib/devise/token_generator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'openssl' module Devise diff --git a/lib/devise/version.rb b/lib/devise/version.rb index ac983193..44b6adf2 100644 --- a/lib/devise/version.rb +++ b/lib/devise/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise VERSION = "4.3.0".freeze end diff --git a/lib/generators/active_record/devise_generator.rb b/lib/generators/active_record/devise_generator.rb index ffcca870..b5640bf8 100644 --- a/lib/generators/active_record/devise_generator.rb +++ b/lib/generators/active_record/devise_generator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rails/generators/active_record' require 'generators/devise/orm_helpers' diff --git a/lib/generators/active_record/templates/migration.rb b/lib/generators/active_record/templates/migration.rb index 2df528a9..deed9859 100644 --- a/lib/generators/active_record/templates/migration.rb +++ b/lib/generators/active_record/templates/migration.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class DeviseCreate<%= table_name.camelize %> < ActiveRecord::Migration<%= migration_version %> def change create_table :<%= table_name %> do |t| diff --git a/lib/generators/active_record/templates/migration_existing.rb b/lib/generators/active_record/templates/migration_existing.rb index d7893343..a44e5413 100644 --- a/lib/generators/active_record/templates/migration_existing.rb +++ b/lib/generators/active_record/templates/migration_existing.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddDeviseTo<%= table_name.camelize %> < ActiveRecord::Migration<%= migration_version %> def self.up change_table :<%= table_name %> do |t| diff --git a/lib/generators/devise/controllers_generator.rb b/lib/generators/devise/controllers_generator.rb index 803ba041..c91371a3 100644 --- a/lib/generators/devise/controllers_generator.rb +++ b/lib/generators/devise/controllers_generator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rails/generators/base' module Devise diff --git a/lib/generators/devise/devise_generator.rb b/lib/generators/devise/devise_generator.rb index ea7054c7..79f860ba 100644 --- a/lib/generators/devise/devise_generator.rb +++ b/lib/generators/devise/devise_generator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rails/generators/named_base' module Devise diff --git a/lib/generators/devise/install_generator.rb b/lib/generators/devise/install_generator.rb index 6c6626b1..f81494d6 100644 --- a/lib/generators/devise/install_generator.rb +++ b/lib/generators/devise/install_generator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rails/generators/base' require 'securerandom' diff --git a/lib/generators/devise/orm_helpers.rb b/lib/generators/devise/orm_helpers.rb index f67204b3..34afc38d 100644 --- a/lib/generators/devise/orm_helpers.rb +++ b/lib/generators/devise/orm_helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise module Generators module OrmHelpers diff --git a/lib/generators/devise/views_generator.rb b/lib/generators/devise/views_generator.rb index 2faacd5a..29bf8fed 100644 --- a/lib/generators/devise/views_generator.rb +++ b/lib/generators/devise/views_generator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rails/generators/base' module Devise diff --git a/lib/generators/mongoid/devise_generator.rb b/lib/generators/mongoid/devise_generator.rb index 4ff57f06..40a8ac27 100644 --- a/lib/generators/mongoid/devise_generator.rb +++ b/lib/generators/mongoid/devise_generator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rails/generators/named_base' require 'generators/devise/orm_helpers' diff --git a/lib/generators/templates/controllers/confirmations_controller.rb b/lib/generators/templates/controllers/confirmations_controller.rb index 480ee9a0..e0466111 100644 --- a/lib/generators/templates/controllers/confirmations_controller.rb +++ b/lib/generators/templates/controllers/confirmations_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class <%= @scope_prefix %>ConfirmationsController < Devise::ConfirmationsController # GET /resource/confirmation/new # def new diff --git a/lib/generators/templates/controllers/omniauth_callbacks_controller.rb b/lib/generators/templates/controllers/omniauth_callbacks_controller.rb index cc122dc4..5f95be2d 100644 --- a/lib/generators/templates/controllers/omniauth_callbacks_controller.rb +++ b/lib/generators/templates/controllers/omniauth_callbacks_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class <%= @scope_prefix %>OmniauthCallbacksController < Devise::OmniauthCallbacksController # You should configure your model like this: # devise :omniauthable, omniauth_providers: [:twitter] diff --git a/lib/generators/templates/controllers/passwords_controller.rb b/lib/generators/templates/controllers/passwords_controller.rb index 3409d435..afd468cc 100644 --- a/lib/generators/templates/controllers/passwords_controller.rb +++ b/lib/generators/templates/controllers/passwords_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class <%= @scope_prefix %>PasswordsController < Devise::PasswordsController # GET /resource/password/new # def new diff --git a/lib/generators/templates/controllers/registrations_controller.rb b/lib/generators/templates/controllers/registrations_controller.rb index 3ffd29e9..cdd91acc 100644 --- a/lib/generators/templates/controllers/registrations_controller.rb +++ b/lib/generators/templates/controllers/registrations_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class <%= @scope_prefix %>RegistrationsController < Devise::RegistrationsController # before_action :configure_sign_up_params, only: [:create] # before_action :configure_account_update_params, only: [:update] diff --git a/lib/generators/templates/controllers/sessions_controller.rb b/lib/generators/templates/controllers/sessions_controller.rb index 69afe4b4..f229c9b4 100644 --- a/lib/generators/templates/controllers/sessions_controller.rb +++ b/lib/generators/templates/controllers/sessions_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class <%= @scope_prefix %>SessionsController < Devise::SessionsController # before_action :configure_sign_in_params, only: [:create] diff --git a/lib/generators/templates/controllers/unlocks_controller.rb b/lib/generators/templates/controllers/unlocks_controller.rb index 0e2cced5..0eadbbf6 100644 --- a/lib/generators/templates/controllers/unlocks_controller.rb +++ b/lib/generators/templates/controllers/unlocks_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class <%= @scope_prefix %>UnlocksController < Devise::UnlocksController # GET /resource/unlock/new # def new diff --git a/lib/generators/templates/devise.rb b/lib/generators/templates/devise.rb index e3d9ede7..17bd5073 100755 --- a/lib/generators/templates/devise.rb +++ b/lib/generators/templates/devise.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Use this hook to configure devise mailer, warden hooks and so forth. # Many of these configuration options can be set straight in your model. Devise.setup do |config| diff --git a/test/controllers/custom_registrations_controller_test.rb b/test/controllers/custom_registrations_controller_test.rb index 13e4eef2..683322eb 100644 --- a/test/controllers/custom_registrations_controller_test.rb +++ b/test/controllers/custom_registrations_controller_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class CustomRegistrationsControllerTest < Devise::ControllerTestCase diff --git a/test/controllers/custom_strategy_test.rb b/test/controllers/custom_strategy_test.rb index b63bead6..c39ac3e6 100644 --- a/test/controllers/custom_strategy_test.rb +++ b/test/controllers/custom_strategy_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' require 'ostruct' require 'warden/strategies/base' diff --git a/test/controllers/helper_methods_test.rb b/test/controllers/helper_methods_test.rb index 59f913fd..5e20477c 100644 --- a/test/controllers/helper_methods_test.rb +++ b/test/controllers/helper_methods_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class ApiController < ActionController::Metal diff --git a/test/controllers/helpers_test.rb b/test/controllers/helpers_test.rb index acbfe404..2380d362 100644 --- a/test/controllers/helpers_test.rb +++ b/test/controllers/helpers_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' require 'ostruct' diff --git a/test/controllers/inherited_controller_i18n_messages_test.rb b/test/controllers/inherited_controller_i18n_messages_test.rb index 677ce30f..f5d142d2 100644 --- a/test/controllers/inherited_controller_i18n_messages_test.rb +++ b/test/controllers/inherited_controller_i18n_messages_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class SessionsInheritedController < Devise::SessionsController diff --git a/test/controllers/internal_helpers_test.rb b/test/controllers/internal_helpers_test.rb index d2a96119..7710e0d7 100644 --- a/test/controllers/internal_helpers_test.rb +++ b/test/controllers/internal_helpers_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class MyController < DeviseController diff --git a/test/controllers/load_hooks_controller_test.rb b/test/controllers/load_hooks_controller_test.rb index cf8f4544..6387b309 100644 --- a/test/controllers/load_hooks_controller_test.rb +++ b/test/controllers/load_hooks_controller_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class LoadHooksControllerTest < Devise::ControllerTestCase diff --git a/test/controllers/passwords_controller_test.rb b/test/controllers/passwords_controller_test.rb index 5c359eed..887e0133 100644 --- a/test/controllers/passwords_controller_test.rb +++ b/test/controllers/passwords_controller_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class PasswordsControllerTest < Devise::ControllerTestCase diff --git a/test/controllers/sessions_controller_test.rb b/test/controllers/sessions_controller_test.rb index 69b65f37..e88cf7e9 100644 --- a/test/controllers/sessions_controller_test.rb +++ b/test/controllers/sessions_controller_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class SessionsControllerTest < Devise::ControllerTestCase diff --git a/test/controllers/url_helpers_test.rb b/test/controllers/url_helpers_test.rb index a4db0901..d5328a36 100644 --- a/test/controllers/url_helpers_test.rb +++ b/test/controllers/url_helpers_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class RoutesTest < Devise::ControllerTestCase diff --git a/test/delegator_test.rb b/test/delegator_test.rb index 65dda06e..851afbca 100644 --- a/test/delegator_test.rb +++ b/test/delegator_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class DelegatorTest < ActiveSupport::TestCase diff --git a/test/devise_test.rb b/test/devise_test.rb index 07377cc6..088527fe 100755 --- a/test/devise_test.rb +++ b/test/devise_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' module Devise diff --git a/test/failure_app_test.rb b/test/failure_app_test.rb index ee6d19fb..b37a9f00 100644 --- a/test/failure_app_test.rb +++ b/test/failure_app_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' require 'ostruct' diff --git a/test/generators/active_record_generator_test.rb b/test/generators/active_record_generator_test.rb index 79fab2b1..006ec5d3 100644 --- a/test/generators/active_record_generator_test.rb +++ b/test/generators/active_record_generator_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" if DEVISE_ORM == :active_record diff --git a/test/generators/controllers_generator_test.rb b/test/generators/controllers_generator_test.rb index 6df0f0c2..01bf970e 100644 --- a/test/generators/controllers_generator_test.rb +++ b/test/generators/controllers_generator_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" class ControllersGeneratorTest < Rails::Generators::TestCase diff --git a/test/generators/devise_generator_test.rb b/test/generators/devise_generator_test.rb index b8824680..00118c22 100644 --- a/test/generators/devise_generator_test.rb +++ b/test/generators/devise_generator_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' require "generators/devise/devise_generator" diff --git a/test/generators/install_generator_test.rb b/test/generators/install_generator_test.rb index daf386d9..45aeddd0 100644 --- a/test/generators/install_generator_test.rb +++ b/test/generators/install_generator_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" class InstallGeneratorTest < Rails::Generators::TestCase diff --git a/test/generators/mongoid_generator_test.rb b/test/generators/mongoid_generator_test.rb index 51802e8e..ea20b4ca 100644 --- a/test/generators/mongoid_generator_test.rb +++ b/test/generators/mongoid_generator_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" if DEVISE_ORM == :mongoid diff --git a/test/generators/views_generator_test.rb b/test/generators/views_generator_test.rb index 7fcdff0d..bfb4a7f1 100644 --- a/test/generators/views_generator_test.rb +++ b/test/generators/views_generator_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" class ViewsGeneratorTest < Rails::Generators::TestCase diff --git a/test/helpers/devise_helper_test.rb b/test/helpers/devise_helper_test.rb index 816d5426..754e82d8 100644 --- a/test/helpers/devise_helper_test.rb +++ b/test/helpers/devise_helper_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class DeviseHelperTest < Devise::IntegrationTest diff --git a/test/integration/authenticatable_test.rb b/test/integration/authenticatable_test.rb index 6d715b79..4f19f3c8 100644 --- a/test/integration/authenticatable_test.rb +++ b/test/integration/authenticatable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class AuthenticationSanityTest < Devise::IntegrationTest diff --git a/test/integration/confirmable_test.rb b/test/integration/confirmable_test.rb index 02730d58..72a28c82 100644 --- a/test/integration/confirmable_test.rb +++ b/test/integration/confirmable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class ConfirmationTest < Devise::IntegrationTest diff --git a/test/integration/database_authenticatable_test.rb b/test/integration/database_authenticatable_test.rb index 135f113b..c367ce07 100644 --- a/test/integration/database_authenticatable_test.rb +++ b/test/integration/database_authenticatable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class DatabaseAuthenticationTest < Devise::IntegrationTest diff --git a/test/integration/http_authenticatable_test.rb b/test/integration/http_authenticatable_test.rb index 56ea541c..54349f45 100644 --- a/test/integration/http_authenticatable_test.rb +++ b/test/integration/http_authenticatable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class HttpAuthenticationTest < Devise::IntegrationTest diff --git a/test/integration/lockable_test.rb b/test/integration/lockable_test.rb index cf6a9001..87e439ef 100644 --- a/test/integration/lockable_test.rb +++ b/test/integration/lockable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class LockTest < Devise::IntegrationTest diff --git a/test/integration/mounted_engine_test.rb b/test/integration/mounted_engine_test.rb index 98dcf475..a19d6a22 100644 --- a/test/integration/mounted_engine_test.rb +++ b/test/integration/mounted_engine_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class MyMountableEngine diff --git a/test/integration/omniauthable_test.rb b/test/integration/omniauthable_test.rb index 6af88420..050b210c 100644 --- a/test/integration/omniauthable_test.rb +++ b/test/integration/omniauthable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' diff --git a/test/integration/recoverable_test.rb b/test/integration/recoverable_test.rb index f35a46b7..c834f1d2 100644 --- a/test/integration/recoverable_test.rb +++ b/test/integration/recoverable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class PasswordTest < Devise::IntegrationTest diff --git a/test/integration/registerable_test.rb b/test/integration/registerable_test.rb index 4fa361b7..2387cd29 100644 --- a/test/integration/registerable_test.rb +++ b/test/integration/registerable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class RegistrationTest < Devise::IntegrationTest diff --git a/test/integration/rememberable_test.rb b/test/integration/rememberable_test.rb index 1dfd07d6..193a458e 100644 --- a/test/integration/rememberable_test.rb +++ b/test/integration/rememberable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class RememberMeTest < Devise::IntegrationTest diff --git a/test/integration/timeoutable_test.rb b/test/integration/timeoutable_test.rb index d831a96c..ceddd108 100644 --- a/test/integration/timeoutable_test.rb +++ b/test/integration/timeoutable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class SessionTimeoutTest < Devise::IntegrationTest diff --git a/test/integration/trackable_test.rb b/test/integration/trackable_test.rb index 4337f153..68d50e11 100644 --- a/test/integration/trackable_test.rb +++ b/test/integration/trackable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class TrackableHooksTest < Devise::IntegrationTest diff --git a/test/mailers/confirmation_instructions_test.rb b/test/mailers/confirmation_instructions_test.rb index f929ba43..358b092c 100644 --- a/test/mailers/confirmation_instructions_test.rb +++ b/test/mailers/confirmation_instructions_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class ConfirmationInstructionsTest < ActionMailer::TestCase diff --git a/test/mailers/email_changed_test.rb b/test/mailers/email_changed_test.rb index f3578297..09717f3c 100644 --- a/test/mailers/email_changed_test.rb +++ b/test/mailers/email_changed_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class EmailChangedTest < ActionMailer::TestCase diff --git a/test/mailers/mailer_test.rb b/test/mailers/mailer_test.rb index f6ec5d5a..f8369052 100644 --- a/test/mailers/mailer_test.rb +++ b/test/mailers/mailer_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" class MailerTest < ActionMailer::TestCase diff --git a/test/mailers/reset_password_instructions_test.rb b/test/mailers/reset_password_instructions_test.rb index 511cadd3..f0b45809 100644 --- a/test/mailers/reset_password_instructions_test.rb +++ b/test/mailers/reset_password_instructions_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class ResetPasswordInstructionsTest < ActionMailer::TestCase diff --git a/test/mailers/unlock_instructions_test.rb b/test/mailers/unlock_instructions_test.rb index 32b998f3..586799da 100644 --- a/test/mailers/unlock_instructions_test.rb +++ b/test/mailers/unlock_instructions_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class UnlockInstructionsTest < ActionMailer::TestCase diff --git a/test/mapping_test.rb b/test/mapping_test.rb index b1010166..0fc10c1a 100644 --- a/test/mapping_test.rb +++ b/test/mapping_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class FakeRequest < Struct.new(:path_info, :params) diff --git a/test/models/authenticatable_test.rb b/test/models/authenticatable_test.rb index ba664f3e..b3cab65b 100644 --- a/test/models/authenticatable_test.rb +++ b/test/models/authenticatable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class AuthenticatableTest < ActiveSupport::TestCase diff --git a/test/models/confirmable_test.rb b/test/models/confirmable_test.rb index e0f08cc0..d0446642 100644 --- a/test/models/confirmable_test.rb +++ b/test/models/confirmable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class ConfirmableTest < ActiveSupport::TestCase diff --git a/test/models/database_authenticatable_test.rb b/test/models/database_authenticatable_test.rb index a5c7c77f..fa0de7d0 100644 --- a/test/models/database_authenticatable_test.rb +++ b/test/models/database_authenticatable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' require 'test_models' require 'digest/sha1' diff --git a/test/models/lockable_test.rb b/test/models/lockable_test.rb index 52373b81..2685afe9 100644 --- a/test/models/lockable_test.rb +++ b/test/models/lockable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class LockableTest < ActiveSupport::TestCase diff --git a/test/models/omniauthable_test.rb b/test/models/omniauthable_test.rb index 03e1f688..c22bc430 100644 --- a/test/models/omniauthable_test.rb +++ b/test/models/omniauthable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class OmniauthableTest < ActiveSupport::TestCase diff --git a/test/models/recoverable_test.rb b/test/models/recoverable_test.rb index 96b36187..919e6e48 100644 --- a/test/models/recoverable_test.rb +++ b/test/models/recoverable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class RecoverableTest < ActiveSupport::TestCase diff --git a/test/models/registerable_test.rb b/test/models/registerable_test.rb index bef6c8ce..25493416 100644 --- a/test/models/registerable_test.rb +++ b/test/models/registerable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class RegisterableTest < ActiveSupport::TestCase diff --git a/test/models/rememberable_test.rb b/test/models/rememberable_test.rb index aa9ce817..24ebb3fe 100644 --- a/test/models/rememberable_test.rb +++ b/test/models/rememberable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class RememberableTest < ActiveSupport::TestCase diff --git a/test/models/serializable_test.rb b/test/models/serializable_test.rb index 784b51d7..0ec9e720 100644 --- a/test/models/serializable_test.rb +++ b/test/models/serializable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class SerializableTest < ActiveSupport::TestCase diff --git a/test/models/timeoutable_test.rb b/test/models/timeoutable_test.rb index 2deac0d3..205c8023 100644 --- a/test/models/timeoutable_test.rb +++ b/test/models/timeoutable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class TimeoutableTest < ActiveSupport::TestCase diff --git a/test/models/trackable_test.rb b/test/models/trackable_test.rb index 07ac9802..4685f1ce 100644 --- a/test/models/trackable_test.rb +++ b/test/models/trackable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class TrackableTest < ActiveSupport::TestCase diff --git a/test/models/validatable_test.rb b/test/models/validatable_test.rb index 343be9ce..6e02ad44 100644 --- a/test/models/validatable_test.rb +++ b/test/models/validatable_test.rb @@ -1,4 +1,6 @@ # encoding: UTF-8 +# frozen_string_literal: true + require 'test_helper' class ValidatableTest < ActiveSupport::TestCase diff --git a/test/models_test.rb b/test/models_test.rb index 2dc3d9d8..f1e42799 100644 --- a/test/models_test.rb +++ b/test/models_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' require 'test_models' diff --git a/test/omniauth/config_test.rb b/test/omniauth/config_test.rb index d2d0223d..d2bf11bb 100644 --- a/test/omniauth/config_test.rb +++ b/test/omniauth/config_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class OmniAuthConfigTest < ActiveSupport::TestCase diff --git a/test/omniauth/url_helpers_test.rb b/test/omniauth/url_helpers_test.rb index 21bf9d3a..41d4f501 100644 --- a/test/omniauth/url_helpers_test.rb +++ b/test/omniauth/url_helpers_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class OmniAuthRoutesTest < ActionController::TestCase diff --git a/test/orm/active_record.rb b/test/orm/active_record.rb index a3afd74e..138c554c 100644 --- a/test/orm/active_record.rb +++ b/test/orm/active_record.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + ActiveRecord::Migration.verbose = false ActiveRecord::Base.logger = Logger.new(nil) ActiveRecord::Base.include_root_in_json = true diff --git a/test/orm/mongoid.rb b/test/orm/mongoid.rb index 1cbe5ed4..d31bc4d2 100644 --- a/test/orm/mongoid.rb +++ b/test/orm/mongoid.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'mongoid/version' Mongoid.configure do |config| diff --git a/test/parameter_sanitizer_test.rb b/test/parameter_sanitizer_test.rb index a1f38426..4e89eb9e 100644 --- a/test/parameter_sanitizer_test.rb +++ b/test/parameter_sanitizer_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' require 'devise/parameter_sanitizer' diff --git a/test/rails_app/app/active_record/admin.rb b/test/rails_app/app/active_record/admin.rb index 124bc905..5383b3b2 100644 --- a/test/rails_app/app/active_record/admin.rb +++ b/test/rails_app/app/active_record/admin.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'shared_admin' class Admin < ActiveRecord::Base diff --git a/test/rails_app/app/active_record/shim.rb b/test/rails_app/app/active_record/shim.rb index 66f12cdb..be35adb9 100644 --- a/test/rails_app/app/active_record/shim.rb +++ b/test/rails_app/app/active_record/shim.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module Shim end diff --git a/test/rails_app/app/active_record/user.rb b/test/rails_app/app/active_record/user.rb index 1c9ebd41..52bb16dd 100644 --- a/test/rails_app/app/active_record/user.rb +++ b/test/rails_app/app/active_record/user.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'shared_user' class User < ActiveRecord::Base diff --git a/test/rails_app/app/active_record/user_on_engine.rb b/test/rails_app/app/active_record/user_on_engine.rb index 21eb3050..42f233f3 100644 --- a/test/rails_app/app/active_record/user_on_engine.rb +++ b/test/rails_app/app/active_record/user_on_engine.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'shared_user_without_omniauth' class UserOnEngine < ActiveRecord::Base diff --git a/test/rails_app/app/active_record/user_on_main_app.rb b/test/rails_app/app/active_record/user_on_main_app.rb index 54ef1f80..596bc3b9 100644 --- a/test/rails_app/app/active_record/user_on_main_app.rb +++ b/test/rails_app/app/active_record/user_on_main_app.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'shared_user_without_omniauth' class UserOnMainApp < ActiveRecord::Base diff --git a/test/rails_app/app/active_record/user_with_validations.rb b/test/rails_app/app/active_record/user_with_validations.rb index abfbe7e0..c396ba88 100644 --- a/test/rails_app/app/active_record/user_with_validations.rb +++ b/test/rails_app/app/active_record/user_with_validations.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'shared_user' class UserWithValidations < ActiveRecord::Base diff --git a/test/rails_app/app/active_record/user_without_email.rb b/test/rails_app/app/active_record/user_without_email.rb index 9ad58188..62bdb897 100644 --- a/test/rails_app/app/active_record/user_without_email.rb +++ b/test/rails_app/app/active_record/user_without_email.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "shared_user_without_email" class UserWithoutEmail < ActiveRecord::Base diff --git a/test/rails_app/app/controllers/admins/sessions_controller.rb b/test/rails_app/app/controllers/admins/sessions_controller.rb index 525ca5ef..122e15a7 100644 --- a/test/rails_app/app/controllers/admins/sessions_controller.rb +++ b/test/rails_app/app/controllers/admins/sessions_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admins::SessionsController < Devise::SessionsController def new flash[:special] = "Welcome to #{controller_path.inspect} controller!" diff --git a/test/rails_app/app/controllers/admins_controller.rb b/test/rails_app/app/controllers/admins_controller.rb index 6b39be19..c732f589 100644 --- a/test/rails_app/app/controllers/admins_controller.rb +++ b/test/rails_app/app/controllers/admins_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AdminsController < ApplicationController before_action :authenticate_admin! diff --git a/test/rails_app/app/controllers/application_controller.rb b/test/rails_app/app/controllers/application_controller.rb index 7adee128..e60ba0c2 100644 --- a/test/rails_app/app/controllers/application_controller.rb +++ b/test/rails_app/app/controllers/application_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Filters added to this controller apply to all controllers in the application. # Likewise, all the methods added will be available for all controllers. diff --git a/test/rails_app/app/controllers/application_with_fake_engine.rb b/test/rails_app/app/controllers/application_with_fake_engine.rb index c77d67f1..652bd2e0 100644 --- a/test/rails_app/app/controllers/application_with_fake_engine.rb +++ b/test/rails_app/app/controllers/application_with_fake_engine.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ApplicationWithFakeEngine < ApplicationController private diff --git a/test/rails_app/app/controllers/custom/registrations_controller.rb b/test/rails_app/app/controllers/custom/registrations_controller.rb index 3864661f..dd0e7a2f 100644 --- a/test/rails_app/app/controllers/custom/registrations_controller.rb +++ b/test/rails_app/app/controllers/custom/registrations_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Custom::RegistrationsController < Devise::RegistrationsController def new super do |resource| diff --git a/test/rails_app/app/controllers/home_controller.rb b/test/rails_app/app/controllers/home_controller.rb index e2a34230..703e9ef8 100644 --- a/test/rails_app/app/controllers/home_controller.rb +++ b/test/rails_app/app/controllers/home_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class HomeController < ApplicationController def index end diff --git a/test/rails_app/app/controllers/publisher/registrations_controller.rb b/test/rails_app/app/controllers/publisher/registrations_controller.rb index 7809a363..f7bdaa08 100644 --- a/test/rails_app/app/controllers/publisher/registrations_controller.rb +++ b/test/rails_app/app/controllers/publisher/registrations_controller.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + class Publisher::RegistrationsController < ApplicationController end diff --git a/test/rails_app/app/controllers/publisher/sessions_controller.rb b/test/rails_app/app/controllers/publisher/sessions_controller.rb index 2eed1bb0..48ce6859 100644 --- a/test/rails_app/app/controllers/publisher/sessions_controller.rb +++ b/test/rails_app/app/controllers/publisher/sessions_controller.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + class Publisher::SessionsController < ApplicationController end diff --git a/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb b/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb index 37cf9a8a..98df2957 100644 --- a/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb +++ b/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController def facebook data = request.respond_to?(:get_header) ? request.get_header("omniauth.auth") : request.env["omniauth.auth"] diff --git a/test/rails_app/app/controllers/users_controller.rb b/test/rails_app/app/controllers/users_controller.rb index 1d2d7494..d02b8844 100644 --- a/test/rails_app/app/controllers/users_controller.rb +++ b/test/rails_app/app/controllers/users_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class UsersController < ApplicationController prepend_before_action :current_user, only: :exhibit before_action :authenticate_user!, except: [:accept, :exhibit] diff --git a/test/rails_app/app/helpers/application_helper.rb b/test/rails_app/app/helpers/application_helper.rb index 22a7940e..fc3fb393 100644 --- a/test/rails_app/app/helpers/application_helper.rb +++ b/test/rails_app/app/helpers/application_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Methods added to this helper will be available to all templates in the application. module ApplicationHelper end diff --git a/test/rails_app/app/mailers/users/from_proc_mailer.rb b/test/rails_app/app/mailers/users/from_proc_mailer.rb index 1bff4cac..e3695125 100644 --- a/test/rails_app/app/mailers/users/from_proc_mailer.rb +++ b/test/rails_app/app/mailers/users/from_proc_mailer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Users::FromProcMailer < Devise::Mailer default from: proc { 'custom@example.com' } end diff --git a/test/rails_app/app/mailers/users/mailer.rb b/test/rails_app/app/mailers/users/mailer.rb index 3342f75a..5962e15d 100644 --- a/test/rails_app/app/mailers/users/mailer.rb +++ b/test/rails_app/app/mailers/users/mailer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Users::Mailer < Devise::Mailer default from: 'custom@example.com' end diff --git a/test/rails_app/app/mailers/users/reply_to_mailer.rb b/test/rails_app/app/mailers/users/reply_to_mailer.rb index 67ca82cf..4b241d32 100644 --- a/test/rails_app/app/mailers/users/reply_to_mailer.rb +++ b/test/rails_app/app/mailers/users/reply_to_mailer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Users::ReplyToMailer < Devise::Mailer default from: 'custom@example.com' default reply_to: 'custom_reply_to@example.com' diff --git a/test/rails_app/app/mongoid/admin.rb b/test/rails_app/app/mongoid/admin.rb index d5884cb6..c41ea059 100644 --- a/test/rails_app/app/mongoid/admin.rb +++ b/test/rails_app/app/mongoid/admin.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'shared_admin' class Admin diff --git a/test/rails_app/app/mongoid/shim.rb b/test/rails_app/app/mongoid/shim.rb index cd48fd40..e5f35782 100644 --- a/test/rails_app/app/mongoid/shim.rb +++ b/test/rails_app/app/mongoid/shim.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Shim extend ::ActiveSupport::Concern diff --git a/test/rails_app/app/mongoid/user.rb b/test/rails_app/app/mongoid/user.rb index 0a2e5ea1..7dd7dbe3 100644 --- a/test/rails_app/app/mongoid/user.rb +++ b/test/rails_app/app/mongoid/user.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'shared_user' class User diff --git a/test/rails_app/app/mongoid/user_on_engine.rb b/test/rails_app/app/mongoid/user_on_engine.rb index e68b096f..f63b727b 100644 --- a/test/rails_app/app/mongoid/user_on_engine.rb +++ b/test/rails_app/app/mongoid/user_on_engine.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'shared_user_without_omniauth' class UserOnEngine diff --git a/test/rails_app/app/mongoid/user_on_main_app.rb b/test/rails_app/app/mongoid/user_on_main_app.rb index a35f2336..92fea262 100644 --- a/test/rails_app/app/mongoid/user_on_main_app.rb +++ b/test/rails_app/app/mongoid/user_on_main_app.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'shared_user_without_omniauth' class UserOnMainApp diff --git a/test/rails_app/app/mongoid/user_with_validations.rb b/test/rails_app/app/mongoid/user_with_validations.rb index 25dc5a31..c1b73a30 100644 --- a/test/rails_app/app/mongoid/user_with_validations.rb +++ b/test/rails_app/app/mongoid/user_with_validations.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "shared_user" class UserWithValidations diff --git a/test/rails_app/app/mongoid/user_without_email.rb b/test/rails_app/app/mongoid/user_without_email.rb index f46ab635..b82ea56a 100644 --- a/test/rails_app/app/mongoid/user_without_email.rb +++ b/test/rails_app/app/mongoid/user_without_email.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "shared_user_without_email" class UserWithoutEmail diff --git a/test/rails_app/config/application.rb b/test/rails_app/config/application.rb index 34732d0a..19f44e41 100644 --- a/test/rails_app/config/application.rb +++ b/test/rails_app/config/application.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path('../boot', __FILE__) require "action_controller/railtie" diff --git a/test/rails_app/config/boot.rb b/test/rails_app/config/boot.rb index 60b90730..07fe8daa 100644 --- a/test/rails_app/config/boot.rb +++ b/test/rails_app/config/boot.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + unless defined?(DEVISE_ORM) DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym end diff --git a/test/rails_app/config/environment.rb b/test/rails_app/config/environment.rb index 1fe685fd..1c7a3ec2 100644 --- a/test/rails_app/config/environment.rb +++ b/test/rails_app/config/environment.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Load the rails application. require File.expand_path('../application', __FILE__) diff --git a/test/rails_app/config/environments/development.rb b/test/rails_app/config/environments/development.rb index fcddb5f5..d23c88d1 100644 --- a/test/rails_app/config/environments/development.rb +++ b/test/rails_app/config/environments/development.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RailsApp::Application.configure do # Settings specified here will take precedence over those in config/application.rb. diff --git a/test/rails_app/config/environments/production.rb b/test/rails_app/config/environments/production.rb index bb2d0504..3e62a174 100644 --- a/test/rails_app/config/environments/production.rb +++ b/test/rails_app/config/environments/production.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RailsApp::Application.configure do # Settings specified here will take precedence over those in config/application.rb. diff --git a/test/rails_app/config/environments/test.rb b/test/rails_app/config/environments/test.rb index 14732973..b202bc3e 100644 --- a/test/rails_app/config/environments/test.rb +++ b/test/rails_app/config/environments/test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RailsApp::Application.configure do # Settings specified here will take precedence over those in config/application.rb. diff --git a/test/rails_app/config/initializers/backtrace_silencers.rb b/test/rails_app/config/initializers/backtrace_silencers.rb index 56ddc8da..9edabe93 100644 --- a/test/rails_app/config/initializers/backtrace_silencers.rb +++ b/test/rails_app/config/initializers/backtrace_silencers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. diff --git a/test/rails_app/config/initializers/devise.rb b/test/rails_app/config/initializers/devise.rb index d79e71f5..761e398a 100644 --- a/test/rails_app/config/initializers/devise.rb +++ b/test/rails_app/config/initializers/devise.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "omniauth-facebook" require "omniauth-openid" diff --git a/test/rails_app/config/initializers/inflections.rb b/test/rails_app/config/initializers/inflections.rb index 45fc8f45..7bb3dc01 100644 --- a/test/rails_app/config/initializers/inflections.rb +++ b/test/rails_app/config/initializers/inflections.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + ActiveSupport::Inflector.inflections do |inflect| end diff --git a/test/rails_app/config/initializers/secret_token.rb b/test/rails_app/config/initializers/secret_token.rb index 35818fa1..48d1b70a 100644 --- a/test/rails_app/config/initializers/secret_token.rb +++ b/test/rails_app/config/initializers/secret_token.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + config = Rails.application.config config.secret_key_base = 'd588e99efff13a86461fd6ab82327823ad2f8feb5dc217ce652cdd9f0dfc5eb4b5a62a92d24d2574d7d51dfb1ea8dd453ea54e00cf672159a13104a135422a10' diff --git a/test/rails_app/config/initializers/session_store.rb b/test/rails_app/config/initializers/session_store.rb index 5ac94e7e..5cfac4ec 100644 --- a/test/rails_app/config/initializers/session_store.rb +++ b/test/rails_app/config/initializers/session_store.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + RailsApp::Application.config.session_store :cookie_store, key: '_rails_app_session' diff --git a/test/rails_app/config/routes.rb b/test/rails_app/config/routes.rb index fb33154f..8687dae2 100644 --- a/test/rails_app/config/routes.rb +++ b/test/rails_app/config/routes.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Rails.application.routes.draw do # Resources for testing resources :users, only: [:index] do diff --git a/test/rails_app/db/migrate/20100401102949_create_tables.rb b/test/rails_app/db/migrate/20100401102949_create_tables.rb index 4eecbc2c..43c6d867 100644 --- a/test/rails_app/db/migrate/20100401102949_create_tables.rb +++ b/test/rails_app/db/migrate/20100401102949_create_tables.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + superclass = ActiveRecord::Migration # TODO: Inherit from the 5.0 Migration class directly when we drop support for Rails 4. superclass = ActiveRecord::Migration[5.0] if superclass.respond_to?(:[]) diff --git a/test/rails_app/db/schema.rb b/test/rails_app/db/schema.rb index a7446056..c435f6b9 100644 --- a/test/rails_app/db/schema.rb +++ b/test/rails_app/db/schema.rb @@ -1,4 +1,6 @@ # encoding: UTF-8 +# frozen_string_literal: true + # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. diff --git a/test/rails_app/lib/shared_admin.rb b/test/rails_app/lib/shared_admin.rb index 7d6227a3..3e6362a7 100644 --- a/test/rails_app/lib/shared_admin.rb +++ b/test/rails_app/lib/shared_admin.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SharedAdmin extend ActiveSupport::Concern diff --git a/test/rails_app/lib/shared_user.rb b/test/rails_app/lib/shared_user.rb index c3b023a4..e037fe86 100644 --- a/test/rails_app/lib/shared_user.rb +++ b/test/rails_app/lib/shared_user.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SharedUser extend ActiveSupport::Concern diff --git a/test/rails_app/lib/shared_user_without_email.rb b/test/rails_app/lib/shared_user_without_email.rb index cc0a4045..f030c195 100644 --- a/test/rails_app/lib/shared_user_without_email.rb +++ b/test/rails_app/lib/shared_user_without_email.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SharedUserWithoutEmail extend ActiveSupport::Concern diff --git a/test/rails_app/lib/shared_user_without_omniauth.rb b/test/rails_app/lib/shared_user_without_omniauth.rb index 7f0396c0..7b9ae08f 100644 --- a/test/rails_app/lib/shared_user_without_omniauth.rb +++ b/test/rails_app/lib/shared_user_without_omniauth.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SharedUserWithoutOmniauth extend ActiveSupport::Concern diff --git a/test/rails_test.rb b/test/rails_test.rb index 65cba2eb..fdc1612e 100644 --- a/test/rails_test.rb +++ b/test/rails_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class RailsTest < ActiveSupport::TestCase diff --git a/test/routes_test.rb b/test/routes_test.rb index 84229f25..ba580f5b 100644 --- a/test/routes_test.rb +++ b/test/routes_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' ExpectedRoutingError = MiniTest::Assertion diff --git a/test/support/action_controller/record_identifier.rb b/test/support/action_controller/record_identifier.rb index 89b3483e..3d6c61e8 100644 --- a/test/support/action_controller/record_identifier.rb +++ b/test/support/action_controller/record_identifier.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Since webrat uses ActionController::RecordIdentifier class that was moved to # ActionView namespace in Rails 4.1+ diff --git a/test/support/assertions.rb b/test/support/assertions.rb index 7ec8b323..9872a0ae 100644 --- a/test/support/assertions.rb +++ b/test/support/assertions.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'active_support/test_case' class ActiveSupport::TestCase diff --git a/test/support/helpers.rb b/test/support/helpers.rb index db82dd7c..fe7cf1b5 100644 --- a/test/support/helpers.rb +++ b/test/support/helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'active_support/test_case' class ActiveSupport::TestCase diff --git a/test/support/http_method_compatibility.rb b/test/support/http_method_compatibility.rb index 7b8fdf08..87946314 100644 --- a/test/support/http_method_compatibility.rb +++ b/test/support/http_method_compatibility.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Devise class IntegrationTest < ActionDispatch::IntegrationTest # %w( get post patch put head delete xml_http_request diff --git a/test/support/integration.rb b/test/support/integration.rb index ac140e86..ea6792a7 100644 --- a/test/support/integration.rb +++ b/test/support/integration.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'action_dispatch/testing/integration' class ActionDispatch::IntegrationTest diff --git a/test/support/webrat/integrations/rails.rb b/test/support/webrat/integrations/rails.rb index 6f4aedcf..ebb481a1 100644 --- a/test/support/webrat/integrations/rails.rb +++ b/test/support/webrat/integrations/rails.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'webrat/core/elements/form' require 'action_dispatch/testing/integration' diff --git a/test/test/controller_helpers_test.rb b/test/test/controller_helpers_test.rb index e94ce309..6c14c189 100644 --- a/test/test/controller_helpers_test.rb +++ b/test/test/controller_helpers_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class TestControllerHelpersTest < Devise::ControllerTestCase diff --git a/test/test/integration_helpers_test.rb b/test/test/integration_helpers_test.rb index 5f7dfd31..131593c1 100644 --- a/test/test/integration_helpers_test.rb +++ b/test/test/integration_helpers_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class TestIntegrationsHelpersTest < Devise::IntegrationTest diff --git a/test/test_helper.rb b/test/test_helper.rb index 9f36b488..cfd925d5 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + ENV["RAILS_ENV"] = "test" DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym diff --git a/test/test_models.rb b/test/test_models.rb index d65648d9..0e52bef4 100644 --- a/test/test_models.rb +++ b/test/test_models.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Configurable < User devise :database_authenticatable, :confirmable, :rememberable, :timeoutable, :lockable, stretches: 15, pepper: 'abcdef', allow_unconfirmed_access_for: 5.days,