Applied rubocop Style/IndentHash.
This commit is contained in:
parent
c79c73d009
commit
158bf737ae
12 changed files with 47 additions and 44 deletions
|
@ -64,7 +64,7 @@ class ImportOtrsController < ApplicationController
|
||||||
|
|
||||||
# return result
|
# return result
|
||||||
render json: {
|
render json: {
|
||||||
result: 'invalid',
|
result: 'invalid',
|
||||||
message_human: message_human,
|
message_human: message_human,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
|
@ -207,11 +207,11 @@ class Package < ApplicationModel
|
||||||
end
|
end
|
||||||
|
|
||||||
# uninstall files of old package
|
# uninstall files of old package
|
||||||
self.uninstall({
|
self.uninstall(
|
||||||
name: package_db.name,
|
name: package_db.name,
|
||||||
version: package_db.version,
|
version: package_db.version,
|
||||||
migration_not_down: true,
|
migration_not_down: true,
|
||||||
})
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
# store package
|
# store package
|
||||||
|
|
|
@ -42,10 +42,13 @@ returns
|
||||||
|
|
||||||
# send update to browser
|
# send update to browser
|
||||||
if session && session['id']
|
if session && session['id']
|
||||||
self.send( client_id, {
|
self.send(
|
||||||
event: 'ws:login',
|
client_id,
|
||||||
data: { success: true },
|
{
|
||||||
})
|
event: 'ws:login',
|
||||||
|
data: { success: true },
|
||||||
|
}
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -54,11 +54,11 @@ class Sessions::Backend::ActivityStream
|
||||||
end
|
end
|
||||||
|
|
||||||
@client.log 'notify', "push activity_stream #{ data.first.class.to_s } for user #{ @user.id }"
|
@client.log 'notify', "push activity_stream #{ data.first.class.to_s } for user #{ @user.id }"
|
||||||
@client.send({
|
@client.send(
|
||||||
event: 'activity_stream_rebuild',
|
event: 'activity_stream_rebuild',
|
||||||
collection: 'activity_stream',
|
collection: 'activity_stream',
|
||||||
data: data,
|
data: data,
|
||||||
})
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -74,18 +74,18 @@ class Sessions::Backend::Collections::Base
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@client.log 'notify', "push assets for push_collection #{ items.first.class.to_s } for user #{ @user.id }"
|
@client.log 'notify', "push assets for push_collection #{ items.first.class.to_s } for user #{ @user.id }"
|
||||||
@client.send({
|
@client.send(
|
||||||
data: assets,
|
data: assets,
|
||||||
event: [ 'loadAssets' ],
|
event: [ 'loadAssets' ],
|
||||||
})
|
)
|
||||||
|
|
||||||
@client.log 'notify', "push push_collection #{ items.first.class.to_s } for user #{ @user.id }"
|
@client.log 'notify', "push push_collection #{ items.first.class.to_s } for user #{ @user.id }"
|
||||||
@client.send({
|
@client.send(
|
||||||
event: 'resetCollection',
|
event: 'resetCollection',
|
||||||
data: {
|
data: {
|
||||||
items.first.class.to_app_model => all,
|
items.first.class.to_app_model => all,
|
||||||
},
|
},
|
||||||
})
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.model_set(model)
|
def self.model_set(model)
|
||||||
|
|
|
@ -54,11 +54,11 @@ class Sessions::Backend::Rss
|
||||||
end
|
end
|
||||||
|
|
||||||
@client.log 'notify', "push rss for user #{@user.id}"
|
@client.log 'notify', "push rss for user #{@user.id}"
|
||||||
@client.send({
|
@client.send(
|
||||||
event: 'rss_rebuild',
|
event: 'rss_rebuild',
|
||||||
collection: 'dashboard_rss',
|
collection: 'dashboard_rss',
|
||||||
data: data,
|
data: data,
|
||||||
})
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -59,10 +59,10 @@ class Sessions::Backend::TicketCreate
|
||||||
end
|
end
|
||||||
|
|
||||||
@client.log 'notify', "push ticket_create for user #{ @user.id }"
|
@client.log 'notify', "push ticket_create for user #{ @user.id }"
|
||||||
@client.send({
|
@client.send(
|
||||||
collection: 'ticket_create_attributes',
|
collection: 'ticket_create_attributes',
|
||||||
data: data,
|
data: data,
|
||||||
})
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -57,10 +57,10 @@ class Sessions::Backend::TicketOverviewIndex
|
||||||
end
|
end
|
||||||
|
|
||||||
@client.log 'notify', "push overview_index for user #{ @user.id }"
|
@client.log 'notify', "push overview_index for user #{ @user.id }"
|
||||||
@client.send({
|
@client.send(
|
||||||
event: ['ticket_overview_index'],
|
event: ['ticket_overview_index'],
|
||||||
data: data,
|
data: data,
|
||||||
})
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -106,11 +106,11 @@ class Sessions::Backend::TicketOverviewList
|
||||||
@client.log 'notify', "push overview_list for user #{ @user.id }"
|
@client.log 'notify', "push overview_list for user #{ @user.id }"
|
||||||
|
|
||||||
# send update to browser
|
# send update to browser
|
||||||
@client.send({
|
@client.send(
|
||||||
data: assets,
|
data: assets,
|
||||||
event: [ 'loadAssets' ]
|
event: [ 'loadAssets' ]
|
||||||
})
|
)
|
||||||
@client.send({
|
@client.send(
|
||||||
data: {
|
data: {
|
||||||
view: item[:index].link.to_s,
|
view: item[:index].link.to_s,
|
||||||
overview: overview_data[:overview],
|
overview: overview_data[:overview],
|
||||||
|
@ -122,7 +122,7 @@ class Sessions::Backend::TicketOverviewList
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
event: [ 'ticket_overview_rebuild' ],
|
event: [ 'ticket_overview_rebuild' ],
|
||||||
})
|
)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
return results if !@client
|
return results if !@client
|
||||||
|
|
|
@ -35,7 +35,7 @@ class ActivityStreamTest < ActiveSupport::TestCase
|
||||||
created_by_id: current_user.id,
|
created_by_id: current_user.id,
|
||||||
},
|
},
|
||||||
article: {
|
article: {
|
||||||
updated_by_id: current_user.id,
|
updated_by_id: current_user.id,
|
||||||
created_by_id: current_user.id,
|
created_by_id: current_user.id,
|
||||||
type_id: Ticket::Article::Type.lookup( name: 'phone' ).id,
|
type_id: Ticket::Article::Type.lookup( name: 'phone' ).id,
|
||||||
sender_id: Ticket::Article::Sender.lookup( name: 'Customer' ).id,
|
sender_id: Ticket::Article::Sender.lookup( name: 'Customer' ).id,
|
||||||
|
@ -59,10 +59,10 @@ class ActivityStreamTest < ActiveSupport::TestCase
|
||||||
},
|
},
|
||||||
check: [
|
check: [
|
||||||
{
|
{
|
||||||
result: true,
|
result: true,
|
||||||
object: 'Ticket',
|
object: 'Ticket',
|
||||||
type: 'updated',
|
type: 'updated',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
result: true,
|
result: true,
|
||||||
object: 'Ticket::Article',
|
object: 'Ticket::Article',
|
||||||
|
|
|
@ -21,7 +21,7 @@ class HistoryTest < ActiveSupport::TestCase
|
||||||
created_by_id: current_user.id,
|
created_by_id: current_user.id,
|
||||||
},
|
},
|
||||||
article: {
|
article: {
|
||||||
updated_by_id: current_user.id,
|
updated_by_id: current_user.id,
|
||||||
created_by_id: current_user.id,
|
created_by_id: current_user.id,
|
||||||
type_id: Ticket::Article::Type.lookup( name: 'phone' ).id,
|
type_id: Ticket::Article::Type.lookup( name: 'phone' ).id,
|
||||||
sender_id: Ticket::Article::Sender.lookup( name: 'Customer' ).id,
|
sender_id: Ticket::Article::Sender.lookup( name: 'Customer' ).id,
|
||||||
|
@ -88,7 +88,7 @@ class HistoryTest < ActiveSupport::TestCase
|
||||||
created_by_id: current_user.id,
|
created_by_id: current_user.id,
|
||||||
},
|
},
|
||||||
article: {
|
article: {
|
||||||
created_by_id: current_user.id,
|
created_by_id: current_user.id,
|
||||||
updated_by_id: current_user.id,
|
updated_by_id: current_user.id,
|
||||||
type_id: Ticket::Article::Type.lookup(name: 'phone' ).id,
|
type_id: Ticket::Article::Type.lookup(name: 'phone' ).id,
|
||||||
sender_id: Ticket::Article::Sender.lookup(name: 'Customer' ).id,
|
sender_id: Ticket::Article::Sender.lookup(name: 'Customer' ).id,
|
||||||
|
|
|
@ -72,15 +72,15 @@ class OnlineNotificationTest < ActiveSupport::TestCase
|
||||||
},
|
},
|
||||||
check: [
|
check: [
|
||||||
{
|
{
|
||||||
type: 'create',
|
type: 'create',
|
||||||
object: 'Ticket',
|
object: 'Ticket',
|
||||||
created_by_id: agent_user1.id,
|
created_by_id: agent_user1.id,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'update',
|
type: 'update',
|
||||||
object: 'Ticket',
|
object: 'Ticket',
|
||||||
created_by_id: customer_user.id,
|
created_by_id: customer_user.id,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -123,15 +123,15 @@ class OnlineNotificationTest < ActiveSupport::TestCase
|
||||||
},
|
},
|
||||||
check: [
|
check: [
|
||||||
{
|
{
|
||||||
type: 'create',
|
type: 'create',
|
||||||
object: 'Ticket',
|
object: 'Ticket',
|
||||||
created_by_id: agent_user1.id,
|
created_by_id: agent_user1.id,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'update',
|
type: 'update',
|
||||||
object: 'Ticket',
|
object: 'Ticket',
|
||||||
created_by_id: customer_user.id,
|
created_by_id: customer_user.id,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -174,15 +174,15 @@ class OnlineNotificationTest < ActiveSupport::TestCase
|
||||||
},
|
},
|
||||||
check: [
|
check: [
|
||||||
{
|
{
|
||||||
type: 'create',
|
type: 'create',
|
||||||
object: 'Ticket',
|
object: 'Ticket',
|
||||||
created_by_id: agent_user1.id,
|
created_by_id: agent_user1.id,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'update',
|
type: 'update',
|
||||||
object: 'Ticket',
|
object: 'Ticket',
|
||||||
created_by_id: customer_user.id,
|
created_by_id: customer_user.id,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -225,15 +225,15 @@ class OnlineNotificationTest < ActiveSupport::TestCase
|
||||||
},
|
},
|
||||||
check: [
|
check: [
|
||||||
{
|
{
|
||||||
type: 'create',
|
type: 'create',
|
||||||
object: 'Ticket',
|
object: 'Ticket',
|
||||||
created_by_id: agent_user1.id,
|
created_by_id: agent_user1.id,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'update',
|
type: 'update',
|
||||||
object: 'Ticket',
|
object: 'Ticket',
|
||||||
created_by_id: customer_user.id,
|
created_by_id: customer_user.id,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue