griddler 1.0.0 → 1.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.
- checksums.yaml +4 -4
- data/README.md +8 -1
- data/lib/griddler/email_parser.rb +1 -1
- data/lib/griddler/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: 9a3833d3d95363c7d1c7a96d6078cf765420809e
|
4
|
+
data.tar.gz: 77d63d65d0711aa139fb0e2eea6a8e57ec1bbcf6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0542546228a7e7685623346b580ba24768469e5648f3da2124df7447a54cf2f5b3dbe5892f9efcc60ff864cf07e9426f1f459ccfb94fa33313be676148cec77
|
7
|
+
data.tar.gz: 430a118db9bf578b9c2f43f3274458a248342390db5a109e06fba769ae60f33a7b2bd5e9057e5e0962871deb40a12dfefbc758f1c6fd124a304b22eee83857e1
|
data/README.md
CHANGED
@@ -64,7 +64,7 @@ end
|
|
64
64
|
| `processor_class` | The class Griddler will use to handle your incoming emails.
|
65
65
|
| `processor_method` | The method Griddler will call on the processor class when handling your incoming emails.
|
66
66
|
| `reply_delimiter` | The string searched for that will split your body.
|
67
|
-
| `email_service` | Tells Griddler which email service you are using. The supported email service options are `:sendgrid` (the default), `:cloudmailin` (expects multipart format), `:postmark` and `:
|
67
|
+
| `email_service` | Tells Griddler which email service you are using. The supported email service options are `:sendgrid` (the default), `:cloudmailin` (expects multipart format), `:postmark`, `:mandrill` and `:mailgun`. You will also need to have an appropriate [adapter] gem included in your Gemfile.
|
68
68
|
|
69
69
|
By default Griddler will look for a class named `EmailProcessor` with a method
|
70
70
|
named `process`, taking in one argument, a `Griddler::Email` instance
|
@@ -79,6 +79,13 @@ class EmailProcessor
|
|
79
79
|
def process
|
80
80
|
# all of your application-specific code here - creating models,
|
81
81
|
# processing reports, etc
|
82
|
+
|
83
|
+
# here's an example of model creation
|
84
|
+
user = User.find_by_email(@email.from[:email])
|
85
|
+
user.posts.create!(
|
86
|
+
subject: @email.subject,
|
87
|
+
body: @email.body
|
88
|
+
)
|
82
89
|
end
|
83
90
|
end
|
84
91
|
```
|
@@ -76,7 +76,7 @@ module Griddler::EmailParser
|
|
76
76
|
reply_delimeter_regex,
|
77
77
|
/^\s*[-]+\s*Original Message\s*[-]+\s*$/i,
|
78
78
|
/^\s*--\s*$/,
|
79
|
-
/^\s*\>?\s*On.*\r?\n
|
79
|
+
/^\s*\>?\s*On.*\r?\n?.*wrote:\r?\n?$/,
|
80
80
|
/On.*wrote:/,
|
81
81
|
/From:.*$/i,
|
82
82
|
/^\s*\d{4}\/\d{1,2}\/\d{1,2}\s.*\s<.*>?$/i
|
data/lib/griddler/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: griddler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Caleb Thompson
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-
|
14
|
+
date: 2014-10-03 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|