td-client 0.8.59 → 0.8.60

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NGZhOTRiMDI0OGRkMmVlYzUwMTQ4NzI2YmFiNjk0YTU4YWJiMzQ2Mg==
5
+ data.tar.gz: !binary |-
6
+ ZDI0ZGRjOWNlZmI2NTEyYWM1YWRjMTUwN2QwZjFjNTAxN2NjYTgwNQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ NThlY2NhMWE2OWVhOGNiNDk5OWZlNDQ1N2MzNjQ4MDJlNTk0YjNlYWM4NWQ0
10
+ N2RkMTg3MGFjNTFkMzgzMjk5MzFiMGU4Njg3ODliNjhkZTllNjY3OTc4MDgz
11
+ ZWU2NTRkOThlOTgwNTk0MjRhZWQ4N2E5Yjk0NDQyYjdlY2Q4OTY=
12
+ data.tar.gz: !binary |-
13
+ MGJjMTExMjk2OGU2MTc0YTY3MjRiY2YxN2FkYzUzNDc2YzJkMjkzM2I4YjBj
14
+ OTlmODcxOTZmNmI4MTg4YzA4YTI0YzhlZWI2MzIyZjIxMzliOTIxY2RhYzU3
15
+ NDM4NWM5MjI3NWQ5ZDdiZjYyYWMzNGM3YjhiN2QzNDA5MjI3NTM=
data/lib/td/client/api.rb CHANGED
@@ -443,7 +443,7 @@ class API
443
443
  start_at = js['start_at']
444
444
  end_at = js['end_at']
445
445
  cpu_time = js['cpu_time']
446
- result = js['result']
446
+ result = js['result'] # result URL
447
447
  hive_result_schema = (js['hive_result_schema'] || '')
448
448
  if hive_result_schema.empty?
449
449
  hive_result_schema = nil
@@ -257,7 +257,7 @@ class Job < Model
257
257
  end
258
258
 
259
259
  attr_reader :job_id, :type, :result_url
260
- attr_reader :hive_result_schema, :priority, :retry_limit, :org_name, :db_name
260
+ attr_reader :priority, :retry_limit, :org_name, :db_name
261
261
 
262
262
  def wait(timeout=nil)
263
263
  # TODO
@@ -302,6 +302,11 @@ class Job < Model
302
302
  @cpu_time
303
303
  end
304
304
 
305
+ def hive_result_schema
306
+ update_status! unless @hive_result_schema.instance_of? Array || finished?
307
+ @hive_result_schema
308
+ end
309
+
305
310
  def result
306
311
  unless @result
307
312
  return nil unless finished?
@@ -357,13 +362,15 @@ class Job < Model
357
362
  end
358
363
 
359
364
  def update_status!
360
- type, query, status, url, debug, start_at, end_at, result_url, hive_result_schema, priority, retry_limit, org_name, db_name = @client.api.show_job(@job_id)
365
+ type, query, status, url, debug, start_at, end_at, cpu_time, result_url, hive_result_schema, priority, retry_limit, org_name, db_name = @client.api.show_job(@job_id)
361
366
  @query = query
362
367
  @status = status
363
368
  @url = url
364
369
  @debug = debug
365
370
  @start_at = start_at
366
371
  @end_at = end_at
372
+ @cpu_time = cpu_time
373
+ @result_url = result_url
367
374
  @hive_result_schema = hive_result_schema
368
375
  @priority = priority
369
376
  @retry_limit = retry_limit
@@ -1,5 +1,5 @@
1
1
  module TreasureData
2
2
  class Client
3
- VERSION = '0.8.59'
3
+ VERSION = '0.8.60'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: td-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.59
5
- prerelease:
4
+ version: 0.8.60
6
5
  platform: ruby
7
6
  authors:
8
7
  - Treasure Data, Inc.
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-04-24 00:00:00.000000000 Z
11
+ date: 2014-04-28 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: msgpack
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -37,7 +35,6 @@ dependencies:
37
35
  type: :runtime
38
36
  prerelease: false
39
37
  version_requirements: !ruby/object:Gem::Requirement
40
- none: false
41
38
  requirements:
42
39
  - - ! '>='
43
40
  - !ruby/object:Gem::Version
@@ -60,7 +57,6 @@ dependencies:
60
57
  - !ruby/object:Gem::Dependency
61
58
  name: json
62
59
  requirement: !ruby/object:Gem::Requirement
63
- none: false
64
60
  requirements:
65
61
  - - ! '>='
66
62
  - !ruby/object:Gem::Version
@@ -68,7 +64,6 @@ dependencies:
68
64
  type: :runtime
69
65
  prerelease: false
70
66
  version_requirements: !ruby/object:Gem::Requirement
71
- none: false
72
67
  requirements:
73
68
  - - ! '>='
74
69
  - !ruby/object:Gem::Version
@@ -76,7 +71,6 @@ dependencies:
76
71
  - !ruby/object:Gem::Dependency
77
72
  name: httpclient
78
73
  requirement: !ruby/object:Gem::Requirement
79
- none: false
80
74
  requirements:
81
75
  - - ~>
82
76
  - !ruby/object:Gem::Version
@@ -84,7 +78,6 @@ dependencies:
84
78
  type: :runtime
85
79
  prerelease: false
86
80
  version_requirements: !ruby/object:Gem::Requirement
87
- none: false
88
81
  requirements:
89
82
  - - ~>
90
83
  - !ruby/object:Gem::Version
@@ -92,7 +85,6 @@ dependencies:
92
85
  - !ruby/object:Gem::Dependency
93
86
  name: rspec
94
87
  requirement: !ruby/object:Gem::Requirement
95
- none: false
96
88
  requirements:
97
89
  - - ~>
98
90
  - !ruby/object:Gem::Version
@@ -100,7 +92,6 @@ dependencies:
100
92
  type: :development
101
93
  prerelease: false
102
94
  version_requirements: !ruby/object:Gem::Requirement
103
- none: false
104
95
  requirements:
105
96
  - - ~>
106
97
  - !ruby/object:Gem::Version
@@ -108,7 +99,6 @@ dependencies:
108
99
  - !ruby/object:Gem::Dependency
109
100
  name: webmock
110
101
  requirement: !ruby/object:Gem::Requirement
111
- none: false
112
102
  requirements:
113
103
  - - ~>
114
104
  - !ruby/object:Gem::Version
@@ -116,7 +106,6 @@ dependencies:
116
106
  type: :development
117
107
  prerelease: false
118
108
  version_requirements: !ruby/object:Gem::Requirement
119
- none: false
120
109
  requirements:
121
110
  - - ~>
122
111
  - !ruby/object:Gem::Version
@@ -124,7 +113,6 @@ dependencies:
124
113
  - !ruby/object:Gem::Dependency
125
114
  name: simplecov
126
115
  requirement: !ruby/object:Gem::Requirement
127
- none: false
128
116
  requirements:
129
117
  - - ! '>='
130
118
  - !ruby/object:Gem::Version
@@ -132,7 +120,6 @@ dependencies:
132
120
  type: :development
133
121
  prerelease: false
134
122
  version_requirements: !ruby/object:Gem::Requirement
135
- none: false
136
123
  requirements:
137
124
  - - ! '>='
138
125
  - !ruby/object:Gem::Version
@@ -140,7 +127,6 @@ dependencies:
140
127
  - !ruby/object:Gem::Dependency
141
128
  name: rake
142
129
  requirement: !ruby/object:Gem::Requirement
143
- none: false
144
130
  requirements:
145
131
  - - ! '>='
146
132
  - !ruby/object:Gem::Version
@@ -148,7 +134,6 @@ dependencies:
148
134
  type: :development
149
135
  prerelease: false
150
136
  version_requirements: !ruby/object:Gem::Requirement
151
- none: false
152
137
  requirements:
153
138
  - - ! '>='
154
139
  - !ruby/object:Gem::Version
@@ -159,13 +144,13 @@ executables: []
159
144
  extensions: []
160
145
  extra_rdoc_files: []
161
146
  files:
147
+ - data/ca-bundle.crt
148
+ - lib/td-client.rb
149
+ - lib/td/client.rb
162
150
  - lib/td/client/api.rb
163
151
  - lib/td/client/compat_gzip_reader.rb
164
152
  - lib/td/client/model.rb
165
153
  - lib/td/client/version.rb
166
- - lib/td/client.rb
167
- - lib/td-client.rb
168
- - data/ca-bundle.crt
169
154
  - spec/api_spec.rb
170
155
  - spec/spec_helper.rb
171
156
  - spec/td/client/api_spec.rb
@@ -179,33 +164,26 @@ files:
179
164
  - spec/td/client/spec_resources.rb
180
165
  homepage: http://treasuredata.com/
181
166
  licenses: []
167
+ metadata: {}
182
168
  post_install_message:
183
169
  rdoc_options: []
184
170
  require_paths:
185
171
  - lib
186
172
  required_ruby_version: !ruby/object:Gem::Requirement
187
- none: false
188
173
  requirements:
189
174
  - - ! '>='
190
175
  - !ruby/object:Gem::Version
191
176
  version: '0'
192
- segments:
193
- - 0
194
- hash: 1351627692478107055
195
177
  required_rubygems_version: !ruby/object:Gem::Requirement
196
- none: false
197
178
  requirements:
198
179
  - - ! '>='
199
180
  - !ruby/object:Gem::Version
200
181
  version: '0'
201
- segments:
202
- - 0
203
- hash: 1351627692478107055
204
182
  requirements: []
205
183
  rubyforge_project:
206
- rubygems_version: 1.8.23
184
+ rubygems_version: 2.2.2
207
185
  signing_key:
208
- specification_version: 3
186
+ specification_version: 4
209
187
  summary: Treasure Data API library for Ruby
210
188
  test_files:
211
189
  - spec/api_spec.rb