From 8165ceb3206485c0e1599dcfacf509aa80a15a46 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Mon, 13 May 2019 09:55:44 +0800 Subject: [PATCH] Make rubocop happy. --- app/controllers/reviewable_claimed_topics_controller.rb | 2 ++ app/jobs/regular/notify_post_revision.rb | 2 ++ app/jobs/scheduled/reviewable_priorities.rb | 2 ++ app/models/reviewable_claimed_topic.rb | 2 ++ .../20190426011148_add_upload_foreign_keys_to_user_profiles.rb | 2 ++ db/migrate/20190502223613_add_bounce_key_index_on_email_logs.rb | 2 ++ db/migrate/20190503180839_remove_like_count_from_post_menu.rb | 2 ++ db/migrate/20190508135348_rename_site_setting_default_topics.rb | 2 ++ db/migrate/20190508141327_create_reviewable_claimed_topics.rb | 2 ++ ...0_add_missing_uploads_ignored_index_to_post_custom_fields.rb | 2 ++ db/post_migrate/20190508141824_drop_claimed_by_id.rb | 2 ++ lib/tasks/groups.rake | 2 ++ spec/jobs/reviewable_priorities_spec.rb | 2 ++ spec/models/reviewable_claimed_topic_spec.rb | 2 ++ 14 files changed, 28 insertions(+) diff --git a/app/controllers/reviewable_claimed_topics_controller.rb b/app/controllers/reviewable_claimed_topics_controller.rb index 948558c8323..eb8b0d712b5 100644 --- a/app/controllers/reviewable_claimed_topics_controller.rb +++ b/app/controllers/reviewable_claimed_topics_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ReviewableClaimedTopicsController < ApplicationController requires_login diff --git a/app/jobs/regular/notify_post_revision.rb b/app/jobs/regular/notify_post_revision.rb index b0b0794685f..b7e5c184dc9 100644 --- a/app/jobs/regular/notify_post_revision.rb +++ b/app/jobs/regular/notify_post_revision.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jobs class NotifyPostRevision < Jobs::Base def execute(args) diff --git a/app/jobs/scheduled/reviewable_priorities.rb b/app/jobs/scheduled/reviewable_priorities.rb index 00159f76fa6..7ba3fc3ee97 100644 --- a/app/jobs/scheduled/reviewable_priorities.rb +++ b/app/jobs/scheduled/reviewable_priorities.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Jobs::ReviewablePriorities < Jobs::Scheduled every 1.day diff --git a/app/models/reviewable_claimed_topic.rb b/app/models/reviewable_claimed_topic.rb index ab73670cf76..d291b6cd457 100644 --- a/app/models/reviewable_claimed_topic.rb +++ b/app/models/reviewable_claimed_topic.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ReviewableClaimedTopic < ActiveRecord::Base belongs_to :topic belongs_to :user diff --git a/db/migrate/20190426011148_add_upload_foreign_keys_to_user_profiles.rb b/db/migrate/20190426011148_add_upload_foreign_keys_to_user_profiles.rb index 2c6d78f782b..c0918769b2f 100644 --- a/db/migrate/20190426011148_add_upload_foreign_keys_to_user_profiles.rb +++ b/db/migrate/20190426011148_add_upload_foreign_keys_to_user_profiles.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'migration/column_dropper' class AddUploadForeignKeysToUserProfiles < ActiveRecord::Migration[5.2] diff --git a/db/migrate/20190502223613_add_bounce_key_index_on_email_logs.rb b/db/migrate/20190502223613_add_bounce_key_index_on_email_logs.rb index c0c66f59c0d..83ccf913d27 100644 --- a/db/migrate/20190502223613_add_bounce_key_index_on_email_logs.rb +++ b/db/migrate/20190502223613_add_bounce_key_index_on_email_logs.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddBounceKeyIndexOnEmailLogs < ActiveRecord::Migration[5.2] def change add_index :email_logs, [:bounce_key], unique: true, where: 'bounce_key IS NOT NULL' diff --git a/db/migrate/20190503180839_remove_like_count_from_post_menu.rb b/db/migrate/20190503180839_remove_like_count_from_post_menu.rb index 84b0d12bdbd..454d22ac589 100644 --- a/db/migrate/20190503180839_remove_like_count_from_post_menu.rb +++ b/db/migrate/20190503180839_remove_like_count_from_post_menu.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class RemoveLikeCountFromPostMenu < ActiveRecord::Migration[5.2] def up execute(<<~SQL) diff --git a/db/migrate/20190508135348_rename_site_setting_default_topics.rb b/db/migrate/20190508135348_rename_site_setting_default_topics.rb index c615dc888d5..fbd5e58bbf0 100644 --- a/db/migrate/20190508135348_rename_site_setting_default_topics.rb +++ b/db/migrate/20190508135348_rename_site_setting_default_topics.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class RenameSiteSettingDefaultTopics < ActiveRecord::Migration[5.2] def up execute "UPDATE site_settings SET name = 'reviewable_default_topics' WHERE name = 'flags_default_topics'" diff --git a/db/migrate/20190508141327_create_reviewable_claimed_topics.rb b/db/migrate/20190508141327_create_reviewable_claimed_topics.rb index 72f049ba2be..fd95ba6aefe 100644 --- a/db/migrate/20190508141327_create_reviewable_claimed_topics.rb +++ b/db/migrate/20190508141327_create_reviewable_claimed_topics.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateReviewableClaimedTopics < ActiveRecord::Migration[5.2] def change create_table :reviewable_claimed_topics do |t| diff --git a/db/migrate/20190508193900_add_missing_uploads_ignored_index_to_post_custom_fields.rb b/db/migrate/20190508193900_add_missing_uploads_ignored_index_to_post_custom_fields.rb index 2672e171a3b..1f6978225c0 100644 --- a/db/migrate/20190508193900_add_missing_uploads_ignored_index_to_post_custom_fields.rb +++ b/db/migrate/20190508193900_add_missing_uploads_ignored_index_to_post_custom_fields.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddMissingUploadsIgnoredIndexToPostCustomFields < ActiveRecord::Migration[5.2] def change add_index :post_custom_fields, :post_id, unique: true, where: "name = 'missing uploads ignored'", name: "index_post_id_where_missing_uploads_ignored" diff --git a/db/post_migrate/20190508141824_drop_claimed_by_id.rb b/db/post_migrate/20190508141824_drop_claimed_by_id.rb index 7e0630348ec..ed9bca6975a 100644 --- a/db/post_migrate/20190508141824_drop_claimed_by_id.rb +++ b/db/post_migrate/20190508141824_drop_claimed_by_id.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class DropClaimedById < ActiveRecord::Migration[5.2] def up remove_column :reviewables, :claimed_by_id diff --git a/lib/tasks/groups.rake b/lib/tasks/groups.rake index 6dbfac4a9d9..242ecbb16ef 100644 --- a/lib/tasks/groups.rake +++ b/lib/tasks/groups.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # bulk grant badge to members of a specific group task "groups:grant_badge", [:group_id, :badge_id] => [:environment] do |_, args| group_id = args[:group_id] diff --git a/spec/jobs/reviewable_priorities_spec.rb b/spec/jobs/reviewable_priorities_spec.rb index ea76400fa8b..a1f60f13101 100644 --- a/spec/jobs/reviewable_priorities_spec.rb +++ b/spec/jobs/reviewable_priorities_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rails_helper' describe Jobs::ReviewablePriorities do diff --git a/spec/models/reviewable_claimed_topic_spec.rb b/spec/models/reviewable_claimed_topic_spec.rb index 09cef31b918..e8801e7f13c 100644 --- a/spec/models/reviewable_claimed_topic_spec.rb +++ b/spec/models/reviewable_claimed_topic_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rails_helper' RSpec.describe ReviewableClaimedTopic, type: :model do