griddler 1.0.0 → 1.1.0

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: 355db78d5cbaf7101a5b3674338c1101a50b057c
4
- data.tar.gz: 4d2f008ade3bbb37f28c3ac5c27d219499dee500
3
+ metadata.gz: 9a3833d3d95363c7d1c7a96d6078cf765420809e
4
+ data.tar.gz: 77d63d65d0711aa139fb0e2eea6a8e57ec1bbcf6
5
5
  SHA512:
6
- metadata.gz: 4a4a2f0a0edba4db35b4afea7579520f812af8a8c090b7aa2c1eea4347568eb9e460a9aff95eff09f912c5314b1f23ff7e66fa51028aca6e6db0a661d23f7937
7
- data.tar.gz: 07bffae2bfab97822a702d5f9b720665afde5673a1f5874a3ab9d1388bdc440f7645c37fcc991ba87fd5f74099c2554ebd21a869d001fa1a9d0f64c3945f2f8d
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 `:mandrill`. You will also need to have an appropriate [adapter] gem included in your Gemfile.
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?\s*.*\s*wrote:\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
@@ -1,3 +1,3 @@
1
1
  module Griddler
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
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.0.0
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-06-30 00:00:00.000000000 Z
14
+ date: 2014-10-03 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails