From 163dbc4e9eb88fe4e978d65112b63b2b66630e63 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Mon, 11 May 2020 14:49:22 +0200 Subject: [PATCH] Updated rubocop(-* gems) to latest version (0.83.0). --- Gemfile.lock | 8 +++----- app/models/cti/caller_id.rb | 4 ++-- app/models/ticket/article.rb | 1 + spec/system/settings/ticket_spec.rb | 8 ++++---- spec/system/ticket/update_spec.rb | 4 ++-- spec/system/ticket/view_spec.rb | 6 +++--- 6 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f177cb8b5..843e596c6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -255,7 +255,6 @@ GEM ice_cube (0.16.3) inflection (1.0.0) interception (0.5) - jaro_winkler (1.5.4) json (2.3.0) jwt (2.2.1) kgio (2.11.2) @@ -355,7 +354,7 @@ GEM omniauth (~> 1.5) omniauth-oauth2 (>= 1.4.0) parallel (1.19.1) - parser (2.7.1.1) + parser (2.7.1.2) ast (~> 2.4.0) pg (0.21.0) pluginator (1.5.0) @@ -449,8 +448,7 @@ GEM rspec-support (~> 3.8.0) rspec-support (3.8.0) rszr (0.5.2) - rubocop (0.82.0) - jaro_winkler (~> 1.5.1) + rubocop (0.83.0) parallel (~> 1.10) parser (>= 2.7.0.1) rainbow (>= 2.2.2, < 4.0) @@ -463,7 +461,7 @@ GEM activesupport rack (>= 1.1) rubocop (>= 0.72.0) - rubocop-rspec (1.38.1) + rubocop-rspec (1.39.0) rubocop (>= 0.68.1) ruby-progressbar (1.10.1) ruby-saml (1.10.2) diff --git a/app/models/cti/caller_id.rb b/app/models/cti/caller_id.rb index c01a41e71..a70c14ac2 100644 --- a/app/models/cti/caller_id.rb +++ b/app/models/cti/caller_id.rb @@ -237,9 +237,9 @@ returns number.gsub!(/\D/, '') case number when /^00/ - number[2..-1] + number[2..] when /^0/ - DEFAULT_COUNTRY_ID + number[1..-1] + DEFAULT_COUNTRY_ID + number[1..] else number end diff --git a/app/models/ticket/article.rb b/app/models/ticket/article.rb index db7fc8b84..888fe3242 100644 --- a/app/models/ticket/article.rb +++ b/app/models/ticket/article.rb @@ -46,6 +46,7 @@ class Ticket::Article < ApplicationModel :cc attr_accessor :should_clone_inline_attachments + alias should_clone_inline_attachments? should_clone_inline_attachments # fillup md5 of message id to search easier on very long message ids diff --git a/spec/system/settings/ticket_spec.rb b/spec/system/settings/ticket_spec.rb index 3acb00c00..7dfb228db 100644 --- a/spec/system/settings/ticket_spec.rb +++ b/spec/system/settings/ticket_spec.rb @@ -10,18 +10,18 @@ RSpec.describe 'Manage > Settings > Ticket', type: :system do within(:active_content) do click(:href, '#auto_assignment') - expect(page).to have_field('ticket_auto_assignment', checked: false, visible: false) + expect(page).to have_field('ticket_auto_assignment', checked: false, visible: :hidden) find('.js-ticketAutoAssignment').click - expect(page).to have_field('ticket_auto_assignment', checked: true, visible: false) + expect(page).to have_field('ticket_auto_assignment', checked: true, visible: :hidden) end refresh within(:active_content) do click(:href, '#auto_assignment') - expect(page).to have_field('ticket_auto_assignment', checked: true, visible: false) + expect(page).to have_field('ticket_auto_assignment', checked: true, visible: :hidden) find('.js-ticketAutoAssignment').click - expect(page).to have_field('ticket_auto_assignment', checked: false, visible: false) + expect(page).to have_field('ticket_auto_assignment', checked: false, visible: :hidden) end end end diff --git a/spec/system/ticket/update_spec.rb b/spec/system/ticket/update_spec.rb index 459ee3310..3d782ab4d 100644 --- a/spec/system/ticket/update_spec.rb +++ b/spec/system/ticket/update_spec.rb @@ -98,7 +98,7 @@ RSpec.describe 'Ticket Update', type: :system do within(:active_content) do expect(page).to have_selector('.js-objectNumber', text: ticket.number) - expect(page).to have_field(attribute.name, with: '', visible: false) + expect(page).to have_field(attribute.name, with: '', visible: :hidden) expect(page).to have_select('state_id', selected: 'new', options: ['new', 'closed', 'open', 'pending close', 'pending reminder']) @@ -108,7 +108,7 @@ RSpec.describe 'Ticket Update', type: :system do expect(page).not_to have_css('.js-submitDropdown .js-submit[disabled]', wait: 2) end - expect(page).to have_field(attribute.name, with: attribute_value, visible: false) + expect(page).to have_field(attribute.name, with: attribute_value, visible: :hidden) expect(page).to have_select('state_id', selected: 'closed', options: ['closed', 'open', 'pending close', 'pending reminder']) diff --git a/spec/system/ticket/view_spec.rb b/spec/system/ticket/view_spec.rb index 94b5a4670..7674a0140 100644 --- a/spec/system/ticket/view_spec.rb +++ b/spec/system/ticket/view_spec.rb @@ -41,7 +41,7 @@ RSpec.describe 'Ticket views', type: :system do # move a bit to the left to display macro batches move_mouse_by(-250, 0) - expect(page).to have_selector(:macro_batch, macro_without_group.id, visible: true) + expect(page).to have_selector(:macro_batch, macro_without_group.id, visible: :visible) expect(page).to have_no_selector(:macro_batch, macro_group1.id) expect(page).to have_no_selector(:macro_batch, macro_group2.id) @@ -60,7 +60,7 @@ RSpec.describe 'Ticket views', type: :system do # move a bit to the left to display macro batches move_mouse_by(-250, 0) - expect(page).to have_selector(:macro_batch, macro_without_group.id, visible: true) + expect(page).to have_selector(:macro_batch, macro_without_group.id, visible: :visible) expect(page).to have_selector(:macro_batch, macro_group1.id) expect(page).to have_no_selector(:macro_batch, macro_group2.id) @@ -79,7 +79,7 @@ RSpec.describe 'Ticket views', type: :system do # move a bit to the left to display macro batches move_mouse_by(-250, 0) - expect(page).to have_selector(:macro_batch, macro_without_group.id, visible: true) + expect(page).to have_selector(:macro_batch, macro_without_group.id, visible: :visible) expect(page).to have_no_selector(:macro_batch, macro_group1.id) expect(page).to have_selector(:macro_batch, macro_group2.id)