smtpapi 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smtpapi.rb +2 -2
- data/lib/smtpapi/version.rb +1 -1
- data/test/test.rb +4 -3
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e949a527b106a2ad0ec5530c0b305bcf568c5f0d
|
4
|
+
data.tar.gz: 521f1c2cd08b6eba6e8759741d2639cd11324af4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 254df808552bb9c2f296379a6a9a0c45d902e82d0cf2bd1bfbefafbd19564ebbf66cb9a2916a0e78eeef1d89b250b38d2028cc27e99acf53e177eb9a6676ad48
|
7
|
+
data.tar.gz: 0d3a6acb3a98a89e938f3a94a0d35f047c5a8cd3b0e1c817962bf0d0977a8e7830a968baa6eb79825b4a78c2c4a9df11b006f2c22d536b6dc7fbb4f6ef5fa638
|
data/lib/smtpapi.rb
CHANGED
@@ -133,9 +133,9 @@ module Smtpapi
|
|
133
133
|
def escape_unicode(str)
|
134
134
|
str.unpack('U*').map{|i|
|
135
135
|
if i > 65535 then
|
136
|
-
"\\u#{((i - 0x10000) / 0x400 + 0xD800)
|
136
|
+
"\\u#{"%04x" % ((i - 0x10000) / 0x400 + 0xD800)}\\u#{"%04x" % ((i - 0x10000) % 0x400 + 0xDC00)}" if i > 65535
|
137
137
|
elsif i > 127 then
|
138
|
-
"\\u#{i
|
138
|
+
"\\u#{"%04x" % i}"
|
139
139
|
else
|
140
140
|
i.chr("UTF-8")
|
141
141
|
end
|
data/lib/smtpapi/version.rb
CHANGED
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.
|
8
|
+
assert_equal("0.0.11", Smtpapi::VERSION)
|
9
9
|
end
|
10
10
|
|
11
11
|
def test_empty
|
@@ -107,11 +107,12 @@ class SmtpapiTest < Test::Unit::TestCase
|
|
107
107
|
|
108
108
|
def test_add_category_unicode
|
109
109
|
header = Smtpapi::Header.new
|
110
|
+
header.add_category('Martí')
|
110
111
|
header.add_category('天破活殺') # category = ['天破活殺']
|
111
112
|
header.add_category('天翔十字鳳') # category = ['天破活殺', '天翔十字鳳']
|
112
|
-
assert_equal("{\"category\":[\"\\u5929\\u7834\\u6d3b\\u6bba\",\"\\u5929\\u7fd4\\u5341\\u5b57\\u9cf3\"]}",header.json_string)
|
113
|
+
assert_equal("{\"category\":[\"Mart\\u00ed\",\"\\u5929\\u7834\\u6d3b\\u6bba\",\"\\u5929\\u7fd4\\u5341\\u5b57\\u9cf3\"]}",header.json_string)
|
113
114
|
header.add_category('鼖') # category = ['天破活殺', '天翔十字鳳', '鼖']
|
114
|
-
assert_equal("{\"category\":[\"\\u5929\\u7834\\u6d3b\\u6bba\",\"\\u5929\\u7fd4\\u5341\\u5b57\\u9cf3\",\"\\ud87e\\ude1b\"]}",header.json_string)
|
115
|
+
assert_equal("{\"category\":[\"Mart\\u00ed\",\"\\u5929\\u7834\\u6d3b\\u6bba\",\"\\u5929\\u7fd4\\u5341\\u5b57\\u9cf3\",\"\\ud87e\\ude1b\"]}",header.json_string)
|
115
116
|
end
|
116
117
|
|
117
118
|
def test_sent_send_at
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smtpapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
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-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.5'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Smtpapi library for SendGrid.
|
@@ -45,8 +45,8 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
-
- .gitignore
|
49
|
-
- .travis.yml
|
48
|
+
- ".gitignore"
|
49
|
+
- ".travis.yml"
|
50
50
|
- Gemfile
|
51
51
|
- LICENSE.txt
|
52
52
|
- README.md
|
@@ -65,17 +65,17 @@ require_paths:
|
|
65
65
|
- lib
|
66
66
|
required_ruby_version: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
|
-
- -
|
68
|
+
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
requirements: []
|
77
77
|
rubyforge_project:
|
78
|
-
rubygems_version: 2.
|
78
|
+
rubygems_version: 2.4.2
|
79
79
|
signing_key:
|
80
80
|
specification_version: 4
|
81
81
|
summary: Smtpapi library for SendGrid.
|