bigquery_migration 0.2.1 → 0.2.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
  SHA1:
3
- metadata.gz: 4bd75123ce0142da8ec326abd8dff02206ed0547
4
- data.tar.gz: d9e0435da7fb64ecc908a7a678cc517d80e47a5e
3
+ metadata.gz: 4cc3b6f5ad69666d2dec7c19ba97cbafecd8f74a
4
+ data.tar.gz: 490f4b4c6dd4801771de9296d9907a90ea5f43b2
5
5
  SHA512:
6
- metadata.gz: de288a0598b7ad32368b506f7859c4292da2c177c388c619f887e239debf94875df1bcab0a44080dcd78e8a4cd00cd11292c2fa5e1a2933058deca933dcd7a68
7
- data.tar.gz: 020bcac45b0214e6f3e40dfd37f3a803adec9653a782176966f3541678cc55bf82b1c6a15b425da53aa43784035cf5d121cb52731a7e4c722efd0e5d9c69f508
6
+ metadata.gz: b486f63c1e1119fc8061308d073559d88cf006dcb935c73dd023b96ae2b783a58ef7f4f2f4717ed30e72f6536c8c46335430f0e0fa993343fbf1781397ef3e61
7
+ data.tar.gz: 2c36c1a2a889d7a8137139bd6ec1ca1900b2e5d8129ab6b3a073c206b5ca2831cd3fbb912c8b16fe84302baba63a6c0b90e607c7da7dc8aa7e301763fa22dfc6
@@ -1,3 +1,9 @@
1
+ # 0.2.2 (2017/04/04)
2
+
3
+ Enhancements:
4
+
5
+ * Support google-api-ruby-client >= v0.11.0
6
+
1
7
  # 0.2.1 (2017/03/31)
2
8
 
3
9
  Enhancements:
@@ -53,8 +53,6 @@ class BigqueryMigration
53
53
  end
54
54
 
55
55
  config[:retries] ||= 5
56
- config[:timeout_sec] ||= 300
57
- config[:open_timeout_sec] ||= 300
58
56
  end
59
57
 
60
58
  def project
@@ -90,8 +88,17 @@ class BigqueryMigration
90
88
 
91
89
  client = Google::Apis::BigqueryV2::BigqueryService.new
92
90
  client.request_options.retries = config[:retries]
93
- client.request_options.timeout_sec = config[:timeout_sec]
94
- client.request_options.open_timeout_sec = config[:open_timeout_sec]
91
+ if client.request_options.respond_to?(:timeout_sec)
92
+ client.request_options.open_timeout_sec = config[:open_timeout_sec] || 300
93
+ client.request_options.timeout_sec = config[:timeout_sec] || 300
94
+ else # google-api-ruby-client >= v0.11.0
95
+ if config[:timeout_sec]
96
+ logger.warn { "timeout_sec is deprecated in google-api-ruby-client >= v0.11.0. Use read_timeout_sec instead" }
97
+ end
98
+ client.client_options.open_timeout_sec = config[:open_timeout_sec] || 300 # default: 60
99
+ client.client_options.send_timeout_sec = config[:send_timeout_sec] || 300 # default: 120
100
+ client.client_options.read_timeout_sec = config[:read_timeout_sec] || config[:timeout_sec] || 300 # default: 60
101
+ end
95
102
  logger.debug { "client_options: #{client.client_options.to_h}" }
96
103
  logger.debug { "request_options: #{client.request_options.to_h}" }
97
104
 
@@ -1,3 +1,3 @@
1
1
  class BigqueryMigration
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigquery_migration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-31 00:00:00.000000000 Z
11
+ date: 2017-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  version: '0'
200
200
  requirements: []
201
201
  rubyforge_project:
202
- rubygems_version: 2.5.1
202
+ rubygems_version: 2.5.2
203
203
  signing_key:
204
204
  specification_version: 4
205
205
  summary: Migrate BigQuery table schema