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:
parent
9451ed6bc3
commit
fac03ff7ff
10 changed files with 26 additions and 26 deletions
|
@ -401,7 +401,7 @@ GEM
|
|||
iniparse (~> 1.4)
|
||||
rexml (~> 3.2)
|
||||
parallel (1.21.0)
|
||||
parser (3.0.2.0)
|
||||
parser (3.0.3.2)
|
||||
ast (~> 2.4.1)
|
||||
pg (0.21.0)
|
||||
power_assert (2.0.1)
|
||||
|
@ -477,7 +477,7 @@ GEM
|
|||
ffi (~> 1.0)
|
||||
rchardet (1.8.0)
|
||||
redis (4.5.1)
|
||||
regexp_parser (2.1.1)
|
||||
regexp_parser (2.2.0)
|
||||
rest-client (2.1.0)
|
||||
http-accept (>= 1.7.0, < 2.0)
|
||||
http-cookie (>= 1.0.2, < 2.0)
|
||||
|
@ -511,7 +511,7 @@ GEM
|
|||
rubocop-ast (>= 1.12.0, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 3.0)
|
||||
rubocop-ast (1.13.0)
|
||||
rubocop-ast (1.15.0)
|
||||
parser (>= 3.0.1.1)
|
||||
rubocop-faker (1.1.0)
|
||||
faker (>= 2.12.0)
|
||||
|
@ -520,7 +520,7 @@ GEM
|
|||
activesupport
|
||||
rubocop
|
||||
rubocop-rspec
|
||||
rubocop-performance (1.12.0)
|
||||
rubocop-performance (1.13.0)
|
||||
rubocop (>= 1.7.0, < 2.0)
|
||||
rubocop-ast (>= 0.4.0)
|
||||
rubocop-rails (2.12.4)
|
||||
|
|
|
@ -71,7 +71,7 @@ returns
|
|||
clean_params[attribute] = data[attribute]
|
||||
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
|
||||
clean_params['id'] = params[:id] if params[:id].present?
|
||||
|
|
|
@ -9,8 +9,8 @@ module ApplicationModel::HasCache
|
|||
end
|
||||
|
||||
def cache_update(other)
|
||||
cache_delete if respond_to?('cache_delete')
|
||||
other.cache_delete if other.respond_to?('cache_delete')
|
||||
cache_delete if respond_to?(:cache_delete)
|
||||
other.cache_delete if other.respond_to?(:cache_delete)
|
||||
ActiveSupport::CurrentAttributes.clear_all
|
||||
true
|
||||
end
|
||||
|
|
|
@ -77,8 +77,8 @@ log object update history with all updated attributes, if configured - will be e
|
|||
if relation_model
|
||||
if relation_model['name']
|
||||
value_str[0] = relation_model['name']
|
||||
elsif relation_model.respond_to?('fullname')
|
||||
value_str[0] = relation_model.send('fullname')
|
||||
elsif relation_model.respond_to?(:fullname)
|
||||
value_str[0] = relation_model.send(:fullname)
|
||||
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['name']
|
||||
value_str[1] = relation_model['name']
|
||||
elsif relation_model.respond_to?('fullname')
|
||||
value_str[1] = relation_model.send('fullname')
|
||||
elsif relation_model.respond_to?(:fullname)
|
||||
value_str[1] = relation_model.send(:fullname)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -299,8 +299,8 @@ class Transaction::Notification
|
|||
if relation_model
|
||||
if relation_model['name']
|
||||
value_str[0] = relation_model['name']
|
||||
elsif relation_model.respond_to?('fullname')
|
||||
value_str[0] = relation_model.send('fullname')
|
||||
elsif relation_model.respond_to?(:fullname)
|
||||
value_str[0] = relation_model.send(:fullname)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -309,8 +309,8 @@ class Transaction::Notification
|
|||
if relation_model
|
||||
if relation_model['name']
|
||||
value_str[1] = relation_model['name']
|
||||
elsif relation_model.respond_to?('fullname')
|
||||
value_str[1] = relation_model.send('fullname')
|
||||
elsif relation_model.respond_to?(:fullname)
|
||||
value_str[1] = relation_model.send(:fullname)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -250,8 +250,8 @@ class Transaction::Slack
|
|||
if relation_model
|
||||
if relation_model['name']
|
||||
value_str[0] = relation_model['name']
|
||||
elsif relation_model.respond_to?('fullname')
|
||||
value_str[0] = relation_model.send('fullname')
|
||||
elsif relation_model.respond_to?(:fullname)
|
||||
value_str[0] = relation_model.send(:fullname)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -260,8 +260,8 @@ class Transaction::Slack
|
|||
if relation_model
|
||||
if relation_model['name']
|
||||
value_str[1] = relation_model['name']
|
||||
elsif relation_model.respond_to?('fullname')
|
||||
value_str[1] = relation_model.send('fullname')
|
||||
elsif relation_model.respond_to?(:fullname)
|
||||
value_str[1] = relation_model.send(:fullname)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,11 +7,11 @@ module Spring
|
|||
DEFAULT_COMMANDS = COMMANDS.dup
|
||||
DEFAULT_ALIASES = ALIASES.dup
|
||||
|
||||
remove_const('COMMANDS')
|
||||
remove_const('ALIASES')
|
||||
remove_const(:COMMANDS)
|
||||
remove_const(:ALIASES)
|
||||
|
||||
const_set('COMMANDS', DEFAULT_COMMANDS + %w[server])
|
||||
const_set('ALIASES', DEFAULT_ALIASES.merge('s' => 'server'))
|
||||
const_set(:COMMANDS, DEFAULT_COMMANDS + %w[server])
|
||||
const_set(:ALIASES, DEFAULT_ALIASES.merge('s' => 'server'))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -37,7 +37,7 @@ class Stats::TicketLoadMeasure
|
|||
|
||||
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'
|
||||
return result
|
||||
end
|
||||
|
|
|
@ -38,7 +38,7 @@ class Stats::TicketReopen
|
|||
|
||||
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'
|
||||
return result
|
||||
end
|
||||
|
|
|
@ -213,7 +213,7 @@ class TransactionDispatcher
|
|||
# do not send anything if nothing has changed
|
||||
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
|
||||
else
|
||||
record.created_by_id
|
||||
|
|
Loading…
Reference in a new issue