mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-09 14:58:05 -05:00
Add the frozen_string_literal pragma comment to all Ruby files. (#4725)
This commit is contained in:
committed by
Leonardo Tegon
parent
8b9fba73fd
commit
f39c6fd927
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'shared_admin'
|
||||
|
||||
class Admin < ActiveRecord::Base
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Shim
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'shared_user'
|
||||
|
||||
class User < ActiveRecord::Base
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'shared_user_without_omniauth'
|
||||
|
||||
class UserOnEngine < ActiveRecord::Base
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'shared_user_without_omniauth'
|
||||
|
||||
class UserOnMainApp < ActiveRecord::Base
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'shared_user'
|
||||
|
||||
class UserWithValidations < ActiveRecord::Base
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "shared_user_without_email"
|
||||
|
||||
class UserWithoutEmail < ActiveRecord::Base
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Admins::SessionsController < Devise::SessionsController
|
||||
def new
|
||||
flash[:special] = "Welcome to #{controller_path.inspect} controller!"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AdminsController < ApplicationController
|
||||
before_action :authenticate_admin!
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ApplicationWithFakeEngine < ApplicationController
|
||||
private
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Custom::RegistrationsController < Devise::RegistrationsController
|
||||
def new
|
||||
super do |resource|
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class HomeController < ApplicationController
|
||||
def index
|
||||
end
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Publisher::RegistrationsController < ApplicationController
|
||||
end
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Publisher::SessionsController < ApplicationController
|
||||
end
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Users::FromProcMailer < Devise::Mailer
|
||||
default from: proc { 'custom@example.com' }
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Users::Mailer < Devise::Mailer
|
||||
default from: 'custom@example.com'
|
||||
end
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'shared_admin'
|
||||
|
||||
class Admin
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Shim
|
||||
extend ::ActiveSupport::Concern
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'shared_user'
|
||||
|
||||
class User
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'shared_user_without_omniauth'
|
||||
|
||||
class UserOnEngine
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'shared_user_without_omniauth'
|
||||
|
||||
class UserOnMainApp
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "shared_user"
|
||||
|
||||
class UserWithValidations
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "shared_user_without_email"
|
||||
|
||||
class UserWithoutEmail
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require File.expand_path('../boot', __FILE__)
|
||||
|
||||
require "action_controller/railtie"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
unless defined?(DEVISE_ORM)
|
||||
DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Load the rails application.
|
||||
require File.expand_path('../application', __FILE__)
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
RailsApp::Application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.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.
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
RailsApp::Application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.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.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "omniauth-facebook"
|
||||
require "omniauth-openid"
|
||||
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
ActiveSupport::Inflector.inflections do |inflect|
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
config = Rails.application.config
|
||||
|
||||
config.secret_key_base = 'd588e99efff13a86461fd6ab82327823ad2f8feb5dc217ce652cdd9f0dfc5eb4b5a62a92d24d2574d7d51dfb1ea8dd453ea54e00cf672159a13104a135422a10'
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
RailsApp::Application.config.session_store :cookie_store, key: '_rails_app_session'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
Rails.application.routes.draw do
|
||||
# Resources for testing
|
||||
resources :users, only: [:index] do
|
||||
|
||||
@@ -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?(:[])
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module SharedAdmin
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module SharedUser
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module SharedUserWithoutEmail
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module SharedUserWithoutOmniauth
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
||||
Reference in New Issue
Block a user