stalker 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/stalker.rb +6 -0
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.6.0
@@ -6,6 +6,11 @@ require 'timeout'
6
6
  module Stalker
7
7
  extend self
8
8
 
9
+ def connect(url)
10
+ @@url = url
11
+ beanstalk
12
+ end
13
+
9
14
  def enqueue(job, args={}, opts={})
10
15
  pri = opts[:pri] || 65536
11
16
  delay = opts[:delay] || 0
@@ -123,6 +128,7 @@ module Stalker
123
128
  end
124
129
 
125
130
  def beanstalk_url
131
+ return @@url if defined?(@@url) and @@url
126
132
  ENV['BEANSTALK_URL'] || 'beanstalk://localhost/'
127
133
  end
128
134
 
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 5
8
- - 1
9
- version: 0.5.1
7
+ - 6
8
+ - 0
9
+ version: 0.6.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Adam Wiggins