bump rubocop

This commit is contained in:
Thomas Dziedzic 2018-08-15 14:44:11 +00:00
parent 5150f1e58d
commit 998a721d72
4 changed files with 12 additions and 8 deletions

View File

@ -3,8 +3,10 @@ Rails:
Enabled: true
AllCops:
Include:
- '**/*.rb'
- '**/Rakefile'
- '**/config.ru'
- '**/*.rake'
Exclude:
- Gemfile
- 'bin/**/*'

View File

@ -88,6 +88,7 @@ GEM
htmlentities (4.3.4)
i18n (1.1.0)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.1)
jquery-rails (4.3.3)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
@ -116,9 +117,9 @@ GEM
mini_portile2 (~> 2.3.0)
oauth (0.5.4)
parallel (1.12.1)
parser (2.5.0.5)
parser (2.5.1.2)
ast (~> 2.4.0)
powerpack (0.1.1)
powerpack (0.1.2)
public_suffix (3.0.2)
rack (2.0.5)
rack-test (1.1.0)
@ -174,16 +175,17 @@ GEM
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
rubocop (0.54.0)
rubocop (0.58.2)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-enum (0.7.2)
i18n
ruby-progressbar (1.9.0)
ruby-progressbar (1.10.0)
ruby_dep (1.5.0)
scenic (1.4.1)
activerecord (>= 4.0.0)
@ -207,7 +209,7 @@ GEM
thread_safe (~> 0.1)
uglifier (4.1.18)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.3.0)
unicode-display_width (1.4.0)
unicorn (5.4.1)
kgio (~> 2.6)
raindrops (~> 0.7)

View File

@ -704,7 +704,7 @@ class Story < ApplicationRecord
title_votes[s.title] += 1
end
title_votes.sort_by {|_k, v| v }.reverse.each do |kv|
title_votes.sort_by {|_k, v| v }.reverse_each do |kv|
if kv[1] >= SUGGESTION_QUORUM
Rails.logger.info "[s#{self.id}] promoting suggested title " <<
"#{kv[0].inspect} instead of #{self.title.inspect}"

View File

@ -186,7 +186,7 @@ Comment.where(
thread = []
indent_level = 0
Comment.where(:thread_id => c.thread_id).arrange_for_user(nil).reverse.each do |cc|
Comment.where(:thread_id => c.thread_id).arrange_for_user(nil).reverse_each do |cc|
if indent_level > 0 && cc.indent_level < indent_level
thread.unshift cc
indent_level = cc.indent_level