diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:19:47 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:19:47 +0000 |
commit | e716a49dabe2c086a97e2d8b3cffe5cf369ad026 (patch) | |
tree | e7e98125f89941db4c9d0f48f2df9c410467a3d8 /lib/custodian/alerts/redis-state.rb | |
parent | af2ee063abea8235a8cbd1448533e4f4fbc0d0af (diff) |
Removed spaces inside parenthesis.
Diffstat (limited to 'lib/custodian/alerts/redis-state.rb')
-rw-r--r-- | lib/custodian/alerts/redis-state.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/custodian/alerts/redis-state.rb b/lib/custodian/alerts/redis-state.rb index 27bb2c4..bef0015 100644 --- a/lib/custodian/alerts/redis-state.rb +++ b/lib/custodian/alerts/redis-state.rb @@ -29,14 +29,14 @@ module Custodian # Constructor - save the test-object away & instantiate # the redis connection. # - def initialize( obj ) + def initialize(obj) begin require 'rubygems' require 'redis' require 'json' - @redis = Redis.new(:host => @target ) + @redis = Redis.new(:host => @target) rescue puts 'ERROR Loading redis rubygem!' @@ -52,7 +52,7 @@ module Custodian # def raise - return unless( @redis ) + return unless(@redis) tmp = {} tmp['time'] = Time.now.to_i @@ -63,8 +63,8 @@ module Custodian tmp['test' ] = @test.to_s tmp['class' ] = @test.class - @redis.lpush( 'recent-tests', tmp.to_json) - @redis.ltrim( 'recent-tests', 0, 100 ) + @redis.lpush('recent-tests', tmp.to_json) + @redis.ltrim('recent-tests', 0, 100) end @@ -75,7 +75,7 @@ module Custodian # def clear - return unless( @redis ) + return unless(@redis) tmp = {} @@ -87,8 +87,8 @@ module Custodian tmp['test' ] = @test.to_s tmp['class' ] = @test.class - @redis.lpush( 'recent-tests', tmp.to_json) - @redis.ltrim( 'recent-tests', 0, 100 ) + @redis.lpush('recent-tests', tmp.to_json) + @redis.ltrim('recent-tests', 0, 100) end register_alert_type 'redis' |