Maintenance: Bump rubocop from 1.20.0 to 1.21.0
This commit is contained in:
parent
53d68b12ae
commit
3e2ad0e19c
11 changed files with 12 additions and 19 deletions
|
@ -397,7 +397,7 @@ GEM
|
||||||
childprocess (>= 0.6.3, < 5)
|
childprocess (>= 0.6.3, < 5)
|
||||||
iniparse (~> 1.4)
|
iniparse (~> 1.4)
|
||||||
rexml (~> 3.2)
|
rexml (~> 3.2)
|
||||||
parallel (1.20.1)
|
parallel (1.21.0)
|
||||||
parser (3.0.2.0)
|
parser (3.0.2.0)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
pg (0.21.0)
|
pg (0.21.0)
|
||||||
|
@ -499,7 +499,7 @@ 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.20.0)
|
rubocop (1.21.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)
|
||||||
|
|
|
@ -192,7 +192,7 @@ class FormController < ApplicationController
|
||||||
Rails.logger.info "Invalid token for form (invalid fingerprint found #{fingerprint_local} != #{fingerprint})!"
|
Rails.logger.info "Invalid token for form (invalid fingerprint found #{fingerprint_local} != #{fingerprint})!"
|
||||||
raise Exceptions::NotAuthorized
|
raise Exceptions::NotAuthorized
|
||||||
end
|
end
|
||||||
if parts[1].to_i < (Time.zone.now.to_i - 60 * 60 * 24)
|
if parts[1].to_i < (Time.zone.now.to_i - (60 * 60 * 24))
|
||||||
Rails.logger.info 'Invalid token for form (token expired})!'
|
Rails.logger.info 'Invalid token for form (token expired})!'
|
||||||
raise Exceptions::NotAuthorized
|
raise Exceptions::NotAuthorized
|
||||||
end
|
end
|
||||||
|
|
|
@ -91,7 +91,7 @@ class KnowledgeBase < ApplicationModel
|
||||||
def custom_address_prefix(request)
|
def custom_address_prefix(request)
|
||||||
host = custom_address_uri.host || request.headers.env['SERVER_NAME']
|
host = custom_address_uri.host || request.headers.env['SERVER_NAME']
|
||||||
port = request.headers.env['SERVER_PORT']
|
port = request.headers.env['SERVER_PORT']
|
||||||
port_silent = request.ssl? && port == '443' || !request.ssl? && port == '80'
|
port_silent = (request.ssl? && port == '443') || (!request.ssl? && port == '80')
|
||||||
port_string = port_silent ? '' : ":#{port}"
|
port_string = port_silent ? '' : ":#{port}"
|
||||||
|
|
||||||
"#{custom_address_uri.scheme}://#{host}#{port_string}"
|
"#{custom_address_uri.scheme}://#{host}#{port_string}"
|
||||||
|
|
|
@ -6,6 +6,6 @@ class ChatAddAllowWebsite < ActiveRecord::Migration[5.1]
|
||||||
# return if it's a new setup
|
# return if it's a new setup
|
||||||
return if !Setting.exists?(name: 'system_init_done')
|
return if !Setting.exists?(name: 'system_init_done')
|
||||||
|
|
||||||
add_column :chats, :whitelisted_websites, :string, limit: 5000, null: true # rubocop:disable Naming/InclusiveLanguage
|
add_column :chats, :whitelisted_websites, :string, limit: 5000, null: true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,7 +6,7 @@ class InclusiveWording < ActiveRecord::Migration[6.0]
|
||||||
# return if it's a new setup
|
# return if it's a new setup
|
||||||
return if !Setting.exists?(name: 'system_init_done')
|
return if !Setting.exists?(name: 'system_init_done')
|
||||||
|
|
||||||
rename_column :chats, :whitelisted_websites, :allowed_websites # rubocop:disable Naming/InclusiveLanguage
|
rename_column :chats, :whitelisted_websites, :allowed_websites
|
||||||
Chat.reset_column_information
|
Chat.reset_column_information
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -417,7 +417,6 @@ class String
|
||||||
map['otrs-en-de'] = '^.{6,10}[[:space:]].{3,10}[[:space:]]-[[:space:]].{1,250}[[:space:]](wrote|schrieb):'
|
map['otrs-en-de'] = '^.{6,10}[[:space:]].{3,10}[[:space:]]-[[:space:]].{1,250}[[:space:]](wrote|schrieb):'
|
||||||
|
|
||||||
# Ms
|
# Ms
|
||||||
# rubocop:disable Style/AsciiComments
|
|
||||||
# From: Martin Edenhofer via Znuny Support [mailto:support@znuny.inc]
|
# From: Martin Edenhofer via Znuny Support [mailto:support@znuny.inc]
|
||||||
# Send: Donnerstag, 2. April 2015 10:00
|
# Send: Donnerstag, 2. April 2015 10:00
|
||||||
# To/Cc/Bcc: xxx
|
# To/Cc/Bcc: xxx
|
||||||
|
@ -432,8 +431,6 @@ class String
|
||||||
# À/?/?: xxx
|
# À/?/?: xxx
|
||||||
# Envoyé : mercredi 29 avril 2015 17:31
|
# Envoyé : mercredi 29 avril 2015 17:31
|
||||||
# Objet : xxx
|
# Objet : xxx
|
||||||
# rubocop:enable Style/AsciiComments
|
|
||||||
|
|
||||||
# en/de/fr | sometimes ms adds a space to "xx : value"
|
# en/de/fr | sometimes ms adds a space to "xx : value"
|
||||||
map['ms-en-de-fr_from'] = '^(Von|From|De|от|Z|Od|Ze|Fra|Van|Mistä|Από|Dal|から|Из|од|iz|Från|จาก|з|Từ)( ?):[[:space:]].+?'
|
map['ms-en-de-fr_from'] = '^(Von|From|De|от|Z|Od|Ze|Fra|Van|Mistä|Από|Dal|から|Из|од|iz|Från|จาก|з|Từ)( ?):[[:space:]].+?'
|
||||||
map['ms-en-de-fr_from_html'] = "\n######b######(From|Von|De)([[:space:]]?):([[:space:]]?)(######\/b######)[[:space:]].+?"
|
map['ms-en-de-fr_from_html'] = "\n######b######(From|Von|De)([[:space:]]?):([[:space:]]?)(######\/b######)[[:space:]].+?"
|
||||||
|
|
|
@ -82,7 +82,7 @@ module Import
|
||||||
# get the offset for the current thread and loop count
|
# get the offset for the current thread and loop count
|
||||||
thread_offset_base = (Thread.current[:thread_no] - 1) * limit
|
thread_offset_base = (Thread.current[:thread_no] - 1) * limit
|
||||||
thread_step = thread_count * limit
|
thread_step = thread_count * limit
|
||||||
offset = Thread.current[:loop_count] * thread_step + thread_offset_base + start_offset_base
|
offset = (Thread.current[:loop_count] * thread_step) + thread_offset_base + start_offset_base
|
||||||
|
|
||||||
break if !imported?(
|
break if !imported?(
|
||||||
remote_object: remote_object,
|
remote_object: remote_object,
|
||||||
|
|
|
@ -74,9 +74,7 @@ class Sequencer
|
||||||
# Model Name
|
# Model Name
|
||||||
# Model::Name
|
# Model::Name
|
||||||
# Model Name?
|
# Model Name?
|
||||||
# rubocop:disable Style/AsciiComments
|
|
||||||
# Mödel Nâmé
|
# Mödel Nâmé
|
||||||
# rubocop:enable Style/AsciiComments
|
|
||||||
raise 'Missing implementation for unsanitized_name method'
|
raise 'Missing implementation for unsanitized_name method'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -33,7 +33,7 @@ class Stats::TicketWaitingTime
|
||||||
percent = (handling_time.to_f - 60) / (60 * 3)
|
percent = (handling_time.to_f - 60) / (60 * 3)
|
||||||
'good'
|
'good'
|
||||||
elsif handling_time <= 60 * 8
|
elsif handling_time <= 60 * 8
|
||||||
percent = (handling_time.to_f - 60 * 4) / (60 * 4)
|
percent = (handling_time.to_f - (60 * 4)) / (60 * 4)
|
||||||
'ok'
|
'ok'
|
||||||
else
|
else
|
||||||
percent = 1.00
|
percent = 1.00
|
||||||
|
|
|
@ -501,11 +501,9 @@ create a tweet or direct message from an article
|
||||||
|
|
||||||
Rails.logger.debug { 'Create tweet from article...' }
|
Rails.logger.debug { 'Create tweet from article...' }
|
||||||
|
|
||||||
# rubocop:disable Style/AsciiComments
|
|
||||||
# workaround for https://github.com/sferik/twitter/issues/677
|
# workaround for https://github.com/sferik/twitter/issues/677
|
||||||
# https://github.com/zammad/zammad/issues/2873 - unable to post
|
# https://github.com/zammad/zammad/issues/2873 - unable to post
|
||||||
# tweets with * - replace `*` with the wide-asterisk `*`.
|
# tweets with * - replace `*` with the wide-asterisk `*`.
|
||||||
# rubocop:enable Style/AsciiComments
|
|
||||||
article[:body].tr!('*', '*') if article[:body].present?
|
article[:body].tr!('*', '*') if article[:body].present?
|
||||||
tweet = @client.update(
|
tweet = @client.update(
|
||||||
article[:body],
|
article[:body],
|
||||||
|
|
|
@ -2183,7 +2183,7 @@ RSpec.describe Ticket, type: :model do
|
||||||
Store.add(
|
Store.add(
|
||||||
object: 'SomeObject',
|
object: 'SomeObject',
|
||||||
o_id: 1,
|
o_id: 1,
|
||||||
data: 'a' * (1024**2 * 2.4), # with 2.4 mb
|
data: 'a' * ((1024**2) * 2.4), # with 2.4 mb
|
||||||
filename: 'test.TXT',
|
filename: 'test.TXT',
|
||||||
created_by_id: 1,
|
created_by_id: 1,
|
||||||
)
|
)
|
||||||
|
@ -2258,7 +2258,7 @@ RSpec.describe Ticket, type: :model do
|
||||||
Store.add(
|
Store.add(
|
||||||
object: 'Ticket::Article',
|
object: 'Ticket::Article',
|
||||||
o_id: article1.id,
|
o_id: article1.id,
|
||||||
data: 'a' * (1024**2 * 2.4), # with 2.4 mb
|
data: 'a' * ((1024**2) * 2.4), # with 2.4 mb
|
||||||
filename: 'some_file.pdf',
|
filename: 'some_file.pdf',
|
||||||
preferences: {
|
preferences: {
|
||||||
'Content-Type' => 'image/pdf',
|
'Content-Type' => 'image/pdf',
|
||||||
|
@ -2268,14 +2268,14 @@ RSpec.describe Ticket, type: :model do
|
||||||
Store.add(
|
Store.add(
|
||||||
object: 'Ticket::Article',
|
object: 'Ticket::Article',
|
||||||
o_id: article1.id,
|
o_id: article1.id,
|
||||||
data: 'a' * (1024**2 * 5.8), # with 5,8 mb
|
data: 'a' * ((1024**2) * 5.8), # with 5,8 mb
|
||||||
filename: 'some_file.txt',
|
filename: 'some_file.txt',
|
||||||
preferences: {
|
preferences: {
|
||||||
'Content-Type' => 'text/plain',
|
'Content-Type' => 'text/plain',
|
||||||
},
|
},
|
||||||
created_by_id: 1,
|
created_by_id: 1,
|
||||||
)
|
)
|
||||||
create(:ticket_article, ticket: ticket, body: 'a' * (1024**2 * 1.2)) # body with 1,2 mb
|
create(:ticket_article, ticket: ticket, body: 'a' * ((1024**2) * 1.2)) # body with 1,2 mb
|
||||||
create(:ticket_article, ticket: ticket)
|
create(:ticket_article, ticket: ticket)
|
||||||
ticket.search_index_attribute_lookup
|
ticket.search_index_attribute_lookup
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue