Applied rubocop Style/CommentIndentation.

This commit is contained in:
Martin Edenhofer 2015-05-07 22:49:15 +02:00
parent dd9a9ad19f
commit 43a924f554
19 changed files with 36 additions and 51 deletions

View file

@ -519,8 +519,7 @@ end
def self.notify_clients_support
after_create :notify_clients_after_create
after_update :notify_clients_after_update
# after_touch :notify_clients_after_touch
after_touch :notify_clients_after_update
after_touch :notify_clients_after_touch
after_destroy :notify_clients_after_destroy
end

View file

@ -117,7 +117,6 @@ add a new attribute entry for an object
name: data[:name],
)
if result
# raise "ERROR: attribute #{data[:name]} for #{data[:object]} already exists"
return result.update_attributes(data)
end

View file

@ -25,7 +25,7 @@ class Observer::Ticket::Article::CommunicateTwitter < ActiveRecord::Observer
body: record.body,
in_reply_to: record.in_reply_to
},
# Rails.application.config.channel_twitter
#Rails.application.config.channel_twitter
)
record.message_id = message.id
record.save

View file

@ -261,8 +261,8 @@ returns
if counted
# puts "Diff count #{history_item['value_from']} -> #{history_item['value_to']} / #{last_state_change} -> #{history_item['created_at']}"
total_time_without_pending = total_time_without_pending + diff
# else
# puts "Diff not count #{history_item['value_from']} -> #{history_item['value_to']} / #{last_state_change} -> #{history_item['created_at']}"
# else
# puts "Diff not count #{history_item['value_from']} -> #{history_item['value_to']} / #{last_state_change} -> #{history_item['created_at']}"
end
total_time = total_time + diff

View file

@ -40,7 +40,7 @@ class CreateBase < ActiveRecord::Migration
end
add_index :users, [:login], unique: true
add_index :users, [:email]
# add_index :users, [:email], :unique => true
#add_index :users, [:email], unique: => true
add_index :users, [:image]
add_index :users, [:department]
add_index :users, [:phone]
@ -74,7 +74,7 @@ class CreateBase < ActiveRecord::Migration
create_table :groups do |t|
t.references :signature, null: true
t.references :email_address, null: true
t.column :name, :string, limit: 100, null: false
t.column :name, :string, limit: 160, null: false
t.column :assignment_timeout, :integer, null: true
t.column :follow_up_possible, :string, limit: 100, null: false, default: 'yes'
t.column :follow_up_assignment, :boolean, null: false, default: true

View file

@ -141,7 +141,7 @@ class CreateTicket < ActiveRecord::Migration
t.column :to, :string, limit: 3000, null: true
t.column :cc, :string, limit: 3000, null: true
t.column :subject, :string, limit: 3000, null: true
# t.column :reply_to, :string, :limit => 3000, :null => true
# t.column :reply_to, :string, :limit => 3000, :null => true
t.column :message_id, :string, limit: 3000, null: true
t.column :message_id_md5, :string, limit: 32, null: true
t.column :in_reply_to, :string, limit: 3000, null: true

View file

@ -12,9 +12,6 @@ class PostmasterFilterCreate < ActiveRecord::Migration
t.timestamps
end
add_index :postmaster_filters, [:channel]
# add_column :groups, :email_address_id, :integer, :null => true
end
def down

View file

@ -497,7 +497,6 @@ class UpdateObjectManager2 < ActiveRecord::Migration
maxlength: 250,
null: true,
note: 'Notes are visible to agents only, never to customers.',
# :item_class => 'formGroup--halfSize',
},
editable: false,
active: true,

View file

@ -42,12 +42,12 @@ returns
# load adapter
# will only work on ruby 2.0
# Object.const_get(adapter)
#Object.const_get(adapter)
# will work on ruby 1.9 and 2.0
# adapter.split('::').inject(Object) do |mod, class_name|
# mod.const_get(class_name)
# end
#adapter.split('::').inject(Object) do |mod, class_name|
# mod.const_get(class_name)
#end
# will work with active_support
adapter = adapter.constantize

View file

@ -35,6 +35,6 @@ module Encode
Rails.logger.error 'ERROR: ' + e.inspect
string
end
# Iconv.conv( 'UTF8', charset, string )
#Iconv.conv( 'UTF8', charset, string )
end
end

View file

@ -481,7 +481,6 @@ module Import::OTRS
end
def self._ticket_result(result, locks, _thread = '-')
# puts result.inspect
map = {
Ticket: {
Changed: :updated_at,
@ -496,13 +495,13 @@ module Import::OTRS
Title: :title,
TicketID: :id,
FirstResponse: :first_response,
# :FirstResponseTimeDestinationDate => :first_response_escal_date,
# :FirstResponseInMin => :first_response_in_min,
# :FirstResponseDiffInMin => :first_response_diff_in_min,
#FirstResponseTimeDestinationDate: :first_response_escal_date,
#FirstResponseInMin: :first_response_in_min,
#FirstResponseDiffInMin: :first_response_diff_in_min,
Closed: :close_time,
# :SoltutionTimeDestinationDate => :close_time_escal_date,
# :CloseTimeInMin => :close_time_in_min,
# :CloseTimeDiffInMin => :close_time_diff_in_min,
#SoltutionTimeDestinationDate: :close_time_escal_date,
#CloseTimeInMin: :close_time_in_min,
#CloseTimeDiffInMin: :close_time_diff_in_min,
},
Article: {
SenderType: :sender,
@ -516,7 +515,7 @@ module Import::OTRS
Subject: :subject,
InReplyTo: :in_reply_to,
MessageID: :message_id,
# :ReplyTo => :reply_to,
#ReplyTo: :reply_to,
References: :references,
Changed: :updated_at,
Created: :created_at,
@ -988,8 +987,8 @@ module Import::OTRS
# lookup by roles
# roles of user
# groups of roles
# queues of group
# groups of roles
# queues of group
queue_ids
end

View file

@ -3,12 +3,12 @@ module NotificationFactory
=begin
result_string = NotificationFactory.build(
:string => 'Hi #{recipient.firstname},',
:objects => {
:ticket => ticket,
:recipient => User.find(2),
string: 'Hi #{recipient.firstname},',
objects: {
ticket : ticket,
recipient: User.find(2),
},
:locale => 'en',
locale: 'en',
)
=end
@ -94,10 +94,10 @@ module NotificationFactory
=begin
success = NotificationFactory.send(
:recipient => User.find(123),
:subject => 'sime subject',
:body => 'some body',
:content_type => '', # optional, e. g. 'text/html'
recipient: User.find(123),
subject: 'sime subject',
body: 'some body',
content_type: '', # optional, e. g. 'text/html'
)
=end
@ -113,7 +113,7 @@ module NotificationFactory
Channel::EmailSend.send(
{
# :in_reply_to => self.in_reply_to,
# in_reply_to: in_reply_to,
from: sender,
to: data[:recipient][:email],
subject: data[:subject],

View file

@ -577,8 +577,6 @@ returns
Rails.logger.error e.backtrace.join("\n ")
sleep 10
begin
# ActiveRecord::Base.remove_connection
# ActiveRecord::Base.connection_pool.reap
ActiveRecord::Base.connection_pool.release_connection
rescue => e
Rails.logger.error "Can't reconnect to database #{ e.inspect }"

View file

@ -10,7 +10,6 @@ module Sessions::CacheIn
end
def self.set( key, value, params = {} )
# puts 'CacheIn.set:' + key + '-' + value.inspect
if params[:expires_in]
@@expires_in[key] = Time.now + params[:expires_in]
@@expires_in_ttl[key] = params[:expires_in]
@ -46,7 +45,6 @@ module Sessions::CacheIn
end
def self.get( key, params = {} )
# puts 'CacheIn.get:' + key + '-' + @@data[ key ].inspect
return if expired( key, params )
@@data[ key ]
end

View file

@ -268,7 +268,7 @@ put working hours matrix and timezone in function, returns UTC working hours mat
month = start_time.month
year = start_time.year
hour = start_time.hour
#puts "start outer loop #{start_time}-#{week_day}-#{year}-#{month}-#{day}-#{hour}|c#{count}"
#puts "start outer loop #{start_time}-#{week_day}-#{year}-#{month}-#{day}-#{hour}|c#{count}"
# check if it's vacation day
if config

View file

@ -4,8 +4,7 @@ class FacebookDatabase < OmniAuth::Strategies::Facebook
def initialize(app, *args, &block)
# database lookup
# puts 'FacebookDatabase -> initialize'
config = Setting.get('auth_facebook_credentials') || {}
config = Setting.get('auth_facebook_credentials') || {}
args[0] = config['app_id']
args[1] = config['app_secret']
super

View file

@ -4,8 +4,7 @@ class GoogleOauth2Database < OmniAuth::Strategies::GoogleOauth2
def initialize(app, *args, &block)
# database lookup
# puts 'GoogleOauth2Database -> initialize'
config = Setting.get('auth_google_oauth2_credentials') || {}
config = Setting.get('auth_google_oauth2_credentials') || {}
args[0] = config['client_id']
args[1] = config['client_secret']
super

View file

@ -4,8 +4,7 @@ class LinkedInDatabase < OmniAuth::Strategies::LinkedIn
def initialize(app, *args, &block)
# database lookup
# puts 'LinkedInDatabase -> initialize'
config = Setting.get('auth_linkedin_credentials') || {}
config = Setting.get('auth_linkedin_credentials') || {}
args[0] = config['app_id']
args[1] = config['app_secret']
super

View file

@ -4,8 +4,7 @@ class TwitterDatabase < OmniAuth::Strategies::Twitter
def initialize(app, *args, &block)
# database lookup
# puts 'TwitterDatabase -> initialize'
config = Setting.get('auth_twitter_credentials') || {}
config = Setting.get('auth_twitter_credentials') || {}
args[0] = config['key']
args[1] = config['secret']
super