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:
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module ApplicationCable
|
||||
class Channel < ActionCable::Channel::Base
|
||||
end
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module ApplicationCable
|
||||
class Connection < ActionCable::Connection::Base
|
||||
end
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module Admin
|
||||
class AuthController < AdminController
|
||||
skip_before_action :authorize_admin
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module Admin
|
||||
class ProfileController < AdminController
|
||||
def view
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module Admin
|
||||
class QuestionController < AdminController
|
||||
def index
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module Admin
|
||||
class QuizController < AdminController
|
||||
def index
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module Admin
|
||||
class UserController < AdminController
|
||||
def index
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class AdminController < ApplicationController
|
||||
layout 'admin'
|
||||
before_action :authorize_admin
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class ApplicationController < ActionController::Base
|
||||
protect_from_forgery with: :exception
|
||||
|
||||
|
@ -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]
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class QuizController < ApplicationController
|
||||
before_action :authorize_candidate
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class RecruiterController < ApplicationController
|
||||
before_action :authorize_recruiter, except: [:login, :auth]
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class ReviewController < ApplicationController
|
||||
before_action :authorize_reviewer, except: [:login, :auth]
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module ApplicationHelper
|
||||
def experience_options val
|
||||
options_for_select([
|
||||
|
@ -1,2 +1,3 @@
|
||||
# frozen_string_literal: true
|
||||
class ApplicationJob < ActiveJob::Base
|
||||
end
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class ApplicationMailer < ActionMailer::Base
|
||||
default from: ENV['default_mail_from']
|
||||
layout 'mailer'
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class CandidateMailer < ApplicationMailer
|
||||
def welcome candidate
|
||||
@candidate = candidate
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class RecruiterMailer < ApplicationMailer
|
||||
def candidate_created candidate
|
||||
@candidate = candidate
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class ReviewerMailer < ApplicationMailer
|
||||
def candidate_submission candidate
|
||||
@candidate = candidate
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class UserMailer < ApplicationMailer
|
||||
def password_reset user
|
||||
@user = user
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class Answer < ApplicationRecord
|
||||
serialize :answer
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class ApplicationRecord < ActiveRecord::Base
|
||||
self.abstract_class = true
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class Candidate < ApplicationRecord
|
||||
belongs_to :quiz
|
||||
has_many :questions, -> { order("sort") }, through: :quiz
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class Question < ApplicationRecord
|
||||
serialize :input_options
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class Quiz < ApplicationRecord
|
||||
has_many :questions, -> { order(:sort) }
|
||||
has_many :candidates
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class User < ApplicationRecord
|
||||
has_secure_password
|
||||
has_many :candidates, foreign_key: "recruiter_id"
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
require 'openssl'
|
||||
require 'base64'
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class SkillConfig < Settingslogic
|
||||
source "#{Rails.root}/config/application.yml"
|
||||
namespace Rails.env
|
||||
|
@ -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)
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class EmailFormatValidator < ActiveModel::EachValidator
|
||||
def validate_each(record, attribute, value)
|
||||
# EMAIL regex test
|
||||
|
@ -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
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class CandidateQuiz
|
||||
attr_reader :candidate_id
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class CandidateQuizQuestion
|
||||
attr_reader :row
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class QuizStatus
|
||||
attr_reader :candidate
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class Reminder
|
||||
def initialize
|
||||
@collection = reminder_collection
|
||||
|
Reference in New Issue
Block a user