sendgrid_ruby 0.0.5 → 0.0.6

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: 06364480aba5e82ae0833a519cc500d938c431d2
4
- data.tar.gz: baf6a86beea26f8575978331675f6acd12330327
3
+ metadata.gz: 375db71f38233a7ca585d1c7c02239cca509f620
4
+ data.tar.gz: a28d5968b3c35eb9b33a8441ec2222d3bd96cd08
5
5
  SHA512:
6
- metadata.gz: 5a4bfa2d38e5e1420cf6ff6160197a190a46017b78007873e6316e755b2ec0228870cccece9affdc7f13a50f2be80d22d6f6dd7203a51b848c68c0886cf98e05
7
- data.tar.gz: aaf851f1f5ea295b1105e8fe5cc8559187acbb4bf4f2a6cb8eee62e627f6c81e61d301282a7ae7cbae2556987e05be87e7bec80787918c96e2f605d95ff23e29
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.
@@ -265,6 +265,10 @@ module SendgridRuby
265
265
  @smtpapi.set_send_each_at(send_each_at)
266
266
  end
267
267
 
268
+ def set_asm_group(group_id)
269
+ @smtpapi.set_asm_group(group_id)
270
+ end
271
+
268
272
  def get_headers()
269
273
  @headers
270
274
  end
@@ -1,3 +1,3 @@
1
1
  module SendgridRuby
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -16,7 +16,7 @@ class SendgridRubyTest < Test::Unit::TestCase
16
16
  end
17
17
 
18
18
  def test_version
19
- assert_equal("0.0.5", SendgridRuby::VERSION)
19
+ assert_equal("0.0.6", SendgridRuby::VERSION)
20
20
  end
21
21
 
22
22
  def test_initialize
@@ -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\":\"#{localtime.to_i}\"}", email.smtpapi.json_string)
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\":[\"#{localtime1.to_i}\",\"#{localtime2.to_i}\",\"#{localtime3.to_i}\"]}", email.smtpapi.json_string)
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.5
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: 2014-09-12 00:00:00.000000000 Z
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.2.2
128
+ rubygems_version: 2.4.2
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Web API wrapper for SendGrid.