resque 1.18.0 → 1.18.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of resque might be problematic. Click here for more details.

data/HISTORY.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.18.1 (2011-08-19)
2
+
3
+ * Bugfix: Use RAILS_ROOT in preload task
4
+
1
5
  ## 1.18.0 (2011-08-18)
2
6
 
3
7
  * Added before_enqueue hook.
data/lib/resque/tasks.rb CHANGED
@@ -5,7 +5,7 @@ namespace :resque do
5
5
  task :setup
6
6
 
7
7
  desc "Start a Resque worker"
8
- task :work => :setup do
8
+ task :work => [ :preload, :setup ] do
9
9
  require 'resque'
10
10
 
11
11
  queues = (ENV['QUEUES'] || ENV['QUEUE']).to_s.split(',')
@@ -39,11 +39,13 @@ namespace :resque do
39
39
 
40
40
  threads.each { |thread| thread.join }
41
41
  end
42
- end
43
42
 
44
- # Preload app files
45
- task :environment do
46
- Dir['app/**/*.rb'].each do |file|
47
- require file
43
+ # Preload app files if this is Rails
44
+ task :preload do
45
+ if defined? RAILS_ROOT
46
+ Dir["#{RAILS_ROOT}/app/**/*.rb"].each do |file|
47
+ require file
48
+ end
49
+ end
48
50
  end
49
51
  end
@@ -1,3 +1,3 @@
1
1
  module Resque
2
- Version = VERSION = '1.18.0'
2
+ Version = VERSION = '1.18.1'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque
3
3
  version: !ruby/object:Gem::Version
4
- hash: 95
4
+ hash: 93
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 18
9
- - 0
10
- version: 1.18.0
9
+ - 1
10
+ version: 1.18.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Wanstrath
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-18 00:00:00 -07:00
18
+ date: 2011-08-19 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency