Maintenance: Bump rubocop from 1.18.4 to 1.19.0
This commit is contained in:
parent
b564860989
commit
86e18abd00
6 changed files with 9 additions and 7 deletions
|
@ -497,16 +497,16 @@ 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.18.4)
|
rubocop (1.19.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.8.0, < 2.0)
|
rubocop-ast (>= 1.9.1, < 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.8.0)
|
rubocop-ast (1.10.0)
|
||||||
parser (>= 3.0.1.1)
|
parser (>= 3.0.1.1)
|
||||||
rubocop-faker (1.1.0)
|
rubocop-faker (1.1.0)
|
||||||
faker (>= 2.12.0)
|
faker (>= 2.12.0)
|
||||||
|
|
|
@ -56,7 +56,7 @@ add a new activity entry for an object
|
||||||
# check newest entry - is needed
|
# check newest entry - is needed
|
||||||
result = ActivityStream.where(
|
result = ActivityStream.where(
|
||||||
o_id: data[:o_id],
|
o_id: data[:o_id],
|
||||||
#:activity_stream_type_id => type_id,
|
# :activity_stream_type_id => type_id,
|
||||||
permission_id: permission_id,
|
permission_id: permission_id,
|
||||||
activity_stream_object_id: object_id,
|
activity_stream_object_id: object_id,
|
||||||
created_by_id: data[:created_by_id]
|
created_by_id: data[:created_by_id]
|
||||||
|
|
|
@ -38,7 +38,7 @@ class ObjectManager::Element::Backend
|
||||||
name: attribute.name,
|
name: attribute.name,
|
||||||
display: attribute.display,
|
display: attribute.display,
|
||||||
tag: attribute.data_type,
|
tag: attribute.data_type,
|
||||||
#:null => attribute.null,
|
# :null => attribute.null,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ module ActiveRecord
|
||||||
module SchemaStatements
|
module SchemaStatements
|
||||||
|
|
||||||
# on postgres create lower indices to support case-insensitive where conditions
|
# 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)
|
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 ', '
|
column_names = index_columns.split ', '
|
||||||
|
|
|
@ -84,6 +84,7 @@ class SearchKnowledgeBaseBackend
|
||||||
.joins(:category)
|
.joins(:category)
|
||||||
.where(knowledge_base_categories: { knowledge_base_id: knowledge_bases })
|
.where(knowledge_base_categories: { knowledge_base_id: knowledge_bases })
|
||||||
|
|
||||||
|
# rubocop:disable Style/RedundantSelfAssignmentBranch
|
||||||
scope = if user&.permissions?('knowledge_base.editor')
|
scope = if user&.permissions?('knowledge_base.editor')
|
||||||
scope
|
scope
|
||||||
elsif user&.permissions?('knowledge_base.reader') && flavor == :agent
|
elsif user&.permissions?('knowledge_base.reader') && flavor == :agent
|
||||||
|
@ -91,6 +92,7 @@ class SearchKnowledgeBaseBackend
|
||||||
else
|
else
|
||||||
scope.published
|
scope.published
|
||||||
end
|
end
|
||||||
|
# rubocop:enable Style/RedundantSelfAssignmentBranch
|
||||||
|
|
||||||
flatten_translation_ids(scope)
|
flatten_translation_ids(scope)
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ RSpec.describe Ticket::State, type: :model do
|
||||||
describe 'of whole table:' do
|
describe 'of whole table:' do
|
||||||
it 'has seven records' do
|
it 'has seven records' do
|
||||||
expect(described_class.pluck(:name))
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue