stalking 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,4 +1,7 @@
1
1
 
2
+ [![Code Quality](https://codeclimate.com/github/mrkamel/stalking.png)](https://codeclimate.com/github/mrkamel/stalking)
3
+ [![Still Maintained](http://stillmaintained.com/mrkamel/stalking.png)](http://stillmaintained.com/mrkamel/stalking)
4
+
2
5
  # Stalking
3
6
 
4
7
  Asynchronous job processing using the beanstalkd queue server with automatic
@@ -56,7 +56,7 @@ module Stalking
56
56
  end
57
57
  end
58
58
  rescue EOFError, Beanstalk::NotConnected => e
59
- @logger.andand.error e.message
59
+ @logger.andand.error e
60
60
 
61
61
  sleep 1
62
62
 
@@ -64,7 +64,7 @@ module Stalking
64
64
 
65
65
  retry
66
66
  rescue => e
67
- @logger.andand.error e.message
67
+ @logger.andand.error e
68
68
 
69
69
  raise e
70
70
  end
@@ -98,7 +98,7 @@ module Stalking
98
98
 
99
99
  @connection
100
100
  rescue Beanstalk::NotConnected => e
101
- @logger.andand.error e.message
101
+ @logger.andand.error e
102
102
 
103
103
  sleep 1
104
104
 
@@ -44,10 +44,10 @@ module Stalking
44
44
 
45
45
  return true
46
46
  rescue Beanstalk::NotConnected, Timeout::Error, StandardError => e
47
- @logger.andand.error e.message
47
+ @logger.andand.error e
48
48
  end
49
49
  rescue Timeout::Error, StandardError => e
50
- @logger.andand.error e.message
50
+ @logger.andand.error e
51
51
  end
52
52
  end
53
53
 
@@ -1,3 +1,3 @@
1
1
  module Stalking
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -199,7 +199,7 @@ class Stalking::ConsumerTest < Test::Unit::TestCase
199
199
 
200
200
  assert_equal [["down"], ["test", { "a" => "b" }]], res
201
201
 
202
- assert_equal ["Beanstalk::NotConnected"], logger.messages
202
+ assert_equal ["Beanstalk::NotConnected"], logger.entries.collect(&:to_s)
203
203
  end
204
204
 
205
205
  def test_logger
@@ -80,7 +80,7 @@ class Stalking::ProducerTest < Test::Unit::TestCase
80
80
 
81
81
  producer.enqueue "test", "up" => "true"
82
82
 
83
- assert_equal ['Enqueue "test" with {"up"=>"true"} and {}', "Beanstalk::NotConnected", 'Enqueue "test" with {"up"=>"true"} and {} failed'], logger.messages
83
+ assert_equal ['Enqueue "test" with {"up"=>"true"} and {}', "Beanstalk::NotConnected", 'Enqueue "test" with {"up"=>"true"} and {} failed'], logger.entries.collect(&:to_s)
84
84
  end
85
85
  end
86
86
 
@@ -1,17 +1,17 @@
1
1
 
2
2
  class TestLogger
3
- attr_reader :messages
3
+ attr_reader :entries
4
4
 
5
5
  def initialize
6
- @messages = []
6
+ @entries = []
7
7
  end
8
8
 
9
- def info(msg)
10
- @messages.push msg
9
+ def info(entry)
10
+ @entries.push entry
11
11
  end
12
12
 
13
- def error(msg)
14
- @messages.push msg
13
+ def error(entry)
14
+ @entries.push entry
15
15
  end
16
16
  end
17
17
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stalking
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-12 00:00:00.000000000 Z
12
+ date: 2014-04-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake