rubocop noise: fixes FrozenStringLiteralComment

Adding the .ruby-verison file triggered previously un-run cops, specifically:

  This cop is designed to help upgrade to Ruby 3.0. It will add the
  comment `# frozen_string_literal: true` to the top of files to enable
  frozen string literals. Frozen string literals will be default in Ruby
  3.0. The comment will be added below a shebang and encoding comment. The
  frozen string literal comment is only valid in Ruby 2.3+.

More info on rubocop [Automatic-Corrections](https://github.com/bbatsov/rubocop/wiki/Automatic-Corrections)
This commit is contained in:
Mark Moser
2016-09-08 10:25:33 -05:00
parent 20614a7fce
commit 4bbd93ded1
114 changed files with 114 additions and 2 deletions

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module ApplicationCable
class Channel < ActionCable::Channel::Base
end

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module ApplicationCable
class Connection < ActionCable::Connection::Base
end

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Admin
class AuthController < AdminController
skip_before_action :authorize_admin

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Admin
class ProfileController < AdminController
def view

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Admin
class QuestionController < AdminController
def index

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Admin
class QuizController < AdminController
def index

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Admin
class UserController < AdminController
def index

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class AdminController < ApplicationController
layout 'admin'
before_action :authorize_admin

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class CandidateController < ApplicationController
before_action :authorize_candidate, except: [:login, :validate, :live_coder]
before_action :send_to_oops, only: [:login]

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class QuizController < ApplicationController
before_action :authorize_candidate

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class RecruiterController < ApplicationController
before_action :authorize_recruiter, except: [:login, :auth]

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class ReviewController < ApplicationController
before_action :authorize_reviewer, except: [:login, :auth]

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module ApplicationHelper
def experience_options val
options_for_select([

View File

@ -1,2 +1,3 @@
# frozen_string_literal: true
class ApplicationJob < ActiveJob::Base
end

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class ApplicationMailer < ActionMailer::Base
default from: ENV['default_mail_from']
layout 'mailer'

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class CandidateMailer < ApplicationMailer
def welcome candidate
@candidate = candidate

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class RecruiterMailer < ApplicationMailer
def candidate_created candidate
@candidate = candidate

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class ReviewerMailer < ApplicationMailer
def candidate_submission candidate
@candidate = candidate

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class UserMailer < ApplicationMailer
def password_reset user
@user = user

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class Answer < ApplicationRecord
serialize :answer

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class Candidate < ApplicationRecord
belongs_to :quiz
has_many :questions, -> { order("sort") }, through: :quiz

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class Question < ApplicationRecord
serialize :input_options

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class Quiz < ApplicationRecord
has_many :questions, -> { order(:sort) }
has_many :candidates

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class User < ApplicationRecord
has_secure_password
has_many :candidates, foreign_key: "recruiter_id"

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'openssl'
require 'base64'

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class SkillConfig < Settingslogic
source "#{Rails.root}/config/application.yml"
namespace Rails.env

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class AnswerFormatValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
send(record.question.input_type, record, attribute, value)

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class EmailFormatValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
# EMAIL regex test

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class InputOptionsPresenceValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
return true unless record.input_type =~ /radio|check/i

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class CandidateQuiz
attr_reader :candidate_id

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class CandidateQuizQuestion
attr_reader :row

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class QuizStatus
attr_reader :candidate

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class Reminder
def initialize
@collection = reminder_collection