sendgrid-rails 2.0.4 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.travis.yml +1 -3
- data/README.rdoc +18 -0
- data/lib/send_grid/api_header.rb +4 -0
- data/lib/send_grid/version.rb +1 -1
- data/lib/send_grid.rb +1 -1
- data/spec/api_header_spec.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzJkNTQwY2QzMGY0NWU2N2Q0ZGIyNjlkY2YxZmM1OTJiMzY5NWE1OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YmJlNzQ1MTI0ZmVlNGU2ODRmNGZkNmIwNTNhZDQyMmQzOTg3ZjI4OQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODcwMDU0OTYwNTc5M2NjM2IxOGFhOTQ5Y2M5NWU0NGEwN2E2ZDA2NzkxMmQ5
|
10
|
+
ZTk3OGY1MTA4YjEzYjg4ZjJhYzMxMzY5NmJiZDkxZGRkOTU1MmU0MjA2YjM4
|
11
|
+
OTJkY2M4OTFmY2Q1OTMyYmVmODQ2OWVkNjdhOTU5MDZkYjhiOTI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGE0OGQ5ZjI1Y2Y5NDIxNDIyMTZkMDk1YTE3OThmY2Q3YTZkOGFjM2E4ZWU4
|
14
|
+
ZjJmOWRiYmVlOGM4ZTYwMzM1YTJkMTJkOGZiZDVhZDY2ZDJjYWY1ZjkwNTFl
|
15
|
+
YzVjMWNhMTU5NDllYWM2YjdjMjA5ZTQ5ZjkyNGFkZWY3ZGJmYmM=
|
data/.travis.yml
CHANGED
data/README.rdoc
CHANGED
@@ -28,6 +28,24 @@ In config/initializers/mail.rb:
|
|
28
28
|
:password => 'your password'
|
29
29
|
}
|
30
30
|
|
31
|
+
If you use Heroku, here what the mailer initializer may look like:
|
32
|
+
|
33
|
+
ActionMailer::Base.register_interceptor(SendGrid::MailInterceptor)
|
34
|
+
|
35
|
+
if ENV['SENDGRID_USERNAME'] && ENV['SENDGRID_PASSWORD']
|
36
|
+
ActionMailer::Base.smtp_settings = {
|
37
|
+
:address => 'smtp.sendgrid.net',
|
38
|
+
:port => '465',
|
39
|
+
:authentication => :plain,
|
40
|
+
:user_name => ENV['SENDGRID_USERNAME'],
|
41
|
+
:password => ENV['SENDGRID_PASSWORD'],
|
42
|
+
:domain => 'heroku.com',
|
43
|
+
:enable_starttls_auto => true,
|
44
|
+
:ssl => true
|
45
|
+
}
|
46
|
+
ActionMailer::Base.delivery_method = :smtp
|
47
|
+
end
|
48
|
+
|
31
49
|
=== Overriding default recipient in standard SMTP header
|
32
50
|
|
33
51
|
Dummy recipient email used in sent email's "To" header and seen in received email's Received header.
|
data/lib/send_grid/api_header.rb
CHANGED
data/lib/send_grid/version.rb
CHANGED
data/lib/send_grid.rb
CHANGED
@@ -7,7 +7,7 @@ module SendGrid
|
|
7
7
|
def self.included(base)
|
8
8
|
base.class_eval do
|
9
9
|
include InstanceMethods
|
10
|
-
delegate :substitute, :uniq_args, :category, :add_filter_setting, :to => :sendgrid_header
|
10
|
+
delegate :substitute, :uniq_args, :category, :add_filter_setting, :deliver_at, :to => :sendgrid_header
|
11
11
|
alias_method_chain :mail, :sendgrid
|
12
12
|
alias_method :sendgrid_header, :send_grid_header
|
13
13
|
end
|
data/spec/api_header_spec.rb
CHANGED
@@ -32,6 +32,12 @@ describe SendGrid::ApiHeader do
|
|
32
32
|
header.to_json.should eql '{"category":"category_name"}'
|
33
33
|
end
|
34
34
|
|
35
|
+
it "contains send_at" do
|
36
|
+
ts = 5.minutes.from_now.to_i
|
37
|
+
header.deliver_at ts
|
38
|
+
header.to_json.should eql "{\"send_at\":#{ts}}"
|
39
|
+
end
|
40
|
+
|
35
41
|
it "contains filter settings" do
|
36
42
|
header.add_filter_setting :filter1, :setting1, 'val1'
|
37
43
|
header.to_json.should eql '{"filters":{"filter1":{"settings":{"setting1":"val1"}}}}'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sendgrid-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PavelTyk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
97
|
version: '0'
|
98
98
|
requirements: []
|
99
99
|
rubyforge_project: sendgrid-rails
|
100
|
-
rubygems_version: 2.
|
100
|
+
rubygems_version: 2.4.5
|
101
101
|
signing_key:
|
102
102
|
specification_version: 4
|
103
103
|
summary: SendGrid gem fo Rails 3
|