Maintenance: Bump rubocop from 1.18.4 to 1.19.0

This commit is contained in:
Martin Gruner 2021-08-13 08:03:57 +02:00
parent b564860989
commit 86e18abd00
6 changed files with 9 additions and 7 deletions

View file

@ -497,16 +497,16 @@ GEM
rspec-support (~> 3.10)
rspec-support (3.10.2)
rszr (0.5.2)
rubocop (1.18.4)
rubocop (1.19.0)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.8.0, < 2.0)
rubocop-ast (>= 1.9.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.8.0)
rubocop-ast (1.10.0)
parser (>= 3.0.1.1)
rubocop-faker (1.1.0)
faker (>= 2.12.0)

View file

@ -56,7 +56,7 @@ add a new activity entry for an object
# check newest entry - is needed
result = ActivityStream.where(
o_id: data[:o_id],
#:activity_stream_type_id => type_id,
# :activity_stream_type_id => type_id,
permission_id: permission_id,
activity_stream_object_id: object_id,
created_by_id: data[:created_by_id]

View file

@ -38,7 +38,7 @@ class ObjectManager::Element::Backend
name: attribute.name,
display: attribute.display,
tag: attribute.data_type,
#:null => attribute.null,
# :null => attribute.null,
}
end

View file

@ -8,7 +8,7 @@ module ActiveRecord
module SchemaStatements
# on postgres create lower indices to support case-insensitive where conditions
def add_index(table_name, column_name, options = {}) #:nodoc:
def add_index(table_name, column_name, options = {}) # :nodoc:
index_name, index_type, index_columns, index_options, index_algorithm, index_using = add_index_options(table_name, column_name, **options)
column_names = index_columns.split ', '

View file

@ -84,6 +84,7 @@ class SearchKnowledgeBaseBackend
.joins(:category)
.where(knowledge_base_categories: { knowledge_base_id: knowledge_bases })
# rubocop:disable Style/RedundantSelfAssignmentBranch
scope = if user&.permissions?('knowledge_base.editor')
scope
elsif user&.permissions?('knowledge_base.reader') && flavor == :agent
@ -91,6 +92,7 @@ class SearchKnowledgeBaseBackend
else
scope.published
end
# rubocop:enable Style/RedundantSelfAssignmentBranch
flatten_translation_ids(scope)
end

View file

@ -16,7 +16,7 @@ RSpec.describe Ticket::State, type: :model do
describe 'of whole table:' do
it 'has seven records' do
expect(described_class.pluck(:name))
.to match_array(%w[closed merged new open pending\ close pending\ reminder removed])
.to match_array(['closed', 'merged', 'new', 'open', 'pending close', 'pending reminder', 'removed'])
end
end