asir_beanstalk 1.2.6 → 1.2.7

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog CHANGED
@@ -1,3 +1,7 @@
1
+ 2012-03-14 Kurt A. Stephens <ks.github@kurtstephens.com>
2
+
3
+ * v1.2.7: renamed #status to #conduit_status.
4
+
1
5
  2012-03-13 Kurt A. Stephens <ks.github@kurtstephens.com>
2
6
 
3
7
  * v1.2.6: New Version: Added #status, #stats, #stats_job, #stats_tube.
@@ -131,13 +131,14 @@ module ASIR
131
131
  # !SLIDE
132
132
  # Beanstalk protocol support
133
133
 
134
- def status
135
- {
136
- :beanstalkd => {
137
- :stats => stats,
138
- :stats_tube => tube && stats_tube,
139
- }
134
+ def conduit_status
135
+ t0 = Time.now
136
+ x = {
137
+ :stats => stats,
138
+ :stats_tube => tube && stats_tube,
140
139
  }
140
+ x[:response_time] = Time.now - t0
141
+ { :beanstalkd => x }
141
142
  end
142
143
 
143
144
  def stats
@@ -1,3 +1,3 @@
1
1
  module AsirBeanstalk
2
- VERSION = "1.2.6"
2
+ VERSION = "1.2.7"
3
3
  end
@@ -85,12 +85,13 @@ describe "ASIR::Transport::Beanstalk" do
85
85
  s.should == :NOT_FOUND
86
86
  end
87
87
 
88
- it "should be able to get status" do
89
- s = t.status
88
+ it "should be able to get conduit_status" do
89
+ s = t.conduit_status
90
90
  s = s[:beanstalkd]
91
91
  s.should_not == nil
92
92
  s[:stats].class.should == Hash
93
93
  s[:stats_tube].class.should == Hash
94
+ s[:response_time].class.should == Float
94
95
  end
95
96
 
96
97
  context "with a sent message" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asir_beanstalk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.2.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -119,7 +119,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  segments:
121
121
  - 0
122
- hash: -1356083774943575431
122
+ hash: 2838955884663425346
123
123
  required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  none: false
125
125
  requirements:
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  version: '0'
129
129
  segments:
130
130
  - 0
131
- hash: -1356083774943575431
131
+ hash: 2838955884663425346
132
132
  requirements: []
133
133
  rubyforge_project:
134
134
  rubygems_version: 1.8.25