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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5bd51f30481828394075cc17c42f3031f56a51c2
4
- data.tar.gz: cc6746437f90c04859b1d0f7e7cf6288f754334a
3
+ metadata.gz: bc987e74d2254841e0ac7628fb45da2e6b0ab396
4
+ data.tar.gz: 64b831382a82bd0d71b7e611c3ac5e01e147889a
5
5
  SHA512:
6
- metadata.gz: 5bb5f60f7b05bc12116cbc68f369c47dbc7368acfd4b03ca42f484577fa3acd1bb28b30437b508561c73de858b5d83b97cf59f27e4fd89634780e64fbaac16d3
7
- data.tar.gz: becb95614ed113f44f4ae733055d2483b61d6a41878d09368e0eb85b5b34ad08fb6a6c42ac0c26e2c4f6c304d34daad7e066bfc261b40772525c481b0a083d48
6
+ metadata.gz: 761a30c77db3e7f62aaa291be33f455d2c2428b7a5f1ba45e726efae6d4162ba958c44d9e6a740c82b8348a9ea805dbe34b19c64f19ea0ac5d1f2530a387bad5
7
+ data.tar.gz: ffe4e6ce67195278d38bbd2862d599810aec646a85ac7ca53430ffc01ec6218eb6699b481b0d6b20067ac7fa07f53c2466d9a849b22e283cd479b8917dfb3f5b
data/ChangeLog.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.2.6
2
+
3
+ ## Fixes
4
+
5
+ * Kura::Client#dataset and #table called with block yields nil at notFound error for consistency.
6
+
1
7
  # 0.2.5
2
8
 
3
9
  ## Enhancements
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
- @api.get_dataset(project_id, dataset_id, &blk)
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
- @api.get_table(project_id, dataset_id, table_id, &blk)
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
@@ -1,3 +1,3 @@
1
1
  module Kura
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
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.5
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-20 00:00:00.000000000 Z
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