From 081d71ffa3ab0a5881da7edca5fee1385167ac19 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 27 Apr 2015 16:47:58 +0200 Subject: [PATCH] Applied rubocop Style/SpaceInsideHashLiteralBraces. --- app/controllers/sessions_controller.rb | 2 +- lib/user_agent.rb | 8 ++++---- test/unit/session_enhanced_test.rb | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 1332bfa41..e8c66fddb 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -127,7 +127,7 @@ class SessionsController < ApplicationController request.env['rack.session.options'][:expire_after] = -1.year request.env['rack.session.options'][:renew] = true - render json: { } + render json: {} end def create_omniauth diff --git a/lib/user_agent.rb b/lib/user_agent.rb index 4cec34e3d..48806c65b 100644 --- a/lib/user_agent.rb +++ b/lib/user_agent.rb @@ -45,7 +45,7 @@ returns http = get_http(uri, options) # prepare request - request = Net::HTTP::Get.new( uri, {'User-Agent' => 'Zammad User Agent'} ) + request = Net::HTTP::Get.new( uri, { 'User-Agent' => 'Zammad User Agent' } ) # http basic auth (if needed) request = set_basic_auth(request, options) @@ -93,7 +93,7 @@ returns http = get_http(uri, options) # prepare request - request = Net::HTTP::Post.new( uri, {'User-Agent' => 'Zammad User Agent'} ) + request = Net::HTTP::Post.new( uri, { 'User-Agent' => 'Zammad User Agent' } ) # set params request = set_params(request, params, options) @@ -141,7 +141,7 @@ returns http = get_http(uri, options) # prepare request - request = Net::HTTP::Put.new( uri, {'User-Agent' => 'Zammad User Agent'} ) + request = Net::HTTP::Put.new( uri, { 'User-Agent' => 'Zammad User Agent' } ) # set params request = set_params(request, params, options) @@ -185,7 +185,7 @@ returns http = get_http(uri, options) # prepare request - request = Net::HTTP::Delete.new( uri, {'User-Agent' => 'Zammad User Agent'} ) + request = Net::HTTP::Delete.new( uri, { 'User-Agent' => 'Zammad User Agent' } ) # http basic auth (if needed) request = set_basic_auth(request, options) diff --git a/test/unit/session_enhanced_test.rb b/test/unit/session_enhanced_test.rb index 6c40120c7..ae4279bf0 100644 --- a/test/unit/session_enhanced_test.rb +++ b/test/unit/session_enhanced_test.rb @@ -116,7 +116,7 @@ class SessionEnhancedTest < ActiveSupport::TestCase assert_equal( true, messages[0]['data']['success'], 'messages 1') # broadcast to all clients - Sessions.broadcast( { msg: 'ooo123123123123123123'} ) + Sessions.broadcast( { msg: 'ooo123123123123123123' } ) messages = Sessions.queue(client_id1) assert_equal( messages.count, 1, 'messages count') assert_equal( 'ooo123123123123123123', messages[0]['msg'], 'messages broadcast 1') @@ -130,7 +130,7 @@ class SessionEnhancedTest < ActiveSupport::TestCase assert_equal( 'ooo123123123123123123', messages[0]['msg'], 'messages broadcast 1') # send dedicated message to user - Sessions.send_to( agent1.id, { msg: 'ooo1231231231231231234'} ) + Sessions.send_to( agent1.id, { msg: 'ooo1231231231231231234' } ) messages = Sessions.queue(client_id1) assert_equal( messages.count, 1, 'messages count') assert_equal( 'ooo1231231231231231234', messages[0]['msg'], 'messages send 1')