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 | 54b21cf54c51dfe40784a8096f84c7a80b015bd4 (patch) | |
tree | 4763692624732650daf1a9e02c91576d3f7ee8d0 /lib/custodian/alerts/redis-state.rb | |
parent | a22b8e96ead33b0f97ed5243dbad7f7b6cd5135d (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' |