ses_api-rails 0.1.0 → 0.1.1

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: 412077631ec736027d7d9b14e46fcfca42e2d193
4
- data.tar.gz: 01081ff399c203622a4514cddf6089cca15c4c58
3
+ metadata.gz: 4de9daf34f95efa8b7df130f3aa60a03a4ff19a8
4
+ data.tar.gz: 55dc920bb50c3a435040e9556d3c66a08bd92b23
5
5
  SHA512:
6
- metadata.gz: fddfc7096b9b62780bded4527d1c57f291921a3e1ee63a5559a3e65c08bac04aa0beb00ea8acdf2ee4185001bf421c1abd15218f95194fac3086cb339d0d3409
7
- data.tar.gz: a0c64ff863393372b9a736fd72682a6664ffec491806c56b0b30e9d95c807d207e6b9ae263a63c9f0d9f2836ef0ae88662ec58cc7550200c070194f36bcac043
6
+ metadata.gz: 1dc9fc30d9186dc9eaea6293447522ef1bd2ffeb7cca7114dbabdce90d4271dc4e20ee39d3d7f36fb78a77c6b0eb82e9443667a1441e092e7e958138e343a14e
7
+ data.tar.gz: ece94310d777f0ae08604db59014caa008be02fdf4989387c208e3322327a51d7c995b6dd9a35071293c32c84d30a07a927e7aa5a2e24ba79cc0824b9294bb31
data/README.md CHANGED
@@ -4,9 +4,11 @@ Basic SES API integration with Rails specifically for transaction based emails -
4
4
  ## Install the SES API Rails gem
5
5
  ```
6
6
  # Gemfile
7
- gem 'ses_api-rails', git: 'https://github.com/cickes/ses_api-rails.git'
7
+ gem 'ses_api-rails'
8
+ ```
9
+ ```
10
+ bundle install
8
11
  ```
9
- `bundle install`
10
12
 
11
13
  ## High Level Integration Details
12
14
  1. Create an initializer file defining your AWS credentials as constants
@@ -54,8 +56,8 @@ gem 'ses_api-rails', git: 'https://github.com/cickes/ses_api-rails.git'
54
56
  gem 'figaro'
55
57
  ```
56
58
  ```
57
- `bundle install`
58
- `figaro install`
59
+ bundle install
60
+ figaro install
59
61
  ```
60
62
  ```
61
63
  # config/application.yml
@@ -79,23 +81,25 @@ gem 'ses_api-rails', git: 'https://github.com/cickes/ses_api-rails.git'
79
81
  3. Create a Mailer that subclasses the SesApi::Rails::Mailer
80
82
  `rails g mailer ContactMailer`
81
83
  If you are only sending email from the Amazon Ses Api, you can subclass the ApplicationMailer. Otherwise subclass the Mailer that will use the Ses delivery method.
82
- * Using the Amazon Ses API as the only delivery method application-wide
83
- ```
84
- # app/mailers/application_mailer.rb
85
- class ApplicationMailer < SesApi::Rails::Mailer
86
- default from: "from@example.com"
87
- layout 'mailer'
88
- end
89
- ```
90
- ```
91
- # app/mailers/contact_mailer.rb
92
- class ContactMailer < ApplicationMailer
93
- ...
94
- def contact
95
- mail to: "you@example.com", subject: "Via Ses"
96
- end
97
- end
98
- ```
84
+
85
+ Using the Amazon Ses API as the only delivery method application-wide
86
+ ```
87
+ # app/mailers/application_mailer.rb
88
+ class ApplicationMailer < SesApi::Rails::Mailer
89
+ default from: "from@example.com"
90
+ layout 'mailer'
91
+ end
92
+ ```
93
+ ```
94
+ # app/mailers/contact_mailer.rb
95
+ class ContactMailer < ApplicationMailer
96
+ ...
97
+ def contact
98
+ mail to: "you@example.com", subject: "Via Ses"
99
+ end
100
+ end
101
+ ```
102
+
99
103
  Create a mailer view(s)
100
104
  ```
101
105
  # app/views/contact_mailer/contact.html.erb
@@ -129,5 +133,5 @@ gem 'ses_api-rails', git: 'https://github.com/cickes/ses_api-rails.git'
129
133
  Is the library included? One way to do so is to autoload all library sub-directories:
130
134
  `config.autoload_paths += Dir["#{config.root}/lib/**/"]`
131
135
 
132
- Is the time correct? Recommended to use ntp or another time snychronization method
136
+ Is the time correct? Recommend ntp or another time snychronization method.
133
137
 
@@ -55,8 +55,8 @@ module SesApi
55
55
 
56
56
  def create_payload
57
57
  to = mail.to.each_with_index.map { |email, i| "&Destination.ToAddresses.member.#{i+1}=#{CGI::escape(email)}"}.join
58
- cc = mail.cc.each_with_index.map { |email, i| "&Destination.CCAddresses.member.#{i+1}=#{CGI::escape(email)}"}.join if mail.cc.present?
59
- bcc = mail.bcc.each_with_index.map { |email, i| "&Destination.BCCAddresses.member.#{i+1}=#{CGI::escape(email)}"}.join if mail.bcc.present?
58
+ cc = mail.cc.each_with_index.map { |email, i| "&Destination.CcAddresses.member.#{i+1}=#{CGI::escape(email)}"}.join if mail.cc.present?
59
+ bcc = mail.bcc.each_with_index.map { |email, i| "&Destination.BccAddresses.member.#{i+1}=#{CGI::escape(email)}"}.join if mail.bcc.present?
60
60
  from = "&Source=#{CGI::escape(mail.from[0])}"
61
61
  subject = "&Message.Subject.Data=#{CGI::escape(mail.subject)}"
62
62
 
@@ -1,5 +1,5 @@
1
1
  module SesApi
2
2
  module Rails
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ses_api-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Ickes
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-20 00:00:00.000000000 Z
11
+ date: 2015-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler