Change RuboCop rules to loose (#4464)
parent
93aafa8549
commit
3e7a541e09
|
@ -27,6 +27,7 @@ Metrics/AbcSize:
|
||||||
Max: 100
|
Max: 100
|
||||||
|
|
||||||
Metrics/BlockLength:
|
Metrics/BlockLength:
|
||||||
|
Max: 35
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/tasks/**/*'
|
- 'lib/tasks/**/*'
|
||||||
|
|
||||||
|
@ -35,10 +36,10 @@ Metrics/BlockNesting:
|
||||||
|
|
||||||
Metrics/ClassLength:
|
Metrics/ClassLength:
|
||||||
CountComments: false
|
CountComments: false
|
||||||
Max: 200
|
Max: 300
|
||||||
|
|
||||||
Metrics/CyclomaticComplexity:
|
Metrics/CyclomaticComplexity:
|
||||||
Max: 15
|
Max: 25
|
||||||
|
|
||||||
Metrics/LineLength:
|
Metrics/LineLength:
|
||||||
AllowURI: true
|
AllowURI: true
|
||||||
|
@ -53,11 +54,11 @@ Metrics/ModuleLength:
|
||||||
Max: 200
|
Max: 200
|
||||||
|
|
||||||
Metrics/ParameterLists:
|
Metrics/ParameterLists:
|
||||||
Max: 4
|
Max: 5
|
||||||
CountKeywordArgs: true
|
CountKeywordArgs: true
|
||||||
|
|
||||||
Metrics/PerceivedComplexity:
|
Metrics/PerceivedComplexity:
|
||||||
Max: 10
|
Max: 20
|
||||||
|
|
||||||
Rails:
|
Rails:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
|
@ -6,7 +6,7 @@ class Emoji
|
||||||
include Singleton
|
include Singleton
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
data = Oj.load(File.open(File.join(Rails.root, 'lib', 'assets', 'emoji.json')))
|
data = Oj.load(File.open(Rails.root.join('lib', 'assets', 'emoji.json')))
|
||||||
|
|
||||||
@map = {}
|
@map = {}
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ class BatchedRemoveStatusService < BaseService
|
||||||
key = FeedManager.instance.key(:home, follower_id)
|
key = FeedManager.instance.key(:home, follower_id)
|
||||||
|
|
||||||
originals = statuses.reject(&:reblog?)
|
originals = statuses.reject(&:reblog?)
|
||||||
reblogs = statuses.reject { |s| !s.reblog? }
|
reblogs = statuses.select(&:reblog?)
|
||||||
|
|
||||||
# Quickly remove all originals
|
# Quickly remove all originals
|
||||||
redis.pipelined do
|
redis.pipelined do
|
||||||
|
|
|
@ -14,7 +14,7 @@ class Pubsubhubbub::DistributionWorker
|
||||||
@subscriptions = active_subscriptions.to_a
|
@subscriptions = active_subscriptions.to_a
|
||||||
|
|
||||||
distribute_public!(stream_entries.reject(&:hidden?))
|
distribute_public!(stream_entries.reject(&:hidden?))
|
||||||
distribute_hidden!(stream_entries.reject { |s| !s.hidden? })
|
distribute_hidden!(stream_entries.select(&:hidden?))
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -35,7 +35,7 @@ class Pubsubhubbub::DistributionWorker
|
||||||
@payload = OStatus::AtomSerializer.render(OStatus::AtomSerializer.new.feed(@account, stream_entries))
|
@payload = OStatus::AtomSerializer.render(OStatus::AtomSerializer.new.feed(@account, stream_entries))
|
||||||
@domains = @account.followers.domains
|
@domains = @account.followers.domains
|
||||||
|
|
||||||
Pubsubhubbub::DeliveryWorker.push_bulk(@subscriptions.reject { |s| !allowed_to_receive?(s.callback_url, s.domain) }) do |subscription|
|
Pubsubhubbub::DeliveryWorker.push_bulk(@subscriptions.select { |s| allowed_to_receive?(s.callback_url, s.domain) }) do |subscription|
|
||||||
[subscription.id, @payload]
|
[subscription.id, @payload]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Reference in New Issue