fluent-plugin-bigquery 0.3.1 → 0.3.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: f0f23c20f0c7feb488dc105d5b4ada3dcc27a4a3
4
- data.tar.gz: 41497e9b9fa0e5b518f63dc4c664ae67b17f763f
3
+ metadata.gz: 590529c576446a57e0f41efd138b7365151de0d4
4
+ data.tar.gz: e5a0523d06c21bb90cf50f10c6eccb80aaff5c78
5
5
  SHA512:
6
- metadata.gz: a62ad2c42da6fabfc422457e06a40095957abc1b740cf3fa99337d2f03802b92dd79e314f60ebef1911ed4ba09ff972bf5adceccafc701cbd4d0d7e9411387e3
7
- data.tar.gz: 6d399567ec70f674f9ce8725d16561f5362f38c64a5267ec4e519e72f40431b65852dfb03a2486a52bf1594b97615b94063e0cf101177be1da37544be823edf2
6
+ metadata.gz: e80598626c9b5d8948e748bf0b9364607599111c32a2593fb70322cfd8b7b4c7ab5c96d98e617e94d6da75aa8bbfbcc699142e6913e42bf1f1d377fe501ff2fd
7
+ data.tar.gz: 85853f5a13767574692faa6a3633d91b5c9c13f83add2d51884cb3226611662cb92b82f6a5183266e7a8ce1202d68085e24f09afd5b5463dd104b59063d0860a
@@ -1,6 +1,6 @@
1
1
  module Fluent
2
2
  module BigQueryPlugin
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.2"
4
4
  end
5
5
  end
6
6
 
@@ -287,12 +287,14 @@ module Fluent
287
287
  json_key = @auth_options[:json_key]
288
288
 
289
289
  begin
290
+ JSON.parse(json_key)
291
+ key = StringIO.new(json_key)
292
+ Google::Auth::ServiceAccountCredentials.make_creds(json_key_io: key, scope: @scope)
293
+ rescue JSON::ParserError
294
+ key = json_key
290
295
  File.open(json_key) do |f|
291
296
  Google::Auth::ServiceAccountCredentials.make_creds(json_key_io: f, scope: @scope)
292
297
  end
293
- rescue Errno::ENOENT
294
- key = StringIO.new(json_key)
295
- Google::Auth::ServiceAccountCredentials.make_creds(json_key_io: key, scope: @scope)
296
298
  end
297
299
  end
298
300
 
@@ -145,7 +145,7 @@ class BigQueryOutputTest < Test::Unit::TestCase
145
145
  end
146
146
 
147
147
  def test_configure_auth_json_key_as_string
148
- json_key = '{"private_key": "X", "client_email": "xxx@developer.gserviceaccount.com"}'
148
+ json_key = '{"private_key": "X", "client_email": "' + 'x' * 255 + '@developer.gserviceaccount.com"}'
149
149
  json_key_io = StringIO.new(json_key)
150
150
  mock(StringIO).new(json_key) { json_key_io }
151
151
  authorization = Object.new
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-bigquery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naoya Ito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-28 00:00:00.000000000 Z
11
+ date: 2016-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake