kura 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +6 -0
- data/lib/kura/client.rb +22 -2
- data/lib/kura/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc987e74d2254841e0ac7628fb45da2e6b0ab396
|
4
|
+
data.tar.gz: 64b831382a82bd0d71b7e611c3ac5e01e147889a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 761a30c77db3e7f62aaa291be33f455d2c2428b7a5f1ba45e726efae6d4162ba958c44d9e6a740c82b8348a9ea805dbe34b19c64f19ea0ac5d1f2530a387bad5
|
7
|
+
data.tar.gz: ffe4e6ce67195278d38bbd2862d599810aec646a85ac7ca53430ffc01ec6218eb6699b481b0d6b20067ac7fa07f53c2466d9a849b22e283cd479b8917dfb3f5b
|
data/ChangeLog.md
CHANGED
data/lib/kura/client.rb
CHANGED
@@ -89,7 +89,17 @@ module Kura
|
|
89
89
|
end
|
90
90
|
|
91
91
|
def dataset(dataset_id, project_id: @default_project_id, &blk)
|
92
|
-
|
92
|
+
if blk
|
93
|
+
@api.get_dataset(project_id, dataset_id) do |result, err|
|
94
|
+
if err.respond_to?(:status_code) and err.status_code == 404
|
95
|
+
result = nil
|
96
|
+
err = nil
|
97
|
+
end
|
98
|
+
blk.call(result, err)
|
99
|
+
end
|
100
|
+
else
|
101
|
+
@api.get_dataset(project_id, dataset_id)
|
102
|
+
end
|
93
103
|
rescue
|
94
104
|
return nil if $!.respond_to?(:status_code) and $!.status_code == 404
|
95
105
|
process_error($!)
|
@@ -135,7 +145,17 @@ module Kura
|
|
135
145
|
end
|
136
146
|
|
137
147
|
def table(dataset_id, table_id, project_id: @default_project_id, &blk)
|
138
|
-
|
148
|
+
if blk
|
149
|
+
@api.get_table(project_id, dataset_id, table_id) do |result, err|
|
150
|
+
if err.respond_to?(:status_code) and err.status_code == 404
|
151
|
+
result = nil
|
152
|
+
err = nil
|
153
|
+
end
|
154
|
+
blk.call(result, err)
|
155
|
+
end
|
156
|
+
else
|
157
|
+
@api.get_table(project_id, dataset_id, table_id)
|
158
|
+
end
|
139
159
|
rescue
|
140
160
|
return nil if $!.respond_to?(:status_code) and $!.status_code == 404
|
141
161
|
process_error($!)
|
data/lib/kura/version.rb
CHANGED
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.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chikanaga Tomoyuki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-api-client
|