Maintenance: Bump rubocop-performance from 1.12.0 to 1.13.0

Bumps [rubocop-performance](https://github.com/rubocop/rubocop-performance) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/rubocop/rubocop-performance/releases)
- [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.12.0...v1.13.0)
This commit is contained in:
Martin Gruner 2021-12-27 15:50:27 +01:00
parent 9451ed6bc3
commit fac03ff7ff
10 changed files with 26 additions and 26 deletions

View file

@ -401,7 +401,7 @@ GEM
iniparse (~> 1.4) iniparse (~> 1.4)
rexml (~> 3.2) rexml (~> 3.2)
parallel (1.21.0) parallel (1.21.0)
parser (3.0.2.0) parser (3.0.3.2)
ast (~> 2.4.1) ast (~> 2.4.1)
pg (0.21.0) pg (0.21.0)
power_assert (2.0.1) power_assert (2.0.1)
@ -477,7 +477,7 @@ GEM
ffi (~> 1.0) ffi (~> 1.0)
rchardet (1.8.0) rchardet (1.8.0)
redis (4.5.1) redis (4.5.1)
regexp_parser (2.1.1) regexp_parser (2.2.0)
rest-client (2.1.0) rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0) http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0) http-cookie (>= 1.0.2, < 2.0)
@ -511,7 +511,7 @@ GEM
rubocop-ast (>= 1.12.0, < 2.0) rubocop-ast (>= 1.12.0, < 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.13.0) rubocop-ast (1.15.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)
@ -520,7 +520,7 @@ GEM
activesupport activesupport
rubocop rubocop
rubocop-rspec rubocop-rspec
rubocop-performance (1.12.0) rubocop-performance (1.13.0)
rubocop (>= 1.7.0, < 2.0) rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0) rubocop-ast (>= 0.4.0)
rubocop-rails (2.12.4) rubocop-rails (2.12.4)

View file

@ -71,7 +71,7 @@ returns
clean_params[attribute] = data[attribute] clean_params[attribute] = data[attribute]
end end
clean_params['form_id'] = data['form_id'] if data.key?('form_id') && new.respond_to?('form_id') clean_params['form_id'] = data['form_id'] if data.key?('form_id') && new.respond_to?(:form_id)
if inside_nested if inside_nested
clean_params['id'] = params[:id] if params[:id].present? clean_params['id'] = params[:id] if params[:id].present?

View file

@ -9,8 +9,8 @@ module ApplicationModel::HasCache
end end
def cache_update(other) def cache_update(other)
cache_delete if respond_to?('cache_delete') cache_delete if respond_to?(:cache_delete)
other.cache_delete if other.respond_to?('cache_delete') other.cache_delete if other.respond_to?(:cache_delete)
ActiveSupport::CurrentAttributes.clear_all ActiveSupport::CurrentAttributes.clear_all
true true
end end

View file

@ -77,8 +77,8 @@ log object update history with all updated attributes, if configured - will be e
if relation_model if relation_model
if relation_model['name'] if relation_model['name']
value_str[0] = relation_model['name'] value_str[0] = relation_model['name']
elsif relation_model.respond_to?('fullname') elsif relation_model.respond_to?(:fullname)
value_str[0] = relation_model.send('fullname') value_str[0] = relation_model.send(:fullname)
end end
end end
end end
@ -87,8 +87,8 @@ log object update history with all updated attributes, if configured - will be e
if relation_model if relation_model
if relation_model['name'] if relation_model['name']
value_str[1] = relation_model['name'] value_str[1] = relation_model['name']
elsif relation_model.respond_to?('fullname') elsif relation_model.respond_to?(:fullname)
value_str[1] = relation_model.send('fullname') value_str[1] = relation_model.send(:fullname)
end end
end end
end end

View file

@ -299,8 +299,8 @@ class Transaction::Notification
if relation_model if relation_model
if relation_model['name'] if relation_model['name']
value_str[0] = relation_model['name'] value_str[0] = relation_model['name']
elsif relation_model.respond_to?('fullname') elsif relation_model.respond_to?(:fullname)
value_str[0] = relation_model.send('fullname') value_str[0] = relation_model.send(:fullname)
end end
end end
end end
@ -309,8 +309,8 @@ class Transaction::Notification
if relation_model if relation_model
if relation_model['name'] if relation_model['name']
value_str[1] = relation_model['name'] value_str[1] = relation_model['name']
elsif relation_model.respond_to?('fullname') elsif relation_model.respond_to?(:fullname)
value_str[1] = relation_model.send('fullname') value_str[1] = relation_model.send(:fullname)
end end
end end
end end

View file

@ -250,8 +250,8 @@ class Transaction::Slack
if relation_model if relation_model
if relation_model['name'] if relation_model['name']
value_str[0] = relation_model['name'] value_str[0] = relation_model['name']
elsif relation_model.respond_to?('fullname') elsif relation_model.respond_to?(:fullname)
value_str[0] = relation_model.send('fullname') value_str[0] = relation_model.send(:fullname)
end end
end end
end end
@ -260,8 +260,8 @@ class Transaction::Slack
if relation_model if relation_model
if relation_model['name'] if relation_model['name']
value_str[1] = relation_model['name'] value_str[1] = relation_model['name']
elsif relation_model.respond_to?('fullname') elsif relation_model.respond_to?(:fullname)
value_str[1] = relation_model.send('fullname') value_str[1] = relation_model.send(:fullname)
end end
end end
end end

View file

@ -7,11 +7,11 @@ module Spring
DEFAULT_COMMANDS = COMMANDS.dup DEFAULT_COMMANDS = COMMANDS.dup
DEFAULT_ALIASES = ALIASES.dup DEFAULT_ALIASES = ALIASES.dup
remove_const('COMMANDS') remove_const(:COMMANDS)
remove_const('ALIASES') remove_const(:ALIASES)
const_set('COMMANDS', DEFAULT_COMMANDS + %w[server]) const_set(:COMMANDS, DEFAULT_COMMANDS + %w[server])
const_set('ALIASES', DEFAULT_ALIASES.merge('s' => 'server')) const_set(:ALIASES, DEFAULT_ALIASES.merge('s' => 'server'))
end end
end end
end end

View file

@ -37,7 +37,7 @@ class Stats::TicketLoadMeasure
return result if !result.key?(:used_for_average) return result if !result.key?(:used_for_average)
if result[:total] < 1 || result[:average_per_agent].to_d == 0.0.to_d if result[:total] < 1 || result[:average_per_agent].to_d == BigDecimal('0.0')
result[:state] = 'supergood' result[:state] = 'supergood'
return result return result
end end

View file

@ -38,7 +38,7 @@ class Stats::TicketReopen
return result if !result.key?(:used_for_average) return result if !result.key?(:used_for_average)
if result[:total] < 1 || result[:average_per_agent].to_d == 0.0.to_d if result[:total] < 1 || result[:average_per_agent].to_d == BigDecimal('0.0')
result[:state] = 'supergood' result[:state] = 'supergood'
return result return result
end end

View file

@ -213,7 +213,7 @@ class TransactionDispatcher
# do not send anything if nothing has changed # do not send anything if nothing has changed
return true if real_changes.blank? return true if real_changes.blank?
changed_by_id = if record.respond_to?('updated_by_id') changed_by_id = if record.respond_to?(:updated_by_id)
record.updated_by_id record.updated_by_id
else else
record.created_by_id record.created_by_id