From 83041df3eb3ca88c5d17cb45afdeb9bd279844a7 Mon Sep 17 00:00:00 2001 From: jorgeabrahan Date: Tue, 6 Jun 2023 22:46:46 -0600 Subject: [PATCH] Fix rubocop linter errors --- Gemfile | 17 ++++++++--------- app/mailers/application_mailer.rb | 4 ++-- config.ru | 2 +- .../application_cable/connection_test.rb | 2 +- test/test_helper.rb | 6 +++--- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Gemfile b/Gemfile index c6db1a4..54f19d0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,18 +1,18 @@ -source "https://rubygems.org" +source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } gem 'rubocop', '>= 1.0', '< 2.0' -ruby "3.2.2" +ruby '3.2.2' # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" -gem "rails", "~> 7.0.5" +gem 'rails', '~> 7.0.5' # Use postgresql as the database for Active Record -gem "pg", "~> 1.1" +gem 'pg', '~> 1.1' # Use the Puma web server [https://github.com/puma/puma] -gem "puma", "~> 5.0" +gem 'puma', '~> 5.0' # Build JSON APIs with ease [https://github.com/rails/jbuilder] # gem "jbuilder" @@ -27,10 +27,10 @@ gem "puma", "~> 5.0" # gem "bcrypt", "~> 3.1.7" # Windows does not include zoneinfo files, so bundle the tzinfo-data gem -gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ] +gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby] # Reduces boot times through caching; required in config/boot.rb -gem "bootsnap", require: false +gem 'bootsnap', require: false # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] # gem "image_processing", "~> 1.2" @@ -40,11 +40,10 @@ gem "bootsnap", require: false group :development, :test do # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem - gem "debug", platforms: %i[ mri mingw x64_mingw ] + gem 'debug', platforms: %i[mri mingw x64_mingw] end group :development do # Speed up commands on slow machines / big apps [https://github.com/rails/spring] # gem "spring" end - diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 3c34c81..286b223 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,4 +1,4 @@ class ApplicationMailer < ActionMailer::Base - default from: "from@example.com" - layout "mailer" + default from: 'from@example.com' + layout 'mailer' end diff --git a/config.ru b/config.ru index 4a3c09a..ad1fbf2 100644 --- a/config.ru +++ b/config.ru @@ -1,6 +1,6 @@ # This file is used by Rack-based servers to start the application. -require_relative "config/environment" +require_relative 'config/environment' run Rails.application Rails.application.load_server diff --git a/test/channels/application_cable/connection_test.rb b/test/channels/application_cable/connection_test.rb index 800405f..d05dbd2 100644 --- a/test/channels/application_cable/connection_test.rb +++ b/test/channels/application_cable/connection_test.rb @@ -1,4 +1,4 @@ -require "test_helper" +require 'test_helper' class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase # test "connects with cookies" do diff --git a/test/test_helper.rb b/test/test_helper.rb index 973526e..91c1291 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,6 +1,6 @@ -ENV["RAILS_ENV"] ||= "test" -require_relative "../config/environment" -require "rails/test_help" +ENV['RAILS_ENV'] ||= 'test' +require_relative '../config/environment' +require 'rails/test_help' class ActiveSupport::TestCase # Run tests in parallel with specified workers