job_boss 0.7.21 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/job_boss.gemspec +1 -1
  2. data/lib/job_boss/job.rb +2 -4
  3. metadata +5 -5
@@ -4,7 +4,7 @@ $:.unshift lib unless $:.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "job_boss"
7
- s.version = '0.7.21'
7
+ s.version = '0.8.0'
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Brian Underwood"]
10
10
  s.email = ["ml+job_boss@semi-sentient.com"]
@@ -10,7 +10,7 @@ module JobBoss
10
10
  scope :pending, where('started_at IS NULL AND cancelled_at IS NULL')
11
11
  scope :running, where('started_at IS NOT NULL AND completed_at IS NULL')
12
12
  scope :completed, where('completed_at IS NOT NULL')
13
- scope :not_completed, where('completed_at IS NOT NULL')
13
+ scope :not_completed, where('completed_at IS NULL')
14
14
  scope :unfinished, where('completed_at IS NULL AND cancelled_at IS NULL')
15
15
  scope :mia, where("completed_at IS NOT NULL AND status = 'mia'")
16
16
 
@@ -213,9 +213,7 @@ module JobBoss
213
213
  end
214
214
 
215
215
  def cancelled?
216
- count = self.where('cancelled_at IS NULL').count
217
-
218
- !(count > 0)
216
+ !!self.where('cancelled_at IS NOT NULL').first
219
217
  end
220
218
 
221
219
  def cancel(jobs = nil)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: job_boss
3
3
  version: !ruby/object:Gem::Version
4
- hash: 41
4
+ hash: 63
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 7
9
- - 21
10
- version: 0.7.21
8
+ - 8
9
+ - 0
10
+ version: 0.8.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brian Underwood
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-23 00:00:00 -04:00
18
+ date: 2011-06-28 00:00:00 -04:00
19
19
  default_executable: job_boss
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency