A platform for community discussion. Free, open, simple.
Make rubocop happy.
Guo Xiang Tan8165ceb32064
diff --git a/app/controllers/reviewable_claimed_topics_controller.rb b/app/controllers/reviewable_claimed_topics_controller.rbindex 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 < ApplicationControllerrequires_logindiff --git a/app/jobs/regular/notify_post_revision.rb b/app/jobs/regular/notify_post_revision.rbindex 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 Jobsclass NotifyPostRevision < Jobs::Basedef execute(args)diff --git a/app/jobs/scheduled/reviewable_priorities.rb b/app/jobs/scheduled/reviewable_priorities.rbindex 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::Scheduledevery 1.daydiff --git a/app/models/reviewable_claimed_topic.rb b/app/models/reviewable_claimed_topic.rbindex 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::Basebelongs_to :topicbelongs_to :userdiff --git a/db/migrate/20190426011148_add_upload_foreign_keys_to_user_profiles.rb b/db/migrate/20190426011148_add_upload_foreign_keys_to_user_profiles.rbindex 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.rbindex 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 changeadd_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.rbindex 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 upexecute(<<~SQL)diff --git a/db/migrate/20190508135348_rename_site_setting_default_topics.rb b/db/migrate/20190508135348_rename_site_setting_default_topics.rbindex 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 upexecute "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.rbindex 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 changecreate_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.rbindex 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 changeadd_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.rbindex 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 upremove_column :reviewables, :claimed_by_iddiff --git a/lib/tasks/groups.rake b/lib/tasks/groups.rakeindex 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 grouptask "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.rbindex 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 dodiff --git a/spec/models/reviewable_claimed_topic_spec.rb b/spec/models/reviewable_claimed_topic_spec.rbindex 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