vf-email-handler 0.0.1 → 0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d3dfd6e8bd814eb464375f2310eabcb1d2dbeb7
4
- data.tar.gz: 35d8181ce32c6fe61c5a1959df0ee244512992a7
3
+ metadata.gz: 1c1778f9431c9ade3da0ea1dfd1b8f959c8985e6
4
+ data.tar.gz: ab78ce69d2f189ca009a17defbeedc1aa1dc966c
5
5
  SHA512:
6
- metadata.gz: 31d8c82a3921232dd1479af035159aa6a0e21a9ce921bcadc9ce5744dbac24193463b6fc7ff668dd67320ca64a0fda1ac7fcce10b28082d4f807b32ef97a513f
7
- data.tar.gz: ac941615464f4665fced5f48a7c8e9befb7bf6d2c1647e001ba47c6b21fa2d8e5a02d41655f7f5f16fa64b584bdfad2a3b751c3405480976946fcfe029431e41
6
+ metadata.gz: a0e8e25829b0acbaf7cdc3311f531890c58db300a6154850e2f66f574425daea629cbe14e8cc51a101672a1af915507e380d68c28306804bff4df28616e68660
7
+ data.tar.gz: 73e59bf4f5166e888499ebea3ec5730de0fe42116e9dddb411152e5749f282f5ba17ba80b5a4e144c75e0495668c0c82f37af1517a44f668be2b74e34f51aec3
data/README.md CHANGED
@@ -5,6 +5,18 @@ Logic that binds the Amazon SQS (Simple Queue Service) to the Amazon SES (Simple
5
5
 
6
6
  The handler will poll a specified SQS Queue and translate the messages to somethign that SES can understand and then push them to SES; effectively sending the emails.
7
7
 
8
+ The SQS message should look something like this:
9
+
10
+ ```javascript
11
+ {
12
+ "from": "SES verified email <noreply@videofy.me>",
13
+ "to": "Person <kalle@videofy.me>",
14
+ "subject": "Subject of the email",
15
+ "html": "<p> A little email </p>"
16
+ }
17
+ ```
18
+ There are ofcourse a bunch of other fields that can be used, check the code for more info.
19
+
8
20
  ####Get up and running with the mail handler
9
21
  To start with there are some dependencies that must be satisfied.
10
22
  * Ruby ( >= 2.1.2) must be installed on the host computer
@@ -12,26 +24,38 @@ To start with there are some dependencies that must be satisfied.
12
24
 
13
25
  To install just type `gem install vf-email-handler` and you're set to go.
14
26
 
27
+ To build the gem from source hit `rake gem:build` and that will build the gem and install it.
28
+
15
29
  Then there is just the matter of writing the config, which of course the handler can do for you; at least get you started.
16
30
  Type the following:
17
31
 
18
32
  ```bash
19
- Config create call here
33
+ vf-email-handler create-config
20
34
  ```
21
35
 
22
- and it will generate a config-skeleton for you. Looking inside `default.h.cfg` we se this:
23
-
24
- ```bash
25
- Put sample config here
36
+ and it will generate a config-skeleton for you. Looking inside `mailer_config.yml` we se this:
37
+
38
+ ```yaml
39
+ :aws:
40
+ :ses:
41
+ :access_key_id: <YOUR AWS ACCESS_KEY_ID>
42
+ :secret_access_key: <YOUR AWS SECRET_ACCESS_KEY>
43
+ :ses_server: email.eu-west-1.amazonaws.com
44
+ :sqs:
45
+ :access_key_id: <YOUR AWS ACCESS_KEY_ID>
46
+ :secret_access_key: <YOUR AWS SECRET_ACCESS_KEY>
47
+ :sqs_queues: [<NAMES OF YOUR AWS SQS QUEUES>]
48
+ :aws_region: eu-west-1
49
+ :batch_size: <OPTIONAL DEFAULT 1 MAX 10>
50
+
51
+ :logger:
52
+ :log_file: <PATH TO LOGFILE HERE; Null if STOUT>
26
53
  ```
27
54
 
28
55
  Fill in the blanks and then start the handler by running.
29
56
 
30
57
  ```bash
31
- Put startup command here
58
+ vf-email-handler run mailer_config.yml
32
59
  ```
33
60
 
34
- #####Daemonize
35
- There is an init.d script in the opt folder of the repo.
36
-
37
61
  Happy hacking!
data/lib/logger/logger.rb CHANGED
@@ -11,7 +11,7 @@ module MailHandler
11
11
  end
12
12
 
13
13
  def success(args)
14
- #log "SUCCESS: #{args[:subject]}"
14
+ log "SUCCESS: #{args[:subject]}"
15
15
  end
16
16
 
17
17
  def error(args)
data/lib/meta/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # Current version of the handler
2
2
  module MailHandler
3
- VERSION = '0.0.1'
3
+ VERSION = '0.1.0'
4
4
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.email = 'karl.litterfeldt@videofy.me'
13
13
  s.license = 'MIT-LICENSE'
14
14
 
15
- s.required_ruby_version = '>=2.1.2'
15
+ s.required_ruby_version = '>=2.0.0'
16
16
 
17
17
  s.homepage = 'http://www.videofy.me'
18
18
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vf-email-handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Videofy
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-12 00:00:00.000000000 Z
12
+ date: 2014-09-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-ses
@@ -105,7 +105,6 @@ files:
105
105
  - lib/meta/version.rb
106
106
  - lib/models/email.rb
107
107
  - lib/workers/threaded_worker.rb
108
- - spec/integration_spec.rb
109
108
  - spec/interfaces/ses_spec.rb
110
109
  - spec/interfaces/sqs_spec.rb
111
110
  - spec/mail_handler_spec.rb
@@ -123,7 +122,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
123
122
  requirements:
124
123
  - - ">="
125
124
  - !ruby/object:Gem::Version
126
- version: 2.1.2
125
+ version: 2.0.0
127
126
  required_rubygems_version: !ruby/object:Gem::Requirement
128
127
  requirements:
129
128
  - - ">="
@@ -136,7 +135,6 @@ signing_key:
136
135
  specification_version: 4
137
136
  summary: Integrates AWS SQS with SES letting youseemlessly queue emails for sending
138
137
  test_files:
139
- - spec/integration_spec.rb
140
138
  - spec/interfaces/ses_spec.rb
141
139
  - spec/interfaces/sqs_spec.rb
142
140
  - spec/mail_handler_spec.rb
File without changes