smtpapi 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: 2123dd1c53a5afb0d6d364b839f7e2bce172895e
4
- data.tar.gz: ce573a808d20121d4fcfb7b34c08fd6d42f8e456
3
+ metadata.gz: fa8b6bf35c9660b52c0426f7d27368ef3386a98a
4
+ data.tar.gz: 0a879660f6ee610cab30f4c9ca4c3888384d0007
5
5
  SHA512:
6
- metadata.gz: c233c25f27b369907d46a919a713e515a36c2bdc05ff33b8e26d30e03515ef6fd29999886cd3e69dd3e93a1f2d7c15fe1255b5407c12431c339386e6817a8b51
7
- data.tar.gz: 0579ce01ddecfb27392275a33a64ae7b0931baf8faf9b06a9a165f672833a8d9b85bca9fb9b74ec260f7a77c0f2e53cff99d8228e7942eea87e5e69787fe17e1
6
+ metadata.gz: c9b7147010f748f26ae5efb2c57c8cb975797e54c4733210aa2a3644bb680a6ce41940d259476c55239dc8246dde6dc73d562015f0c56aae924e8039063e9e59
7
+ data.tar.gz: 5f8c6f74f92de930001f9e11abf8585d8f20b83826ac17a0c66b32e1da4bf74e06ef571ec1400aa69e487aff8cb6e7d4eb94aac6555cf48886c1b4e18ea08349
data/README.md CHANGED
@@ -133,6 +133,24 @@ filter = {
133
133
  header.set_filters(filter)
134
134
  ```
135
135
 
136
+ ### set_send_at
137
+
138
+ ```ruby
139
+ header = Smtpapi::Header.new
140
+ lt = Time.local(2014, 8, 29, 17, 56, 35)
141
+ header.set_send_at(lt)
142
+ ```
143
+
144
+ ### set_send_each_at
145
+
146
+ ```ruby
147
+ header = Smtpapi::Header.new
148
+ lt1 = Time.local(2014, 8, 29, 17, 56, 35)
149
+ lt2 = Time.local(2013, 12, 31, 0, 0, 0)
150
+ lt3 = Time.local(2015, 9, 1, 4, 5, 6)
151
+ header.set_send_each_at([lt1, lt2, lt3])
152
+ ```
153
+
136
154
  ## Contributing
137
155
 
138
156
  1. Fork it ( http://github.com/sendgridjp/smtpapi-ruby/fork )
@@ -99,10 +99,10 @@ module Smtpapi
99
99
  data["unique_args"] = @unique_args if @unique_args.length > 0
100
100
  data["category"] = @category if @category.length > 0
101
101
  data["filters"] = @filters if @filters.length > 0
102
- data["send_at"] = @send_at.to_i.to_s if @send_at != nil
102
+ data["send_at"] = @send_at.to_i if @send_at != nil
103
103
  str_each_at = []
104
104
  @send_each_at.each {|val|
105
- str_each_at.push(val.to_i.to_s)
105
+ str_each_at.push(val.to_i)
106
106
  }
107
107
  data["send_each_at"] = str_each_at if str_each_at.length > 0
108
108
  data
@@ -1,3 +1,3 @@
1
1
  module Smtpapi
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -5,7 +5,7 @@ require "./lib/smtpapi"
5
5
  class SmtpapiTest < Test::Unit::TestCase
6
6
 
7
7
  def test_version
8
- assert_equal("0.0.5", Smtpapi::VERSION)
8
+ assert_equal("0.0.6", Smtpapi::VERSION)
9
9
  end
10
10
 
11
11
  def test_empty
@@ -111,7 +111,7 @@ class SmtpapiTest < Test::Unit::TestCase
111
111
  localtime = Time.local(2014, 8, 29, 17, 56, 35)
112
112
  header.set_send_at(localtime)
113
113
 
114
- assert_equal("{\"send_at\":\"#{localtime.to_i}\"}", header.json_string)
114
+ assert_equal("{\"send_at\":#{localtime.to_i}}", header.json_string)
115
115
  end
116
116
 
117
117
  def test_send_each_at
@@ -121,7 +121,7 @@ class SmtpapiTest < Test::Unit::TestCase
121
121
  localtime3 = Time.local(2015, 9, 1, 4, 5, 6)
122
122
  header.set_send_each_at([localtime1, localtime2, localtime3])
123
123
 
124
- assert_equal("{\"send_each_at\":[\"#{localtime1.to_i}\",\"#{localtime2.to_i}\",\"#{localtime3.to_i}\"]}", header.json_string)
124
+ assert_equal("{\"send_each_at\":[#{localtime1.to_i},#{localtime2.to_i},#{localtime3.to_i}]}", header.json_string)
125
125
  end
126
126
 
127
127
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smtpapi
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: 2014-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler