Applied new rubocop version.

This commit is contained in:
Martin Edenhofer 2015-09-09 20:16:20 +02:00
parent 0a18954064
commit 4e94fd5790
3 changed files with 7 additions and 5 deletions

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/ # Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class LongPollingController < ApplicationController class LongPollingController < ApplicationController
skip_filter :session_update skip_action_callback :session_update # prevent race conditions
# GET /api/v1/message_send # GET /api/v1/message_send
def message_send def message_send

View file

@ -218,9 +218,11 @@ translate strings in ruby context, e. g. for notifications
def cache_clear def cache_clear
Cache.delete( 'TranslationMap::' + locale.downcase ) Cache.delete( 'TranslationMap::' + locale.downcase )
end end
def self.cache_set(locale, data) def self.cache_set(locale, data)
Cache.write( 'TranslationMap::' + locale.downcase, data ) Cache.write( 'TranslationMap::' + locale.downcase, data )
end end
def self.cache_get(locale) def self.cache_get(locale)
Cache.get( 'TranslationMap::' + locale.downcase ) Cache.get( 'TranslationMap::' + locale.downcase )
end end

View file

@ -121,7 +121,7 @@ class ElasticsearchTest < ActiveSupport::TestCase
Store.add( Store.add(
object: 'Ticket::Article', object: 'Ticket::Article',
o_id: article1.id, o_id: article1.id,
data: File.open("#{Rails.root}/test/fixtures/es-normal.txt", 'rb') { |file| file.read }, data: IO.read("#{Rails.root}/test/fixtures/es-normal.txt"),
filename: 'es-normal.txt', filename: 'es-normal.txt',
preferences: {}, preferences: {},
created_by_id: 1, created_by_id: 1,
@ -132,7 +132,7 @@ class ElasticsearchTest < ActiveSupport::TestCase
Store.add( Store.add(
object: 'Ticket::Article', object: 'Ticket::Article',
o_id: article1.id, o_id: article1.id,
data: File.open("#{Rails.root}/test/fixtures/es-pdf1.pdf", 'rb') { |file| file.read }, data: IO.read("#{Rails.root}/test/fixtures/es-pdf1.pdf"),
filename: 'es-pdf1.pdf', filename: 'es-pdf1.pdf',
preferences: {}, preferences: {},
created_by_id: 1, created_by_id: 1,
@ -143,7 +143,7 @@ class ElasticsearchTest < ActiveSupport::TestCase
Store.add( Store.add(
object: 'Ticket::Article', object: 'Ticket::Article',
o_id: article1.id, o_id: article1.id,
data: File.open("#{Rails.root}/test/fixtures/es-box1.box", 'rb') { |file| file.read }, data: IO.read("#{Rails.root}/test/fixtures/es-box1.box"),
filename: 'mail1.box', filename: 'mail1.box',
preferences: {}, preferences: {},
created_by_id: 1, created_by_id: 1,
@ -154,7 +154,7 @@ class ElasticsearchTest < ActiveSupport::TestCase
Store.add( Store.add(
object: 'Ticket::Article', object: 'Ticket::Article',
o_id: article1.id, o_id: article1.id,
data: File.open("#{Rails.root}/test/fixtures/es-too-big.txt", 'rb') { |file| file.read }, data: IO.read("#{Rails.root}/test/fixtures/es-too-big.txt"),
filename: 'es-too-big.txt', filename: 'es-too-big.txt',
preferences: {}, preferences: {},
created_by_id: 1, created_by_id: 1,