workless 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,17 +1,19 @@
1
- h1. Workless
1
+ [![Build Status](https://secure.travis-ci.org/lostboy/workless.png?branch=master)](http://travis-ci.org/lostboy/workless)
2
2
 
3
- This is an addon for delayed_job (2.1.0.pre2) http://github.com/collectiveidea/delayed_job/tree/v2.1.0.pre2
4
- It is designed to be used when you're using Heroku as a host and have the need to do background work with delayed job but you dont want to leave the workers running all the time as it costs money.
3
+ # Workless
4
+
5
+ This is an addon for delayed_job (> 2.0.0) http://github.com/collectiveidea/delayed_job
6
+ It is designed to be used when you're using Heroku as a host and have the need to do background work with delayed job but you don't want to leave the workers running all the time as it costs money.
5
7
 
6
8
  You basically add the gem to your project and the rest is taken care of for you given a few CONFIG vars set on Heroku.
7
9
 
8
10
  There are already a few of these out there, notably @mtravers' cheepnis http://github.com/mtravers/cheepnis and the autoscale branch of delayed_job by @pedro http://github.com/pedro/delayed_job/tree/autoscaling
9
11
 
10
- This one takes bits from both and is helping me understand gem and plugin development. It's built for rails 3 on the delayed_job 2.1.0.pre2 tag but don't see why it wouldn't work on rails 2 as well as it hooks into the callbacks of the Delayed::Job ActiveRecord class to turn workers on and off based on the creation and destruction of jobs.
12
+ Workless takes ideas from both and is helping me understand gem and plugin development. Prior to version 1.0.0 it was originally built for rails 3 on the delayed_job 2.1.0.pre2 but since 1.0.0 is compatible with rails 2.3.x, 3.0.x, 3.1.x and 3.2.x
11
13
 
12
- h2. Installation
14
+ ## Installation
13
15
 
14
- Add the gem to your project Gemfile and update your bundle
16
+ Add the workless gem and the delayed_job gem to your project Gemfile and update your bundle. Its is recommended to specify the gem version for delayed_job especially if you are using rails 2.3.x which doesn't work with the latest delayed_job
15
17
 
16
18
  <pre>
17
19
  gem "workless"
@@ -20,14 +22,20 @@ gem "workless"
20
22
  Add your Heroku username / password as config vars to your Heroku instance, the same one you log in to Heroku with
21
23
 
22
24
  <pre>
23
- heroku config:add HEROKU_USER=<your username> HEROKU_PASSWORD=<your password>
25
+ heroku config:add HEROKU_USER=yourusername HEROKU_PASSWORD=yourpassword
26
+ </pre>
27
+
28
+ And for cedar apps add the app name
29
+
30
+ <pre>
31
+ heroku config:add APP_NAME=yourherokuappname
24
32
  </pre>
25
33
 
26
- h2. Failing Jobs
34
+ ## Failing Jobs
27
35
 
28
36
  In the case of failed jobs Workless will only shut down the dj worker if all attempts have been tried. By default Delayed Job will try 25 times to process a job with ever increasing time delays between each unsucessful attempt. Because of this Workless configures Delayed Job to try failed jobs only 3 times to reduce the amount of time a worker can be running while trying to process them.
29
37
 
30
- h2. Configuration
38
+ ## Configuration
31
39
 
32
40
  Workless can be disabled by using the null scaler that will ignore the workers requests to scale up and down. In an environment file add this in the config block:
33
41
 
@@ -49,7 +57,7 @@ The local scaler uses @adamwiggins rush library http://github.com/adamwiggins/ru
49
57
 
50
58
  The heroku scaler works on the Aspen and Bamboo stacks while the heroku_cedar scaler only works on the new Cedar stack.
51
59
 
52
- h2. Note on Patches/Pull Requests
60
+ ## Note on Patches/Pull Requests
53
61
 
54
62
  * Please fork the project, as you can see there are no tests and at present I don't know how to go about adding them so any advice would be welcome.
55
63
  * Make your feature addition or bug fix.
@@ -57,6 +65,6 @@ h2. Note on Patches/Pull Requests
57
65
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
58
66
  * Send me a pull request.
59
67
 
60
- h2. Copyright
68
+ ## Copyright
61
69
 
62
70
  Copyright (c) 2010 lostboy. See LICENSE for details.
@@ -1,4 +1,3 @@
1
-
2
1
  require File.dirname(__FILE__) + "/workless/scalers/base"
3
2
  require File.dirname(__FILE__) + "/workless/scaler"
4
3
  require File.dirname(__FILE__) + "/workless/railtie" if defined?(Rails::Railtie)
@@ -0,0 +1,3 @@
1
+ Delayed::Worker.max_attempts = 3
2
+ Delayed::Backend::ActiveRecord::Job.send(:include, Delayed::Workless::Scaler) if defined?(Delayed::Backend::ActiveRecord::Job)
3
+ Delayed::Backend::Mongoid::Job.send(:include, Delayed::Workless::Scaler) if defined?(Delayed::Backend::Mongoid::Job)
@@ -1,11 +1,10 @@
1
1
  require 'rails'
2
+ require 'delayed_job'
2
3
 
3
4
  module Delayed
4
5
  class Railtie < Rails::Railtie
5
6
  initializer :after_initialize do
6
- Delayed::Worker.max_attempts = 3
7
- Delayed::Backend::ActiveRecord::Job.send(:include, Delayed::Workless::Scaler) if defined?(Delayed::Backend::ActiveRecord::Job)
8
- Delayed::Backend::Mongoid::Job.send(:include, Delayed::Workless::Scaler) if defined?(Delayed::Backend::Mongoid::Job)
7
+ require 'workless/initialize'
9
8
  end
10
9
  end
11
- end
10
+ end
@@ -1,9 +1,13 @@
1
+ require 'workless/scalers/heroku'
2
+ require 'workless/scalers/heroku_cedar'
3
+ require 'workless/scalers/local'
4
+ require 'workless/scalers/null'
5
+
1
6
  module Delayed
2
7
  module Workless
3
8
  module Scaler
4
9
 
5
10
  def self.included(base)
6
-
7
11
  base.send :extend, ClassMethods
8
12
  base.class_eval do
9
13
  after_destroy "self.class.scaler.down"
@@ -16,17 +20,14 @@ module Delayed
16
20
  module ClassMethods
17
21
  def scaler
18
22
  @scaler ||= if ENV.include?("HEROKU_UPID")
19
- require File.dirname(__FILE__) + "/scalers/heroku"
20
- Scaler::Heroku.new
23
+ Scaler::Heroku
21
24
  else
22
- require File.dirname(__FILE__) + "/scalers/local"
23
- Scaler::Local.new
25
+ Scaler::Local
24
26
  end
25
27
  end
26
28
 
27
29
  def scaler=(scaler)
28
- require File.dirname(__FILE__) + "/scalers/#{scaler.to_s}"
29
- @scaler = "Delayed::Workless::Scaler::#{scaler.to_s.camelize}".constantize.new
30
+ @scaler = "Delayed::Workless::Scaler::#{scaler.to_s.camelize}".constantize
30
31
  end
31
32
  end
32
33
 
@@ -5,11 +5,20 @@ module Delayed
5
5
  module Scaler
6
6
 
7
7
  class Base
8
- def jobs
9
- Delayed::Job.where(:failed_at => nil)
8
+ def self.jobs
9
+ Delayed::Job.all(:conditions => { :failed_at => nil })
10
10
  end
11
11
  end
12
-
12
+
13
+ module HerokuClient
14
+ require 'heroku'
15
+
16
+ def client
17
+ @client ||= ::Heroku::Client.new(ENV['HEROKU_USER'], ENV['HEROKU_PASSWORD'])
18
+ end
19
+
20
+ end
21
+
13
22
  end
14
23
  end
15
- end
24
+ end
@@ -6,28 +6,22 @@ module Delayed
6
6
 
7
7
  class Heroku < Base
8
8
 
9
- require "heroku"
9
+ extend Delayed::Workless::Scaler::HerokuClient
10
10
 
11
- def up
12
- client.set_workers(ENV['APP_NAME'], 1) if workers == 0
11
+ def self.up
12
+ client.set_workers(ENV['APP_NAME'], 1) if self.workers == 0
13
13
  end
14
14
 
15
- def down
16
- client.set_workers(ENV['APP_NAME'], 0) unless workers == 0 or jobs.count > 0
15
+ def self.down
16
+ client.set_workers(ENV['APP_NAME'], 0) unless self.workers == 0 or self.jobs.count > 0
17
17
  end
18
18
 
19
- def workers
19
+ def self.workers
20
20
  client.info(ENV['APP_NAME'])[:workers].to_i
21
21
  end
22
22
 
23
- private
24
-
25
- def client
26
- @client ||= ::Heroku::Client.new(ENV['HEROKU_USER'], ENV['HEROKU_PASSWORD'])
27
- end
28
-
29
23
  end
30
24
 
31
25
  end
32
26
  end
33
- end
27
+ end
@@ -6,26 +6,20 @@ module Delayed
6
6
 
7
7
  class HerokuCedar < Base
8
8
 
9
- require "heroku"
9
+ extend Delayed::Workless::Scaler::HerokuClient
10
10
 
11
- def up
12
- client.ps_scale(ENV['APP_NAME'], type: 'worker', qty: 1) if workers == 0
11
+ def self.up
12
+ client.ps_scale(ENV['APP_NAME'], :type => 'worker', :qty => 1) if self.workers == 0
13
13
  end
14
14
 
15
- def down
16
- client.ps_scale(ENV['APP_NAME'], type: 'worker', qty: 0) unless workers == 0 or jobs.count > 0
15
+ def self.down
16
+ client.ps_scale(ENV['APP_NAME'], :type => 'worker', :qty => 0) unless self.workers == 0 or self.jobs.count > 0
17
17
  end
18
18
 
19
- def workers
19
+ def self.workers
20
20
  client.ps(ENV['APP_NAME']).count { |p| p["process"] =~ /worker\.\d?/ }
21
21
  end
22
22
 
23
- private
24
-
25
- def client
26
- @client ||= ::Heroku::Client.new(ENV['HEROKU_USER'], ENV['HEROKU_PASSWORD'])
27
- end
28
-
29
23
  end
30
24
 
31
25
  end
@@ -6,17 +6,17 @@ module Delayed
6
6
 
7
7
  class Local < Base
8
8
 
9
- def up
10
- Rush::Box.new[Rails.root].bash("rake jobs:work", :background => true) if workers == 0
9
+ def self.up
10
+ Rush::Box.new[Rails.root].bash("rake jobs:work", :background => true) if self.workers == 0
11
11
  true
12
12
  end
13
13
 
14
- def down
15
- Rush::Box.new.processes.filter(:cmdline => /rake jobs:work/).kill unless workers == 0 or jobs.count > 0
14
+ def self.down
15
+ $exit = true unless jobs.count > 0
16
16
  true
17
17
  end
18
18
 
19
- def workers
19
+ def self.workers
20
20
  Rush::Box.new.processes.filter(:cmdline => /rake jobs:work/).size
21
21
  end
22
22
 
@@ -24,4 +24,4 @@ module Delayed
24
24
 
25
25
  end
26
26
  end
27
- end
27
+ end
@@ -4,14 +4,14 @@ module Delayed
4
4
 
5
5
  class Null < Base
6
6
 
7
- def up
7
+ def self.up
8
8
  end
9
9
 
10
- def down
10
+ def self.down
11
11
  end
12
12
 
13
13
  end
14
14
 
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -0,0 +1 @@
1
+ require File.dirname(__FILE__) + "/../lib/workless/initialize"
metadata CHANGED
@@ -1,8 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workless
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.2.0
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 0
9
+ version: 1.0.0
6
10
  platform: ruby
7
11
  authors:
8
12
  - lostboy
@@ -10,117 +14,82 @@ autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
16
 
13
- date: 2011-06-30 00:00:00 +02:00
17
+ date: 2011-06-30 00:00:00 +07:00
14
18
  default_executable:
15
19
  dependencies:
16
20
  - !ruby/object:Gem::Dependency
17
21
  name: rails
22
+ prerelease: false
18
23
  requirement: &id001 !ruby/object:Gem::Requirement
19
- none: false
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
23
- version: 3.0.0
27
+ segments:
28
+ - 0
29
+ version: "0"
24
30
  type: :runtime
25
- prerelease: false
26
31
  version_requirements: *id001
27
32
  - !ruby/object:Gem::Dependency
28
33
  name: heroku
34
+ prerelease: false
29
35
  requirement: &id002 !ruby/object:Gem::Requirement
30
- none: false
31
36
  requirements:
32
37
  - - ">="
33
38
  - !ruby/object:Gem::Version
39
+ segments:
40
+ - 0
34
41
  version: "0"
35
42
  type: :runtime
36
- prerelease: false
37
43
  version_requirements: *id002
38
44
  - !ruby/object:Gem::Dependency
39
45
  name: rush
46
+ prerelease: false
40
47
  requirement: &id003 !ruby/object:Gem::Requirement
41
- none: false
42
48
  requirements:
43
- - - "="
49
+ - - ">="
44
50
  - !ruby/object:Gem::Version
45
- version: 0.6.7
51
+ segments:
52
+ - 0
53
+ version: "0"
46
54
  type: :runtime
47
- prerelease: false
48
55
  version_requirements: *id003
49
56
  - !ruby/object:Gem::Dependency
50
57
  name: delayed_job
58
+ prerelease: false
51
59
  requirement: &id004 !ruby/object:Gem::Requirement
52
- none: false
53
60
  requirements:
54
- - - ~>
61
+ - - ">="
55
62
  - !ruby/object:Gem::Version
56
- version: 2.1.0
63
+ segments:
64
+ - 2
65
+ - 0
66
+ - 7
67
+ version: 2.0.7
57
68
  type: :runtime
58
- prerelease: false
59
69
  version_requirements: *id004
60
70
  - !ruby/object:Gem::Dependency
61
- name: rails
62
- requirement: &id005 !ruby/object:Gem::Requirement
63
- none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- version: 3.0.0
68
- type: :runtime
71
+ name: rspec
69
72
  prerelease: false
70
- version_requirements: *id005
71
- - !ruby/object:Gem::Dependency
72
- name: heroku
73
- requirement: &id006 !ruby/object:Gem::Requirement
74
- none: false
73
+ requirement: &id005 !ruby/object:Gem::Requirement
75
74
  requirements:
76
75
  - - ">="
77
76
  - !ruby/object:Gem::Version
77
+ segments:
78
+ - 0
78
79
  version: "0"
79
- type: :runtime
80
- prerelease: false
81
- version_requirements: *id006
82
- - !ruby/object:Gem::Dependency
83
- name: rush
84
- requirement: &id007 !ruby/object:Gem::Requirement
85
- none: false
86
- requirements:
87
- - - "="
88
- - !ruby/object:Gem::Version
89
- version: 0.6.7
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: *id007
93
- - !ruby/object:Gem::Dependency
94
- name: delayed_job
95
- requirement: &id008 !ruby/object:Gem::Requirement
96
- none: false
97
- requirements:
98
- - - ~>
99
- - !ruby/object:Gem::Version
100
- version: 2.1.0
101
- type: :runtime
102
- prerelease: false
103
- version_requirements: *id008
80
+ type: :development
81
+ version_requirements: *id005
104
82
  description: Extension to Delayed Job to enable workers to scale up when needed
105
83
  email: paul.crabtree@gmail.com
106
84
  executables: []
107
85
 
108
86
  extensions: []
109
87
 
110
- extra_rdoc_files:
111
- - LICENSE
112
- - README.textile
88
+ extra_rdoc_files: []
89
+
113
90
  files:
114
- - .bundle/config
115
- - .document
116
- - .rvmrc
117
- - Gemfile
118
- - Gemfile.lock
119
- - LICENSE
120
- - README.textile
121
- - Rakefile
122
- - VERSION
123
- - lib/workless.rb
91
+ - rails/init.rb
92
+ - lib/workless/initialize.rb
124
93
  - lib/workless/railtie.rb
125
94
  - lib/workless/scaler.rb
126
95
  - lib/workless/scalers/base.rb
@@ -128,7 +97,9 @@ files:
128
97
  - lib/workless/scalers/heroku_cedar.rb
129
98
  - lib/workless/scalers/local.rb
130
99
  - lib/workless/scalers/null.rb
131
- - workless.gemspec
100
+ - lib/workless.rb
101
+ - LICENSE
102
+ - README.md
132
103
  has_rdoc: true
133
104
  homepage: http://github.com/lostboy/workless
134
105
  licenses: []
@@ -139,23 +110,27 @@ rdoc_options: []
139
110
  require_paths:
140
111
  - lib
141
112
  required_ruby_version: !ruby/object:Gem::Requirement
142
- none: false
143
113
  requirements:
144
114
  - - ">="
145
115
  - !ruby/object:Gem::Version
116
+ segments:
117
+ - 0
146
118
  version: "0"
147
119
  required_rubygems_version: !ruby/object:Gem::Requirement
148
- none: false
149
120
  requirements:
150
121
  - - ">="
151
122
  - !ruby/object:Gem::Version
152
- version: "0"
123
+ segments:
124
+ - 1
125
+ - 3
126
+ - 6
127
+ version: 1.3.6
153
128
  requirements: []
154
129
 
155
130
  rubyforge_project:
156
- rubygems_version: 1.5.0
131
+ rubygems_version: 1.3.6
157
132
  signing_key:
158
133
  specification_version: 3
159
- summary: Use delayed job workers only when theyre needed
134
+ summary: Use delayed job workers only when theyre needed on Heroku
160
135
  test_files: []
161
136
 
@@ -1,3 +0,0 @@
1
- ---
2
- BUNDLE_DISABLE_SHARED_GEMS: "1"
3
- BUNDLE_WITHOUT: ""
data/.document DELETED
@@ -1,5 +0,0 @@
1
- README.rdoc
2
- lib/**/*.rb
3
- bin/*
4
- features/**/*.feature
5
- LICENSE
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm use 1.9.2@workless
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source :gemcutter
2
-
3
- gem "rails", ">=3.0.0"
4
- gem "heroku"
5
- gem "rush", "0.6.7"
6
- gem "delayed_job", "~> 2.1.0"
@@ -1,96 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- abstract (1.0.0)
5
- actionmailer (3.0.9)
6
- actionpack (= 3.0.9)
7
- mail (~> 2.2.19)
8
- actionpack (3.0.9)
9
- activemodel (= 3.0.9)
10
- activesupport (= 3.0.9)
11
- builder (~> 2.1.2)
12
- erubis (~> 2.6.6)
13
- i18n (~> 0.5.0)
14
- rack (~> 1.2.1)
15
- rack-mount (~> 0.6.14)
16
- rack-test (~> 0.5.7)
17
- tzinfo (~> 0.3.23)
18
- activemodel (3.0.9)
19
- activesupport (= 3.0.9)
20
- builder (~> 2.1.2)
21
- i18n (~> 0.5.0)
22
- activerecord (3.0.9)
23
- activemodel (= 3.0.9)
24
- activesupport (= 3.0.9)
25
- arel (~> 2.0.10)
26
- tzinfo (~> 0.3.23)
27
- activeresource (3.0.9)
28
- activemodel (= 3.0.9)
29
- activesupport (= 3.0.9)
30
- activesupport (3.0.9)
31
- arel (2.0.10)
32
- builder (2.1.2)
33
- configuration (1.3.1)
34
- daemons (1.1.4)
35
- delayed_job (2.1.4)
36
- activesupport (~> 3.0)
37
- daemons
38
- erubis (2.6.6)
39
- abstract (>= 1.0.0)
40
- fattr (2.2.0)
41
- heroku (2.3.6)
42
- launchy (>= 0.3.2)
43
- rest-client (~> 1.6.1)
44
- term-ansicolor (~> 1.0.5)
45
- i18n (0.5.0)
46
- launchy (0.4.0)
47
- configuration (>= 0.0.5)
48
- rake (>= 0.8.1)
49
- mail (2.2.19)
50
- activesupport (>= 2.3.6)
51
- i18n (>= 0.4.0)
52
- mime-types (~> 1.16)
53
- treetop (~> 1.4.8)
54
- mime-types (1.16)
55
- polyglot (0.3.1)
56
- rack (1.2.3)
57
- rack-mount (0.6.14)
58
- rack (>= 1.0.0)
59
- rack-test (0.5.7)
60
- rack (>= 1.0)
61
- rails (3.0.9)
62
- actionmailer (= 3.0.9)
63
- actionpack (= 3.0.9)
64
- activerecord (= 3.0.9)
65
- activeresource (= 3.0.9)
66
- activesupport (= 3.0.9)
67
- bundler (~> 1.0)
68
- railties (= 3.0.9)
69
- railties (3.0.9)
70
- actionpack (= 3.0.9)
71
- activesupport (= 3.0.9)
72
- rake (>= 0.8.7)
73
- rdoc (~> 3.4)
74
- thor (~> 0.14.4)
75
- rake (0.9.2)
76
- rdoc (3.8)
77
- rest-client (1.6.3)
78
- mime-types (>= 1.16)
79
- rush (0.6.7)
80
- session
81
- session (3.1.0)
82
- fattr
83
- term-ansicolor (1.0.5)
84
- thor (0.14.6)
85
- treetop (1.4.9)
86
- polyglot (>= 0.3.1)
87
- tzinfo (0.3.29)
88
-
89
- PLATFORMS
90
- ruby
91
-
92
- DEPENDENCIES
93
- delayed_job (~> 2.1.0)
94
- heroku
95
- rails (>= 3.0.0)
96
- rush (= 0.6.7)
data/Rakefile DELETED
@@ -1,55 +0,0 @@
1
- require 'rubygems'
2
- require 'rake'
3
- require 'bundler'
4
-
5
- begin
6
- require 'jeweler'
7
-
8
- Jeweler::Tasks.new do |gem|
9
- gem.name = "workless"
10
- gem.summary = %Q{Use delayed job workers only when theyre needed}
11
- gem.description = %Q{Extension to Delayed Job to enable workers to scale up when needed}
12
- gem.email = "paul.crabtree@gmail.com"
13
- gem.homepage = "http://github.com/lostboy/workless"
14
- gem.authors = ["lostboy"]
15
- gem.add_bundler_dependencies
16
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
17
- end
18
- Jeweler::GemcutterTasks.new
19
- rescue LoadError
20
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
21
- end
22
-
23
- require 'rake/testtask'
24
- Rake::TestTask.new(:test) do |test|
25
- test.libs << 'lib' << 'test'
26
- test.pattern = 'test/**/test_*.rb'
27
- test.verbose = true
28
- end
29
-
30
- begin
31
- require 'rcov/rcovtask'
32
- Rcov::RcovTask.new do |test|
33
- test.libs << 'test'
34
- test.pattern = 'test/**/test_*.rb'
35
- test.verbose = true
36
- end
37
- rescue LoadError
38
- task :rcov do
39
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
40
- end
41
- end
42
-
43
- task :test => :check_dependencies
44
-
45
- task :default => :test
46
-
47
- require 'rake/rdoctask'
48
- Rake::RDocTask.new do |rdoc|
49
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
50
-
51
- rdoc.rdoc_dir = 'rdoc'
52
- rdoc.title = "workless #{version}"
53
- rdoc.rdoc_files.include('README*')
54
- rdoc.rdoc_files.include('lib/**/*.rb')
55
- end
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.2.0
@@ -1,77 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{workless}
8
- s.version = "0.2.0"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["lostboy"]
12
- s.date = %q{2011-06-30}
13
- s.description = %q{Extension to Delayed Job to enable workers to scale up when needed}
14
- s.email = %q{paul.crabtree@gmail.com}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.textile"
18
- ]
19
- s.files = [
20
- ".bundle/config",
21
- ".document",
22
- ".rvmrc",
23
- "Gemfile",
24
- "Gemfile.lock",
25
- "LICENSE",
26
- "README.textile",
27
- "Rakefile",
28
- "VERSION",
29
- "lib/workless.rb",
30
- "lib/workless/railtie.rb",
31
- "lib/workless/scaler.rb",
32
- "lib/workless/scalers/base.rb",
33
- "lib/workless/scalers/heroku.rb",
34
- "lib/workless/scalers/heroku_cedar.rb",
35
- "lib/workless/scalers/local.rb",
36
- "lib/workless/scalers/null.rb",
37
- "workless.gemspec"
38
- ]
39
- s.homepage = %q{http://github.com/lostboy/workless}
40
- s.require_paths = ["lib"]
41
- s.rubygems_version = %q{1.5.0}
42
- s.summary = %q{Use delayed job workers only when theyre needed}
43
-
44
- if s.respond_to? :specification_version then
45
- s.specification_version = 3
46
-
47
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
48
- s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
49
- s.add_runtime_dependency(%q<heroku>, [">= 0"])
50
- s.add_runtime_dependency(%q<rush>, ["= 0.6.7"])
51
- s.add_runtime_dependency(%q<delayed_job>, ["~> 2.1.0"])
52
- s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
53
- s.add_runtime_dependency(%q<heroku>, [">= 0"])
54
- s.add_runtime_dependency(%q<rush>, ["= 0.6.7"])
55
- s.add_runtime_dependency(%q<delayed_job>, ["~> 2.1.0"])
56
- else
57
- s.add_dependency(%q<rails>, [">= 3.0.0"])
58
- s.add_dependency(%q<heroku>, [">= 0"])
59
- s.add_dependency(%q<rush>, ["= 0.6.7"])
60
- s.add_dependency(%q<delayed_job>, ["~> 2.1.0"])
61
- s.add_dependency(%q<rails>, [">= 3.0.0"])
62
- s.add_dependency(%q<heroku>, [">= 0"])
63
- s.add_dependency(%q<rush>, ["= 0.6.7"])
64
- s.add_dependency(%q<delayed_job>, ["~> 2.1.0"])
65
- end
66
- else
67
- s.add_dependency(%q<rails>, [">= 3.0.0"])
68
- s.add_dependency(%q<heroku>, [">= 0"])
69
- s.add_dependency(%q<rush>, ["= 0.6.7"])
70
- s.add_dependency(%q<delayed_job>, ["~> 2.1.0"])
71
- s.add_dependency(%q<rails>, [">= 3.0.0"])
72
- s.add_dependency(%q<heroku>, [">= 0"])
73
- s.add_dependency(%q<rush>, ["= 0.6.7"])
74
- s.add_dependency(%q<delayed_job>, ["~> 2.1.0"])
75
- end
76
- end
77
-