resque 1.18.5 → 1.18.6

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.6 (2011-08-30)
2
+
3
+ * Bugfix: Use Rails 3 eager loading for resque:preload
4
+
1
5
  ## 1.18.5 (2011-08-24)
2
6
 
3
7
  * Added support for Travis CI
@@ -469,6 +469,14 @@ run Rack::URLMap.new \
469
469
  Check `examples/demo/config.ru` for a functional example (including
470
470
  HTTP basic auth).
471
471
 
472
+ ### Rails 3
473
+
474
+ You can also easily mount Resque on a subpath in your existing Rails 3 app by adding this to your `routes.rb`:
475
+
476
+ ``` ruby
477
+ mount Resque::Server.new, :at => "/resque"
478
+ ```
479
+
472
480
 
473
481
  Resque vs DelayedJob
474
482
  --------------------
@@ -42,10 +42,13 @@ namespace :resque do
42
42
 
43
43
  # Preload app files if this is Rails
44
44
  task :preload => :setup do
45
- if defined?(Rails) && Rails.env == 'production'
46
- Dir["#{Rails.root}/app/**/*.rb"].each do |file|
47
- require file
48
- end
45
+ if defined?(Rails) && Rails.respond_to?(:application)
46
+ # Rails 3
47
+ Rails.application.eager_load!
48
+ elsif defined?(Rails::Initializer)
49
+ # Rails 2.3
50
+ $rails_rake_task = false
51
+ Rails::Initializer.run :load_application_classes
49
52
  end
50
53
  end
51
54
  end
@@ -1,3 +1,3 @@
1
1
  module Resque
2
- Version = VERSION = '1.18.5'
2
+ Version = VERSION = '1.18.6'
3
3
  end
@@ -1,2 +1,2 @@
1
- $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
1
+ $LOAD_PATH.unshift File.dirname(__FILE__) + '/../../lib'
2
2
  require 'resque/tasks'
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: 85
4
+ hash: 83
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 18
9
- - 5
10
- version: 1.18.5
9
+ - 6
10
+ version: 1.18.6
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-24 00:00:00 -07:00
18
+ date: 2011-08-30 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency