mallet 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.
@@ -5,7 +5,8 @@ class CreateMalletTables < ActiveRecord::Migration
5
5
  t.string "definition"
6
6
  t.string "malletable_type"
7
7
  t.string "malletable_id"
8
- t.string "workflow_state"
8
+ t.string "workflow_state"
9
+ t.string "message_id"
9
10
  t.timestamps
10
11
  end
11
12
 
@@ -16,15 +16,15 @@ module Mallet
16
16
  event :deliver, :transitions_to => :sent
17
17
  event :error, :transitions_to => :failed
18
18
  end
19
-
20
- state :failed
21
19
 
22
20
  state :sent do
23
21
  event :success, :transitions_to => :delivered
22
+ event :error, :transitions_to => :failed
24
23
  event :bounce, :transitions_to => :bounced
25
24
  end
26
25
 
27
26
  state :delivered
27
+ state :failed
28
28
  state :bounced
29
29
 
30
30
  after_transition do
@@ -71,7 +71,7 @@ module Mallet
71
71
  end
72
72
 
73
73
  def self.deliver_all!
74
- pending.each(&:delayed_delivery)
74
+ with_pending_state.each(&:delayed_delivery)
75
75
  end
76
76
 
77
77
  end
@@ -1,3 +1,3 @@
1
1
  module Mallet
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -5,6 +5,7 @@ ActiveRecord::Schema.define do
5
5
  t.string "malletable_type"
6
6
  t.string "malletable_id"
7
7
  t.string "workflow_state"
8
+ t.string "message_id"
8
9
  t.timestamps
9
10
  end
10
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mallet
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:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-02-12 00:00:00.000000000 Z
13
+ date: 2014-02-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport