From 6461bed0ddb53874d4b19a2564ff13bce6d0b932 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 27 Apr 2015 16:42:53 +0200 Subject: [PATCH] Applied rubocop Style/SpaceBeforeComma. --- app/models/channel/email_parser.rb | 2 +- lib/sessions.rb | 2 +- test/unit/session_basic_test.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/channel/email_parser.rb b/app/models/channel/email_parser.rb index 939202ecb..e56b9c990 100644 --- a/app/models/channel/email_parser.rb +++ b/app/models/channel/email_parser.rb @@ -535,7 +535,7 @@ class Channel::EmailParser next if key == 'created_by_id' # check if id exists - key_short = key[ key.length - 3 , key.length ] + key_short = key[ key.length - 3, key.length ] if key_short == '_id' key_short = key[ 0, key.length - 3 ] header = "x-zammad-#{header_name}-#{key_short}" diff --git a/lib/sessions.rb b/lib/sessions.rb index cae7e09b2..3d52bf09e 100644 --- a/lib/sessions.rb +++ b/lib/sessions.rb @@ -395,7 +395,7 @@ returns path = @path + '/spool/' FileUtils.mkpath path file = Time.new.to_f.to_s + '-' + rand(99_999).to_s - File.open( path + '/' + file , 'wb' ) { |file| + File.open( path + '/' + file, 'wb' ) { |file| data = { msg: msg, timestamp: Time.now.to_i, diff --git a/test/unit/session_basic_test.rb b/test/unit/session_basic_test.rb index 552a4f723..7cc27ff6b 100644 --- a/test/unit/session_basic_test.rb +++ b/test/unit/session_basic_test.rb @@ -3,7 +3,7 @@ require 'test_helper' class SessionBasicTest < ActiveSupport::TestCase test 'a cache' do - Sessions::CacheIn.set( 'last_run_test' , true, { expires_in: 2.seconds } ) + Sessions::CacheIn.set( 'last_run_test', true, { expires_in: 2.seconds } ) result = Sessions::CacheIn.get( 'last_run_test' ) assert_equal( true, result, 'check 1' ) @@ -37,7 +37,7 @@ class SessionBasicTest < ActiveSupport::TestCase assert_equal( nil, result, 'check 2' ) # check delete cache - Sessions::CacheIn.set( 'last_run_delete' , true, { expires_in: 5.seconds } ) + Sessions::CacheIn.set( 'last_run_delete', true, { expires_in: 5.seconds } ) result = Sessions::CacheIn.get( 'last_run_delete' ) assert_equal( true, result, 'check 1' ) Sessions::CacheIn.delete( 'last_run_delete' )