From 71700779dff8d01abf2f40ecb8e79eebec8a8919 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Fri, 1 May 2015 14:31:46 +0200 Subject: [PATCH] Corrected with rubocop cop 'Style/EmptyLinesAroundAccessModifier'. --- app/models/link.rb | 1 + app/models/observer/ticket/close_time.rb | 1 + app/models/observer/ticket/online_notification_seen.rb | 1 + app/models/setting.rb | 1 + app/models/sla.rb | 1 + app/models/taskbar.rb | 1 + app/models/token.rb | 1 + app/models/translation.rb | 1 + lib/user_agent.rb | 1 + 9 files changed, 9 insertions(+) diff --git a/app/models/link.rb b/app/models/link.rb index b7b5e744b..2c541da3d 100644 --- a/app/models/link.rb +++ b/app/models/link.rb @@ -152,6 +152,7 @@ class Link < ApplicationModel end private + def self.link_type_get(data) linktype = Link::Type.where( name: data[:name] ).first if !linktype diff --git a/app/models/observer/ticket/close_time.rb b/app/models/observer/ticket/close_time.rb index 30cdc5929..1ce45ee1b 100644 --- a/app/models/observer/ticket/close_time.rb +++ b/app/models/observer/ticket/close_time.rb @@ -12,6 +12,7 @@ class Observer::Ticket::CloseTime < ActiveRecord::Observer end private + def _check(record) # puts 'check close time' diff --git a/app/models/observer/ticket/online_notification_seen.rb b/app/models/observer/ticket/online_notification_seen.rb index 4516a7ca7..2872bba29 100644 --- a/app/models/observer/ticket/online_notification_seen.rb +++ b/app/models/observer/ticket/online_notification_seen.rb @@ -12,6 +12,7 @@ class Observer::Ticket::OnlineNotificationSeen < ActiveRecord::Observer end private + def _check(record) # return if we run import mode diff --git a/app/models/setting.rb b/app/models/setting.rb index 57dbb7efe..7854ef336 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -51,6 +51,7 @@ class Setting < ApplicationModel end private + def delete_cache @@current[:settings_config] = nil end diff --git a/app/models/sla.rb b/app/models/sla.rb index 070beb4bc..e590fe8c6 100644 --- a/app/models/sla.rb +++ b/app/models/sla.rb @@ -10,6 +10,7 @@ class Sla < ApplicationModel after_destroy :escalation_calculation_rebuild private + def escalation_calculation_rebuild Cache.delete( 'SLA::List::Active' ) Ticket::Escalation.rebuild_all diff --git a/app/models/taskbar.rb b/app/models/taskbar.rb index 3d707221d..1349fd074 100644 --- a/app/models/taskbar.rb +++ b/app/models/taskbar.rb @@ -7,6 +7,7 @@ class Taskbar < ApplicationModel before_update :update_last_contact, :set_user private + def update_last_contact self.last_contact = Time.now end diff --git a/app/models/token.rb b/app/models/token.rb index 0f92da53f..518dc66d3 100644 --- a/app/models/token.rb +++ b/app/models/token.rb @@ -26,6 +26,7 @@ class Token < ActiveRecord::Base end private + def generate_token begin self.name = SecureRandom.hex(20) diff --git a/app/models/translation.rb b/app/models/translation.rb index d748bbc80..acbe94bac 100644 --- a/app/models/translation.rb +++ b/app/models/translation.rb @@ -167,6 +167,7 @@ translate strings in ruby context, e. g. for notifications end private + def set_initial return if target_initial diff --git a/lib/user_agent.rb b/lib/user_agent.rb index 3c16769eb..b29e9ab2e 100644 --- a/lib/user_agent.rb +++ b/lib/user_agent.rb @@ -241,6 +241,7 @@ returns end private + def self.get_http(uri, options) http = Net::HTTP.new(uri.host, uri.port)