Some new rubocop checks.
This commit is contained in:
parent
6909430eac
commit
c694f2f37e
11 changed files with 17 additions and 17 deletions
|
@ -62,7 +62,7 @@ module Ticket::Number::Date
|
|||
end
|
||||
number += chksum.to_s
|
||||
end
|
||||
return number
|
||||
number
|
||||
end
|
||||
def check(string)
|
||||
|
||||
|
@ -78,6 +78,6 @@ module Ticket::Number::Date
|
|||
elsif string =~ /#{ticket_hook}\s{0,2}(#{system_id}\d{2,50})/i then
|
||||
ticket = Ticket.where( number: $1 ).first
|
||||
end
|
||||
return ticket
|
||||
ticket
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ module Ticket::Number::Increment
|
|||
config = Setting.get('ticket_number_increment')
|
||||
|
||||
# read counter
|
||||
min_digs = config[:min_size] || 4;
|
||||
min_digs = config[:min_size] || 4
|
||||
counter_increment = nil
|
||||
Ticket::Counter.transaction do
|
||||
counter = Ticket::Counter.where( generator: 'Increment' ).lock(true).first
|
||||
|
@ -65,7 +65,7 @@ module Ticket::Number::Increment
|
|||
end
|
||||
number += chksum.to_s
|
||||
end
|
||||
return number
|
||||
number
|
||||
end
|
||||
|
||||
def check(string)
|
||||
|
@ -82,6 +82,6 @@ module Ticket::Number::Increment
|
|||
elsif string =~ /#{ticket_hook}\s{0,2}(#{system_id}\d{2,48})/i then
|
||||
ticket = Ticket.where( number: $1 ).first
|
||||
end
|
||||
return ticket
|
||||
ticket
|
||||
end
|
||||
end
|
||||
|
|
|
@ -181,7 +181,7 @@ returns
|
|||
where( _condition( overview_selected.condition ) ).
|
||||
count()
|
||||
|
||||
return {
|
||||
{
|
||||
tickets: tickets,
|
||||
tickets_count: tickets_count,
|
||||
overview: overview_selected_raw,
|
||||
|
@ -245,6 +245,6 @@ returns
|
|||
end
|
||||
}
|
||||
bind[0] = sql
|
||||
return bind
|
||||
bind
|
||||
end
|
||||
end
|
||||
|
|
|
@ -41,7 +41,7 @@ returns
|
|||
data[:current_user].groups.each {|group|
|
||||
return true if self.group.id == group.id
|
||||
}
|
||||
return false
|
||||
false
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -113,7 +113,7 @@ returns
|
|||
}
|
||||
}
|
||||
|
||||
return {
|
||||
{
|
||||
assets: assets,
|
||||
filter: filter,
|
||||
dependencies: dependencies,
|
||||
|
@ -167,7 +167,7 @@ returns
|
|||
assets = ticket.assets(assets)
|
||||
}
|
||||
|
||||
return {
|
||||
{
|
||||
ticket_ids_open: ticket_ids_open,
|
||||
ticket_ids_closed: ticket_ids_closed,
|
||||
assets: assets,
|
||||
|
|
|
@ -52,7 +52,7 @@ returns
|
|||
limit = params[:limit] || 12
|
||||
current_user = params[:current_user]
|
||||
full = false
|
||||
if params[:full] || !params.has_key?(:full)
|
||||
if params[:full] || !params.key?(:full)
|
||||
full = true
|
||||
end
|
||||
|
||||
|
@ -140,7 +140,7 @@ returns
|
|||
tickets_all.each { |ticket|
|
||||
tickets.push Ticket.lookup( id: ticket.id )
|
||||
}
|
||||
return tickets
|
||||
tickets
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -48,6 +48,6 @@ returns:
|
|||
def ignore_escalation?
|
||||
ignore_escalation = ['removed', 'closed', 'merged']
|
||||
return true if ignore_escalation.include?( self.name )
|
||||
return false
|
||||
false
|
||||
end
|
||||
end
|
||||
|
|
|
@ -73,6 +73,6 @@ returns
|
|||
subject = subject[ 0, ticket_subject_size.to_i ] + '[...]'
|
||||
end
|
||||
|
||||
return subject
|
||||
subject
|
||||
end
|
||||
end
|
||||
|
|
|
@ -30,7 +30,7 @@ returns
|
|||
# check agent
|
||||
return true if data[:current_user].is_role(Z_ROLENAME_ADMIN)
|
||||
return true if data[:current_user].is_role('Agent')
|
||||
return false
|
||||
false
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -50,7 +50,7 @@ returns
|
|||
'(firstname LIKE ? or lastname LIKE ? or email LIKE ?) AND id != 1', "%#{query}%", "%#{query}%", "%#{query}%",
|
||||
).order('firstname').limit(limit)
|
||||
end
|
||||
return users
|
||||
users
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -712,7 +712,7 @@ class TestCase < Test::Unit::TestCase
|
|||
file = File.join(Dir.pwd, filename)
|
||||
#file = 'some test lalal'
|
||||
|
||||
element = instance.find_elements( { css: params[:css] } )[0].send_keys file
|
||||
instance.find_elements( { css: params[:css] } )[0].send_keys file
|
||||
#instance.find_elements( { :css => params[:css] } )[0]
|
||||
#element
|
||||
#@driver.find_element(id: 'file-submit').click
|
||||
|
|
Loading…
Reference in a new issue