kura 1.0.0 → 1.0.2

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
  SHA256:
3
- metadata.gz: d1debc77b4a5c71c844cad85bc06c93603a24eb4818b8b9e30458d5a242d6f05
4
- data.tar.gz: 510c51094d84046376bf201da775397dc03a9c6e994ae86fe704413f7a14024f
3
+ metadata.gz: 3921d79646b029137c7639d074c6893ba650ffae8e7829e4e8c838d883a059a2
4
+ data.tar.gz: 91beea19c74492ab7d89e5aa627e726c289760aa775b5321c67220ed416aa1a8
5
5
  SHA512:
6
- metadata.gz: 10ffe28579b192cf3e48ef234c28f62cc3201153dada35245e93e6e9864380e195fda959d02c7a5268bf31a2a47e9b1b8afd11363651121c04a0676596ff5f16
7
- data.tar.gz: b5e198bb1d4d8c11fb87ee855af973fe42faec35b3bb3dc4ffe82baacd221f80ff84e14a319cac1ee18670139c5b6e06c71f0fb76bf7326d53e99288dab13c5c
6
+ metadata.gz: cfbb6eafee56b5652faf98b6b72bf13d174267a28ed0525087e90f48db663a2f602749b32583cdec12e27a3a778fcb180cd6a312d44281e31d74122b623cc8f2
7
+ data.tar.gz: 688dbf51ffc9a472b070f73ba79f6c2efbd42ad84f62b22815a02fa7303191a65d3a724fc40bfb5816a7d2730ce1b48a98709dbff4391368b0e31aff60e21687
data/ChangeLog.md CHANGED
@@ -1,3 +1,15 @@
1
+ # 1.0.2
2
+
3
+ ## Changes
4
+
5
+ * Handle SystemCallError and OpenSSL::SSL::SSLError as Kura::ApiError.
6
+
7
+ # 1.0.1
8
+
9
+ ## Enhancements
10
+
11
+ * `insert_table` method accept `clustering_fields` argument.
12
+
1
13
  # 1.0.0
2
14
 
3
15
  ## Breaking Changes
data/lib/kura/client.rb CHANGED
@@ -68,6 +68,8 @@ module Kura
68
68
  errors = "HTTP Status: #{err.status_code}\nHeaders: #{err.header.inspect}\nBody:\n#{err.body}"
69
69
  end
70
70
  raise Kura::ApiError.new(reason, errors)
71
+ elsif err.is_a?(SystemCallError) or err.is_a?(OpenSSL::SSL::SSLError)
72
+ raise Kura::ApiError.new("internalError", err.message)
71
73
  else
72
74
  raise err
73
75
  end
@@ -201,6 +203,7 @@ module Kura
201
203
  query: nil, external_data_configuration: nil,
202
204
  use_legacy_sql: false,
203
205
  time_partitioning: nil,
206
+ clustering_fields: [],
204
207
  &blk)
205
208
  if expiration_time
206
209
  expiration_time = (expiration_time.to_f * 1000.0).to_i
@@ -222,6 +225,9 @@ module Kura
222
225
  if time_partitioning
223
226
  table.time_partitioning = Google::Apis::BigqueryV2::TimePartitioning.new(**time_partitioning)
224
227
  end
228
+ if clustering_fields and clustering_fields.size > 0
229
+ table.clustering = Google::Apis::BigqueryV2::Clustering.new(fields: clustering_fields)
230
+ end
225
231
  @api.insert_table(project_id, dataset_id, table, &blk)
226
232
  rescue
227
233
  process_error($!)
data/lib/kura/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kura
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.2"
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: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chikanaga Tomoyuki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-18 00:00:00.000000000 Z
11
+ date: 2024-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-bigquery_v2
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  - !ruby/object:Gem::Version
149
149
  version: '0'
150
150
  requirements: []
151
- rubygems_version: 3.3.7
151
+ rubygems_version: 3.3.26
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: Interface to BigQuery API v2.