Make rubocop happy.

This commit is contained in:
Guo Xiang Tan 2019-05-13 09:55:44 +08:00
parent 888e68a163
commit 8165ceb320
14 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class ReviewableClaimedTopicsController < ApplicationController class ReviewableClaimedTopicsController < ApplicationController
requires_login requires_login

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Jobs module Jobs
class NotifyPostRevision < Jobs::Base class NotifyPostRevision < Jobs::Base
def execute(args) def execute(args)

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Jobs::ReviewablePriorities < Jobs::Scheduled class Jobs::ReviewablePriorities < Jobs::Scheduled
every 1.day every 1.day

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class ReviewableClaimedTopic < ActiveRecord::Base class ReviewableClaimedTopic < ActiveRecord::Base
belongs_to :topic belongs_to :topic
belongs_to :user belongs_to :user

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'migration/column_dropper' require 'migration/column_dropper'
class AddUploadForeignKeysToUserProfiles < ActiveRecord::Migration[5.2] class AddUploadForeignKeysToUserProfiles < ActiveRecord::Migration[5.2]

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddBounceKeyIndexOnEmailLogs < ActiveRecord::Migration[5.2] class AddBounceKeyIndexOnEmailLogs < ActiveRecord::Migration[5.2]
def change def change
add_index :email_logs, [:bounce_key], unique: true, where: 'bounce_key IS NOT NULL' add_index :email_logs, [:bounce_key], unique: true, where: 'bounce_key IS NOT NULL'

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class RemoveLikeCountFromPostMenu < ActiveRecord::Migration[5.2] class RemoveLikeCountFromPostMenu < ActiveRecord::Migration[5.2]
def up def up
execute(<<~SQL) execute(<<~SQL)

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class RenameSiteSettingDefaultTopics < ActiveRecord::Migration[5.2] class RenameSiteSettingDefaultTopics < ActiveRecord::Migration[5.2]
def up def up
execute "UPDATE site_settings SET name = 'reviewable_default_topics' WHERE name = 'flags_default_topics'" execute "UPDATE site_settings SET name = 'reviewable_default_topics' WHERE name = 'flags_default_topics'"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateReviewableClaimedTopics < ActiveRecord::Migration[5.2] class CreateReviewableClaimedTopics < ActiveRecord::Migration[5.2]
def change def change
create_table :reviewable_claimed_topics do |t| create_table :reviewable_claimed_topics do |t|

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddMissingUploadsIgnoredIndexToPostCustomFields < ActiveRecord::Migration[5.2] class AddMissingUploadsIgnoredIndexToPostCustomFields < ActiveRecord::Migration[5.2]
def change def change
add_index :post_custom_fields, :post_id, unique: true, where: "name = 'missing uploads ignored'", name: "index_post_id_where_missing_uploads_ignored" add_index :post_custom_fields, :post_id, unique: true, where: "name = 'missing uploads ignored'", name: "index_post_id_where_missing_uploads_ignored"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class DropClaimedById < ActiveRecord::Migration[5.2] class DropClaimedById < ActiveRecord::Migration[5.2]
def up def up
remove_column :reviewables, :claimed_by_id remove_column :reviewables, :claimed_by_id

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
# bulk grant badge to members of a specific group # bulk grant badge to members of a specific group
task "groups:grant_badge", [:group_id, :badge_id] => [:environment] do |_, args| task "groups:grant_badge", [:group_id, :badge_id] => [:environment] do |_, args|
group_id = args[:group_id] group_id = args[:group_id]

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'rails_helper' require 'rails_helper'
describe Jobs::ReviewablePriorities do describe Jobs::ReviewablePriorities do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'rails_helper' require 'rails_helper'
RSpec.describe ReviewableClaimedTopic, type: :model do RSpec.describe ReviewableClaimedTopic, type: :model do