kura 0.2.11 → 0.2.12

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: 21bc7162d31e2dbf76656f90c3d69db812c7d8aa
4
- data.tar.gz: d6f21b718169fb247c0a243ec49d8408b2ba4788
3
+ metadata.gz: 1b7c812e214cec783cacf7fe58f768069b3f7a5b
4
+ data.tar.gz: 489c5f2a69ae4fe658810145c94e4005f116286d
5
5
  SHA512:
6
- metadata.gz: 378a26e155f0acf77dc400e6baed0866dabafec76cebf5b85cc8ca3e089d3dabf491f1b983a324425d58261895bcc34e8ee9fc4af1152e15af8298b4ea64dfca
7
- data.tar.gz: 396bc763df427fcd9e29cd8991f38cc92740d189d16d16ada211497ddf858b9eb5c7b6d1673e088fdaa44a2881ff7cddf66f98c1c1f2f7fdcd065d93d2c3d651
6
+ metadata.gz: 25710128d223c775bf800d4158759964f11b2fd9e3bdb173044f1cb8663775bb57661023e9ba9450f88b1e5eae29decb5ba2106bdfbcd9c70c22d65af1ab6920
7
+ data.tar.gz: c0e012b961c124c99f0bd0bb0c087bd9b544db6b6f5c3522f0beebd87054ec84d57f793d03df33647c0438724b03baa257d8ef292cd1e0ecdcb62f984dca4a56
data/ChangeLog.md CHANGED
@@ -1,3 +1,13 @@
1
+ # 0.2.12
2
+
3
+ ## Enhancements
4
+
5
+ * Support job APIs in batch requests.
6
+ Until now load/query/extract/copy methods reiceived block to be yielded when
7
+ the keyword argument :wait was specified and polling every second.
8
+ In batch request (in block of Kura::Client#batch), you cannot specified :wait
9
+ keyword argument and block will be yielded when batch response are passed.
10
+
1
11
  # 0.2.11
2
12
 
3
13
  ## Enhancements
data/lib/kura/client.rb CHANGED
@@ -299,12 +299,23 @@ module Kura
299
299
  job_object.job_reference.project_id = project_id
300
300
  job_object.job_reference.job_id = job_id
301
301
  end
302
- job = @api.insert_job(project_id, job_object, upload_source: media)
303
- job.kura_api = self
304
302
  if wait
303
+ job = @api.insert_job(project_id, job_object, upload_source: media)
304
+ job.kura_api = self
305
305
  wait_job(job, wait, &blk)
306
306
  else
307
- job
307
+ if blk
308
+ @api.insert_job(project_id, job_object, upload_source: media) do |r, err|
309
+ if r
310
+ r.kura_api = self
311
+ end
312
+ blk.call(r, err)
313
+ end
314
+ else
315
+ job = @api.insert_job(project_id, job_object, upload_source: media)
316
+ job.kura_api = self
317
+ job
318
+ end
308
319
  end
309
320
  rescue
310
321
  process_error($!)
data/lib/kura/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kura
2
- VERSION = "0.2.11"
2
+ VERSION = "0.2.12"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kura
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chikanaga Tomoyuki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-02 00:00:00.000000000 Z
11
+ date: 2016-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client