bigquery 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/bigquery.rb +6 -2
  2. metadata +1 -1
data/lib/bigquery.rb CHANGED
@@ -12,13 +12,13 @@ class BigQuery
12
12
  "notasecret"
13
13
  )
14
14
 
15
- asserter = Google::APIClient::JWTAsserter.new(
15
+ @asserter = Google::APIClient::JWTAsserter.new(
16
16
  opts['service_email'],
17
17
  "https://www.googleapis.com/auth/bigquery",
18
18
  key
19
19
  )
20
20
 
21
- @client.authorization = asserter.authorize
21
+ refresh_auth
22
22
 
23
23
  @bq = @client.discovered_api("bigquery", "v2")
24
24
 
@@ -55,6 +55,10 @@ class BigQuery
55
55
  tables(dataset).map {|t| "[#{dataset}.#{t['tableReference']['tableId']}]"}
56
56
  end
57
57
 
58
+ def refresh_auth
59
+ @client.authorization = @asserter.authorize
60
+ end
61
+
58
62
  private
59
63
 
60
64
  def api(opts)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigquery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: