mallet 0.1.7 → 0.1.8
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.
- checksums.yaml +4 -4
- data/lib/mallet/hooks.rb +8 -0
- data/lib/mallet/mail.rb +45 -8
- data/lib/mallet/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2e69a5f35634f5b061dad4027c2f9efdb2b0a9f
|
4
|
+
data.tar.gz: ddfcff3eb59f77b2d45277fc6ae437119139fd0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e10d593da69e7a7f610d4edd4879184b4f63a731f1f26b262de4a2a9a6364d11fe6cc22347f76d71b0f173f90745866fb35fa60c0e38ac2794990045d7bf1211
|
7
|
+
data.tar.gz: 85f083adb361773badeee338b9c2725d22667c80fa638805c149501dd23d419c47a6399355d6d78c915a47ac120e817f87be22759da05d2c592a7fa9a279a3ea
|
data/lib/mallet/hooks.rb
CHANGED
data/lib/mallet/mail.rb
CHANGED
@@ -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 :
|
30
|
-
|
31
|
-
|
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
|
61
|
-
Hooks.
|
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
|
69
|
-
Hooks.
|
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
|
data/lib/mallet/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2015-11-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|