Browse Source

Maintenance: Update dependency rubocop to v1.41.1

renovatebot 2 years ago
parent
commit
addbe88fd1

+ 1 - 1
.gitlab/check_postgres_array_columns.rb

@@ -1,7 +1,7 @@
 #!/usr/bin/env ruby
 # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
 
-require ::File.expand_path('../config/environment', __dir__)
+require File.expand_path('../config/environment', __dir__)
 
 class CheckPostgresArrayColumns
   def self.run

+ 3 - 3
Gemfile.lock

@@ -361,7 +361,7 @@ GEM
       iniparse (~> 1.4)
       rexml (~> 3.2)
     parallel (1.22.1)
-    parser (3.1.2.1)
+    parser (3.1.3.0)
       ast (~> 2.4.1)
     pg (1.2.3)
     power_assert (2.0.2)
@@ -455,7 +455,7 @@ GEM
       rspec-core (> 3.3)
     rspec-support (3.12.0)
     rszr (1.3.0)
-    rubocop (1.39.0)
+    rubocop (1.41.1)
       json (~> 2.3)
       parallel (~> 1.10)
       parser (>= 3.1.2.1)
@@ -465,7 +465,7 @@ GEM
       rubocop-ast (>= 1.23.0, < 2.0)
       ruby-progressbar (~> 1.7)
       unicode-display_width (>= 1.4.0, < 3.0)
-    rubocop-ast (1.23.0)
+    rubocop-ast (1.24.0)
       parser (>= 3.1.1.0)
     rubocop-faker (1.1.0)
       faker (>= 2.12.0)

+ 1 - 1
config.ru

@@ -2,7 +2,7 @@
 
 # This file is used by Rack-based servers to start the application.
 
-require ::File.expand_path('config/environment', __dir__)
+require File.expand_path('config/environment', __dir__)
 run Zammad::Application
 
 # set config to do no self notification

+ 1 - 1
config/initializers/logo.rb

@@ -9,7 +9,7 @@ Rails.application.reloader.to_prepare do
     next if Setting.column_names.exclude?('state_current')
 
     StaticAssets.sync
-  rescue ::ActiveRecord::NoDatabaseError
+  rescue ActiveRecord::NoDatabaseError
     Rails.logger.debug("Database doesn't exist. Skipping StaticAssets.sync")
   end
 end

+ 20 - 20
lib/excel_sheet/ticket.rb

@@ -66,26 +66,26 @@ class ExcelSheet::Ticket < ExcelSheet
       .each { |elem| elem[:width] = 20 }
       .then { |objects| header.concat(objects) }
 
-    header.concat([
-                    { display: __('Created At'), name: 'created_at', width: 18, data_type: 'datetime' },
-                    { display: __('Updated At'), name: 'updated_at', width: 18, data_type: 'datetime' },
-                    { display: __('Closed At'), name: 'close_at', width: 18, data_type: 'datetime' },
-                    { display: __('Close Escalation At'), name: 'close_escalation_at', width: 18, data_type: 'datetime' },
-                    { display: __('Close In Min'), name: 'close_in_min', width: 10, data_type: 'integer' },
-                    { display: __('Close Diff In Min'), name: 'close_diff_in_min', width: 10, data_type: 'integer' },
-                    { display: __('First Response At'), name: 'first_response_at', width: 18, data_type: 'datetime' },
-                    { display: __('First Response Escalation At'), name: 'first_response_escalation_at', width: 18, data_type: 'datetime' },
-                    { display: __('First Response In Min'), name: 'first_response_in_min', width: 10, data_type: 'integer' },
-                    { display: __('First Response Diff In Min'), name: 'first_response_diff_in_min', width: 10, data_type: 'integer' },
-                    { display: __('Update Escalation At'), name: 'update_escalation_at', width: 18, data_type: 'datetime' },
-                    { display: __('Update In Min'), name: 'update_in_min', width: 10, data_type: 'integer' },
-                    { display: __('Update Diff In Min'), name: 'update_diff_in_min', width: 10, data_type: 'integer' },
-                    { display: __('Last Contact At'), name: 'last_contact_at', width: 18, data_type: 'datetime' },
-                    { display: __('Last Contact Agent At'), name: 'last_contact_agent_at', width: 18, data_type: 'datetime' },
-                    { display: __('Last Contact Customer At'), name: 'last_contact_customer_at', width: 18, data_type: 'datetime' },
-                    { display: __('Article Count'), name: 'article_count', width: 10, data_type: 'integer' },
-                    { display: __('Escalation At'), name: 'escalation_at', width: 18, data_type: 'datetime' },
-                  ])
+    header.push(
+      { display: __('Created At'), name: 'created_at', width: 18, data_type: 'datetime' },
+      { display: __('Updated At'), name: 'updated_at', width: 18, data_type: 'datetime' },
+      { display: __('Closed At'), name: 'close_at', width: 18, data_type: 'datetime' },
+      { display: __('Close Escalation At'), name: 'close_escalation_at', width: 18, data_type: 'datetime' },
+      { display: __('Close In Min'), name: 'close_in_min', width: 10, data_type: 'integer' },
+      { display: __('Close Diff In Min'), name: 'close_diff_in_min', width: 10, data_type: 'integer' },
+      { display: __('First Response At'), name: 'first_response_at', width: 18, data_type: 'datetime' },
+      { display: __('First Response Escalation At'), name: 'first_response_escalation_at', width: 18, data_type: 'datetime' },
+      { display: __('First Response In Min'), name: 'first_response_in_min', width: 10, data_type: 'integer' },
+      { display: __('First Response Diff In Min'), name: 'first_response_diff_in_min', width: 10, data_type: 'integer' },
+      { display: __('Update Escalation At'), name: 'update_escalation_at', width: 18, data_type: 'datetime' },
+      { display: __('Update In Min'), name: 'update_in_min', width: 10, data_type: 'integer' },
+      { display: __('Update Diff In Min'), name: 'update_diff_in_min', width: 10, data_type: 'integer' },
+      { display: __('Last Contact At'), name: 'last_contact_at', width: 18, data_type: 'datetime' },
+      { display: __('Last Contact Agent At'), name: 'last_contact_agent_at', width: 18, data_type: 'datetime' },
+      { display: __('Last Contact Customer At'), name: 'last_contact_customer_at', width: 18, data_type: 'datetime' },
+      { display: __('Article Count'), name: 'article_count', width: 10, data_type: 'integer' },
+      { display: __('Escalation At'), name: 'escalation_at', width: 18, data_type: 'datetime' },
+    )
 
   end
 

+ 1 - 1
spec/db/migrate/issue_1905_exchange_login_from_remote_id_spec.rb

@@ -4,7 +4,7 @@ require 'rails_helper'
 
 RSpec.describe Issue1905ExchangeLoginFromRemoteId, type: :db_migration do
 
-  let(:backend) { ::Import::Exchange }
+  let(:backend) { Import::Exchange }
 
   it 'removes :item_id from attributes' do
 

+ 1 - 1
spec/factories/channel.rb

@@ -3,7 +3,7 @@
 FactoryBot.define do
   factory :channel do
     area          { 'Email::Dummy' }
-    group         { ::Group.find(1) }
+    group         { Group.find(1) }
     active        { true }
     options       { nil }
     preferences   { nil }

+ 2 - 2
spec/graphql/gql/mutations/mention/subscribe_spec.rb

@@ -28,9 +28,9 @@ RSpec.describe Gql::Mutations::Mention::Subscribe, :aggregate_failures, type: :g
 
   context 'when logged in as an agent', authenticated_as: :agent do
     it 'subscribes to a ticket' do
-      allow(::Mention).to receive(:subscribe!)
+      allow(Mention).to receive(:subscribe!)
       gql.execute(query, variables: variables)
-      expect(::Mention).to have_received(:subscribe!).with(object, agent)
+      expect(Mention).to have_received(:subscribe!).with(object, agent)
     end
   end
 

+ 2 - 2
spec/graphql/gql/mutations/mention/unsubscribe_spec.rb

@@ -28,9 +28,9 @@ RSpec.describe Gql::Mutations::Mention::Unsubscribe, :aggregate_failures, type:
 
   context 'when logged in as an agent', authenticated_as: :agent do
     it 'unsubscribes from a ticket' do
-      allow(::Mention).to receive(:unsubscribe!)
+      allow(Mention).to receive(:unsubscribe!)
       gql.execute(query, variables: variables)
-      expect(::Mention).to have_received(:unsubscribe!).with(object, agent)
+      expect(Mention).to have_received(:unsubscribe!).with(object, agent)
     end
   end
 

+ 1 - 1
spec/graphql/gql/queries/autocomplete_search/merge_ticket_spec.rb

@@ -35,7 +35,7 @@ RSpec.describe Gql::Queries::AutocompleteSearch::MergeTicket, authenticated_as:
     let(:limit)        { nil }
 
     before do
-      searchindex_model_reload([::Ticket])
+      searchindex_model_reload([Ticket])
       gql.execute(query, variables: variables)
     end
 

Some files were not shown because too many files changed in this diff