smtpapi 0.0.4 → 0.0.5

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: 4fbf767bac2cbf7e60ff3b5dcd0096a57813b439
4
- data.tar.gz: 65dd3337529a894178d6e3dc4889e6a0c7fb2a8d
3
+ metadata.gz: 2123dd1c53a5afb0d6d364b839f7e2bce172895e
4
+ data.tar.gz: ce573a808d20121d4fcfb7b34c08fd6d42f8e456
5
5
  SHA512:
6
- metadata.gz: ab1fb72c15745b6e81088a5e234d931626d88d1102b8d24cf0823b6fd603852b46d6c8a929a2d3998e5d37d61dd9957a1be5104bf833f7b539adb3bcef23a0c1
7
- data.tar.gz: 15eb7ef5f5c6ca140a6e5613fb7c98f08adeef8db31c4e74f9d4e84ba16f619a3228528c6cfdc9db4c1d5f4bbf9277f524ee6fdf53cc9c8006a18154a85d217d
6
+ metadata.gz: c233c25f27b369907d46a919a713e515a36c2bdc05ff33b8e26d30e03515ef6fd29999886cd3e69dd3e93a1f2d7c15fe1255b5407c12431c339386e6817a8b51
7
+ data.tar.gz: 0579ce01ddecfb27392275a33a64ae7b0931baf8faf9b06a9a165f672833a8d9b85bca9fb9b74ec260f7a77c0f2e53cff99d8228e7942eea87e5e69787fe17e1
data/README.md CHANGED
@@ -133,24 +133,6 @@ filter = {
133
133
  header.set_filters(filter)
134
134
  ```
135
135
 
136
- ### set_send_all
137
-
138
- ```ruby
139
- header = Smtpapi::Header.new
140
- lt = Time.local(2014, 8, 29, 17, 56, 35)
141
- header.set_send_all(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
-
154
136
  ## Contributing
155
137
 
156
138
  1. Fork it ( http://github.com/sendgridjp/smtpapi-ruby/fork )
@@ -1,3 +1,3 @@
1
1
  module Smtpapi
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/smtpapi.rb CHANGED
@@ -6,7 +6,7 @@ require "json"
6
6
  module Smtpapi
7
7
  class Header
8
8
 
9
- attr_reader :to, :sub, :section, :category, :unique_args, :filters, :send_all, :send_each_at
9
+ attr_reader :to, :sub, :section, :category, :unique_args, :filters, :send_at, :send_each_at
10
10
 
11
11
  def initialize
12
12
  @to = []
@@ -15,7 +15,7 @@ module Smtpapi
15
15
  @category = []
16
16
  @unique_args = {}
17
17
  @filters = {}
18
- @send_all = nil
18
+ @send_at = nil
19
19
  @send_each_at = []
20
20
  end
21
21
 
@@ -83,8 +83,8 @@ module Smtpapi
83
83
  self
84
84
  end
85
85
 
86
- def set_send_all(send_all)
87
- @send_all = send_all
86
+ def set_send_at(send_at)
87
+ @send_at = send_at
88
88
  end
89
89
 
90
90
  def set_send_each_at(send_each_at)
@@ -99,7 +99,7 @@ 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_all"] = @send_all.to_i.to_s if @send_all != nil
102
+ data["send_at"] = @send_at.to_i.to_s if @send_at != nil
103
103
  str_each_at = []
104
104
  @send_each_at.each {|val|
105
105
  str_each_at.push(val.to_i.to_s)
data/test/test.rb CHANGED
@@ -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.4", Smtpapi::VERSION)
8
+ assert_equal("0.0.5", Smtpapi::VERSION)
9
9
  end
10
10
 
11
11
  def test_empty
@@ -106,12 +106,12 @@ class SmtpapiTest < Test::Unit::TestCase
106
106
  assert_equal("{\"category\":[\"\\u5929\\u7834\\u6d3b\\u6bba\",\"\\u5929\\u7fd4\\u5341\\u5b57\\u9cf3\"]}",header.json_string)
107
107
  end
108
108
 
109
- def test_sent_send_all
109
+ def test_sent_send_at
110
110
  header = Smtpapi::Header.new
111
111
  localtime = Time.local(2014, 8, 29, 17, 56, 35)
112
- header.set_send_all(localtime)
112
+ header.set_send_at(localtime)
113
113
 
114
- assert_equal("{\"send_all\":\"#{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
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.4
4
+ version: 0.0.5
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-02 00:00:00.000000000 Z
11
+ date: 2014-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler