correct linting
This commit is contained in:
parent
8f43872bff
commit
f4f95ce956
|
@ -101,7 +101,6 @@ EOM
|
||||||
break if users.empty?
|
break if users.empty?
|
||||||
|
|
||||||
last_user_id = users[-1]["id"]
|
last_user_id = users[-1]["id"]
|
||||||
before = users.size
|
|
||||||
users.reject! { |u| @lookup.user_already_imported?(u["id"].to_i) }
|
users.reject! { |u| @lookup.user_already_imported?(u["id"].to_i) }
|
||||||
|
|
||||||
create_users(users, total: user_count, offset: offset) do |user|
|
create_users(users, total: user_count, offset: offset) do |user|
|
||||||
|
@ -233,7 +232,7 @@ EOM
|
||||||
end
|
end
|
||||||
|
|
||||||
remaining = max_length
|
remaining = max_length
|
||||||
if word_lengths.inject(0) {|sum, (k,v)| sum + v } > remaining
|
if word_lengths.inject(0) { |sum, (_, v)| sum + v } > remaining
|
||||||
word_lengths = Hash[word_lengths.sort { |x, y| y[1] <=> x[1] }]
|
word_lengths = Hash[word_lengths.sort { |x, y| y[1] <=> x[1] }]
|
||||||
word_lengths.each do |idx, word_length|
|
word_lengths.each do |idx, word_length|
|
||||||
if remaining > 0
|
if remaining > 0
|
||||||
|
@ -313,7 +312,7 @@ EOM
|
||||||
begin
|
begin
|
||||||
PostAction.act(user, post, 2) if user && post
|
PostAction.act(user, post, 2) if user && post
|
||||||
rescue => e
|
rescue => e
|
||||||
debugger
|
puts "error acting on post #{e}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -402,22 +401,22 @@ EOM
|
||||||
end
|
end
|
||||||
|
|
||||||
# [FONT=blah] and [COLOR=blah]
|
# [FONT=blah] and [COLOR=blah]
|
||||||
raw.gsub! /\[FONT=.*?\](.*?)\[\/FONT\]/im, '\1'
|
raw.gsub!(/\[FONT=.*?\](.*?)\[\/FONT\]/im, '\1')
|
||||||
raw.gsub! /\[COLOR=.*?\](.*?)\[\/COLOR\]/im, '\1'
|
raw.gsub!(/\[COLOR=.*?\](.*?)\[\/COLOR\]/im, '\1')
|
||||||
raw.gsub! /\[COLOR=#.*?\](.*?)\[\/COLOR\]/im, '\1'
|
raw.gsub!(/\[COLOR=#.*?\](.*?)\[\/COLOR\]/im, '\1')
|
||||||
|
|
||||||
raw.gsub! /\[SIZE=.*?\](.*?)\[\/SIZE\]/im, '\1'
|
raw.gsub!(/\[SIZE=.*?\](.*?)\[\/SIZE\]/im, '\1')
|
||||||
raw.gsub! /\[h=.*?\](.*?)\[\/h\]/im, '\1'
|
raw.gsub!(/\[h=.*?\](.*?)\[\/h\]/im, '\1')
|
||||||
|
|
||||||
# [CENTER]...[/CENTER]
|
# [CENTER]...[/CENTER]
|
||||||
raw.gsub! /\[CENTER\](.*?)\[\/CENTER\]/im, '\1'
|
raw.gsub!(/\[CENTER\](.*?)\[\/CENTER\]/im, '\1')
|
||||||
|
|
||||||
# [INDENT]...[/INDENT]
|
# [INDENT]...[/INDENT]
|
||||||
raw.gsub! /\[INDENT\](.*?)\[\/INDENT\]/im, '\1'
|
raw.gsub!(/\[INDENT\](.*?)\[\/INDENT\]/im, '\1')
|
||||||
raw.gsub! /\[TABLE\](.*?)\[\/TABLE\]/im, '\1'
|
raw.gsub!(/\[TABLE\](.*?)\[\/TABLE\]/im, '\1')
|
||||||
raw.gsub! /\[TR\](.*?)\[\/TR\]/im, '\1'
|
raw.gsub!(/\[TR\](.*?)\[\/TR\]/im, '\1')
|
||||||
raw.gsub! /\[TD\](.*?)\[\/TD\]/im, '\1'
|
raw.gsub!(/\[TD\](.*?)\[\/TD\]/im, '\1')
|
||||||
raw.gsub! /\[TD="?.*?"?\](.*?)\[\/TD\]/im, '\1'
|
raw.gsub!(/\[TD="?.*?"?\](.*?)\[\/TD\]/im, '\1')
|
||||||
|
|
||||||
# [QUOTE]...[/QUOTE]
|
# [QUOTE]...[/QUOTE]
|
||||||
raw.gsub!(/\[quote\](.+?)\[\/quote\]/im) { |quote|
|
raw.gsub!(/\[quote\](.+?)\[\/quote\]/im) { |quote|
|
||||||
|
|
Loading…
Reference in New Issue