Add the frozen_string_literal pragma comment to all Ruby files. (#4725)

This commit is contained in:
Pat Allan
2017-12-22 04:36:29 +11:00
committed by Leonardo Tegon
parent 8b9fba73fd
commit f39c6fd927
199 changed files with 397 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'shared_admin'
class Admin < ActiveRecord::Base

View File

@@ -1,2 +1,4 @@
# frozen_string_literal: true
module Shim
end

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'shared_user'
class User < ActiveRecord::Base

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'shared_user_without_omniauth'
class UserOnEngine < ActiveRecord::Base

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'shared_user_without_omniauth'
class UserOnMainApp < ActiveRecord::Base

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'shared_user'
class UserWithValidations < ActiveRecord::Base

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require "shared_user_without_email"
class UserWithoutEmail < ActiveRecord::Base

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class Admins::SessionsController < Devise::SessionsController
def new
flash[:special] = "Welcome to #{controller_path.inspect} controller!"

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class AdminsController < ApplicationController
before_action :authenticate_admin!

View File

@@ -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.

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class ApplicationWithFakeEngine < ApplicationController
private

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class Custom::RegistrationsController < Devise::RegistrationsController
def new
super do |resource|

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class HomeController < ApplicationController
def index
end

View File

@@ -1,2 +1,4 @@
# frozen_string_literal: true
class Publisher::RegistrationsController < ApplicationController
end

View File

@@ -1,2 +1,4 @@
# frozen_string_literal: true
class Publisher::SessionsController < ApplicationController
end

View File

@@ -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"]

View File

@@ -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]

View File

@@ -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

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class Users::FromProcMailer < Devise::Mailer
default from: proc { 'custom@example.com' }
end

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class Users::Mailer < Devise::Mailer
default from: 'custom@example.com'
end

View File

@@ -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'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'shared_admin'
class Admin

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Shim
extend ::ActiveSupport::Concern

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'shared_user'
class User

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'shared_user_without_omniauth'
class UserOnEngine

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'shared_user_without_omniauth'
class UserOnMainApp

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require "shared_user"
class UserWithValidations

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require "shared_user_without_email"
class UserWithoutEmail

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require File.expand_path('../boot', __FILE__)
require "action_controller/railtie"

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
unless defined?(DEVISE_ORM)
DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym
end

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Load the rails application.
require File.expand_path('../application', __FILE__)

View 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.

View 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.

View 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.

View File

@@ -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.

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require "omniauth-facebook"
require "omniauth-openid"

View File

@@ -1,2 +1,4 @@
# frozen_string_literal: true
ActiveSupport::Inflector.inflections do |inflect|
end

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
config = Rails.application.config
config.secret_key_base = 'd588e99efff13a86461fd6ab82327823ad2f8feb5dc217ce652cdd9f0dfc5eb4b5a62a92d24d2574d7d51dfb1ea8dd453ea54e00cf672159a13104a135422a10'

View File

@@ -1 +1,3 @@
# frozen_string_literal: true
RailsApp::Application.config.session_store :cookie_store, key: '_rails_app_session'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
Rails.application.routes.draw do
# Resources for testing
resources :users, only: [:index] do

View File

@@ -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?(:[])

View File

@@ -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.

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module SharedAdmin
extend ActiveSupport::Concern

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module SharedUser
extend ActiveSupport::Concern

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module SharedUserWithoutEmail
extend ActiveSupport::Concern

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module SharedUserWithoutOmniauth
extend ActiveSupport::Concern