incoming 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +1 -1
- data/README.md +27 -4
- data/lib/incoming.rb +2 -2
- data/lib/incoming/strategies/sendgrid.rb +1 -1
- metadata +4 -4
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,17 +1,40 @@
|
|
1
1
|
Incoming!
|
2
2
|
-----------
|
3
3
|
|
4
|
-
|
4
|
+
### Receive email in your Rack apps.
|
5
|
+
|
6
|
+
Incoming! receives a `Rack::Request` and hands you a `Mail::Message`, much
|
7
|
+
like `ActionMailer::Base.receive` does with a raw email. We currently
|
8
|
+
support the following services:
|
9
|
+
|
10
|
+
1. SendGrid
|
11
|
+
2. Mailgun
|
12
|
+
3. Postmark
|
13
|
+
4. CloudMailin
|
14
|
+
5. Any mail server capable of routing messages to a system command
|
5
15
|
|
6
16
|
Brought to you by :zap: **Honeybadger.io**, painless [Rails exception tracking](https://www.honeybadger.io/).
|
7
17
|
|
8
18
|
[![Build Status](https://travis-ci.org/honeybadger-io/incoming.png)](https://travis-ci.org/honeybadger-io/incoming)
|
9
19
|
[![Gem Version](https://badge.fury.io/rb/incoming.png)](http://badge.fury.io/rb/incoming)
|
10
20
|
|
11
|
-
##
|
21
|
+
## Installation
|
22
|
+
|
23
|
+
1. Add Incoming! to your Gemfile and run `bundle install`:
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
gem 'incoming'
|
27
|
+
```
|
28
|
+
|
29
|
+
2. Create a new class to receive emails (see examples below)
|
30
|
+
|
31
|
+
3. Implement an HTTP endpoint to receive HTTP post hooks, and pass the
|
32
|
+
request to your receiver. (see examples below)
|
33
|
+
|
34
|
+
## SendGrid example:
|
12
35
|
|
13
36
|
```ruby
|
14
|
-
class EmailReceiver < Incoming::Strategies::
|
37
|
+
class EmailReceiver < Incoming::Strategies::SendGrid
|
15
38
|
def receive(mail)
|
16
39
|
puts %(Got message from #{mail.to.first} with subject "#{mail.subject}")
|
17
40
|
end
|
@@ -137,5 +160,5 @@ end
|
|
137
160
|
|
138
161
|
## License
|
139
162
|
|
140
|
-
Incoming! is Copyright 2013 © Honeybadger Industries LLC. It is free software, and
|
163
|
+
Incoming! is Copyright 2013 © Joshua Wood and Honeybadger Industries LLC. It is free software, and
|
141
164
|
may be redistributed under the terms specified in the MIT-LICENSE file.
|
data/lib/incoming.rb
CHANGED
@@ -2,10 +2,10 @@ require 'mail'
|
|
2
2
|
require 'incoming/strategy'
|
3
3
|
|
4
4
|
module Incoming
|
5
|
-
VERSION = '0.1.
|
5
|
+
VERSION = '0.1.2'
|
6
6
|
|
7
7
|
module Strategies
|
8
|
-
autoload :
|
8
|
+
autoload :SendGrid, 'incoming/strategies/sendgrid'
|
9
9
|
autoload :Mailgun, 'incoming/strategies/mailgun'
|
10
10
|
autoload :Postmark, 'incoming/strategies/postmark'
|
11
11
|
autoload :CloudMailin, 'incoming/strategies/cloudmailin'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: incoming
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
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: 2013-02-
|
12
|
+
date: 2013-02-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mail
|
@@ -127,7 +127,7 @@ files:
|
|
127
127
|
- Rakefile
|
128
128
|
- README.md
|
129
129
|
- bin/http_post
|
130
|
-
homepage: https://
|
130
|
+
homepage: https://github.com/honeybadger-io/incoming
|
131
131
|
licenses: []
|
132
132
|
post_install_message:
|
133
133
|
rdoc_options: []
|
@@ -141,7 +141,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
141
141
|
version: '0'
|
142
142
|
segments:
|
143
143
|
- 0
|
144
|
-
hash:
|
144
|
+
hash: -4457823353074909668
|
145
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
146
|
none: false
|
147
147
|
requirements:
|