trollo 0.0.9 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/trollo/card.rb CHANGED
@@ -15,12 +15,12 @@ module Trollo
15
15
  scope :overdue, lambda { where('due_at < ?', Time.now) }
16
16
 
17
17
  workflow do
18
- state :complete do
19
- event :undo, :transitions_to => :incomplete
18
+ state :active do
19
+ event :archive, :transitions_to => :archived
20
20
  end
21
21
 
22
- state :incomplete do
23
- event :finish, :transitions_to => :complete
22
+ state :archived do
23
+ event :unarchive, :transitions_to => :active
24
24
  end
25
25
  end
26
26
 
@@ -33,18 +33,9 @@ module Trollo
33
33
  end
34
34
 
35
35
  def check
36
- check_complete
37
36
  check_due_at
38
37
  end
39
38
 
40
- def check_complete
41
- if complete?
42
- undo! if tasklists.any?(&:incomplete?)
43
- elsif incomplete?
44
- finish! if tasklists.all?(&:complete?)
45
- end
46
- end
47
-
48
39
  def check_due_at
49
40
  self.due_at = tasklists.minimum(:due_at)
50
41
  self.save!
@@ -1,3 +1,3 @@
1
1
  module Trollo
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trollo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-13 00:00:00.000000000 Z
12
+ date: 2014-01-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport