Applied rubocop Style/CommentIndentation.
This commit is contained in:
parent
dd9a9ad19f
commit
43a924f554
19 changed files with 36 additions and 51 deletions
|
@ -519,8 +519,7 @@ end
|
||||||
def self.notify_clients_support
|
def self.notify_clients_support
|
||||||
after_create :notify_clients_after_create
|
after_create :notify_clients_after_create
|
||||||
after_update :notify_clients_after_update
|
after_update :notify_clients_after_update
|
||||||
# after_touch :notify_clients_after_touch
|
after_touch :notify_clients_after_touch
|
||||||
after_touch :notify_clients_after_update
|
|
||||||
after_destroy :notify_clients_after_destroy
|
after_destroy :notify_clients_after_destroy
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,6 @@ add a new attribute entry for an object
|
||||||
name: data[:name],
|
name: data[:name],
|
||||||
)
|
)
|
||||||
if result
|
if result
|
||||||
# raise "ERROR: attribute #{data[:name]} for #{data[:object]} already exists"
|
|
||||||
return result.update_attributes(data)
|
return result.update_attributes(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ class CreateBase < ActiveRecord::Migration
|
||||||
end
|
end
|
||||||
add_index :users, [:login], unique: true
|
add_index :users, [:login], unique: true
|
||||||
add_index :users, [:email]
|
add_index :users, [:email]
|
||||||
# add_index :users, [:email], :unique => true
|
#add_index :users, [:email], unique: => true
|
||||||
add_index :users, [:image]
|
add_index :users, [:image]
|
||||||
add_index :users, [:department]
|
add_index :users, [:department]
|
||||||
add_index :users, [:phone]
|
add_index :users, [:phone]
|
||||||
|
@ -74,7 +74,7 @@ class CreateBase < ActiveRecord::Migration
|
||||||
create_table :groups do |t|
|
create_table :groups do |t|
|
||||||
t.references :signature, null: true
|
t.references :signature, null: true
|
||||||
t.references :email_address, 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 :assignment_timeout, :integer, null: true
|
||||||
t.column :follow_up_possible, :string, limit: 100, null: false, default: 'yes'
|
t.column :follow_up_possible, :string, limit: 100, null: false, default: 'yes'
|
||||||
t.column :follow_up_assignment, :boolean, null: false, default: true
|
t.column :follow_up_assignment, :boolean, null: false, default: true
|
||||||
|
|
|
@ -12,9 +12,6 @@ class PostmasterFilterCreate < ActiveRecord::Migration
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
add_index :postmaster_filters, [:channel]
|
add_index :postmaster_filters, [:channel]
|
||||||
|
|
||||||
# add_column :groups, :email_address_id, :integer, :null => true
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
|
|
|
@ -497,7 +497,6 @@ class UpdateObjectManager2 < ActiveRecord::Migration
|
||||||
maxlength: 250,
|
maxlength: 250,
|
||||||
null: true,
|
null: true,
|
||||||
note: 'Notes are visible to agents only, never to customers.',
|
note: 'Notes are visible to agents only, never to customers.',
|
||||||
# :item_class => 'formGroup--halfSize',
|
|
||||||
},
|
},
|
||||||
editable: false,
|
editable: false,
|
||||||
active: true,
|
active: true,
|
||||||
|
|
|
@ -481,7 +481,6 @@ module Import::OTRS
|
||||||
end
|
end
|
||||||
|
|
||||||
def self._ticket_result(result, locks, _thread = '-')
|
def self._ticket_result(result, locks, _thread = '-')
|
||||||
# puts result.inspect
|
|
||||||
map = {
|
map = {
|
||||||
Ticket: {
|
Ticket: {
|
||||||
Changed: :updated_at,
|
Changed: :updated_at,
|
||||||
|
@ -496,13 +495,13 @@ module Import::OTRS
|
||||||
Title: :title,
|
Title: :title,
|
||||||
TicketID: :id,
|
TicketID: :id,
|
||||||
FirstResponse: :first_response,
|
FirstResponse: :first_response,
|
||||||
# :FirstResponseTimeDestinationDate => :first_response_escal_date,
|
#FirstResponseTimeDestinationDate: :first_response_escal_date,
|
||||||
# :FirstResponseInMin => :first_response_in_min,
|
#FirstResponseInMin: :first_response_in_min,
|
||||||
# :FirstResponseDiffInMin => :first_response_diff_in_min,
|
#FirstResponseDiffInMin: :first_response_diff_in_min,
|
||||||
Closed: :close_time,
|
Closed: :close_time,
|
||||||
# :SoltutionTimeDestinationDate => :close_time_escal_date,
|
#SoltutionTimeDestinationDate: :close_time_escal_date,
|
||||||
# :CloseTimeInMin => :close_time_in_min,
|
#CloseTimeInMin: :close_time_in_min,
|
||||||
# :CloseTimeDiffInMin => :close_time_diff_in_min,
|
#CloseTimeDiffInMin: :close_time_diff_in_min,
|
||||||
},
|
},
|
||||||
Article: {
|
Article: {
|
||||||
SenderType: :sender,
|
SenderType: :sender,
|
||||||
|
@ -516,7 +515,7 @@ module Import::OTRS
|
||||||
Subject: :subject,
|
Subject: :subject,
|
||||||
InReplyTo: :in_reply_to,
|
InReplyTo: :in_reply_to,
|
||||||
MessageID: :message_id,
|
MessageID: :message_id,
|
||||||
# :ReplyTo => :reply_to,
|
#ReplyTo: :reply_to,
|
||||||
References: :references,
|
References: :references,
|
||||||
Changed: :updated_at,
|
Changed: :updated_at,
|
||||||
Created: :created_at,
|
Created: :created_at,
|
||||||
|
|
|
@ -3,12 +3,12 @@ module NotificationFactory
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
result_string = NotificationFactory.build(
|
result_string = NotificationFactory.build(
|
||||||
:string => 'Hi #{recipient.firstname},',
|
string: 'Hi #{recipient.firstname},',
|
||||||
:objects => {
|
objects: {
|
||||||
:ticket => ticket,
|
ticket : ticket,
|
||||||
:recipient => User.find(2),
|
recipient: User.find(2),
|
||||||
},
|
},
|
||||||
:locale => 'en',
|
locale: 'en',
|
||||||
)
|
)
|
||||||
|
|
||||||
=end
|
=end
|
||||||
|
@ -94,10 +94,10 @@ module NotificationFactory
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
success = NotificationFactory.send(
|
success = NotificationFactory.send(
|
||||||
:recipient => User.find(123),
|
recipient: User.find(123),
|
||||||
:subject => 'sime subject',
|
subject: 'sime subject',
|
||||||
:body => 'some body',
|
body: 'some body',
|
||||||
:content_type => '', # optional, e. g. 'text/html'
|
content_type: '', # optional, e. g. 'text/html'
|
||||||
)
|
)
|
||||||
|
|
||||||
=end
|
=end
|
||||||
|
@ -113,7 +113,7 @@ module NotificationFactory
|
||||||
|
|
||||||
Channel::EmailSend.send(
|
Channel::EmailSend.send(
|
||||||
{
|
{
|
||||||
# :in_reply_to => self.in_reply_to,
|
# in_reply_to: in_reply_to,
|
||||||
from: sender,
|
from: sender,
|
||||||
to: data[:recipient][:email],
|
to: data[:recipient][:email],
|
||||||
subject: data[:subject],
|
subject: data[:subject],
|
||||||
|
|
|
@ -577,8 +577,6 @@ returns
|
||||||
Rails.logger.error e.backtrace.join("\n ")
|
Rails.logger.error e.backtrace.join("\n ")
|
||||||
sleep 10
|
sleep 10
|
||||||
begin
|
begin
|
||||||
# ActiveRecord::Base.remove_connection
|
|
||||||
# ActiveRecord::Base.connection_pool.reap
|
|
||||||
ActiveRecord::Base.connection_pool.release_connection
|
ActiveRecord::Base.connection_pool.release_connection
|
||||||
rescue => e
|
rescue => e
|
||||||
Rails.logger.error "Can't reconnect to database #{ e.inspect }"
|
Rails.logger.error "Can't reconnect to database #{ e.inspect }"
|
||||||
|
|
|
@ -10,7 +10,6 @@ module Sessions::CacheIn
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.set( key, value, params = {} )
|
def self.set( key, value, params = {} )
|
||||||
# puts 'CacheIn.set:' + key + '-' + value.inspect
|
|
||||||
if params[:expires_in]
|
if params[:expires_in]
|
||||||
@@expires_in[key] = Time.now + params[:expires_in]
|
@@expires_in[key] = Time.now + params[:expires_in]
|
||||||
@@expires_in_ttl[key] = params[:expires_in]
|
@@expires_in_ttl[key] = params[:expires_in]
|
||||||
|
@ -46,7 +45,6 @@ module Sessions::CacheIn
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.get( key, params = {} )
|
def self.get( key, params = {} )
|
||||||
# puts 'CacheIn.get:' + key + '-' + @@data[ key ].inspect
|
|
||||||
return if expired( key, params )
|
return if expired( key, params )
|
||||||
@@data[ key ]
|
@@data[ key ]
|
||||||
end
|
end
|
||||||
|
|
1
vendor/lib/facebook_database.rb
vendored
1
vendor/lib/facebook_database.rb
vendored
|
@ -4,7 +4,6 @@ class FacebookDatabase < OmniAuth::Strategies::Facebook
|
||||||
def initialize(app, *args, &block)
|
def initialize(app, *args, &block)
|
||||||
|
|
||||||
# database lookup
|
# database lookup
|
||||||
# puts 'FacebookDatabase -> initialize'
|
|
||||||
config = Setting.get('auth_facebook_credentials') || {}
|
config = Setting.get('auth_facebook_credentials') || {}
|
||||||
args[0] = config['app_id']
|
args[0] = config['app_id']
|
||||||
args[1] = config['app_secret']
|
args[1] = config['app_secret']
|
||||||
|
|
1
vendor/lib/google_oauth2_database.rb
vendored
1
vendor/lib/google_oauth2_database.rb
vendored
|
@ -4,7 +4,6 @@ class GoogleOauth2Database < OmniAuth::Strategies::GoogleOauth2
|
||||||
def initialize(app, *args, &block)
|
def initialize(app, *args, &block)
|
||||||
|
|
||||||
# database lookup
|
# 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[0] = config['client_id']
|
||||||
args[1] = config['client_secret']
|
args[1] = config['client_secret']
|
||||||
|
|
1
vendor/lib/linked_in_database.rb
vendored
1
vendor/lib/linked_in_database.rb
vendored
|
@ -4,7 +4,6 @@ class LinkedInDatabase < OmniAuth::Strategies::LinkedIn
|
||||||
def initialize(app, *args, &block)
|
def initialize(app, *args, &block)
|
||||||
|
|
||||||
# database lookup
|
# database lookup
|
||||||
# puts 'LinkedInDatabase -> initialize'
|
|
||||||
config = Setting.get('auth_linkedin_credentials') || {}
|
config = Setting.get('auth_linkedin_credentials') || {}
|
||||||
args[0] = config['app_id']
|
args[0] = config['app_id']
|
||||||
args[1] = config['app_secret']
|
args[1] = config['app_secret']
|
||||||
|
|
1
vendor/lib/twitter_database.rb
vendored
1
vendor/lib/twitter_database.rb
vendored
|
@ -4,7 +4,6 @@ class TwitterDatabase < OmniAuth::Strategies::Twitter
|
||||||
def initialize(app, *args, &block)
|
def initialize(app, *args, &block)
|
||||||
|
|
||||||
# database lookup
|
# database lookup
|
||||||
# puts 'TwitterDatabase -> initialize'
|
|
||||||
config = Setting.get('auth_twitter_credentials') || {}
|
config = Setting.get('auth_twitter_credentials') || {}
|
||||||
args[0] = config['key']
|
args[0] = config['key']
|
||||||
args[1] = config['secret']
|
args[1] = config['secret']
|
||||||
|
|
Loading…
Reference in a new issue