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
+1 -1
View File
@@ -1 +1 @@
rvm --ruby-version use 2.3.1
2.3.1
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
source 'https://rubygems.org'
gem 'figaro', '~> 1.1.1'
+1 -1
View File
@@ -268,7 +268,7 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)
unicode-display_width (1.1.0)
unicode-display_width (1.1.1)
web-console (3.3.1)
actionview (>= 5.0)
activemodel (>= 5.0)
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
@@ -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
View File
@@ -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
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Admin
class QuizController < AdminController
def index
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Admin
class UserController < AdminController
def index
+1
View File
@@ -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
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]
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class QuizController < ApplicationController
before_action :authorize_candidate
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class RecruiterController < ApplicationController
before_action :authorize_recruiter, except: [:login, :auth]
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class ReviewController < ApplicationController
before_action :authorize_reviewer, except: [:login, :auth]
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module ApplicationHelper
def experience_options val
options_for_select([
+1
View File
@@ -1,2 +1,3 @@
# frozen_string_literal: true
class ApplicationJob < ActiveJob::Base
end
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class ApplicationMailer < ActionMailer::Base
default from: ENV['default_mail_from']
layout 'mailer'
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class CandidateMailer < ApplicationMailer
def welcome candidate
@candidate = candidate
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class RecruiterMailer < ApplicationMailer
def candidate_created candidate
@candidate = candidate
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class ReviewerMailer < ApplicationMailer
def candidate_submission candidate
@candidate = candidate
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class UserMailer < ApplicationMailer
def password_reset user
@user = user
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class Answer < ApplicationRecord
serialize :answer
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class Candidate < ApplicationRecord
belongs_to :quiz
has_many :questions, -> { order("sort") }, through: :quiz
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class Question < ApplicationRecord
serialize :input_options
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class Quiz < ApplicationRecord
has_many :questions, -> { order(:sort) }
has_many :candidates
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class User < ApplicationRecord
has_secure_password
has_many :candidates, foreign_key: "recruiter_id"
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'openssl'
require 'base64'
+1
View File
@@ -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
View File
@@ -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
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class CandidateQuiz
attr_reader :candidate_id
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class CandidateQuizQuestion
attr_reader :row
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class QuizStatus
attr_reader :candidate
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class Reminder
def initialize
@collection = reminder_collection
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# This file is used by Rack-based servers to start the application.
require_relative 'config/environment'
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require_relative 'boot'
require 'rails/all'
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' # Set up gems listed in the Gemfile.
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Load the Rails application.
require_relative 'application'
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# ApplicationController.renderer.defaults.merge!(
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
@@ -1,3 +1,4 @@
# 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,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# TODO: needs better wrapping instead of nuking
# https://rubyplus.com/articles/3401
ActionView::Base.field_error_proc = proc do |html_tag, _instance|
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
Mailjet.configure do |config|
config.api_key = ENV['mailjet_key']
config.secret_key = ENV['mailjet_secret']
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
#
# This file contains migration options to ease your Rails 5.0 upgrade.
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
Rails.application.config.session_store :cookie_store, key: '_skill-assessment-app_session'
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Puma can serve each request in a thread from an internal thread pool.
# The `threads` method setting takes two numbers a minimum and maximum.
# Any libraries that use thread pools should be configured to match
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
Rails.application.routes.draw do
post "/admin/login", to: "admin/auth#auth", as: :admin_auth
get "/admin/login", to: "admin/auth#login", as: :admin_login
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
%w(
.ruby-version
.rbenv-vars
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class DbInit < ActiveRecord::Migration[5.0]
def change
create_table :candidates do |t|
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class AddQuizToCandidate < ActiveRecord::Migration[5.0]
def change
add_column :candidates, :quiz_id, :integer
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class AddAttachmentsToQuestions < ActiveRecord::Migration[5.0]
def change
add_column :questions, :attachment, :string
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class AddNameToQuiz < ActiveRecord::Migration[5.0]
def change
add_column :quizzes, :name, :string, after: :id
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class AddResetsToUsers < ActiveRecord::Migration[5.0]
def change
add_column :users, :reset_token, :string
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class EncodeCandidateEmails < ActiveRecord::Migration[5.0]
def change
sql = "select id, email from candidates;"
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
namespace :reminders do
desc "send reminders to stagnate quizes"
task send_all: :environment do
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
module Admin
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
module Admin
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
module Admin
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
module Admin
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
module Admin
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class AdminControllerTest < ActionDispatch::IntegrationTest
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class ApplicationControllerTest < ActionDispatch::IntegrationTest
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class CandidateControllerTest < ActionDispatch::IntegrationTest
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class QuizControllerTest < ActionDispatch::IntegrationTest
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class RecruiterControllerTest < ActionDispatch::IntegrationTest
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class ReviewControllerTest < ActionDispatch::IntegrationTest
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class QuestionAttachmentsTest < ActionDispatch::IntegrationTest
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class QuestionFlowTest < ActionDispatch::IntegrationTest
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class QuestionLiveCoderTest < ActionDispatch::IntegrationTest
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class CandidateMailerTest < ActionMailer::TestCase
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Preview all emails at http://localhost:3000/rails/mailers/candidate_mailer
class CandidateMailerPreview < ActionMailer::Preview
def welcome
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Preview all emails at http://localhost:3000/rails/mailers/recruiter_mailer
class RecruiterMailerPreview < ActionMailer::Preview
def candidate_created
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Preview all emails at http://localhost:3000/rails/mailers/reviewer_mailer
class ReviewerMailerPreview < ActionMailer::Preview
def candidate_submission
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Preview all emails at http://localhost:3000/rails/mailers/user_mailer
class UserMailerPreview < ActionMailer::Preview
def password_reset
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class RecruiterMailerTest < ActionMailer::TestCase
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class ReviewerMailerTest < ActionMailer::TestCase
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class UserMailerTest < ActionMailer::TestCase
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class AnswerTest < ActiveSupport::TestCase
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class CandidateTest < ActiveSupport::TestCase
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class QuestionTest < ActiveSupport::TestCase
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class QuizTest < ActiveSupport::TestCase
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class UserTest < ActiveSupport::TestCase
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class CryptSerializerTest < ActiveSupport::TestCase
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'test_helper'
class SkillConfigTest < ActiveSupport::TestCase
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
ENV['RAILS_ENV'] ||= 'test'
# https://github.com/colszowka/simplecov
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class AnswerValidatable
include ActiveModel::Validations

Some files were not shown because too many files have changed in this diff Show More