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
requires_login

View File

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

View File

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

View File

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

View File

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

View File

@ -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'

View File

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

View File

@ -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'"

View File

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

View File

@ -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"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class DropClaimedById < ActiveRecord::Migration[5.2]
def up
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
task "groups:grant_badge", [:group_id, :badge_id] => [:environment] do |_, args|
group_id = args[:group_id]

View File

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

View File

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