From bae19fd9d75078ba7982840353a304429510862b Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Mon, 4 May 2015 16:28:42 +0200 Subject: [PATCH] Corrected with rubocop cop 'Style/AccessorMethodName'. --- app/controllers/import_otrs_controller.rb | 2 +- lib/import/otrs2.rb | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/controllers/import_otrs_controller.rb b/app/controllers/import_otrs_controller.rb index fdb3d99c5..d55cc57a8 100644 --- a/app/controllers/import_otrs_controller.rb +++ b/app/controllers/import_otrs_controller.rb @@ -93,7 +93,7 @@ class ImportOtrsController < ApplicationController def import_status return if setup_done_response - state = Import::OTRS2.get_current_state + state = Import::OTRS2.current_state render json: { data: state, diff --git a/lib/import/otrs2.rb b/lib/import/otrs2.rb index bd7056f69..8aff3c442 100644 --- a/lib/import/otrs2.rb +++ b/lib/import/otrs2.rb @@ -212,9 +212,9 @@ module Import::OTRS2 =begin - get object statisitic from server ans save it in cache + get object statistic from server ans save it in cache - result = get_statisitic('Subaction=List') + result = statistic('Subaction=List') return @@ -226,7 +226,7 @@ module Import::OTRS2 =end - def self.get_statisitic + def self.statistic # check cache cache = Cache.get('import_otrs_stats') @@ -246,7 +246,7 @@ module Import::OTRS2 return current import state - result = get_current_state + result = current_state return @@ -263,8 +263,8 @@ module Import::OTRS2 =end - def self.get_current_state - data = self.get_statisitic + def self.current_state + data = self.statistic base = Group.count + Ticket::State.count + Ticket::Priority.count base_total = data['Queue'] + data['State'] + data['Priority'] user = User.count