td-client 0.8.68 → 0.8.69
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/td/client.rb +250 -57
- data/lib/td/client/api.rb +125 -7
- data/lib/td/client/api/access_control.rb +14 -2
- data/lib/td/client/api/account.rb +4 -0
- data/lib/td/client/api/bulk_import.rb +41 -11
- data/lib/td/client/api/bulk_load.rb +205 -0
- data/lib/td/client/api/database.rb +6 -3
- data/lib/td/client/api/export.rb +5 -0
- data/lib/td/client/api/import.rb +7 -1
- data/lib/td/client/api/job.rb +49 -5
- data/lib/td/client/api/partial_delete.rb +6 -0
- data/lib/td/client/api/result.rb +7 -2
- data/lib/td/client/api/schedule.rb +17 -3
- data/lib/td/client/api/server_status.rb +1 -0
- data/lib/td/client/api/table.rb +41 -6
- data/lib/td/client/api/to_hash_struct.rb +82 -0
- data/lib/td/client/api/user.rb +27 -10
- data/lib/td/client/compat_gzip_reader.rb +3 -0
- data/lib/td/client/model.rb +209 -0
- data/lib/td/client/version.rb +1 -1
- data/spec/spec_helper.rb +14 -6
- data/spec/td/client/bulk_load_spec.rb +358 -0
- data/spec/td/client/job_api_spec.rb +10 -8
- data/spec/td/client_sched_spec.rb +1 -1
- metadata +96 -35
data/lib/td/client/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,13 +1,21 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
begin
|
4
|
+
if defined?(:RUBY_ENGINE) && RUBY_ENGINE == 'ruby'
|
5
|
+
# SimpleCov officially supports MRI 1.9+ only for now
|
6
|
+
# https://github.com/colszowka/simplecov#ruby-version-compatibility
|
7
|
+
|
5
8
|
require 'simplecov'
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
9
|
+
require 'coveralls'
|
10
|
+
|
11
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
12
|
+
SimpleCov::Formatter::HTMLFormatter,
|
13
|
+
Coveralls::SimpleCov::Formatter
|
14
|
+
]
|
15
|
+
SimpleCov.start("test_frameworks")
|
10
16
|
end
|
17
|
+
rescue NameError
|
18
|
+
# skip measuring coverage at Ruby 1.8
|
11
19
|
end
|
12
20
|
|
13
21
|
require 'rspec'
|
@@ -0,0 +1,358 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'td/client/spec_resources'
|
3
|
+
require 'tempfile'
|
4
|
+
|
5
|
+
describe 'BulkImport API' do
|
6
|
+
include_context 'spec symbols'
|
7
|
+
include_context 'common helper'
|
8
|
+
|
9
|
+
let :api do
|
10
|
+
Client.new(nil, {:max_cumul_retry_delay => -1})
|
11
|
+
end
|
12
|
+
|
13
|
+
let :retry_api do
|
14
|
+
API.new(nil, {:retry_delay => 1, :max_cumul_retry_delay => 1})
|
15
|
+
end
|
16
|
+
|
17
|
+
let :original_config do
|
18
|
+
{
|
19
|
+
:config => {
|
20
|
+
:type => "s3_file",
|
21
|
+
:access_key_id => "key",
|
22
|
+
:secret_access_key => "secret",
|
23
|
+
:endpoint => "s3.amazonaws.com",
|
24
|
+
:bucket => "td-bulk-loader-test-tokyo",
|
25
|
+
:path_prefix => "in/nahi/sample"
|
26
|
+
}
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
let :guessed_config do
|
31
|
+
{
|
32
|
+
"config" => {
|
33
|
+
"type" => "s3_file",
|
34
|
+
"access_key_id" => "key",
|
35
|
+
"secret_access_key" => "secret",
|
36
|
+
"endpoint" => "s3.amazonaws.com",
|
37
|
+
"bucket" => "td-bulk-loader-test-tokyo",
|
38
|
+
"path_prefix" => "in/nahi/sample",
|
39
|
+
"parser" => {
|
40
|
+
"charset" => "UTF-8",
|
41
|
+
"newline" => "LF",
|
42
|
+
"type" => "csv",
|
43
|
+
"delimiter" => ",",
|
44
|
+
"header_line" => false,
|
45
|
+
"columns" => [
|
46
|
+
{"name" => "time", "type" => "long"},
|
47
|
+
{"name" => "c1", "type" => "long"},
|
48
|
+
{"name" => "c2", "type" => "string"},
|
49
|
+
{"name" => "c3", "type" => "string"},
|
50
|
+
]
|
51
|
+
},
|
52
|
+
"decoders" => [
|
53
|
+
{"type" => "gzip"}
|
54
|
+
]
|
55
|
+
}
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
let :preview_result do
|
60
|
+
{
|
61
|
+
"schema" => [
|
62
|
+
{"index" => 0, "name" => "c0", "type" => "string"},
|
63
|
+
{"index" => 1, "name" => "c1", "type" => "long"},
|
64
|
+
{"index" => 2, "name" => "c2", "type" => "string"},
|
65
|
+
{"index" => 3, "name" => "c3", "type" => "string"}
|
66
|
+
],
|
67
|
+
"records" => [
|
68
|
+
["19920116", 32864, "06612", "00195"],
|
69
|
+
["19910729", 14824, "07706", "00058"],
|
70
|
+
["19950708", 27559, "03244", "00034"],
|
71
|
+
["19931010", 11270, "03459", "00159"],
|
72
|
+
["19981117", 20461, "01409", "00128"],
|
73
|
+
["19981117", 20461, "00203", "00128"],
|
74
|
+
["19930108", 44402, "01489", "00001"],
|
75
|
+
["19960104", 16528, "04848", "00184"],
|
76
|
+
["19960104", 16528, "01766", "00184"],
|
77
|
+
["19881022", 26114, "06960", "00175"]
|
78
|
+
]
|
79
|
+
}
|
80
|
+
end
|
81
|
+
|
82
|
+
let :bulk_load_session do
|
83
|
+
guessed_config.dup.merge(
|
84
|
+
{
|
85
|
+
"name" => "nahi_test_1",
|
86
|
+
"cron" => "@daily",
|
87
|
+
"timezone" => "Asia/Tokyo",
|
88
|
+
"delay" => 3600
|
89
|
+
}
|
90
|
+
)
|
91
|
+
end
|
92
|
+
|
93
|
+
let :bulk_load_job do
|
94
|
+
guessed_config.dup.merge(
|
95
|
+
{
|
96
|
+
"job_id" => 123456,
|
97
|
+
"account_id" => 1,
|
98
|
+
"status" => "success",
|
99
|
+
"records" => 10,
|
100
|
+
"schema" => [["c0", "string", ""], ["c1", "long", ""], ["c2", "string", ""], ["c3", "string", ""]],
|
101
|
+
"database" => {"id" => 189263, "name" => "nahidb"},
|
102
|
+
"table" => {"id" => 176281, "name" => "bulkload_import_test"},
|
103
|
+
"created_at" => 1426738133,
|
104
|
+
"updated_at" => 1426738145,
|
105
|
+
"start_at" => 1426738134,
|
106
|
+
"end_at" => 1426738144
|
107
|
+
}
|
108
|
+
)
|
109
|
+
end
|
110
|
+
|
111
|
+
describe 'guess' do
|
112
|
+
it 'returns guessed json' do
|
113
|
+
stub_api_request(:post, '/v3/bulk_loads/guess').
|
114
|
+
with(:body => original_config.to_json).
|
115
|
+
to_return(:body => guessed_config.to_json)
|
116
|
+
api.bulk_load_guess(
|
117
|
+
TreasureData::API::BulkLoad::BulkLoad.from_hash(original_config)
|
118
|
+
).to_h.should == guessed_config
|
119
|
+
end
|
120
|
+
|
121
|
+
it 'raises an error' do
|
122
|
+
stub_api_request(:post, '/v3/bulk_loads/guess').
|
123
|
+
with(:body => original_config.to_json).
|
124
|
+
to_return(:status => 500, :body => guessed_config.to_json)
|
125
|
+
expect {
|
126
|
+
api.bulk_load_guess(
|
127
|
+
TreasureData::API::BulkLoad::BulkLoad.from_hash(original_config)
|
128
|
+
)
|
129
|
+
}.to raise_error(TreasureData::APIError)
|
130
|
+
end
|
131
|
+
|
132
|
+
it 'raises on validation error' do
|
133
|
+
config = TreasureData::API::BulkLoad::BulkLoad.from_hash({})
|
134
|
+
expect {
|
135
|
+
api.bulk_load_guess(config)
|
136
|
+
}.to raise_error(ArgumentError)
|
137
|
+
end
|
138
|
+
|
139
|
+
it 'raises on nested validation error' do
|
140
|
+
config = TreasureData::API::BulkLoad::BulkLoad.from_hash(original_config)
|
141
|
+
config.config.type = nil
|
142
|
+
expect {
|
143
|
+
api.bulk_load_guess(config)
|
144
|
+
}.to raise_error(ArgumentError)
|
145
|
+
end
|
146
|
+
|
147
|
+
it 'perform redo on 500 error' do
|
148
|
+
stub_api_request(:post, '/v3/bulk_loads/guess').
|
149
|
+
with(:body => original_config.to_json).
|
150
|
+
to_return(:status => 500, :body => guessed_config.to_json)
|
151
|
+
begin
|
152
|
+
retry_api.bulk_load_guess(
|
153
|
+
TreasureData::API::BulkLoad::BulkLoad.from_hash(original_config)
|
154
|
+
).should != nil
|
155
|
+
rescue TreasureData::APIError => e
|
156
|
+
e.message.should =~ /^500: BulkLoad configuration guess failed/
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
it 'perform retries on connection failure' do
|
161
|
+
api = retry_api
|
162
|
+
api.instance_eval { @api }.stub(:post).and_raise(SocketError.new('>>'))
|
163
|
+
begin
|
164
|
+
retry_api.bulk_load_guess(
|
165
|
+
TreasureData::API::BulkLoad::BulkLoad.from_hash(original_config)
|
166
|
+
)
|
167
|
+
rescue SocketError => e
|
168
|
+
e.message.should == '>> (Retried 1 times in 1 seconds)'
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
describe 'preview' do
|
174
|
+
it 'returns preview json' do
|
175
|
+
stub_api_request(:post, '/v3/bulk_loads/preview').
|
176
|
+
with(:body => guessed_config.to_json).
|
177
|
+
to_return(:body => preview_result.to_json)
|
178
|
+
api.bulk_load_preview(
|
179
|
+
TreasureData::API::BulkLoad::BulkLoad.from_hash(guessed_config)
|
180
|
+
).to_h.should == preview_result
|
181
|
+
end
|
182
|
+
|
183
|
+
it 'raises an error' do
|
184
|
+
stub_api_request(:post, '/v3/bulk_loads/preview').
|
185
|
+
with(:body => guessed_config.to_json).
|
186
|
+
to_return(:status => 500, :body => preview_result.to_json)
|
187
|
+
expect {
|
188
|
+
api.bulk_load_preview(
|
189
|
+
TreasureData::API::BulkLoad::BulkLoad.from_hash(guessed_config)
|
190
|
+
)
|
191
|
+
}.to raise_error(TreasureData::APIError)
|
192
|
+
end
|
193
|
+
|
194
|
+
it 'raises on validation error' do
|
195
|
+
config = TreasureData::API::BulkLoad::BulkLoad.from_hash({})
|
196
|
+
expect {
|
197
|
+
api.bulk_load_preview(config)
|
198
|
+
}.to raise_error(ArgumentError)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
describe 'issue' do
|
203
|
+
it 'returns job id' do
|
204
|
+
expected_request = guessed_config.dup
|
205
|
+
expected_request['database'] = 'database'
|
206
|
+
expected_request['table'] = 'table'
|
207
|
+
stub_api_request(:post, '/v3/job/issue/bulkload/database').
|
208
|
+
with(:body => expected_request.to_json).
|
209
|
+
to_return(:body => {'job_id' => 12345}.to_json)
|
210
|
+
api.bulk_load_issue(
|
211
|
+
'database',
|
212
|
+
'table',
|
213
|
+
TreasureData::API::BulkLoad::BulkLoad.from_hash(guessed_config)
|
214
|
+
).should == '12345'
|
215
|
+
end
|
216
|
+
|
217
|
+
it 'raises on validation error' do
|
218
|
+
config = TreasureData::API::BulkLoad::BulkLoad.from_hash({})
|
219
|
+
expect {
|
220
|
+
api.bulk_load_issue(config)
|
221
|
+
}.to raise_error(ArgumentError)
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
describe 'list' do
|
226
|
+
it 'returns BulkLoadSession' do
|
227
|
+
stub_api_request(:get, '/v3/bulk_loads').
|
228
|
+
to_return(:body => [bulk_load_session, bulk_load_session].to_json)
|
229
|
+
result = api.bulk_load_list
|
230
|
+
result.size.should == 2
|
231
|
+
result.first.to_h.should == bulk_load_session
|
232
|
+
end
|
233
|
+
|
234
|
+
it 'returns empty' do
|
235
|
+
stub_api_request(:get, '/v3/bulk_loads').
|
236
|
+
to_return(:body => [].to_json)
|
237
|
+
api.bulk_load_list.size.should == 0
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
describe 'create' do
|
242
|
+
it 'returns registered bulk_load_session' do
|
243
|
+
expected_request = guessed_config.dup
|
244
|
+
expected_request['name'] = 'nahi_test_1'
|
245
|
+
expected_request['cron'] = '@daily'
|
246
|
+
expected_request['timezone'] = 'Asia/Tokyo'
|
247
|
+
expected_request['delay'] = 3600
|
248
|
+
expected_request['database'] = 'database'
|
249
|
+
expected_request['table'] = 'table'
|
250
|
+
stub_api_request(:post, '/v3/bulk_loads').
|
251
|
+
with(:body => expected_request.to_json).
|
252
|
+
to_return(:body => bulk_load_session.to_json)
|
253
|
+
api.bulk_load_create(
|
254
|
+
'nahi_test_1',
|
255
|
+
'database',
|
256
|
+
'table',
|
257
|
+
TreasureData::API::BulkLoad::BulkLoad.from_hash(guessed_config),
|
258
|
+
{
|
259
|
+
cron: '@daily',
|
260
|
+
timezone: 'Asia/Tokyo',
|
261
|
+
delay: 3600
|
262
|
+
}
|
263
|
+
).to_h.should == bulk_load_session
|
264
|
+
end
|
265
|
+
|
266
|
+
it 'accepts empty option' do
|
267
|
+
expected_request = guessed_config.dup
|
268
|
+
expected_request['name'] = 'nahi_test_1'
|
269
|
+
expected_request['database'] = 'database'
|
270
|
+
expected_request['table'] = 'table'
|
271
|
+
stub_api_request(:post, '/v3/bulk_loads').
|
272
|
+
with(:body => expected_request.to_json).
|
273
|
+
to_return(:body => bulk_load_session.to_json)
|
274
|
+
api.bulk_load_create(
|
275
|
+
'nahi_test_1',
|
276
|
+
'database',
|
277
|
+
'table',
|
278
|
+
TreasureData::API::BulkLoad::BulkLoad.from_hash(guessed_config)
|
279
|
+
).to_h.should == bulk_load_session
|
280
|
+
end
|
281
|
+
|
282
|
+
it 'accepts time_column option' do
|
283
|
+
expected_request = guessed_config.dup
|
284
|
+
expected_request['name'] = 'nahi_test_1'
|
285
|
+
expected_request['time_column'] = 'c0'
|
286
|
+
expected_request['database'] = 'database'
|
287
|
+
expected_request['table'] = 'table'
|
288
|
+
stub_api_request(:post, '/v3/bulk_loads').
|
289
|
+
with(:body => expected_request.to_json).
|
290
|
+
to_return(:body => bulk_load_session.to_json)
|
291
|
+
api.bulk_load_create(
|
292
|
+
'nahi_test_1',
|
293
|
+
'database',
|
294
|
+
'table',
|
295
|
+
TreasureData::API::BulkLoad::BulkLoad.from_hash(guessed_config),
|
296
|
+
{
|
297
|
+
time_column: 'c0'
|
298
|
+
}
|
299
|
+
).to_h.should == bulk_load_session
|
300
|
+
end
|
301
|
+
end
|
302
|
+
|
303
|
+
describe 'show' do
|
304
|
+
it 'returns bulk_load_session' do
|
305
|
+
stub_api_request(:get, '/v3/bulk_loads/nahi_test_1').
|
306
|
+
to_return(:body => bulk_load_session.to_json)
|
307
|
+
api.bulk_load_show('nahi_test_1').to_h.should == bulk_load_session
|
308
|
+
end
|
309
|
+
end
|
310
|
+
|
311
|
+
describe 'update' do
|
312
|
+
it 'returns updated bulk_load_session' do
|
313
|
+
stub_api_request(:put, '/v3/bulk_loads/nahi_test_1').
|
314
|
+
with(:body => bulk_load_session.to_json).
|
315
|
+
to_return(:body => bulk_load_session.to_json)
|
316
|
+
api.bulk_load_update(
|
317
|
+
'nahi_test_1',
|
318
|
+
TreasureData::API::BulkLoad::BulkLoad.from_hash(bulk_load_session)
|
319
|
+
).to_h.should == bulk_load_session
|
320
|
+
end
|
321
|
+
end
|
322
|
+
|
323
|
+
describe 'delete' do
|
324
|
+
it 'returns updated bulk_load_session' do
|
325
|
+
stub_api_request(:delete, '/v3/bulk_loads/nahi_test_1').
|
326
|
+
to_return(:body => bulk_load_session.to_json)
|
327
|
+
api.bulk_load_delete('nahi_test_1').to_h.should == bulk_load_session
|
328
|
+
end
|
329
|
+
end
|
330
|
+
|
331
|
+
describe 'history' do
|
332
|
+
it 'returns list of jobs' do
|
333
|
+
stub_api_request(:get, '/v3/bulk_loads/nahi_test_1/jobs').
|
334
|
+
to_return(:body => [bulk_load_job, bulk_load_job].to_json)
|
335
|
+
result = api.bulk_load_history('nahi_test_1')
|
336
|
+
result.size.should == 2
|
337
|
+
result.first.to_h.should == bulk_load_job
|
338
|
+
end
|
339
|
+
end
|
340
|
+
|
341
|
+
describe 'run' do
|
342
|
+
it 'returns job_id' do
|
343
|
+
stub_api_request(:post, '/v3/bulk_loads/nahi_test_1/jobs').
|
344
|
+
with(:body => '').
|
345
|
+
to_return(:body => {'job_id' => 12345}.to_json)
|
346
|
+
api.bulk_load_run('nahi_test_1').should == '12345'
|
347
|
+
end
|
348
|
+
|
349
|
+
it 'accepts scheduled_time' do
|
350
|
+
now = Time.now.to_i
|
351
|
+
stub_api_request(:post, '/v3/bulk_loads/nahi_test_1/jobs').
|
352
|
+
with(:body => "scheduled_time=#{now}").
|
353
|
+
to_return(:body => {'job_id' => 12345}.to_json)
|
354
|
+
api.bulk_load_run('nahi_test_1', now).should == '12345'
|
355
|
+
end
|
356
|
+
end
|
357
|
+
|
358
|
+
end
|
@@ -241,14 +241,16 @@ describe 'Job API' do
|
|
241
241
|
|
242
242
|
describe 'job_result_each_with_compr_size' do
|
243
243
|
let :packed do
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
244
|
+
# Hard code fixture data to make the size stable
|
245
|
+
# s = StringIO.new
|
246
|
+
# Zlib::GzipWriter.wrap(s) do |f|
|
247
|
+
# pk = MessagePack::Packer.new(f)
|
248
|
+
# pk.write('hello')
|
249
|
+
# pk.write('world')
|
250
|
+
# pk.flush
|
251
|
+
# end
|
252
|
+
# s.string
|
253
|
+
"\u001F\x8B\b\u0000#\xA1\x93T\u0000\u0003[\x9A\x91\x9A\x93\x93\xBF\xB4<\xBF('\u0005\u0000e 0\xB3\f\u0000\u0000\u0000"
|
252
254
|
end
|
253
255
|
|
254
256
|
it 'yields job result for each row with progress' do
|
@@ -33,7 +33,7 @@ describe 'Schedule Command' do
|
|
33
33
|
to_return(:body => {'count' => 1, 'history' => [h]}.to_json)
|
34
34
|
|
35
35
|
client.history(sched_name, 0, 19).each do |scheduled_job|
|
36
|
-
scheduled_job.scheduled_at.xmlschema.should == '2015-02-17T14:16:00+09:00'
|
36
|
+
scheduled_job.scheduled_at.xmlschema.should == Time.parse('2015-02-17T14:16:00+09:00').xmlschema #avoid depending on CI's Locale
|
37
37
|
scheduled_job.job_id.should == 'job_id'
|
38
38
|
scheduled_job.status.should == 'status'
|
39
39
|
scheduled_job.priority.should == 'priority'
|
metadata
CHANGED
@@ -1,147 +1,203 @@
|
|
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.69
|
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: 2015-
|
11
|
+
date: 2015-04-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
|
+
- - "<"
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: 2.6.0
|
81
81
|
type: :runtime
|
82
82
|
prerelease: false
|
83
83
|
version_requirements: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
|
-
- -
|
85
|
+
- - ">="
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: 2.4.0
|
88
|
-
- - <
|
88
|
+
- - "<"
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: 2.6.0
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rspec
|
93
93
|
requirement: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- - ~>
|
95
|
+
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '2.8'
|
98
98
|
type: :development
|
99
99
|
prerelease: false
|
100
100
|
version_requirements: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- - ~>
|
102
|
+
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '2.8'
|
105
|
+
- !ruby/object:Gem::Dependency
|
106
|
+
name: mime-types
|
107
|
+
requirement: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - '='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '1.25'
|
112
|
+
type: :development
|
113
|
+
prerelease: false
|
114
|
+
version_requirements: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - '='
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '1.25'
|
119
|
+
- !ruby/object:Gem::Dependency
|
120
|
+
name: rest-client
|
121
|
+
requirement: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - '='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 1.6.8
|
126
|
+
type: :development
|
127
|
+
prerelease: false
|
128
|
+
version_requirements: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - '='
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: 1.6.8
|
133
|
+
- !ruby/object:Gem::Dependency
|
134
|
+
name: coveralls
|
135
|
+
requirement: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
type: :development
|
141
|
+
prerelease: false
|
142
|
+
version_requirements: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
105
147
|
- !ruby/object:Gem::Dependency
|
106
148
|
name: webmock
|
107
149
|
requirement: !ruby/object:Gem::Requirement
|
108
150
|
requirements:
|
109
|
-
- - ~>
|
151
|
+
- - "~>"
|
110
152
|
- !ruby/object:Gem::Version
|
111
153
|
version: '1.16'
|
112
154
|
type: :development
|
113
155
|
prerelease: false
|
114
156
|
version_requirements: !ruby/object:Gem::Requirement
|
115
157
|
requirements:
|
116
|
-
- - ~>
|
158
|
+
- - "~>"
|
117
159
|
- !ruby/object:Gem::Version
|
118
160
|
version: '1.16'
|
119
161
|
- !ruby/object:Gem::Dependency
|
120
162
|
name: simplecov
|
121
163
|
requirement: !ruby/object:Gem::Requirement
|
122
164
|
requirements:
|
123
|
-
- -
|
165
|
+
- - ">="
|
124
166
|
- !ruby/object:Gem::Version
|
125
167
|
version: 0.5.4
|
126
168
|
type: :development
|
127
169
|
prerelease: false
|
128
170
|
version_requirements: !ruby/object:Gem::Requirement
|
129
171
|
requirements:
|
130
|
-
- -
|
172
|
+
- - ">="
|
131
173
|
- !ruby/object:Gem::Version
|
132
174
|
version: 0.5.4
|
133
175
|
- !ruby/object:Gem::Dependency
|
134
176
|
name: rake
|
135
177
|
requirement: !ruby/object:Gem::Requirement
|
136
178
|
requirements:
|
137
|
-
- -
|
179
|
+
- - ">="
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
182
|
+
type: :development
|
183
|
+
prerelease: false
|
184
|
+
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - ">="
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '0'
|
189
|
+
- !ruby/object:Gem::Dependency
|
190
|
+
name: yard
|
191
|
+
requirement: !ruby/object:Gem::Requirement
|
192
|
+
requirements:
|
193
|
+
- - ">="
|
138
194
|
- !ruby/object:Gem::Version
|
139
195
|
version: '0'
|
140
196
|
type: :development
|
141
197
|
prerelease: false
|
142
198
|
version_requirements: !ruby/object:Gem::Requirement
|
143
199
|
requirements:
|
144
|
-
- -
|
200
|
+
- - ">="
|
145
201
|
- !ruby/object:Gem::Version
|
146
202
|
version: '0'
|
147
203
|
description: Treasure Data API library for Ruby
|
@@ -150,9 +206,14 @@ executables: []
|
|
150
206
|
extensions: []
|
151
207
|
extra_rdoc_files: []
|
152
208
|
files:
|
209
|
+
- data/ca-bundle.crt
|
210
|
+
- lib/td-client.rb
|
211
|
+
- lib/td/client.rb
|
212
|
+
- lib/td/client/api.rb
|
153
213
|
- lib/td/client/api/access_control.rb
|
154
214
|
- lib/td/client/api/account.rb
|
155
215
|
- lib/td/client/api/bulk_import.rb
|
216
|
+
- lib/td/client/api/bulk_load.rb
|
156
217
|
- lib/td/client/api/database.rb
|
157
218
|
- lib/td/client/api/export.rb
|
158
219
|
- lib/td/client/api/import.rb
|
@@ -162,22 +223,20 @@ files:
|
|
162
223
|
- lib/td/client/api/schedule.rb
|
163
224
|
- lib/td/client/api/server_status.rb
|
164
225
|
- lib/td/client/api/table.rb
|
226
|
+
- lib/td/client/api/to_hash_struct.rb
|
165
227
|
- lib/td/client/api/user.rb
|
166
|
-
- lib/td/client/api.rb
|
167
228
|
- lib/td/client/api_error.rb
|
168
229
|
- lib/td/client/compat_gzip_reader.rb
|
169
230
|
- lib/td/client/model.rb
|
170
231
|
- lib/td/client/version.rb
|
171
|
-
- lib/td/client.rb
|
172
232
|
- lib/td/core_ext/openssl/ssl/sslcontext/set_params.rb
|
173
|
-
- lib/td-client.rb
|
174
|
-
- data/ca-bundle.crt
|
175
233
|
- spec/spec_helper.rb
|
176
234
|
- spec/td/client/access_control_api_spec.rb
|
177
235
|
- spec/td/client/account_api_spec.rb
|
178
236
|
- spec/td/client/api_spec.rb
|
179
237
|
- spec/td/client/api_ssl_connection_spec.rb
|
180
238
|
- spec/td/client/bulk_import_spec.rb
|
239
|
+
- spec/td/client/bulk_load_spec.rb
|
181
240
|
- spec/td/client/db_api_spec.rb
|
182
241
|
- spec/td/client/export_api_spec.rb
|
183
242
|
- spec/td/client/import_api_spec.rb
|
@@ -199,17 +258,17 @@ require_paths:
|
|
199
258
|
- lib
|
200
259
|
required_ruby_version: !ruby/object:Gem::Requirement
|
201
260
|
requirements:
|
202
|
-
- -
|
261
|
+
- - ">="
|
203
262
|
- !ruby/object:Gem::Version
|
204
263
|
version: '0'
|
205
264
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
265
|
requirements:
|
207
|
-
- -
|
266
|
+
- - ">="
|
208
267
|
- !ruby/object:Gem::Version
|
209
268
|
version: '0'
|
210
269
|
requirements: []
|
211
270
|
rubyforge_project:
|
212
|
-
rubygems_version: 2.
|
271
|
+
rubygems_version: 2.2.2
|
213
272
|
signing_key:
|
214
273
|
specification_version: 4
|
215
274
|
summary: Treasure Data API library for Ruby
|
@@ -219,6 +278,7 @@ test_files:
|
|
219
278
|
- spec/td/client/api_spec.rb
|
220
279
|
- spec/td/client/api_ssl_connection_spec.rb
|
221
280
|
- spec/td/client/bulk_import_spec.rb
|
281
|
+
- spec/td/client/bulk_load_spec.rb
|
222
282
|
- spec/td/client/db_api_spec.rb
|
223
283
|
- spec/td/client/export_api_spec.rb
|
224
284
|
- spec/td/client/import_api_spec.rb
|
@@ -230,3 +290,4 @@ test_files:
|
|
230
290
|
- spec/td/client/table_api_spec.rb
|
231
291
|
- spec/td/client/user_api_spec.rb
|
232
292
|
- spec/td/client_sched_spec.rb
|
293
|
+
has_rdoc: false
|