kura 0.2.33 → 0.3.0

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
- SHA1:
3
- metadata.gz: d2895108aa1d3573e121679c82f7748271467ba7
4
- data.tar.gz: d232b7024ec49f5991685f3fe6fc8c23132c6c4e
2
+ SHA256:
3
+ metadata.gz: 26b74b2d5b3f3a62af67cd8f33fda5418dac09c02f32e0f8ecfdce26ccccda9c
4
+ data.tar.gz: a93854b4c824c5d4215ae0dcfa39292a4a09ff34518415893ca6056e42503c04
5
5
  SHA512:
6
- metadata.gz: 7785fb1520b95edcecaa0f218a97b53f97825f5f373219c6cc005a433916e1891714bae6ebc6e0816f1844f283aeb0955f9a3032333fa02d4185dd4b5ada07af
7
- data.tar.gz: fe83f196ba036c225d1c10f4cc557ea88deda4559f4b174b2c6d797eecf4ab4c5ec23b977d67facc6722462174f684e96e0c2c7482be0e6067c60199763d24b3
6
+ metadata.gz: f196e24d33c2421d57efb3d76f51975fac64540be475aa1c3f364287370bbcbc268f59eb8f498ff85de5d17fd0ef11037679fd3ce73c4af1da285f895eae6d02
7
+ data.tar.gz: 40ee5ccca20fb9882d09786ce78096034d3b6ae3fc9bfa3cfe926dfefe9c149b3bed382002e3f82f4119775d2d603ebfe8f63f87285b59fb73c2852ce3670f47
@@ -1,4 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.2
4
- before_install: gem install bundler -v 1.10.5
3
+ - 2.5.5
4
+ - 2.6.3
5
+ before_install: gem install bundler -v 1.17.1
@@ -1,3 +1,13 @@
1
+ # 0.3.0
2
+
3
+ ## Enhancements
4
+
5
+ * Support [Models API](https://cloud.google.com/bigquery/docs/reference/rest/v2/models) to manipulate BigQuery ML models.
6
+
7
+ ## Changes
8
+
9
+ * Update version dependency of google-api-client.gem to support BigQuery Models API.
10
+
1
11
  # 0.2.33
2
12
 
3
13
  ## Fixes
@@ -22,10 +22,10 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.required_ruby_version = '>= 2.1'
24
24
 
25
- spec.add_runtime_dependency "google-api-client", ">= 0.9.11"
25
+ spec.add_runtime_dependency "google-api-client", [">= 0.28.6", "!= 0.29.1"]
26
26
 
27
- spec.add_development_dependency "bundler", "~> 1.10"
28
- spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "bundler"
28
+ spec.add_development_dependency "rake"
29
29
  spec.add_development_dependency "test-unit"
30
30
  spec.add_development_dependency "simplecov"
31
31
  spec.add_development_dependency "test-unit-power_assert"
@@ -654,5 +654,43 @@ module Kura
654
654
  end
655
655
  raise Kura::TimeoutError, "wait job timeout"
656
656
  end
657
+
658
+ # Models API
659
+ def models(dataset_id, project_id: @default_project_id, limit: 1000, page_token: nil, &blk)
660
+ if blk
661
+ @api.list_models(project_id, dataset_id, max_results: limit, page_token: page_token) do |result, err|
662
+ result &&= (result.models || [])
663
+ blk.call(result, err)
664
+ end
665
+ else
666
+ @api.list_models(project_id, dataset_id, max_results: limit, page_token: page_token)
667
+ end
668
+ rescue
669
+ process_error($!)
670
+ end
671
+
672
+ def model(dataset_id, model_id, project_id: @default_project_id, &blk)
673
+ if blk
674
+ @api.get_model(project_id, dataset_id, model_id) do |result, err|
675
+ if err.respond_to?(:status_code) and err.status_code == 404
676
+ result = nil
677
+ err = nil
678
+ end
679
+ blk.call(result, err)
680
+ end
681
+ else
682
+ @api.get_model(project_id, dataset_id, model_id)
683
+ end
684
+ rescue
685
+ return nil if $!.respond_to?(:status_code) and $!.status_code == 404
686
+ process_error($!)
687
+ end
688
+
689
+ def delete_model(dataset_id, model_id, project_id: @default_project_id, &blk)
690
+ @api.delete_model(project_id, dataset_id, model_id, &blk)
691
+ rescue
692
+ return nil if $!.respond_to?(:status_code) and $!.status_code == 404
693
+ process_error($!)
694
+ end
657
695
  end
658
696
  end
@@ -1,3 +1,3 @@
1
1
  module Kura
2
- VERSION = "0.2.33"
2
+ VERSION = "0.3.0"
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.33
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chikanaga Tomoyuki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-28 00:00:00.000000000 Z
11
+ date: 2019-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client
@@ -16,42 +16,48 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.9.11
19
+ version: 0.28.6
20
+ - - "!="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.29.1
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: 0.9.11
29
+ version: 0.28.6
30
+ - - "!="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.29.1
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: bundler
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - "~>"
37
+ - - ">="
32
38
  - !ruby/object:Gem::Version
33
- version: '1.10'
39
+ version: '0'
34
40
  type: :development
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
- - - "~>"
44
+ - - ">="
39
45
  - !ruby/object:Gem::Version
40
- version: '1.10'
46
+ version: '0'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: rake
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
- - - "~>"
51
+ - - ">="
46
52
  - !ruby/object:Gem::Version
47
- version: '10.0'
53
+ version: '0'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
- - - "~>"
58
+ - - ">="
53
59
  - !ruby/object:Gem::Version
54
- version: '10.0'
60
+ version: '0'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: test-unit
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -149,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
155
  version: '0'
150
156
  requirements: []
151
157
  rubyforge_project:
152
- rubygems_version: 2.6.14.1
158
+ rubygems_version: 2.7.6
153
159
  signing_key:
154
160
  specification_version: 4
155
161
  summary: Interface to BigQuery API v2.