bigquery 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bigquery.rb +6 -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
|
-
|
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)
|