Corrected with rubocop cop 'Lint/UnusedMethodArgument'.
This commit is contained in:
parent
b3b76acc89
commit
7efe34e53b
16 changed files with 22 additions and 27 deletions
|
@ -205,11 +205,6 @@ Lint/UnusedBlockArgument:
|
|||
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
||||
Enabled: false
|
||||
|
||||
Lint/UnusedMethodArgument:
|
||||
Description: 'Checks for unused method arguments.'
|
||||
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
||||
Enabled: false
|
||||
|
||||
Style/SignalException:
|
||||
Description: 'Checks for proper usage of fail and raise.'
|
||||
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
|
||||
|
|
|
@ -363,7 +363,7 @@ class ApplicationController < ActionController::Base
|
|||
render json: generic_object.attributes_with_associations, status: :ok
|
||||
end
|
||||
|
||||
def model_index_render (object, params)
|
||||
def model_index_render (object, _params)
|
||||
begin
|
||||
generic_objects = object.all
|
||||
model_index_render_result( generic_objects )
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||
|
||||
module ExtraCollection
|
||||
def session( collections, assets, user )
|
||||
def session( collections, assets, _user )
|
||||
|
||||
collections[ Network.to_app_model ] = Network.all
|
||||
collections[ Network::Category.to_app_model ] = Network::Category.all
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# process all database filter
|
||||
module Channel::Filter::Database
|
||||
|
||||
def self.run( channel, mail )
|
||||
def self.run( _channel, mail )
|
||||
|
||||
# process postmaster filter
|
||||
filters = PostmasterFilter.where( active: true, channel: 'email' )
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||
|
||||
class Channel::Sendmail
|
||||
def send(attr, channel, notification = false)
|
||||
def send(attr, _channel, notification = false)
|
||||
|
||||
# return if we run import mode
|
||||
return if Setting.get('import_mode')
|
||||
|
|
|
@ -137,7 +137,7 @@ class Channel::TWITTER2
|
|||
[user, ticket, article]
|
||||
end
|
||||
|
||||
def fetch_user_create(tweet, sender)
|
||||
def fetch_user_create(_tweet, sender)
|
||||
# create sender in db
|
||||
# puts tweet.inspect
|
||||
# user = User.where( :login => tweet.sender.screen_name ).first
|
||||
|
@ -180,7 +180,7 @@ class Channel::TWITTER2
|
|||
user
|
||||
end
|
||||
|
||||
def fetch_ticket_create(user, tweet, sender, channel, group)
|
||||
def fetch_ticket_create(user, tweet, _sender, _channel, group)
|
||||
|
||||
#Rails.logger.info '+++++++++++++++++++++++++++' + tweet.inspect
|
||||
# check if ticket exists
|
||||
|
@ -237,7 +237,7 @@ class Channel::TWITTER2
|
|||
ticket
|
||||
end
|
||||
|
||||
def fetch_article_create( user, ticket, tweet, sender )
|
||||
def fetch_article_create( _user, ticket, tweet, sender )
|
||||
|
||||
# find if record already exists
|
||||
article = Ticket::Article.where( message_id: tweet.id.to_s ).first
|
||||
|
@ -268,7 +268,7 @@ class Channel::TWITTER2
|
|||
|
||||
end
|
||||
|
||||
def send(attr, notification = false)
|
||||
def send(attr, _notification = false)
|
||||
# Rails.logger.debug('tweeeeettttt!!!!!!')
|
||||
channel = Channel.where( area: 'Twitter::Inbound', active: true ).first
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ class Observer::Ticket::Notification < ActiveRecord::Observer
|
|||
EventBuffer.add(e)
|
||||
end
|
||||
|
||||
def after_update(record)
|
||||
def after_update(_record)
|
||||
|
||||
# return if we run import mode
|
||||
return if Setting.get('import_mode')
|
||||
|
|
|
@ -225,7 +225,7 @@ class Observer::Ticket::Notification::BackgroundJob
|
|||
changes
|
||||
end
|
||||
|
||||
def template_create(user, ticket, article, ticket_changes)
|
||||
def template_create(user, ticket, article, _ticket_changes)
|
||||
article_content = ''
|
||||
if article
|
||||
article_content = '<snip>
|
||||
|
@ -348,7 +348,7 @@ Changes:<br>
|
|||
template
|
||||
end
|
||||
|
||||
def template_header(user)
|
||||
def template_header(_user)
|
||||
'
|
||||
<style type="text/css">
|
||||
.header {
|
||||
|
@ -385,7 +385,7 @@ Changes:<br>
|
|||
'
|
||||
end
|
||||
|
||||
def template_footer(user, ticket, article)
|
||||
def template_footer(_user, _ticket, _article)
|
||||
'
|
||||
<p>
|
||||
<a href="#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}">i18n(View this directly here)</a>
|
||||
|
|
|
@ -416,7 +416,7 @@ class Package < ApplicationModel
|
|||
true
|
||||
end
|
||||
|
||||
def self._delete_file(file, permission, data)
|
||||
def self._delete_file(file, _permission, _data)
|
||||
location = @@root + '/' + file
|
||||
|
||||
# install file
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
|
||||
|
||||
module Auth::Developer
|
||||
def self.check( username, password, config, user )
|
||||
def self.check( _username, password, _config, user )
|
||||
|
||||
# development systems
|
||||
if Setting.get('developer_mode') == true
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
|
||||
|
||||
module Auth::Internal
|
||||
def self.check( username, password, config, user )
|
||||
def self.check( _username, password, _config, user )
|
||||
|
||||
# return if no user exists
|
||||
return nil if !user
|
||||
|
|
|
@ -480,7 +480,7 @@ module Import::OTRS2
|
|||
|
||||
end
|
||||
|
||||
def self._ticket_result(result, locks, thread = '-')
|
||||
def self._ticket_result(result, locks, _thread = '-')
|
||||
# puts result.inspect
|
||||
map = {
|
||||
Ticket: {
|
||||
|
@ -968,7 +968,7 @@ module Import::OTRS2
|
|||
}
|
||||
end
|
||||
|
||||
def self.get_queue_ids(user, groups, roles, queues)
|
||||
def self.get_queue_ids(user, _groups, _roles, queues)
|
||||
queue_ids = []
|
||||
|
||||
# lookup by groups
|
||||
|
@ -991,7 +991,7 @@ module Import::OTRS2
|
|||
queue_ids
|
||||
end
|
||||
|
||||
def self.get_roles_ids(user, groups, roles, queues)
|
||||
def self.get_roles_ids(user, groups, roles, _queues)
|
||||
roles = ['Agent']
|
||||
role_ids = []
|
||||
user['GroupIDs'].each {|group_id, permissions|
|
||||
|
|
|
@ -150,7 +150,7 @@ return search result
|
|||
|
||||
=end
|
||||
|
||||
def self.search( query, limit = 10, index = nil, query_extention = {} )
|
||||
def self.search( query, _limit = 10, index = nil, query_extention = {} )
|
||||
return [] if !query
|
||||
|
||||
url = build_url()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
|
||||
|
||||
module Sso::Env
|
||||
def self.check( params, config_item )
|
||||
def self.check( _params, _config_item )
|
||||
|
||||
# try to find user based on login
|
||||
if ENV['REMOTE_USER']
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
|
||||
|
||||
module Sso::Otrs
|
||||
def self.check( params, config_item )
|
||||
def self.check( params, _config_item )
|
||||
|
||||
endpoint = Setting.get('import_otrs_endpoint')
|
||||
return false if !endpoint
|
||||
|
|
|
@ -696,7 +696,7 @@ class TestCase < Test::Unit::TestCase
|
|||
|
||||
=end
|
||||
|
||||
def open_task(params = {}, fallback = false)
|
||||
def open_task(params = {}, _fallback = false)
|
||||
log('open_task', params)
|
||||
|
||||
instance = params[:browser] || @browser
|
||||
|
|
Loading…
Reference in a new issue