sendgrid_ruby 0.0.5 → 0.0.6
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 +20 -0
- data/lib/sendgrid_ruby/email.rb +4 -0
- data/lib/sendgrid_ruby/version.rb +1 -1
- data/test/sendgrid_ruby.rb +1 -1
- data/test/sendgrid_ruby/email.rb +11 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 375db71f38233a7ca585d1c7c02239cca509f620
|
4
|
+
data.tar.gz: a28d5968b3c35eb9b33a8441ec2222d3bd96cd08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2df2a228ee7c07c8cf92ab619e011ffac825e2fe94f8bc3d5d4901bafbfad2fac408915fe8a896df968890365b06277919d8f2df1cdc4b5dc87b6edc0f3b5b6d
|
7
|
+
data.tar.gz: ca78fa4287b04c979dcd1b2302350dc2ab6a9b40de5372d278a1d92a8c4def2c702da95aada09c16d04ad6253ba4bb9c2ff8362829138adc79b1e85e16dbcce4
|
data/README.md
CHANGED
@@ -268,6 +268,26 @@ mail.add_to('foo@bar.com')
|
|
268
268
|
.add_filter("footer", "text/html", "<p style='color:red;'>Here is an HTML footer</p>")
|
269
269
|
```
|
270
270
|
|
271
|
+
### Scheduled send ###
|
272
|
+
|
273
|
+
You can specify delay to send. There are 2 parameters for delay sending.
|
274
|
+
|
275
|
+
#### send_at ####
|
276
|
+
```Ruby
|
277
|
+
mail = SendgridRuby::Email.new
|
278
|
+
localtime = Time.local(2014, 8, 29, 17, 56, 35)
|
279
|
+
mail.set_send_at(localtime)
|
280
|
+
```
|
281
|
+
|
282
|
+
#### send_each_at ####
|
283
|
+
```Ruby
|
284
|
+
mail = SendgridRuby::Email.new
|
285
|
+
localtime1 = Time.local(2014, 8, 29, 17, 56, 35)
|
286
|
+
localtime2 = Time.local(2013, 12, 31, 0, 0, 0)
|
287
|
+
localtime3 = Time.local(2015, 9, 1, 4, 5, 6)
|
288
|
+
mail.set_send_each_at([localtime1, localtime2, localtime3])
|
289
|
+
```
|
290
|
+
|
271
291
|
### Headers ###
|
272
292
|
|
273
293
|
You can add standard email message headers as necessary.
|
data/lib/sendgrid_ruby/email.rb
CHANGED
data/test/sendgrid_ruby.rb
CHANGED
data/test/sendgrid_ruby/email.rb
CHANGED
@@ -363,7 +363,7 @@ class EmailTest < Test::Unit::TestCase
|
|
363
363
|
localtime = Time.local(2014, 8, 29, 17, 56, 35)
|
364
364
|
email.set_send_at(localtime)
|
365
365
|
|
366
|
-
assert_equal("{\"send_at\"
|
366
|
+
assert_equal("{\"send_at\":#{localtime.to_i}}", email.smtpapi.json_string)
|
367
367
|
end
|
368
368
|
|
369
369
|
def test_send_each_at
|
@@ -374,7 +374,16 @@ class EmailTest < Test::Unit::TestCase
|
|
374
374
|
localtime3 = Time.local(2015, 9, 1, 4, 5, 6)
|
375
375
|
email.set_send_each_at([localtime1, localtime2, localtime3])
|
376
376
|
|
377
|
-
assert_equal("{\"send_each_at\":[
|
377
|
+
assert_equal("{\"send_each_at\":[#{localtime1.to_i},#{localtime2.to_i},#{localtime3.to_i}]}", email.smtpapi.json_string)
|
378
|
+
end
|
379
|
+
|
380
|
+
def test_asm_group_id
|
381
|
+
email = SendgridRuby::Email.new
|
382
|
+
|
383
|
+
email.set_asm_group(222)
|
384
|
+
|
385
|
+
assert_equal("{\"asm_group_id\":222}", email.smtpapi.json_string)
|
386
|
+
|
378
387
|
end
|
379
388
|
|
380
389
|
def test_header_accessors
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sendgrid_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wataru Sato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: smtpapi
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.4.2
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Web API wrapper for SendGrid.
|