From 4bbd93ded1470993dd837b8b6a6de37a60895624 Mon Sep 17 00:00:00 2001 From: Mark Moser Date: Thu, 8 Sep 2016 10:25:33 -0500 Subject: [PATCH] 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) --- .ruby-version | 2 +- Gemfile | 1 + Gemfile.lock | 2 +- Guardfile | 1 + Rakefile | 1 + app/channels/application_cable/channel.rb | 1 + app/channels/application_cable/connection.rb | 1 + app/controllers/admin/auth_controller.rb | 1 + app/controllers/admin/profile_controller.rb | 1 + app/controllers/admin/question_controller.rb | 1 + app/controllers/admin/quiz_controller.rb | 1 + app/controllers/admin/user_controller.rb | 1 + app/controllers/admin_controller.rb | 1 + app/controllers/application_controller.rb | 1 + app/controllers/candidate_controller.rb | 1 + app/controllers/quiz_controller.rb | 1 + app/controllers/recruiter_controller.rb | 1 + app/controllers/review_controller.rb | 1 + app/helpers/application_helper.rb | 1 + app/jobs/application_job.rb | 1 + app/mailers/application_mailer.rb | 1 + app/mailers/candidate_mailer.rb | 1 + app/mailers/recruiter_mailer.rb | 1 + app/mailers/reviewer_mailer.rb | 1 + app/mailers/user_mailer.rb | 1 + app/models/answer.rb | 1 + app/models/application_record.rb | 1 + app/models/candidate.rb | 1 + app/models/question.rb | 1 + app/models/quiz.rb | 1 + app/models/user.rb | 1 + app/services/crypt_serializer.rb | 1 + app/services/skill_config.rb | 1 + app/validators/answer_format_validator.rb | 1 + app/validators/email_format_validator.rb | 1 + app/validators/input_options_presence_validator.rb | 1 + app/workers/candidate_quiz.rb | 1 + app/workers/candidate_quiz_question.rb | 1 + app/workers/quiz_status.rb | 1 + app/workers/reminder.rb | 1 + config.ru | 1 + config/application.rb | 1 + config/boot.rb | 1 + config/environment.rb | 1 + config/environments/development.rb | 1 + config/environments/production.rb | 1 + config/environments/test.rb | 1 + config/initializers/application_controller_renderer.rb | 1 + config/initializers/assets.rb | 1 + config/initializers/backtrace_silencers.rb | 1 + config/initializers/cookies_serializer.rb | 1 + config/initializers/custom_error_wrapper.rb | 1 + config/initializers/filter_parameter_logging.rb | 1 + config/initializers/inflections.rb | 1 + config/initializers/mailjet.rb | 1 + config/initializers/mime_types.rb | 1 + config/initializers/new_framework_defaults.rb | 1 + config/initializers/session_store.rb | 1 + config/initializers/wrap_parameters.rb | 1 + config/puma.rb | 1 + config/routes.rb | 1 + config/spring.rb | 1 + db/migrate/20160726193255_db_init.rb | 1 + db/migrate/20160727154057_add_quiz_to_candidate.rb | 1 + db/migrate/20160803003932_add_attachments_to_questions.rb | 1 + db/migrate/20160818225721_add_name_to_quiz.rb | 1 + db/migrate/20160824183159_add_resets_to_users.rb | 1 + db/migrate/20160826200610_encode_candidate_emails.rb | 1 + lib/tasks/reminders.rake | 1 + test/controllers/admin/auth_controller_test.rb | 1 + test/controllers/admin/profile_controller_test.rb | 1 + test/controllers/admin/question_controller_test.rb | 1 + test/controllers/admin/quiz_controller_test.rb | 1 + test/controllers/admin/user_controller_test.rb | 1 + test/controllers/admin_controller_test.rb | 1 + test/controllers/application_controller_test.rb | 1 + test/controllers/candidate_controller_test.rb | 1 + test/controllers/quiz_controller_test.rb | 1 + test/controllers/recruiter_controller_test.rb | 1 + test/controllers/review_controller_test.rb | 1 + test/integration/question_attachments_test.rb | 1 + test/integration/question_flow_test.rb | 1 + test/integration/question_live_coder_test.rb | 1 + test/mailers/candidate_mailer_test.rb | 1 + test/mailers/previews/candidate_mailer_preview.rb | 1 + test/mailers/previews/recruiter_mailer_preview.rb | 1 + test/mailers/previews/reviewer_mailer_preview.rb | 1 + test/mailers/previews/user_mailer_preview.rb | 1 + test/mailers/recruiter_mailer_test.rb | 1 + test/mailers/reviewer_mailer_test.rb | 1 + test/mailers/user_mailer_test.rb | 1 + test/models/answer_test.rb | 1 + test/models/candidate_test.rb | 1 + test/models/question_test.rb | 1 + test/models/quiz_test.rb | 1 + test/models/user_test.rb | 1 + test/services/crypt_serializer_test.rb | 1 + test/services/skill_config_test.rb | 1 + test/test_helper.rb | 1 + test/test_helpers/answer_validatable.rb | 1 + test/test_helpers/email_validatable.rb | 1 + test/test_helpers/input_options_validatable.rb | 1 + test/validators/answer_format_validator/checkbox_other_test.rb | 1 + test/validators/answer_format_validator/checkbox_test.rb | 1 + test/validators/answer_format_validator/live_code_test.rb | 1 + test/validators/answer_format_validator/radio_other_test.rb | 1 + test/validators/answer_format_validator/radio_test.rb | 1 + test/validators/answer_format_validator/text_test.rb | 1 + test/validators/email_format_validator_test.rb | 1 + test/validators/input_options_presence_validator_test.rb | 1 + test/workers/candidate_quiz_question_test.rb | 1 + test/workers/candidate_quiz_test.rb | 1 + test/workers/quiz_status_test.rb | 1 + test/workers/reminder_test.rb | 1 + 114 files changed, 114 insertions(+), 2 deletions(-) diff --git a/.ruby-version b/.ruby-version index fd12b58..2bf1c1c 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -rvm --ruby-version use 2.3.1 \ No newline at end of file +2.3.1 diff --git a/Gemfile b/Gemfile index 8c9a143..0bed934 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,4 @@ +# frozen_string_literal: true source 'https://rubygems.org' gem 'figaro', '~> 1.1.1' diff --git a/Gemfile.lock b/Gemfile.lock index c9cce22..8d3e6f0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) diff --git a/Guardfile b/Guardfile index 73cc130..c6a64d4 100644 --- a/Guardfile +++ b/Guardfile @@ -1,3 +1,4 @@ +# frozen_string_literal: true # A sample Guardfile # More info at https://github.com/guard/guard#readme diff --git a/Rakefile b/Rakefile index e85f913..84f2bc3 100644 --- a/Rakefile +++ b/Rakefile @@ -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. diff --git a/app/channels/application_cable/channel.rb b/app/channels/application_cable/channel.rb index d672697..51e3e93 100644 --- a/app/channels/application_cable/channel.rb +++ b/app/channels/application_cable/channel.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ApplicationCable class Channel < ActionCable::Channel::Base end diff --git a/app/channels/application_cable/connection.rb b/app/channels/application_cable/connection.rb index 0ff5442..fa70319 100644 --- a/app/channels/application_cable/connection.rb +++ b/app/channels/application_cable/connection.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ApplicationCable class Connection < ActionCable::Connection::Base end diff --git a/app/controllers/admin/auth_controller.rb b/app/controllers/admin/auth_controller.rb index cb097fc..ef611a0 100644 --- a/app/controllers/admin/auth_controller.rb +++ b/app/controllers/admin/auth_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Admin class AuthController < AdminController skip_before_action :authorize_admin diff --git a/app/controllers/admin/profile_controller.rb b/app/controllers/admin/profile_controller.rb index 08f8f32..0894a36 100644 --- a/app/controllers/admin/profile_controller.rb +++ b/app/controllers/admin/profile_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Admin class ProfileController < AdminController def view diff --git a/app/controllers/admin/question_controller.rb b/app/controllers/admin/question_controller.rb index 7ee4266..c3b74f4 100644 --- a/app/controllers/admin/question_controller.rb +++ b/app/controllers/admin/question_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Admin class QuestionController < AdminController def index diff --git a/app/controllers/admin/quiz_controller.rb b/app/controllers/admin/quiz_controller.rb index 82c2de4..758516f 100644 --- a/app/controllers/admin/quiz_controller.rb +++ b/app/controllers/admin/quiz_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Admin class QuizController < AdminController def index diff --git a/app/controllers/admin/user_controller.rb b/app/controllers/admin/user_controller.rb index 85b4e71..850e053 100644 --- a/app/controllers/admin/user_controller.rb +++ b/app/controllers/admin/user_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Admin class UserController < AdminController def index diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 37a79b4..27eec24 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class AdminController < ApplicationController layout 'admin' before_action :authorize_admin diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 430edcd..37fe04f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ApplicationController < ActionController::Base protect_from_forgery with: :exception diff --git a/app/controllers/candidate_controller.rb b/app/controllers/candidate_controller.rb index 60e93e7..78a5ec0 100644 --- a/app/controllers/candidate_controller.rb +++ b/app/controllers/candidate_controller.rb @@ -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] diff --git a/app/controllers/quiz_controller.rb b/app/controllers/quiz_controller.rb index 0cb3858..74c191e 100644 --- a/app/controllers/quiz_controller.rb +++ b/app/controllers/quiz_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class QuizController < ApplicationController before_action :authorize_candidate diff --git a/app/controllers/recruiter_controller.rb b/app/controllers/recruiter_controller.rb index 23a3238..c157fc8 100644 --- a/app/controllers/recruiter_controller.rb +++ b/app/controllers/recruiter_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class RecruiterController < ApplicationController before_action :authorize_recruiter, except: [:login, :auth] diff --git a/app/controllers/review_controller.rb b/app/controllers/review_controller.rb index 1077fbe..d810bad 100644 --- a/app/controllers/review_controller.rb +++ b/app/controllers/review_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ReviewController < ApplicationController before_action :authorize_reviewer, except: [:login, :auth] diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index cf00ea8..99e9420 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ApplicationHelper def experience_options val options_for_select([ diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb index a009ace..32fe70b 100644 --- a/app/jobs/application_job.rb +++ b/app/jobs/application_job.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true class ApplicationJob < ActiveJob::Base end diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index e21ed33..6f7e596 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ApplicationMailer < ActionMailer::Base default from: ENV['default_mail_from'] layout 'mailer' diff --git a/app/mailers/candidate_mailer.rb b/app/mailers/candidate_mailer.rb index ac3486d..f3611bc 100644 --- a/app/mailers/candidate_mailer.rb +++ b/app/mailers/candidate_mailer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CandidateMailer < ApplicationMailer def welcome candidate @candidate = candidate diff --git a/app/mailers/recruiter_mailer.rb b/app/mailers/recruiter_mailer.rb index 06fb44b..8ef985c 100644 --- a/app/mailers/recruiter_mailer.rb +++ b/app/mailers/recruiter_mailer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class RecruiterMailer < ApplicationMailer def candidate_created candidate @candidate = candidate diff --git a/app/mailers/reviewer_mailer.rb b/app/mailers/reviewer_mailer.rb index 325df53..b4eee1b 100644 --- a/app/mailers/reviewer_mailer.rb +++ b/app/mailers/reviewer_mailer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ReviewerMailer < ApplicationMailer def candidate_submission candidate @candidate = candidate diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 3ea1484..b345d1b 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class UserMailer < ApplicationMailer def password_reset user @user = user diff --git a/app/models/answer.rb b/app/models/answer.rb index 71a91aa..6983ff4 100644 --- a/app/models/answer.rb +++ b/app/models/answer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Answer < ApplicationRecord serialize :answer diff --git a/app/models/application_record.rb b/app/models/application_record.rb index 141a300..736c87f 100644 --- a/app/models/application_record.rb +++ b/app/models/application_record.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ApplicationRecord < ActiveRecord::Base self.abstract_class = true diff --git a/app/models/candidate.rb b/app/models/candidate.rb index b54bea3..69c4b2b 100644 --- a/app/models/candidate.rb +++ b/app/models/candidate.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Candidate < ApplicationRecord belongs_to :quiz has_many :questions, -> { order("sort") }, through: :quiz diff --git a/app/models/question.rb b/app/models/question.rb index 2b8cac3..6d2a993 100644 --- a/app/models/question.rb +++ b/app/models/question.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Question < ApplicationRecord serialize :input_options diff --git a/app/models/quiz.rb b/app/models/quiz.rb index 7c2c5c1..f8d0b23 100644 --- a/app/models/quiz.rb +++ b/app/models/quiz.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Quiz < ApplicationRecord has_many :questions, -> { order(:sort) } has_many :candidates diff --git a/app/models/user.rb b/app/models/user.rb index 3b0c1b1..8f24471 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class User < ApplicationRecord has_secure_password has_many :candidates, foreign_key: "recruiter_id" diff --git a/app/services/crypt_serializer.rb b/app/services/crypt_serializer.rb index bf39363..74a5ad9 100644 --- a/app/services/crypt_serializer.rb +++ b/app/services/crypt_serializer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'openssl' require 'base64' diff --git a/app/services/skill_config.rb b/app/services/skill_config.rb index 6f3c718..f4d5075 100644 --- a/app/services/skill_config.rb +++ b/app/services/skill_config.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class SkillConfig < Settingslogic source "#{Rails.root}/config/application.yml" namespace Rails.env diff --git a/app/validators/answer_format_validator.rb b/app/validators/answer_format_validator.rb index 99f7d49..6994631 100644 --- a/app/validators/answer_format_validator.rb +++ b/app/validators/answer_format_validator.rb @@ -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) diff --git a/app/validators/email_format_validator.rb b/app/validators/email_format_validator.rb index 2418922..5b889a5 100644 --- a/app/validators/email_format_validator.rb +++ b/app/validators/email_format_validator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class EmailFormatValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) # EMAIL regex test diff --git a/app/validators/input_options_presence_validator.rb b/app/validators/input_options_presence_validator.rb index 0bb6284..5a5c60d 100644 --- a/app/validators/input_options_presence_validator.rb +++ b/app/validators/input_options_presence_validator.rb @@ -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 diff --git a/app/workers/candidate_quiz.rb b/app/workers/candidate_quiz.rb index bedc7a9..a7d74e7 100644 --- a/app/workers/candidate_quiz.rb +++ b/app/workers/candidate_quiz.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CandidateQuiz attr_reader :candidate_id diff --git a/app/workers/candidate_quiz_question.rb b/app/workers/candidate_quiz_question.rb index 20e4d9b..dad8a16 100644 --- a/app/workers/candidate_quiz_question.rb +++ b/app/workers/candidate_quiz_question.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CandidateQuizQuestion attr_reader :row diff --git a/app/workers/quiz_status.rb b/app/workers/quiz_status.rb index 8245c8e..f97037e 100644 --- a/app/workers/quiz_status.rb +++ b/app/workers/quiz_status.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class QuizStatus attr_reader :candidate diff --git a/app/workers/reminder.rb b/app/workers/reminder.rb index 29584e2..7437f04 100644 --- a/app/workers/reminder.rb +++ b/app/workers/reminder.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Reminder def initialize @collection = reminder_collection diff --git a/config.ru b/config.ru index f7ba0b5..7eae264 100644 --- a/config.ru +++ b/config.ru @@ -1,3 +1,4 @@ +# frozen_string_literal: true # This file is used by Rack-based servers to start the application. require_relative 'config/environment' diff --git a/config/application.rb b/config/application.rb index d04f3ab..98b8077 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative 'boot' require 'rails/all' diff --git a/config/boot.rb b/config/boot.rb index 30f5120..9be337a 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -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. diff --git a/config/environment.rb b/config/environment.rb index 426333b..12ea62f 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Load the Rails application. require_relative 'application' diff --git a/config/environments/development.rb b/config/environments/development.rb index 88c86ee..c10e626 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. diff --git a/config/environments/production.rb b/config/environments/production.rb index 2b66046..076378e 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. diff --git a/config/environments/test.rb b/config/environments/test.rb index bb560d5..826c3a5 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. diff --git a/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb index 51639b6..315ac48 100644 --- a/config/initializers/application_controller_renderer.rb +++ b/config/initializers/application_controller_renderer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Be sure to restart your server when you modify this file. # ApplicationController.renderer.defaults.merge!( diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 865c130..4607738 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -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. diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb index 59385cd..d0f0d3b 100644 --- a/config/initializers/backtrace_silencers.rb +++ b/config/initializers/backtrace_silencers.rb @@ -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. diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb index 5a6a32d..2a72959 100644 --- a/config/initializers/cookies_serializer.rb +++ b/config/initializers/cookies_serializer.rb @@ -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. diff --git a/config/initializers/custom_error_wrapper.rb b/config/initializers/custom_error_wrapper.rb index 67cc908..0d627f3 100644 --- a/config/initializers/custom_error_wrapper.rb +++ b/config/initializers/custom_error_wrapper.rb @@ -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| diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 4a994e1..b7fe123 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -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. diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index ac033bf..aa7435f 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -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 diff --git a/config/initializers/mailjet.rb b/config/initializers/mailjet.rb index 2481ab2..4fa89bc 100644 --- a/config/initializers/mailjet.rb +++ b/config/initializers/mailjet.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Mailjet.configure do |config| config.api_key = ENV['mailjet_key'] config.secret_key = ENV['mailjet_secret'] diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index dc18996..6e1d16f 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -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: diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb index 0706caf..d3c12d7 100644 --- a/config/initializers/new_framework_defaults.rb +++ b/config/initializers/new_framework_defaults.rb @@ -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. diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 2c7c004..df5c83b 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -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' diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb index bbfc396..18c3825 100644 --- a/config/initializers/wrap_parameters.rb +++ b/config/initializers/wrap_parameters.rb @@ -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 diff --git a/config/puma.rb b/config/puma.rb index c7f311f..14a0f44 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -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 diff --git a/config/routes.rb b/config/routes.rb index 3383a54..ca4a9dc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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 diff --git a/config/spring.rb b/config/spring.rb index c9119b4..312295f 100644 --- a/config/spring.rb +++ b/config/spring.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true %w( .ruby-version .rbenv-vars diff --git a/db/migrate/20160726193255_db_init.rb b/db/migrate/20160726193255_db_init.rb index 6351352..9da2dd5 100644 --- a/db/migrate/20160726193255_db_init.rb +++ b/db/migrate/20160726193255_db_init.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class DbInit < ActiveRecord::Migration[5.0] def change create_table :candidates do |t| diff --git a/db/migrate/20160727154057_add_quiz_to_candidate.rb b/db/migrate/20160727154057_add_quiz_to_candidate.rb index 88ee3e2..d504fb0 100644 --- a/db/migrate/20160727154057_add_quiz_to_candidate.rb +++ b/db/migrate/20160727154057_add_quiz_to_candidate.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class AddQuizToCandidate < ActiveRecord::Migration[5.0] def change add_column :candidates, :quiz_id, :integer diff --git a/db/migrate/20160803003932_add_attachments_to_questions.rb b/db/migrate/20160803003932_add_attachments_to_questions.rb index 88333da..0773fef 100644 --- a/db/migrate/20160803003932_add_attachments_to_questions.rb +++ b/db/migrate/20160803003932_add_attachments_to_questions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class AddAttachmentsToQuestions < ActiveRecord::Migration[5.0] def change add_column :questions, :attachment, :string diff --git a/db/migrate/20160818225721_add_name_to_quiz.rb b/db/migrate/20160818225721_add_name_to_quiz.rb index a8ecd97..ecbdb10 100644 --- a/db/migrate/20160818225721_add_name_to_quiz.rb +++ b/db/migrate/20160818225721_add_name_to_quiz.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class AddNameToQuiz < ActiveRecord::Migration[5.0] def change add_column :quizzes, :name, :string, after: :id diff --git a/db/migrate/20160824183159_add_resets_to_users.rb b/db/migrate/20160824183159_add_resets_to_users.rb index da9f93b..364e217 100644 --- a/db/migrate/20160824183159_add_resets_to_users.rb +++ b/db/migrate/20160824183159_add_resets_to_users.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class AddResetsToUsers < ActiveRecord::Migration[5.0] def change add_column :users, :reset_token, :string diff --git a/db/migrate/20160826200610_encode_candidate_emails.rb b/db/migrate/20160826200610_encode_candidate_emails.rb index 6872e22..d00d27c 100644 --- a/db/migrate/20160826200610_encode_candidate_emails.rb +++ b/db/migrate/20160826200610_encode_candidate_emails.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class EncodeCandidateEmails < ActiveRecord::Migration[5.0] def change sql = "select id, email from candidates;" diff --git a/lib/tasks/reminders.rake b/lib/tasks/reminders.rake index bd2ee48..2695aa6 100644 --- a/lib/tasks/reminders.rake +++ b/lib/tasks/reminders.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true namespace :reminders do desc "send reminders to stagnate quizes" task send_all: :environment do diff --git a/test/controllers/admin/auth_controller_test.rb b/test/controllers/admin/auth_controller_test.rb index f83e7ff..6ac928f 100644 --- a/test/controllers/admin/auth_controller_test.rb +++ b/test/controllers/admin/auth_controller_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' module Admin diff --git a/test/controllers/admin/profile_controller_test.rb b/test/controllers/admin/profile_controller_test.rb index 7f11332..ce3e01e 100644 --- a/test/controllers/admin/profile_controller_test.rb +++ b/test/controllers/admin/profile_controller_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' module Admin diff --git a/test/controllers/admin/question_controller_test.rb b/test/controllers/admin/question_controller_test.rb index a629bea..767eada 100644 --- a/test/controllers/admin/question_controller_test.rb +++ b/test/controllers/admin/question_controller_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' module Admin diff --git a/test/controllers/admin/quiz_controller_test.rb b/test/controllers/admin/quiz_controller_test.rb index b638661..cc1b435 100644 --- a/test/controllers/admin/quiz_controller_test.rb +++ b/test/controllers/admin/quiz_controller_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' module Admin diff --git a/test/controllers/admin/user_controller_test.rb b/test/controllers/admin/user_controller_test.rb index 6f0a311..4d034c6 100644 --- a/test/controllers/admin/user_controller_test.rb +++ b/test/controllers/admin/user_controller_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' module Admin diff --git a/test/controllers/admin_controller_test.rb b/test/controllers/admin_controller_test.rb index 0c0c0b1..56df4d6 100644 --- a/test/controllers/admin_controller_test.rb +++ b/test/controllers/admin_controller_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class AdminControllerTest < ActionDispatch::IntegrationTest diff --git a/test/controllers/application_controller_test.rb b/test/controllers/application_controller_test.rb index 16068dc..189e330 100644 --- a/test/controllers/application_controller_test.rb +++ b/test/controllers/application_controller_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class ApplicationControllerTest < ActionDispatch::IntegrationTest diff --git a/test/controllers/candidate_controller_test.rb b/test/controllers/candidate_controller_test.rb index d0258a1..f9128bc 100644 --- a/test/controllers/candidate_controller_test.rb +++ b/test/controllers/candidate_controller_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class CandidateControllerTest < ActionDispatch::IntegrationTest diff --git a/test/controllers/quiz_controller_test.rb b/test/controllers/quiz_controller_test.rb index 843e037..ec11003 100644 --- a/test/controllers/quiz_controller_test.rb +++ b/test/controllers/quiz_controller_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class QuizControllerTest < ActionDispatch::IntegrationTest diff --git a/test/controllers/recruiter_controller_test.rb b/test/controllers/recruiter_controller_test.rb index 41343cc..1398f11 100644 --- a/test/controllers/recruiter_controller_test.rb +++ b/test/controllers/recruiter_controller_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class RecruiterControllerTest < ActionDispatch::IntegrationTest diff --git a/test/controllers/review_controller_test.rb b/test/controllers/review_controller_test.rb index b030c41..bb7b28e 100644 --- a/test/controllers/review_controller_test.rb +++ b/test/controllers/review_controller_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class ReviewControllerTest < ActionDispatch::IntegrationTest diff --git a/test/integration/question_attachments_test.rb b/test/integration/question_attachments_test.rb index 4f25a90..e363ead 100644 --- a/test/integration/question_attachments_test.rb +++ b/test/integration/question_attachments_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class QuestionAttachmentsTest < ActionDispatch::IntegrationTest diff --git a/test/integration/question_flow_test.rb b/test/integration/question_flow_test.rb index ee79aa8..dce3a52 100644 --- a/test/integration/question_flow_test.rb +++ b/test/integration/question_flow_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class QuestionFlowTest < ActionDispatch::IntegrationTest diff --git a/test/integration/question_live_coder_test.rb b/test/integration/question_live_coder_test.rb index 59eed19..e7d0481 100644 --- a/test/integration/question_live_coder_test.rb +++ b/test/integration/question_live_coder_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class QuestionLiveCoderTest < ActionDispatch::IntegrationTest diff --git a/test/mailers/candidate_mailer_test.rb b/test/mailers/candidate_mailer_test.rb index 1b41c27..00817fd 100644 --- a/test/mailers/candidate_mailer_test.rb +++ b/test/mailers/candidate_mailer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class CandidateMailerTest < ActionMailer::TestCase diff --git a/test/mailers/previews/candidate_mailer_preview.rb b/test/mailers/previews/candidate_mailer_preview.rb index 08ee6c9..888625e 100644 --- a/test/mailers/previews/candidate_mailer_preview.rb +++ b/test/mailers/previews/candidate_mailer_preview.rb @@ -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 diff --git a/test/mailers/previews/recruiter_mailer_preview.rb b/test/mailers/previews/recruiter_mailer_preview.rb index b739fb8..9a14fb3 100644 --- a/test/mailers/previews/recruiter_mailer_preview.rb +++ b/test/mailers/previews/recruiter_mailer_preview.rb @@ -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 diff --git a/test/mailers/previews/reviewer_mailer_preview.rb b/test/mailers/previews/reviewer_mailer_preview.rb index bf08208..df8b1cb 100644 --- a/test/mailers/previews/reviewer_mailer_preview.rb +++ b/test/mailers/previews/reviewer_mailer_preview.rb @@ -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 diff --git a/test/mailers/previews/user_mailer_preview.rb b/test/mailers/previews/user_mailer_preview.rb index b303156..27b0d13 100644 --- a/test/mailers/previews/user_mailer_preview.rb +++ b/test/mailers/previews/user_mailer_preview.rb @@ -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 diff --git a/test/mailers/recruiter_mailer_test.rb b/test/mailers/recruiter_mailer_test.rb index e6fabe4..5331ca9 100644 --- a/test/mailers/recruiter_mailer_test.rb +++ b/test/mailers/recruiter_mailer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class RecruiterMailerTest < ActionMailer::TestCase diff --git a/test/mailers/reviewer_mailer_test.rb b/test/mailers/reviewer_mailer_test.rb index 807f992..45bb811 100644 --- a/test/mailers/reviewer_mailer_test.rb +++ b/test/mailers/reviewer_mailer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class ReviewerMailerTest < ActionMailer::TestCase diff --git a/test/mailers/user_mailer_test.rb b/test/mailers/user_mailer_test.rb index de58eb7..4ef0c09 100644 --- a/test/mailers/user_mailer_test.rb +++ b/test/mailers/user_mailer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class UserMailerTest < ActionMailer::TestCase diff --git a/test/models/answer_test.rb b/test/models/answer_test.rb index c0af5c3..3950320 100644 --- a/test/models/answer_test.rb +++ b/test/models/answer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class AnswerTest < ActiveSupport::TestCase diff --git a/test/models/candidate_test.rb b/test/models/candidate_test.rb index 5707062..7cb0f5d 100644 --- a/test/models/candidate_test.rb +++ b/test/models/candidate_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class CandidateTest < ActiveSupport::TestCase diff --git a/test/models/question_test.rb b/test/models/question_test.rb index ab2e1ec..13e958e 100644 --- a/test/models/question_test.rb +++ b/test/models/question_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class QuestionTest < ActiveSupport::TestCase diff --git a/test/models/quiz_test.rb b/test/models/quiz_test.rb index f0c73ff..63a5253 100644 --- a/test/models/quiz_test.rb +++ b/test/models/quiz_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class QuizTest < ActiveSupport::TestCase diff --git a/test/models/user_test.rb b/test/models/user_test.rb index 82f61e0..2a7931b 100644 --- a/test/models/user_test.rb +++ b/test/models/user_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class UserTest < ActiveSupport::TestCase diff --git a/test/services/crypt_serializer_test.rb b/test/services/crypt_serializer_test.rb index c649076..2bcdd43 100644 --- a/test/services/crypt_serializer_test.rb +++ b/test/services/crypt_serializer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class CryptSerializerTest < ActiveSupport::TestCase diff --git a/test/services/skill_config_test.rb b/test/services/skill_config_test.rb index e72dfb5..8d6fcff 100644 --- a/test/services/skill_config_test.rb +++ b/test/services/skill_config_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class SkillConfigTest < ActiveSupport::TestCase diff --git a/test/test_helper.rb b/test/test_helper.rb index a65e8ac..898806c 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ENV['RAILS_ENV'] ||= 'test' # https://github.com/colszowka/simplecov diff --git a/test/test_helpers/answer_validatable.rb b/test/test_helpers/answer_validatable.rb index cb2ba6d..e886459 100644 --- a/test/test_helpers/answer_validatable.rb +++ b/test/test_helpers/answer_validatable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class AnswerValidatable include ActiveModel::Validations diff --git a/test/test_helpers/email_validatable.rb b/test/test_helpers/email_validatable.rb index f9920f0..475d157 100644 --- a/test/test_helpers/email_validatable.rb +++ b/test/test_helpers/email_validatable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class EmailValidatable include ActiveModel::Validations attr_accessor :email diff --git a/test/test_helpers/input_options_validatable.rb b/test/test_helpers/input_options_validatable.rb index 85c26aa..b2673a7 100644 --- a/test/test_helpers/input_options_validatable.rb +++ b/test/test_helpers/input_options_validatable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class InputOptionsValidatable include ActiveModel::Validations attr_accessor :input_type diff --git a/test/validators/answer_format_validator/checkbox_other_test.rb b/test/validators/answer_format_validator/checkbox_other_test.rb index 2d84926..702bb6f 100644 --- a/test/validators/answer_format_validator/checkbox_other_test.rb +++ b/test/validators/answer_format_validator/checkbox_other_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' # *_with_other answers expect a hash response: diff --git a/test/validators/answer_format_validator/checkbox_test.rb b/test/validators/answer_format_validator/checkbox_test.rb index 8899919..29c1881 100644 --- a/test/validators/answer_format_validator/checkbox_test.rb +++ b/test/validators/answer_format_validator/checkbox_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class AnswerFormatValidatorTest < ActiveSupport::TestCase diff --git a/test/validators/answer_format_validator/live_code_test.rb b/test/validators/answer_format_validator/live_code_test.rb index 78709d3..c031c98 100644 --- a/test/validators/answer_format_validator/live_code_test.rb +++ b/test/validators/answer_format_validator/live_code_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class AnswerFormatValidatorTest < ActiveSupport::TestCase diff --git a/test/validators/answer_format_validator/radio_other_test.rb b/test/validators/answer_format_validator/radio_other_test.rb index 8429f2b..397e049 100644 --- a/test/validators/answer_format_validator/radio_other_test.rb +++ b/test/validators/answer_format_validator/radio_other_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' # *_with_other answers expect a hash answer: diff --git a/test/validators/answer_format_validator/radio_test.rb b/test/validators/answer_format_validator/radio_test.rb index 6629d87..30141be 100644 --- a/test/validators/answer_format_validator/radio_test.rb +++ b/test/validators/answer_format_validator/radio_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class AnswerFormatValidatorTest < ActiveSupport::TestCase diff --git a/test/validators/answer_format_validator/text_test.rb b/test/validators/answer_format_validator/text_test.rb index bd7e206..e1dca24 100644 --- a/test/validators/answer_format_validator/text_test.rb +++ b/test/validators/answer_format_validator/text_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class AnswerFormatValidatorTest < ActiveSupport::TestCase diff --git a/test/validators/email_format_validator_test.rb b/test/validators/email_format_validator_test.rb index 619a6a7..151d88e 100644 --- a/test/validators/email_format_validator_test.rb +++ b/test/validators/email_format_validator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class EmailFormatValidatorTest < ActiveSupport::TestCase diff --git a/test/validators/input_options_presence_validator_test.rb b/test/validators/input_options_presence_validator_test.rb index b827af2..921c39e 100644 --- a/test/validators/input_options_presence_validator_test.rb +++ b/test/validators/input_options_presence_validator_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class InputOptionsPresenceValidatorTest < ActiveSupport::TestCase diff --git a/test/workers/candidate_quiz_question_test.rb b/test/workers/candidate_quiz_question_test.rb index dde32f9..85b08d2 100644 --- a/test/workers/candidate_quiz_question_test.rb +++ b/test/workers/candidate_quiz_question_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class CandidateQuizQuestionTest < ActiveSupport::TestCase diff --git a/test/workers/candidate_quiz_test.rb b/test/workers/candidate_quiz_test.rb index 0e4a0f3..f77267c 100644 --- a/test/workers/candidate_quiz_test.rb +++ b/test/workers/candidate_quiz_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class CandidateQuizTest < ActiveSupport::TestCase diff --git a/test/workers/quiz_status_test.rb b/test/workers/quiz_status_test.rb index 615eac7..f79b299 100644 --- a/test/workers/quiz_status_test.rb +++ b/test/workers/quiz_status_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class QuizStatusTest < ActiveSupport::TestCase diff --git a/test/workers/reminder_test.rb b/test/workers/reminder_test.rb index 00d25e5..32dabbb 100644 --- a/test/workers/reminder_test.rb +++ b/test/workers/reminder_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'test_helper' class ReminderTest < ActiveSupport::TestCase