mallet 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dbbc94de710c39031154385d6c93856ebae55bbb
4
- data.tar.gz: bbc00fa3852f38b3ca0868d65e3bdac2ec1449e9
3
+ metadata.gz: d2e69a5f35634f5b061dad4027c2f9efdb2b0a9f
4
+ data.tar.gz: ddfcff3eb59f77b2d45277fc6ae437119139fd0d
5
5
  SHA512:
6
- metadata.gz: 6447dd374d7820ab52e7c34315029787fb865d7a3a042d92cad67ba987f5449ee3356677dc9c83a1ef80d38e0af35384a79b30ce7548da81cb8c4a61e57292b6
7
- data.tar.gz: 50fd75a9c9085c5b75acce8605a4e64f3889f0495adcc83d2d7935425527e10dfccf05a8c82eea89cc7e9dd5e7d91491ae5f39525dbc8bc7a1702e5edc80e9be
6
+ metadata.gz: e10d593da69e7a7f610d4edd4879184b4f63a731f1f26b262de4a2a9a6364d11fe6cc22347f76d71b0f173f90745866fb35fa60c0e38ac2794990045d7bf1211
7
+ data.tar.gz: 85f083adb361773badeee338b9c2725d22667c80fa638805c149501dd23d419c47a6399355d6d78c915a47ac120e817f87be22759da05d2c592a7fa9a279a3ea
@@ -22,6 +22,14 @@ module Mallet
22
22
 
23
23
  end
24
24
 
25
+ def self.on_drop(mallet_mail)
26
+
27
+ end
28
+
29
+ def self.on_complain(mallet_mail)
30
+
31
+ end
32
+
25
33
  end
26
34
 
27
35
  end
@@ -21,14 +21,47 @@ module Mallet
21
21
  end
22
22
 
23
23
  state :sent do
24
- event :success, :transitions_to => :delivered
25
24
  event :error, :transitions_to => :failed
25
+ event :success, :transitions_to => :delivered
26
26
  event :bounce, :transitions_to => :bounced
27
+ event :drop, :transitions_to => :dropped
28
+ event :complain, :transitions_to => :complained
27
29
  end
28
30
 
29
- state :delivered
30
- state :failed
31
- state :bounced
31
+ state :failed do
32
+ event :success, :transitions_to => :delivered
33
+ event :bounce, :transitions_to => :bounced
34
+ event :drop, :transitions_to => :dropped
35
+ event :complain, :transitions_to => :complained
36
+ end
37
+
38
+ state :delivered do
39
+ event :success, :transitions_to => :delivered
40
+ event :bounce, :transitions_to => :bounced
41
+ event :drop, :transitions_to => :dropped
42
+ event :complain, :transitions_to => :complained
43
+ end
44
+
45
+ state :bounced do
46
+ event :success, :transitions_to => :delivered
47
+ event :bounce, :transitions_to => :bounced
48
+ event :drop, :transitions_to => :dropped
49
+ event :complain, :transitions_to => :complained
50
+ end
51
+
52
+ state :dropped do
53
+ event :success, :transitions_to => :delivered
54
+ event :bounce, :transitions_to => :bounced
55
+ event :drop, :transitions_to => :dropped
56
+ event :complain, :transitions_to => :complained
57
+ end
58
+
59
+ state :complained do
60
+ event :success, :transitions_to => :delivered
61
+ event :bounce, :transitions_to => :bounced
62
+ event :drop, :transitions_to => :dropped
63
+ event :complain, :transitions_to => :complained
64
+ end
32
65
 
33
66
  after_transition do
34
67
  notify_observers "on_#{workflow_state}".to_sym
@@ -57,16 +90,20 @@ module Mallet
57
90
  Hooks.on_error(self)
58
91
  end
59
92
 
60
- def bounce
61
- Hooks.on_bounce(self)
93
+ def success
94
+ Hooks.on_success(self)
62
95
  end
63
96
 
64
97
  def bounce
65
98
  Hooks.on_bounce(self)
66
99
  end
67
100
 
68
- def success
69
- Hooks.on_success(self)
101
+ def drop
102
+ Hooks.on_drop(self)
103
+ end
104
+
105
+ def complain
106
+ Hooks.on_complain(self)
70
107
  end
71
108
 
72
109
  end
@@ -1,3 +1,3 @@
1
1
  module Mallet
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
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.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Douglas Anderson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-08 00:00:00.000000000 Z
12
+ date: 2015-11-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport