resque-status 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source :rubygems
2
2
 
3
3
  gem 'redisk', '>= 0.2.1'
4
4
  gem 'resque', '~>1.19'
5
- gem 'uuid', '~>2.0.2'
5
+ gem 'uuid', '~>2.3'
6
6
 
7
7
  group :test do
8
8
  gem 'mocha', '~>0.9.8'
@@ -2,25 +2,29 @@ GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
4
  git (1.2.5)
5
- jeweler (1.6.4)
5
+ jeweler (1.8.3)
6
6
  bundler (~> 1.0)
7
7
  git (>= 1.2.5)
8
8
  rake
9
+ rdoc
10
+ json (1.6.5)
9
11
  macaddr (1.5.0)
10
12
  systemu (>= 2.4.0)
11
13
  mocha (0.9.12)
12
14
  multi_json (1.0.4)
13
- rack (1.4.0)
15
+ rack (1.4.1)
14
16
  rack-protection (1.2.0)
15
17
  rack
16
18
  rake (0.9.2.2)
19
+ rdoc (3.12)
20
+ json (~> 1.4)
17
21
  redis (2.2.2)
18
22
  redis-namespace (1.0.3)
19
23
  redis (< 3.0.0)
20
24
  redisk (0.2.2)
21
25
  redis (>= 0.1.1)
22
26
  redis-namespace (>= 0.1.0)
23
- resque (1.19.0.1)
27
+ resque (1.19.0)
24
28
  multi_json (~> 1.0)
25
29
  redis-namespace (~> 1.0.2)
26
30
  sinatra (>= 0.9.2)
@@ -32,9 +36,9 @@ GEM
32
36
  tilt (~> 1.3, >= 1.3.3)
33
37
  systemu (2.4.2)
34
38
  tilt (1.3.3)
35
- uuid (2.0.2)
39
+ uuid (2.3.5)
36
40
  macaddr (~> 1.0)
37
- vegas (0.1.8)
41
+ vegas (0.1.11)
38
42
  rack (>= 1.0.0)
39
43
 
40
44
  PLATFORMS
@@ -46,4 +50,4 @@ DEPENDENCIES
46
50
  redisk (>= 0.2.1)
47
51
  resque (~> 1.19)
48
52
  shoulda (~> 2.10.2)
49
- uuid (~> 2.0.2)
53
+ uuid (~> 2.3)
@@ -1 +1 @@
1
- require 'resque/status'
1
+ require "#{File.dirname(__FILE__)}/resque/status"
@@ -1,5 +1,3 @@
1
- require 'resque/plugins/status/hash'
2
-
3
1
  module Resque
4
2
  module Plugins
5
3
 
@@ -30,7 +28,9 @@ module Resque
30
28
  # This job would iterate num times updating the status as it goes. At the end
31
29
  # we update the status telling anyone listening to this job that its complete.
32
30
  module Status
33
- VERSION = '0.3.1'
31
+ VERSION = '0.3.2'
32
+
33
+ autoload :Hash, 'resque/plugins/status/hash'
34
34
 
35
35
  # The error class raised when a job is killed
36
36
  class Killed < RuntimeError; end
@@ -50,6 +50,7 @@ module Resque
50
50
  #
51
51
  # Ensures that Redisk is logging to the same Redis connection as Resque.
52
52
  def self.logger(uuid, options = {})
53
+ require 'redisk' unless defined?(Redisk)
53
54
  Redisk.redis = redis
54
55
  Redisk::Logger.new(logger_key(uuid), options)
55
56
  end
@@ -149,6 +150,7 @@ module Resque
149
150
  end
150
151
 
151
152
  def self.generate_uuid
153
+ require 'uuid' unless defined?(UUID)
152
154
  UUID.generate(:compact)
153
155
  end
154
156
 
@@ -1,6 +1,8 @@
1
1
  require 'resque'
2
- require 'redisk'
3
- require 'uuid'
4
2
 
5
- require 'resque/plugins/status'
6
- require 'resque/job_with_status'
3
+ module Resque
4
+ autoload :JobWithStatus, "#{File.dirname(__FILE__)}/job_with_status"
5
+ module Plugins
6
+ autoload :Status, "#{File.dirname(__FILE__)}/plugins/status"
7
+ end
8
+ end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "resque-status"
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Aaron Quint"]
12
- s.date = "2012-01-23"
12
+ s.date = "2012-02-03"
13
13
  s.description = "resque-status is an extension to the resque queue system that provides simple trackable jobs. It provides a Resque::Plugins::Status::Hash class which can set/get the statuses of jobs and a Resque::Plugins::Status class that when included provides easily trackable/killable jobs."
14
14
  s.email = "aaron@quirkey.com"
15
15
  s.extra_rdoc_files = [
@@ -52,18 +52,18 @@ Gem::Specification.new do |s|
52
52
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
53
53
  s.add_runtime_dependency(%q<redisk>, [">= 0.2.1"])
54
54
  s.add_runtime_dependency(%q<resque>, ["~> 1.19"])
55
- s.add_runtime_dependency(%q<uuid>, ["~> 2.0.2"])
55
+ s.add_runtime_dependency(%q<uuid>, ["~> 2.3"])
56
56
  s.add_development_dependency(%q<jeweler>, [">= 0"])
57
57
  else
58
58
  s.add_dependency(%q<redisk>, [">= 0.2.1"])
59
59
  s.add_dependency(%q<resque>, ["~> 1.19"])
60
- s.add_dependency(%q<uuid>, ["~> 2.0.2"])
60
+ s.add_dependency(%q<uuid>, ["~> 2.3"])
61
61
  s.add_dependency(%q<jeweler>, [">= 0"])
62
62
  end
63
63
  else
64
64
  s.add_dependency(%q<redisk>, [">= 0.2.1"])
65
65
  s.add_dependency(%q<resque>, ["~> 1.19"])
66
- s.add_dependency(%q<uuid>, ["~> 2.0.2"])
66
+ s.add_dependency(%q<uuid>, ["~> 2.3"])
67
67
  s.add_dependency(%q<jeweler>, [">= 0"])
68
68
  end
69
69
  end
@@ -4,6 +4,7 @@ $TESTING = true
4
4
  require 'test/unit'
5
5
  require 'rubygems'
6
6
  require 'shoulda'
7
+ require 'redisk'
7
8
  require 'mocha'
8
9
 
9
10
  require 'resque-status'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-status
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
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-01-23 00:00:00.000000000Z
12
+ date: 2012-02-03 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redisk
16
- requirement: &70111193431380 !ruby/object:Gem::Requirement
16
+ requirement: &70279646686820 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.2.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70111193431380
24
+ version_requirements: *70279646686820
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: resque
27
- requirement: &70111193430860 !ruby/object:Gem::Requirement
27
+ requirement: &70279646686000 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,21 +32,21 @@ dependencies:
32
32
  version: '1.19'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70111193430860
35
+ version_requirements: *70279646686000
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: uuid
38
- requirement: &70111193430060 !ruby/object:Gem::Requirement
38
+ requirement: &70279646685180 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
42
42
  - !ruby/object:Gem::Version
43
- version: 2.0.2
43
+ version: '2.3'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70111193430060
46
+ version_requirements: *70279646685180
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: jeweler
49
- requirement: &70111193429380 !ruby/object:Gem::Requirement
49
+ requirement: &70279646684320 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70111193429380
57
+ version_requirements: *70279646684320
58
58
  description: resque-status is an extension to the resque queue system that provides
59
59
  simple trackable jobs. It provides a Resque::Plugins::Status::Hash class which can
60
60
  set/get the statuses of jobs and a Resque::Plugins::Status class that when included