From b16ef1e237f6132f1391cc8d8c871394a2619139 Mon Sep 17 00:00:00 2001 From: Manuel Bustillo Date: Sat, 28 Dec 2024 18:30:54 +0100 Subject: [PATCH] Run Rubocop autocorrect on the rest of the project --- .rubocop.yml | 2 +- Rakefile | 4 +++- app/channels/application_cable/channel.rb | 2 ++ app/channels/application_cable/connection.rb | 2 ++ app/extensions/tree_node_extension.rb | 2 ++ app/jobs/application_job.rb | 2 ++ app/jobs/table_simulator_job.rb | 2 ++ app/mailers/application_mailer.rb | 6 ++++-- app/serializers/serializable_group.rb | 2 ++ app/serializers/serializable_guest.rb | 2 ++ config.ru | 4 +++- lib/tasks/annotate_rb.rake | 6 ++++-- 12 files changed, 29 insertions(+), 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index ff07d58..ca1ed81 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -9,7 +9,7 @@ AllCops: - 'db/**/*' - 'config/**/*' - 'script/**/*' - - 'bin/{rails,rake}' + - 'bin/*' - '*.yml' Layout/LineLength: Max: 120 diff --git a/Rakefile b/Rakefile index 9a5ea73..488c551 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,8 @@ +# 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. -require_relative "config/application" +require_relative 'config/application' Rails.application.load_tasks diff --git a/app/channels/application_cable/channel.rb b/app/channels/application_cable/channel.rb index 3073f1e..12b8f3d 100644 --- a/app/channels/application_cable/channel.rb +++ b/app/channels/application_cable/channel.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Copyright (C) 2024 Manuel Bustillo module ApplicationCable diff --git a/app/channels/application_cable/connection.rb b/app/channels/application_cable/connection.rb index 1cc97c6..02dcb5d 100644 --- a/app/channels/application_cable/connection.rb +++ b/app/channels/application_cable/connection.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Copyright (C) 2024 Manuel Bustillo module ApplicationCable diff --git a/app/extensions/tree_node_extension.rb b/app/extensions/tree_node_extension.rb index 630b011..80104c3 100644 --- a/app/extensions/tree_node_extension.rb +++ b/app/extensions/tree_node_extension.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Copyright (C) 2024 Manuel Bustillo module TreeNodeExtension diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb index 3498a49..438f83d 100644 --- a/app/jobs/application_job.rb +++ b/app/jobs/application_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Copyright (C) 2024 Manuel Bustillo class ApplicationJob < ActiveJob::Base diff --git a/app/jobs/table_simulator_job.rb b/app/jobs/table_simulator_job.rb index 7cbe659..fe46a6d 100644 --- a/app/jobs/table_simulator_job.rb +++ b/app/jobs/table_simulator_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Copyright (C) 2024 Manuel Bustillo class TableSimulatorJob < ApplicationJob diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 94e1656..dc388c7 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,6 +1,8 @@ +# frozen_string_literal: true + # Copyright (C) 2024 Manuel Bustillo class ApplicationMailer < ActionMailer::Base - default from: "from@example.com" - layout "mailer" + default from: 'from@example.com' + layout 'mailer' end diff --git a/app/serializers/serializable_group.rb b/app/serializers/serializable_group.rb index f7cc103..f0c18e9 100644 --- a/app/serializers/serializable_group.rb +++ b/app/serializers/serializable_group.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Copyright (C) 2024 Manuel Bustillo class SerializableGroup < JSONAPI::Serializable::Resource diff --git a/app/serializers/serializable_guest.rb b/app/serializers/serializable_guest.rb index e411307..9c34d8d 100644 --- a/app/serializers/serializable_guest.rb +++ b/app/serializers/serializable_guest.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Copyright (C) 2024 Manuel Bustillo class SerializableGuest < JSONAPI::Serializable::Resource diff --git a/config.ru b/config.ru index 4a3c09a..6dc8321 100644 --- a/config.ru +++ b/config.ru @@ -1,6 +1,8 @@ +# frozen_string_literal: true + # 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/lib/tasks/annotate_rb.rake b/lib/tasks/annotate_rb.rake index 1ad0ec3..e8368b2 100644 --- a/lib/tasks/annotate_rb.rake +++ b/lib/tasks/annotate_rb.rake @@ -1,8 +1,10 @@ +# frozen_string_literal: true + # This rake task was added by annotate_rb gem. # Can set `ANNOTATERB_SKIP_ON_DB_TASKS` to be anything to skip this -if Rails.env.development? && ENV["ANNOTATERB_SKIP_ON_DB_TASKS"].nil? - require "annotate_rb" +if Rails.env.development? && ENV['ANNOTATERB_SKIP_ON_DB_TASKS'].nil? + require 'annotate_rb' AnnotateRb::Core.load_rake_tasks end