ost 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/lib/ost.rb +1 -2
  2. data/ost.gemspec +1 -3
  3. data/test/ost_test.rb +6 -0
  4. metadata +17 -8
data/lib/ost.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require "nest"
2
2
 
3
3
  module Ost
4
- VERSION = "0.1.4"
5
4
  TIMEOUT = ENV["OST_TIMEOUT"] || 2
6
5
 
7
6
  class Queue
@@ -9,7 +8,7 @@ module Ost
9
8
  attr :backup
10
9
 
11
10
  def initialize(name)
12
- @key = Nest.new(:ost)[name]
11
+ @key = Nest.new(:ost, redis)[name]
13
12
  @backup = @key[Socket.gethostname][Process.pid]
14
13
  end
15
14
 
@@ -1,8 +1,6 @@
1
- require "./lib/ost"
2
-
3
1
  Gem::Specification.new do |s|
4
2
  s.name = "ost"
5
- s.version = Ost::VERSION
3
+ s.version = "0.1.5"
6
4
  s.summary = "Redis based queues and workers."
7
5
  s.description = "Ost lets you manage queues and workers with Redis."
8
6
  s.authors = ["Michel Martens"]
@@ -129,4 +129,10 @@ scope do
129
129
  assert_equal 0, Ost[:events].backup.llen
130
130
  assert_equal false, Ost[:events].backup.exists
131
131
  end
132
+
133
+ test "uses same redis instance" do
134
+ queue = Ost['foo']
135
+
136
+ assert_equal queue.key.redis, queue.redis
137
+ end
132
138
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ost
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-20 00:00:00.000000000 Z
12
+ date: 2012-11-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nest
16
- requirement: &70235895313000 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '1.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70235895313000
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '1.0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: cutest
27
- requirement: &70235895312500 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ~>
@@ -32,7 +37,12 @@ dependencies:
32
37
  version: '1.0'
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *70235895312500
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '1.0'
36
46
  description: Ost lets you manage queues and workers with Redis.
37
47
  email:
38
48
  - michel@soveran.com
@@ -67,9 +77,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
77
  version: '0'
68
78
  requirements: []
69
79
  rubyforge_project:
70
- rubygems_version: 1.8.10
80
+ rubygems_version: 1.8.23
71
81
  signing_key:
72
82
  specification_version: 3
73
83
  summary: Redis based queues and workers.
74
84
  test_files: []
75
- has_rdoc: