Maintenance: Bump rubocop from 1.21.0 to 1.22.0
This commit is contained in:
parent
4e4ba091d4
commit
51933e3b76
5 changed files with 8 additions and 12 deletions
|
@ -498,13 +498,13 @@ GEM
|
||||||
rspec-support (~> 3.10)
|
rspec-support (~> 3.10)
|
||||||
rspec-support (3.10.2)
|
rspec-support (3.10.2)
|
||||||
rszr (0.5.2)
|
rszr (0.5.2)
|
||||||
rubocop (1.21.0)
|
rubocop (1.22.0)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 3.0.0.0)
|
parser (>= 3.0.0.0)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
regexp_parser (>= 1.8, < 3.0)
|
regexp_parser (>= 1.8, < 3.0)
|
||||||
rexml
|
rexml
|
||||||
rubocop-ast (>= 1.9.1, < 2.0)
|
rubocop-ast (>= 1.12.0, < 2.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 1.4.0, < 3.0)
|
unicode-display_width (>= 1.4.0, < 3.0)
|
||||||
rubocop-ast (1.12.0)
|
rubocop-ast (1.12.0)
|
||||||
|
|
|
@ -502,7 +502,7 @@ process unprocessable_mails (tmp/unprocessable_mail/*.eml) again
|
||||||
path = Rails.root.join('tmp/unprocessable_mail')
|
path = Rails.root.join('tmp/unprocessable_mail')
|
||||||
files = []
|
files = []
|
||||||
Dir.glob("#{path}/*.eml") do |entry|
|
Dir.glob("#{path}/*.eml") do |entry|
|
||||||
ticket, _article, _user, _mail = Channel::EmailParser.new.process(params, IO.binread(entry))
|
ticket, _article, _user, _mail = Channel::EmailParser.new.process(params, File.binread(entry))
|
||||||
next if ticket.blank?
|
next if ticket.blank?
|
||||||
|
|
||||||
files.push entry
|
files.push entry
|
||||||
|
|
|
@ -161,8 +161,8 @@ satinize html string based on whiltelist
|
||||||
# wrap plain-text URLs in <a> tags
|
# wrap plain-text URLs in <a> tags
|
||||||
if node.is_a?(Nokogiri::XML::Text) && node.content.present? && node.content.include?(':') && node.ancestors.map(&:name).exclude?('a')
|
if node.is_a?(Nokogiri::XML::Text) && node.content.present? && node.content.include?(':') && node.ancestors.map(&:name).exclude?('a')
|
||||||
urls = URI.extract(node.content, LINKABLE_URL_SCHEMES)
|
urls = URI.extract(node.content, LINKABLE_URL_SCHEMES)
|
||||||
.map { |u| u.sub(%r{[,.]$}, '') } # URI::extract captures trailing dots/commas
|
.map { |u| u.sub(%r{[,.]$}, '') } # URI::extract captures trailing dots/commas
|
||||||
.reject { |u| u.match?(%r{^[^:]+:$}) } # URI::extract will match, e.g., 'tel:'
|
.grep_v(%r{^[^:]+:$}) # URI::extract will match, e.g., 'tel:'
|
||||||
|
|
||||||
next if urls.blank?
|
next if urls.blank?
|
||||||
|
|
||||||
|
|
|
@ -104,9 +104,7 @@ Oversized Email Message Body #{'#' * 120_000}
|
||||||
# 1. verify that the oversized email has been saved locally to:
|
# 1. verify that the oversized email has been saved locally to:
|
||||||
# /tmp/oversized_mail/yyyy-mm-ddThh:mm:ss-:md5.eml
|
# /tmp/oversized_mail/yyyy-mm-ddThh:mm:ss-:md5.eml
|
||||||
path = Rails.root.join('tmp/oversized_mail')
|
path = Rails.root.join('tmp/oversized_mail')
|
||||||
target_files = Dir.entries(path).select do |filename|
|
target_files = Dir.entries(path).grep(%r{^#{large_message_md5}\.eml$})
|
||||||
filename =~ %r{^#{large_message_md5}\.eml$}
|
|
||||||
end
|
|
||||||
assert(target_files.present?, 'Large message .eml log file must be present.')
|
assert(target_files.present?, 'Large message .eml log file must be present.')
|
||||||
|
|
||||||
# pick the latest file that matches the criteria
|
# pick the latest file that matches the criteria
|
||||||
|
@ -193,9 +191,7 @@ Oversized Email Message Body #{'#' * 120_000}
|
||||||
# 1. verify that the oversized email has been saved locally to:
|
# 1. verify that the oversized email has been saved locally to:
|
||||||
# /tmp/oversized_mail/yyyy-mm-ddThh:mm:ss-:md5.eml
|
# /tmp/oversized_mail/yyyy-mm-ddThh:mm:ss-:md5.eml
|
||||||
path = Rails.root.join('tmp/oversized_mail')
|
path = Rails.root.join('tmp/oversized_mail')
|
||||||
target_files = Dir.entries(path).select do |filename|
|
target_files = Dir.entries(path).grep(%r{^.+?\.eml$})
|
||||||
filename =~ %r{^.+?\.eml$}
|
|
||||||
end
|
|
||||||
assert_not(target_files.blank?, 'Large message .eml log file must be blank.')
|
assert_not(target_files.blank?, 'Large message .eml log file must be blank.')
|
||||||
|
|
||||||
# 2. verify that a postmaster response email has been sent to the sender
|
# 2. verify that a postmaster response email has been sent to the sender
|
||||||
|
|
|
@ -62,7 +62,7 @@ class ActiveSupport::TestCase
|
||||||
# read config file and count type & recipients
|
# read config file and count type & recipients
|
||||||
file = Rails.root.join('log', "#{Rails.env}.log")
|
file = Rails.root.join('log', "#{Rails.env}.log")
|
||||||
lines = []
|
lines = []
|
||||||
IO.foreach(file) do |line|
|
File.foreach(file) do |line|
|
||||||
lines.push line
|
lines.push line
|
||||||
end
|
end
|
||||||
count = 0
|
count = 0
|
||||||
|
|
Loading…
Reference in a new issue