mandrill-rails 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +106 -2
- data/lib/mandrill-rails/version.rb +3 -1
- data/lib/mandrill/web_hook.rb +1 -0
- data/lib/mandrill/web_hook/attachment.rb +38 -0
- data/lib/mandrill/web_hook/event_decorator.rb +14 -4
- data/mandrill-rails.gemspec +1 -1
- data/spec/fixtures/payload_examples/decoded_sample.pdf +0 -0
- data/spec/fixtures/payload_examples/sample.pdf +0 -0
- data/spec/fixtures/payload_examples/sample.txt +3 -0
- data/spec/fixtures/webhook_examples/inbound_with_multiple_attachments.json +46 -0
- data/spec/fixtures/webhook_examples/inbound_with_pdf_attachment.json +41 -0
- data/spec/fixtures/webhook_examples/inbound_with_txt_attachment.json +41 -0
- data/spec/mandrill/web_hook/attachment_spec.rb +34 -0
- data/spec/mandrill/web_hook/event_decorator_spec.rb +56 -1
- data/spec/support/fixtures_helper.rb +11 -0
- metadata +68 -18
@@ -17,6 +17,17 @@ module FixturesHelper
|
|
17
17
|
def webhook_example_event(sample_name)
|
18
18
|
webhook_example_events(sample_name).first
|
19
19
|
end
|
20
|
+
|
21
|
+
def payload_examples_path
|
22
|
+
Pathname.new(File.dirname(__FILE__)).join('..','fixtures','payload_examples')
|
23
|
+
end
|
24
|
+
|
25
|
+
# Returns the content of +sample_name+ payload example filename
|
26
|
+
def payload_example(sample_name)
|
27
|
+
payload_examples_path.join(sample_name).read
|
28
|
+
end
|
29
|
+
|
30
|
+
|
20
31
|
end
|
21
32
|
|
22
33
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mandrill-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mandrill
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: 0.0.2
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.0.2
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: activesupport
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
@@ -32,21 +37,31 @@ dependencies:
|
|
32
37
|
version: 3.0.3
|
33
38
|
type: :runtime
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 3.0.3
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: bundler
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
|
-
- -
|
51
|
+
- - ! '>='
|
42
52
|
- !ruby/object:Gem::Version
|
43
53
|
version: 1.1.0
|
44
54
|
type: :development
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.1.0
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
63
|
name: rake
|
49
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
50
65
|
none: false
|
51
66
|
requirements:
|
52
67
|
- - ~>
|
@@ -54,10 +69,15 @@ dependencies:
|
|
54
69
|
version: 0.9.2.2
|
55
70
|
type: :development
|
56
71
|
prerelease: false
|
57
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 0.9.2.2
|
58
78
|
- !ruby/object:Gem::Dependency
|
59
79
|
name: rspec
|
60
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
61
81
|
none: false
|
62
82
|
requirements:
|
63
83
|
- - ~>
|
@@ -65,10 +85,15 @@ dependencies:
|
|
65
85
|
version: 2.8.0
|
66
86
|
type: :development
|
67
87
|
prerelease: false
|
68
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 2.8.0
|
69
94
|
- !ruby/object:Gem::Dependency
|
70
95
|
name: rdoc
|
71
|
-
requirement:
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
72
97
|
none: false
|
73
98
|
requirements:
|
74
99
|
- - ~>
|
@@ -76,10 +101,15 @@ dependencies:
|
|
76
101
|
version: '3.11'
|
77
102
|
type: :development
|
78
103
|
prerelease: false
|
79
|
-
version_requirements:
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '3.11'
|
80
110
|
- !ruby/object:Gem::Dependency
|
81
111
|
name: guard-rspec
|
82
|
-
requirement:
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
83
113
|
none: false
|
84
114
|
requirements:
|
85
115
|
- - ~>
|
@@ -87,7 +117,12 @@ dependencies:
|
|
87
117
|
version: 1.2.0
|
88
118
|
type: :development
|
89
119
|
prerelease: false
|
90
|
-
version_requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 1.2.0
|
91
126
|
description: Rails integration for Mandrill
|
92
127
|
email:
|
93
128
|
- gallagher.paul@gmail.com
|
@@ -107,15 +142,23 @@ files:
|
|
107
142
|
- lib/mandrill-rails/version.rb
|
108
143
|
- lib/mandrill-rails/web_hook_processor.rb
|
109
144
|
- lib/mandrill/web_hook.rb
|
145
|
+
- lib/mandrill/web_hook/attachment.rb
|
110
146
|
- lib/mandrill/web_hook/event_decorator.rb
|
111
147
|
- lib/mandrill/web_hook/processor.rb
|
112
148
|
- mandrill-rails.gemspec
|
149
|
+
- spec/fixtures/payload_examples/decoded_sample.pdf
|
150
|
+
- spec/fixtures/payload_examples/sample.pdf
|
151
|
+
- spec/fixtures/payload_examples/sample.txt
|
113
152
|
- spec/fixtures/webhook_examples/click.json
|
114
153
|
- spec/fixtures/webhook_examples/inbound.json
|
115
154
|
- spec/fixtures/webhook_examples/inbound_reply.json
|
155
|
+
- spec/fixtures/webhook_examples/inbound_with_multiple_attachments.json
|
156
|
+
- spec/fixtures/webhook_examples/inbound_with_pdf_attachment.json
|
157
|
+
- spec/fixtures/webhook_examples/inbound_with_txt_attachment.json
|
116
158
|
- spec/fixtures/webhook_examples/open.json
|
117
159
|
- spec/fixtures/webhook_examples/send.json
|
118
160
|
- spec/mandrill-rails/web_hook_processor_spec.rb
|
161
|
+
- spec/mandrill/web_hook/attachment_spec.rb
|
119
162
|
- spec/mandrill/web_hook/event_decorator_spec.rb
|
120
163
|
- spec/mandrill/web_hook/processor_spec.rb
|
121
164
|
- spec/spec_helper.rb
|
@@ -140,18 +183,25 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
183
|
version: '0'
|
141
184
|
requirements: []
|
142
185
|
rubyforge_project:
|
143
|
-
rubygems_version: 1.8.
|
186
|
+
rubygems_version: 1.8.24
|
144
187
|
signing_key:
|
145
188
|
specification_version: 3
|
146
189
|
summary: Provides webhook processing and event decoration to make using Mandrill with
|
147
190
|
Rails just that much easier
|
148
191
|
test_files:
|
192
|
+
- spec/fixtures/payload_examples/decoded_sample.pdf
|
193
|
+
- spec/fixtures/payload_examples/sample.pdf
|
194
|
+
- spec/fixtures/payload_examples/sample.txt
|
149
195
|
- spec/fixtures/webhook_examples/click.json
|
150
196
|
- spec/fixtures/webhook_examples/inbound.json
|
151
197
|
- spec/fixtures/webhook_examples/inbound_reply.json
|
198
|
+
- spec/fixtures/webhook_examples/inbound_with_multiple_attachments.json
|
199
|
+
- spec/fixtures/webhook_examples/inbound_with_pdf_attachment.json
|
200
|
+
- spec/fixtures/webhook_examples/inbound_with_txt_attachment.json
|
152
201
|
- spec/fixtures/webhook_examples/open.json
|
153
202
|
- spec/fixtures/webhook_examples/send.json
|
154
203
|
- spec/mandrill-rails/web_hook_processor_spec.rb
|
204
|
+
- spec/mandrill/web_hook/attachment_spec.rb
|
155
205
|
- spec/mandrill/web_hook/event_decorator_spec.rb
|
156
206
|
- spec/mandrill/web_hook/processor_spec.rb
|
157
207
|
- spec/spec_helper.rb
|