td-client 0.8.65 → 0.8.66
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/lib/td/client.rb +1 -1
- data/lib/td/client/api.rb +64 -9
- data/lib/td/client/version.rb +1 -1
- data/spec/spec_helper.rb +3 -2
- data/spec/td/client/api_ssl_connection_spec.rb +83 -0
- data/spec/td/client/db_api_spec.rb +1 -1
- data/spec/td/client/job_api_spec.rb +5 -2
- data/spec/td/client/result_api_spec.rb +1 -1
- data/spec/td/client/sched_api_spec.rb +7 -8
- data/spec/td/client/table_api_spec.rb +1 -1
- metadata +30 -28
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MjEzZDA5YzUzYmRmNWFjNzA4Y2JmZDA3ZTc5OTc5YmI1YTI5NTg5Nw==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 68f45b7f8ac2b35437c0c67488cccc901b244efa
|
4
|
+
data.tar.gz: e15152f3edc04a66e74579f2fb31afa161fe87e0
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
NzFlM2Q5NDU1ZTVlMjFmNzM5MjI0ZGIzYmMwZDg5YWJjYTM5OTI3NTg2NGI0
|
11
|
-
NzBlY2EyNTYzYWRlNzFhNzI5NjFhYzY4ZGUwNzI2OTIzMzZkZTY=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YTQ1NzFjYmZhZWY5OTM5MmFhNjdiNzJmMjUxMzhmNzc3ZGZjMjNhYjg1YjMy
|
14
|
-
ZTFiNjNmODljOWI4NzQ4M2EzNDU1MDNhYjg0NmU1Njg1YWFmZTM4ZDcwY2Zk
|
15
|
-
NzkzNjQ1YjJhZTRkOTJjZTFhM2JjZDFjY2VhZGVjZGM4ZTJmMDE=
|
6
|
+
metadata.gz: 889a0f5ec860113c7afc442915e4ef3d6d8a43b79d9bb3839874976354488ecedc8282bdc798788fbeffa74242e31d1d9ccf2c9b50b4753766991264bf20ef4d
|
7
|
+
data.tar.gz: 492c0632ffbcd8d9c0cb8b6e7f02228a47d5f73c9500d1cd74104ee70e680dc024060dd201a9abff7fce857d3910bfa2fb73ad0e2e60d1ba0020069cda0a1d6e
|
data/lib/td/client.rb
CHANGED
data/lib/td/client/api.rb
CHANGED
@@ -54,6 +54,7 @@ class API
|
|
54
54
|
@read_timeout = opts[:read_timeout] || 600
|
55
55
|
@send_timeout = opts[:send_timeout] || 600
|
56
56
|
@retry_post_requests = opts[:retry_post_requests] || false
|
57
|
+
@max_cumul_retry_delay = opts[:max_cumul_retry_delay] || 600
|
57
58
|
|
58
59
|
case uri.scheme
|
59
60
|
when 'http', 'https'
|
@@ -962,7 +963,7 @@ class API
|
|
962
963
|
raise_error("Import failed", res)
|
963
964
|
end
|
964
965
|
js = checked_json(body, %w[])
|
965
|
-
time = js['
|
966
|
+
time = js['elapsed_time'].to_f
|
966
967
|
return time
|
967
968
|
end
|
968
969
|
|
@@ -1189,6 +1190,10 @@ class API
|
|
1189
1190
|
return status
|
1190
1191
|
end
|
1191
1192
|
|
1193
|
+
def ssl_ca_file=(ssl_ca_file)
|
1194
|
+
@ssl_ca_file = ssl_ca_file
|
1195
|
+
end
|
1196
|
+
|
1192
1197
|
private
|
1193
1198
|
module DeflateReadBodyMixin
|
1194
1199
|
attr_accessor :gzip
|
@@ -1217,6 +1222,12 @@ class API
|
|
1217
1222
|
end
|
1218
1223
|
|
1219
1224
|
def get(url, params=nil, &block)
|
1225
|
+
guard_no_sslv3 do
|
1226
|
+
do_get(url, params, &block)
|
1227
|
+
end
|
1228
|
+
end
|
1229
|
+
|
1230
|
+
def do_get(url, params=nil, &block)
|
1220
1231
|
http, header = new_http
|
1221
1232
|
|
1222
1233
|
path = @base_path + url
|
@@ -1238,7 +1249,6 @@ class API
|
|
1238
1249
|
|
1239
1250
|
# up to 7 retries with exponential (base 2) back-off starting at 'retry_delay'
|
1240
1251
|
retry_delay = 5
|
1241
|
-
max_cumul_retry_delay = 600
|
1242
1252
|
cumul_retry_delay = 0
|
1243
1253
|
|
1244
1254
|
# for both exceptions and 500+ errors retrying is enabled by default.
|
@@ -1256,7 +1266,7 @@ class API
|
|
1256
1266
|
|
1257
1267
|
status = response.code.to_i
|
1258
1268
|
# retry if the HTTP error code is 500 or higher and we did not run out of retrying attempts
|
1259
|
-
if !block_given? && status >= 500 && cumul_retry_delay <= max_cumul_retry_delay
|
1269
|
+
if !block_given? && status >= 500 && cumul_retry_delay <= @max_cumul_retry_delay
|
1260
1270
|
$stderr.puts "Error #{status}: #{get_error(response)}. Retrying after #{retry_delay} seconds..."
|
1261
1271
|
sleep retry_delay
|
1262
1272
|
cumul_retry_delay += retry_delay
|
@@ -1268,14 +1278,14 @@ class API
|
|
1268
1278
|
raise e
|
1269
1279
|
end
|
1270
1280
|
$stderr.print "#{e.class}: #{e.message}. "
|
1271
|
-
if cumul_retry_delay <= max_cumul_retry_delay
|
1281
|
+
if cumul_retry_delay <= @max_cumul_retry_delay
|
1272
1282
|
$stderr.puts "Retrying after #{retry_delay} seconds..."
|
1273
1283
|
sleep retry_delay
|
1274
1284
|
cumul_retry_delay += retry_delay
|
1275
1285
|
retry_delay *= 2
|
1276
1286
|
retry
|
1277
1287
|
else
|
1278
|
-
$stderr.puts "Retrying stopped after #{max_cumul_retry_delay} seconds."
|
1288
|
+
$stderr.puts "Retrying stopped after #{@max_cumul_retry_delay} seconds."
|
1279
1289
|
raise e
|
1280
1290
|
end
|
1281
1291
|
rescue => e
|
@@ -1311,6 +1321,12 @@ class API
|
|
1311
1321
|
end
|
1312
1322
|
|
1313
1323
|
def post(url, params=nil)
|
1324
|
+
guard_no_sslv3 do
|
1325
|
+
do_post(url, params)
|
1326
|
+
end
|
1327
|
+
end
|
1328
|
+
|
1329
|
+
def do_post(url, params=nil)
|
1314
1330
|
http, header = new_http
|
1315
1331
|
|
1316
1332
|
path = @base_path + url
|
@@ -1332,7 +1348,6 @@ class API
|
|
1332
1348
|
|
1333
1349
|
# up to 7 retries with exponential (base 2) back-off starting at 'retry_delay'
|
1334
1350
|
retry_delay = 5
|
1335
|
-
max_cumul_retry_delay = 600
|
1336
1351
|
cumul_retry_delay = 0
|
1337
1352
|
|
1338
1353
|
# for both exceptions and 500+ errors retrying can be enabled by initialization
|
@@ -1346,7 +1361,7 @@ class API
|
|
1346
1361
|
# if the HTTP error code is 500 or higher and the user requested retrying
|
1347
1362
|
# on post request, attempt a retry
|
1348
1363
|
status = response.code.to_i
|
1349
|
-
if @retry_post_requests && status >= 500 && cumul_retry_delay <= max_cumul_retry_delay
|
1364
|
+
if @retry_post_requests && status >= 500 && cumul_retry_delay <= @max_cumul_retry_delay
|
1350
1365
|
$stderr.puts "Error #{status}: #{get_error(response)}. Retrying after #{retry_delay} seconds..."
|
1351
1366
|
sleep retry_delay
|
1352
1367
|
cumul_retry_delay += retry_delay
|
@@ -1355,14 +1370,14 @@ class API
|
|
1355
1370
|
end
|
1356
1371
|
rescue Errno::ECONNREFUSED, Errno::ECONNRESET, Timeout::Error, EOFError, OpenSSL::SSL::SSLError, SocketError => e
|
1357
1372
|
$stderr.print "#{e.class}: #{e.message}. "
|
1358
|
-
if @retry_post_requests && cumul_retry_delay <= max_cumul_retry_delay
|
1373
|
+
if @retry_post_requests && cumul_retry_delay <= @max_cumul_retry_delay
|
1359
1374
|
$stderr.puts "Retrying after #{retry_delay} seconds..."
|
1360
1375
|
sleep retry_delay
|
1361
1376
|
cumul_retry_delay += retry_delay
|
1362
1377
|
retry_delay *= 2
|
1363
1378
|
retry
|
1364
1379
|
else
|
1365
|
-
$stderr.puts "Retrying stopped after #{max_cumul_retry_delay} seconds."
|
1380
|
+
$stderr.puts "Retrying stopped after #{@max_cumul_retry_delay} seconds."
|
1366
1381
|
raise e
|
1367
1382
|
end
|
1368
1383
|
rescue => e
|
@@ -1419,6 +1434,19 @@ class API
|
|
1419
1434
|
"#{schema}://#{host}:#{@port}/#{@base_path + url}"
|
1420
1435
|
end
|
1421
1436
|
|
1437
|
+
def guard_no_sslv3
|
1438
|
+
key = :SET_SSL_OP_NO_SSLv3
|
1439
|
+
backup = Thread.current[key]
|
1440
|
+
begin
|
1441
|
+
# Disable SSLv3 connection: See Net::HTTP hack at the bottom
|
1442
|
+
Thread.current[key] = true
|
1443
|
+
yield
|
1444
|
+
ensure
|
1445
|
+
# backup could be nil, but assigning nil to TLS means 'delete'
|
1446
|
+
Thread.current[key] = backup
|
1447
|
+
end
|
1448
|
+
end
|
1449
|
+
|
1422
1450
|
def new_http(opts = {})
|
1423
1451
|
host = opts[:host] || @host
|
1424
1452
|
http = @http_class.new(host, @port)
|
@@ -1429,6 +1457,12 @@ class API
|
|
1429
1457
|
#store = OpenSSL::X509::Store.new
|
1430
1458
|
#http.cert_store = store
|
1431
1459
|
http.ca_file = File.join(ssl_ca_file)
|
1460
|
+
# Disable SSLv3 connection in favor of POODLE Attack protection
|
1461
|
+
# ruby 1.8.7 uses own @ssl_context instead of calling
|
1462
|
+
# SSLContext#set_params.
|
1463
|
+
if ctx = http.instance_eval { @ssl_context }
|
1464
|
+
ctx.options = OpenSSL::SSL::OP_ALL | OpenSSL::SSL::OP_NO_SSLv3
|
1465
|
+
end
|
1432
1466
|
end
|
1433
1467
|
|
1434
1468
|
header = {}
|
@@ -1450,6 +1484,8 @@ class API
|
|
1450
1484
|
if @ssl
|
1451
1485
|
client.ssl_config.add_trust_ca(ssl_ca_file)
|
1452
1486
|
client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
1487
|
+
# Disable SSLv3 connection in favor of POODLE Attack protection
|
1488
|
+
client.ssl_config.options |= OpenSSL::SSL::OP_NO_SSLv3
|
1453
1489
|
end
|
1454
1490
|
|
1455
1491
|
header = {}
|
@@ -1529,3 +1565,22 @@ class API
|
|
1529
1565
|
end
|
1530
1566
|
|
1531
1567
|
end # module TreasureData
|
1568
|
+
|
1569
|
+
require 'openssl'
|
1570
|
+
module OpenSSL
|
1571
|
+
module SSL
|
1572
|
+
class SSLContext
|
1573
|
+
|
1574
|
+
# For disabling SSLv3 connection in favor of POODLE Attack protection
|
1575
|
+
#
|
1576
|
+
# Allow 'options' customize through Thread local storage since
|
1577
|
+
# Net::HTTP does not support 'options' configuration.
|
1578
|
+
#
|
1579
|
+
alias original_set_params set_params
|
1580
|
+
def set_params(params={})
|
1581
|
+
original_set_params(params)
|
1582
|
+
self.options |= OP_NO_SSLv3 if Thread.current[:SET_SSL_OP_NO_SSLv3]
|
1583
|
+
end
|
1584
|
+
end
|
1585
|
+
end
|
1586
|
+
end
|
data/lib/td/client/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -8,6 +8,7 @@ end
|
|
8
8
|
|
9
9
|
require 'rspec'
|
10
10
|
require 'webmock/rspec'
|
11
|
+
WebMock.disable_net_connect!(:allow_localhost => true)
|
11
12
|
|
12
13
|
include WebMock::API
|
13
14
|
|
@@ -24,12 +25,12 @@ shared_context 'common helper' do
|
|
24
25
|
end
|
25
26
|
|
26
27
|
let :headers do
|
27
|
-
{'Accept' => '*/*', 'Accept-Encoding' =>
|
28
|
+
{'Accept' => '*/*', 'Accept-Encoding' => /gzip/, 'Date' => /.*/, 'User-Agent' => /Ruby/}
|
28
29
|
end
|
29
30
|
|
30
31
|
def stub_api_request(method, path, opts = nil)
|
31
32
|
scheme = 'http'
|
32
|
-
with_opts = {:
|
33
|
+
with_opts = {:headers => headers}
|
33
34
|
if opts
|
34
35
|
scheme = 'https' if opts[:ssl]
|
35
36
|
with_opts[:query] = opts[:query] if opts[:query]
|
@@ -0,0 +1,83 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'td/client/api'
|
3
|
+
require 'logger'
|
4
|
+
require 'webrick'
|
5
|
+
require 'webrick/https'
|
6
|
+
|
7
|
+
describe 'API SSL connection' do
|
8
|
+
DIR = File.dirname(File.expand_path(__FILE__))
|
9
|
+
|
10
|
+
after :each do
|
11
|
+
@server.shutdown
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should fail to connect SSLv3 only server' do
|
15
|
+
@server = setup_server(:SSLv3)
|
16
|
+
api = API.new(nil, :endpoint => "https://localhost:#{@serverport}", :retry_post_requests => false)
|
17
|
+
api.ssl_ca_file = File.join(DIR, 'ca-all.cert')
|
18
|
+
expect {
|
19
|
+
api.delete_database('no_such_database')
|
20
|
+
}.to raise_error OpenSSL::SSL::SSLError
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'should success to connect TLSv1 only server' do
|
24
|
+
@server = setup_server(:TLSv1)
|
25
|
+
api = API.new(nil, :endpoint => "https://localhost:#{@serverport}", :retry_post_requests => false)
|
26
|
+
api.ssl_ca_file = File.join(DIR, 'ca-all.cert')
|
27
|
+
expect {
|
28
|
+
api.delete_database('no_such_database')
|
29
|
+
}.to raise_error TreasureData::NotFoundError
|
30
|
+
end
|
31
|
+
|
32
|
+
def setup_server(ssl_version)
|
33
|
+
logger = Logger.new(STDERR)
|
34
|
+
logger.level = Logger::Severity::FATAL # avoid logging SSLError (ERROR level)
|
35
|
+
@server = WEBrick::HTTPServer.new(
|
36
|
+
:BindAddress => "localhost",
|
37
|
+
:Logger => logger,
|
38
|
+
:Port => 0,
|
39
|
+
:AccessLog => [],
|
40
|
+
:DocumentRoot => '.',
|
41
|
+
:SSLEnable => true,
|
42
|
+
:SSLCACertificateFile => File.join(DIR, 'ca.cert'),
|
43
|
+
:SSLCertificate => cert('server.cert'),
|
44
|
+
:SSLPrivateKey => key('server.key')
|
45
|
+
)
|
46
|
+
@serverport = @server.config[:Port]
|
47
|
+
@server.mount(
|
48
|
+
'/hello',
|
49
|
+
WEBrick::HTTPServlet::ProcHandler.new(method(:do_hello).to_proc)
|
50
|
+
)
|
51
|
+
@server.ssl_context.ssl_version = ssl_version
|
52
|
+
@server_thread = start_server_thread(@server)
|
53
|
+
return @server
|
54
|
+
end
|
55
|
+
|
56
|
+
def do_hello(req, res)
|
57
|
+
res['content-type'] = 'text/html'
|
58
|
+
res.body = "hello"
|
59
|
+
end
|
60
|
+
|
61
|
+
def start_server_thread(server)
|
62
|
+
t = Thread.new {
|
63
|
+
Thread.current.abort_on_exception = true
|
64
|
+
server.start
|
65
|
+
}
|
66
|
+
while server.status != :Running
|
67
|
+
sleep 0.1
|
68
|
+
unless t.alive?
|
69
|
+
t.join
|
70
|
+
raise
|
71
|
+
end
|
72
|
+
end
|
73
|
+
t
|
74
|
+
end
|
75
|
+
|
76
|
+
def cert(filename)
|
77
|
+
OpenSSL::X509::Certificate.new(File.read(File.join(DIR, filename)))
|
78
|
+
end
|
79
|
+
|
80
|
+
def key(filename)
|
81
|
+
OpenSSL::PKey::RSA.new(File.read(File.join(DIR, filename)))
|
82
|
+
end
|
83
|
+
end
|
@@ -18,7 +18,7 @@ describe 'Database API' do
|
|
18
18
|
stub_api_request(:post, "/v3/database/create/#{e(db_name)}")
|
19
19
|
.to_return(:body => {'database' => db_name}.to_json)
|
20
20
|
|
21
|
-
api.create_database(db_name).should
|
21
|
+
api.create_database(db_name).should be true
|
22
22
|
end
|
23
23
|
|
24
24
|
it 'should return 400 error with invalid name' do
|
@@ -10,11 +10,14 @@ describe 'Job API' do
|
|
10
10
|
API.new(nil)
|
11
11
|
end
|
12
12
|
|
13
|
+
let :api_with_short_retry do
|
14
|
+
API.new(nil, {:max_cumul_retry_delay => 10})
|
15
|
+
end
|
16
|
+
|
13
17
|
describe 'list_jobs' do
|
14
18
|
it 'should returns 20 jobs by default' do
|
15
19
|
stub_api_request(:get, "/v3/job/list", :query => {'from' => '0'}).to_return(:body => {'jobs' => raw_jobs}.to_json)
|
16
20
|
jobs = api.list_jobs
|
17
|
-
puts jobs.size
|
18
21
|
jobs.size.should == 20
|
19
22
|
end
|
20
23
|
|
@@ -102,7 +105,7 @@ describe 'Job API' do
|
|
102
105
|
stub_api_request(:get, "/v3/job/show/#{e(invalid_id)}").to_return(:status => 500, :body => body.to_json)
|
103
106
|
|
104
107
|
expect {
|
105
|
-
|
108
|
+
api_with_short_retry.show_job(invalid_id)
|
106
109
|
}.to raise_error(TreasureData::APIError, /'job_id' parameter is required but missing/)
|
107
110
|
end
|
108
111
|
end
|
@@ -14,7 +14,7 @@ describe 'Result API' do
|
|
14
14
|
params = {'url' => result_url}
|
15
15
|
stub_api_request(:post, "/v3/result/create/#{e(result_name)}").with(:body => params).to_return(:body => {'result' => result_name})
|
16
16
|
|
17
|
-
api.create_result(result_name, result_url).should
|
17
|
+
api.create_result(result_name, result_url).should be true
|
18
18
|
end
|
19
19
|
|
20
20
|
it 'should return 422 error with invalid name' do
|
@@ -17,21 +17,21 @@ describe 'Schedule API' do
|
|
17
17
|
it 'should create a new schedule' do
|
18
18
|
start = Time.now
|
19
19
|
stub_api_request(:post, "/v3/schedule/create/#{e(sched_name)}")
|
20
|
-
.with(opts.merge('type' => 'hive'))
|
20
|
+
.with(:body => opts.merge('type' => 'hive'))
|
21
21
|
.to_return(:body => {'name' => sched_name, 'start' => start.to_s}.to_json)
|
22
22
|
|
23
|
-
api.create_schedule(sched_name, opts).should == start.to_s
|
23
|
+
api.create_schedule(sched_name, opts.merge('type' => 'hive')).should == start.to_s
|
24
24
|
end
|
25
25
|
|
26
26
|
it 'should return 422 error with invalid name' do
|
27
27
|
name = '1'
|
28
28
|
err_msg = "Validation failed: Name is too short" # " (minimum is 3 characters)"
|
29
29
|
stub_api_request(:post, "/v3/schedule/create/#{e(name)}")
|
30
|
-
.with(opts.merge('type' => 'hive'))
|
30
|
+
.with(:body => opts.merge('type' => 'hive'))
|
31
31
|
.to_return(:status => 422, :body => {'message' => err_msg}.to_json)
|
32
32
|
|
33
33
|
expect {
|
34
|
-
api.create_schedule(name, opts)
|
34
|
+
api.create_schedule(name, opts.merge('type' => 'hive'))
|
35
35
|
}.to raise_error(TreasureData::APIError, /#{err_msg}/)
|
36
36
|
end
|
37
37
|
end
|
@@ -46,18 +46,17 @@ describe 'Schedule API' do
|
|
46
46
|
|
47
47
|
it 'should not return 414 even if the query text is very long' do
|
48
48
|
stub_api_request(:post, "/v3/schedule/update/#{e(sched_name)}")
|
49
|
-
.with(opts.merge('type' => 'pig'))
|
49
|
+
.with(:body => opts.merge('type' => 'pig'))
|
50
50
|
.to_return(:body => {'name' => sched_name, 'query' => pig_query}.to_json)
|
51
51
|
|
52
|
-
err_msg = "Update schedule failed: Request-URI Too Long"
|
53
52
|
expect {
|
54
|
-
api.update_schedule(sched_name, opts)
|
53
|
+
api.update_schedule(sched_name, opts.merge('type' => 'pig'))
|
55
54
|
}.not_to raise_error
|
56
55
|
end
|
57
56
|
|
58
57
|
it 'should update the schedule with the new query' do
|
59
58
|
stub_api_request(:post, "/v3/schedule/update/#{e(sched_name)}")
|
60
|
-
.with(opts.merge('type' => 'pig'))
|
59
|
+
.with(:body => opts.merge('type' => 'pig'))
|
61
60
|
.to_return(:body => {'name' => sched_name, 'query' => pig_query}.to_json)
|
62
61
|
|
63
62
|
stub_api_request(:get, "/v3/schedule/list")
|
@@ -27,7 +27,7 @@ describe 'Table API' do
|
|
27
27
|
it 'should create a new table if the database exists' do
|
28
28
|
stub_api_request(:post, "/v3/table/create/#{e db_name}/#{e(table_name)}/log")
|
29
29
|
.to_return(:body => {'database' => db_name, 'table' => table_name, 'type' => 'log'}.to_json)
|
30
|
-
api.create_log_table(db_name, table_name).should
|
30
|
+
api.create_log_table(db_name, table_name).should be true
|
31
31
|
end
|
32
32
|
|
33
33
|
it 'should return 400 error with invalid name' do
|
metadata
CHANGED
@@ -1,141 +1,141 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: td-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.66
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Treasure Data, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.4.4
|
20
|
-
- -
|
20
|
+
- - "!="
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 0.5.0
|
23
|
-
- -
|
23
|
+
- - "!="
|
24
24
|
- !ruby/object:Gem::Version
|
25
25
|
version: 0.5.1
|
26
|
-
- -
|
26
|
+
- - "!="
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
version: 0.5.2
|
29
|
-
- -
|
29
|
+
- - "!="
|
30
30
|
- !ruby/object:Gem::Version
|
31
31
|
version: 0.5.3
|
32
|
-
- - <
|
32
|
+
- - "<"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: 0.6.0
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: 0.4.4
|
42
|
-
- -
|
42
|
+
- - "!="
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: 0.5.0
|
45
|
-
- -
|
45
|
+
- - "!="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 0.5.1
|
48
|
-
- -
|
48
|
+
- - "!="
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: 0.5.2
|
51
|
-
- -
|
51
|
+
- - "!="
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: 0.5.3
|
54
|
-
- - <
|
54
|
+
- - "<"
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: 0.6.0
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: json
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- -
|
61
|
+
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: 1.7.6
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
|
-
- -
|
68
|
+
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: 1.7.6
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: httpclient
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
|
-
- - ~>
|
75
|
+
- - "~>"
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: 2.4.0
|
78
78
|
type: :runtime
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
|
-
- - ~>
|
82
|
+
- - "~>"
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: 2.4.0
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: rspec
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
|
-
- - ~>
|
89
|
+
- - "~>"
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '2.8'
|
92
92
|
type: :development
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
|
-
- - ~>
|
96
|
+
- - "~>"
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '2.8'
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: webmock
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
|
-
- - ~>
|
103
|
+
- - "~>"
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '1.16'
|
106
106
|
type: :development
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
|
-
- - ~>
|
110
|
+
- - "~>"
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: '1.16'
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: simplecov
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- -
|
117
|
+
- - ">="
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: 0.5.4
|
120
120
|
type: :development
|
121
121
|
prerelease: false
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
|
-
- -
|
124
|
+
- - ">="
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: 0.5.4
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
128
|
name: rake
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
|
-
- -
|
131
|
+
- - ">="
|
132
132
|
- !ruby/object:Gem::Version
|
133
133
|
version: '0'
|
134
134
|
type: :development
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
requirements:
|
138
|
-
- -
|
138
|
+
- - ">="
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: '0'
|
141
141
|
description: Treasure Data API library for Ruby
|
@@ -153,6 +153,7 @@ files:
|
|
153
153
|
- lib/td/client/version.rb
|
154
154
|
- spec/spec_helper.rb
|
155
155
|
- spec/td/client/api_spec.rb
|
156
|
+
- spec/td/client/api_ssl_connection_spec.rb
|
156
157
|
- spec/td/client/bulk_import_spec.rb
|
157
158
|
- spec/td/client/db_api_spec.rb
|
158
159
|
- spec/td/client/export_api_spec.rb
|
@@ -171,12 +172,12 @@ require_paths:
|
|
171
172
|
- lib
|
172
173
|
required_ruby_version: !ruby/object:Gem::Requirement
|
173
174
|
requirements:
|
174
|
-
- -
|
175
|
+
- - ">="
|
175
176
|
- !ruby/object:Gem::Version
|
176
177
|
version: '0'
|
177
178
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
179
|
requirements:
|
179
|
-
- -
|
180
|
+
- - ">="
|
180
181
|
- !ruby/object:Gem::Version
|
181
182
|
version: '0'
|
182
183
|
requirements: []
|
@@ -187,6 +188,7 @@ specification_version: 4
|
|
187
188
|
summary: Treasure Data API library for Ruby
|
188
189
|
test_files:
|
189
190
|
- spec/td/client/api_spec.rb
|
191
|
+
- spec/td/client/api_ssl_connection_spec.rb
|
190
192
|
- spec/td/client/bulk_import_spec.rb
|
191
193
|
- spec/td/client/db_api_spec.rb
|
192
194
|
- spec/td/client/export_api_spec.rb
|