fluent-plugin-google-cloud 0.6.13.pre.memory.1 → 0.6.13.pre.memory.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: b26e153a8191c18cf52ed1efdc552d5323045683
4
- data.tar.gz: 3111b02b15f0a930f7cbd0d28b5517ffbe56a0ab
3
+ metadata.gz: 26e55203b2c40d92dfa4087065c41b547291cdf0
4
+ data.tar.gz: dc3d1822611b4dfc35e00980449e525ab54e75e1
5
5
  SHA512:
6
- metadata.gz: 4e569bbf17acbb4c997c3321bee3d7bac9cdbaa21c5e8b6d6f40bf996906ac3cc41f4ae7e7ae2f8085251369cefa5a0be4261d3529c294a305c7e0bb4aba2d1c
7
- data.tar.gz: 28562ed528b840677aca44c5f5982740e0e936a1eb9bb15ed8ca35d36f821fbc0931e8888ffe53a99cc4c73e622b10dbda51b8146c8ec2f1ecec97b6b671d042
6
+ metadata.gz: 670621b542a34fe36eac6b2ca0dda0a59043116476a61068060c7622c4def2def173e7d11342483e4f1b4bcf192cab2e0f736745558160e700c6ee7575189c2a
7
+ data.tar.gz: 1b37a3134df21f2fa17685f93f1ba2f2b1bb6a260add960a26b6dc6cd764f1cc42fff2581ac2bcfb739bddc01bd168bf6d23cecce8a422b022a8e9b306f7436e
data/Gemfile.lock CHANGED
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-google-cloud (0.6.13.pre.memory.1)
4
+ fluent-plugin-google-cloud (0.6.13.pre.memory.2)
5
5
  fluentd (~> 0.10)
6
6
  google-api-client (~> 0.14)
7
7
  google-cloud-logging (~> 1.2.3)
8
8
  googleapis-common-protos (~> 1.3)
9
9
  googleauth (~> 0.5)
10
- grpc (~> 1.8)
10
+ grpc (~> 1.8.3)
11
11
  json (~> 1.8)
12
12
 
13
13
  GEM
@@ -55,7 +55,7 @@ GEM
55
55
  googleauth (~> 0.5.1)
56
56
  grpc (~> 1.0)
57
57
  rly (~> 0.2.3)
58
- google-protobuf (3.5.1)
58
+ google-protobuf (3.5.1.1)
59
59
  googleapis-common-protos (1.3.7)
60
60
  google-protobuf (~> 3.0)
61
61
  googleapis-common-protos-types (~> 1.0)
@@ -10,7 +10,7 @@ eos
10
10
  gem.homepage =
11
11
  'https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud'
12
12
  gem.license = 'Apache-2.0'
13
- gem.version = '0.6.13.pre.memory.1'
13
+ gem.version = '0.6.13.pre.memory.2'
14
14
  gem.authors = ['Todd Derr', 'Alex Robinson']
15
15
  gem.email = ['salty@google.com']
16
16
  gem.required_ruby_version = Gem::Requirement.new('>= 2.0')
@@ -24,7 +24,7 @@ eos
24
24
  gem.add_runtime_dependency 'google-api-client', '~> 0.14'
25
25
  gem.add_runtime_dependency 'google-cloud-logging', '~> 1.2.3'
26
26
  gem.add_runtime_dependency 'googleauth', '~> 0.5'
27
- gem.add_runtime_dependency 'grpc', '~> 1.8'
27
+ gem.add_runtime_dependency 'grpc', '~> 1.8.3'
28
28
  gem.add_runtime_dependency 'json', '~> 1.8'
29
29
 
30
30
  gem.add_development_dependency 'mocha', '~> 1.1'
@@ -195,7 +195,7 @@ module Fluent
195
195
  Fluent::Plugin.register_output('google_cloud', self)
196
196
 
197
197
  PLUGIN_NAME = 'Fluentd Google Cloud Logging plugin'.freeze
198
- PLUGIN_VERSION = '0.6.13.pre.memory.1'.freeze
198
+ PLUGIN_VERSION = '0.6.13.pre.memory.2'.freeze
199
199
 
200
200
  # Name of the the Google cloud logging write scope.
201
201
  LOGGING_SCOPE = 'https://www.googleapis.com/auth/logging.write'.freeze
@@ -1798,16 +1798,6 @@ module Fluent
1798
1798
  end
1799
1799
 
1800
1800
  def init_api_client
1801
- return if @use_grpc
1802
- # TODO: Use a non-default ClientOptions object.
1803
- Google::Apis::ClientOptions.default.application_name = PLUGIN_NAME
1804
- Google::Apis::ClientOptions.default.application_version = PLUGIN_VERSION
1805
- @client = Google::Apis::LoggingV2::LoggingService.new
1806
- @client.authorization = Google::Auth.get_application_default(
1807
- LOGGING_SCOPE)
1808
- end
1809
-
1810
- def api_client
1811
1801
  if @use_grpc
1812
1802
  ssl_creds = GRPC::Core::ChannelCredentials.new
1813
1803
  authentication = Google::Auth.get_application_default
@@ -1817,15 +1807,26 @@ module Fluent
1817
1807
  channel: GRPC::Core::Channel.new(
1818
1808
  'logging.googleapis.com', nil, creds))
1819
1809
  else
1820
- unless @client.authorization.expired?
1821
- begin
1822
- @client.authorization.fetch_access_token!
1823
- rescue MultiJson::ParseError
1824
- # Workaround an issue in the API client; just re-raise a more
1825
- # descriptive error for the user (which will still cause a retry).
1826
- raise Google::APIClient::ClientError, 'Unable to fetch access ' \
1827
- 'token (no scopes configured?)'
1828
- end
1810
+ # TODO: Use a non-default ClientOptions object.
1811
+ Google::Apis::ClientOptions.default.application_name = PLUGIN_NAME
1812
+ Google::Apis::ClientOptions.default.application_version = PLUGIN_VERSION
1813
+ @client = Google::Apis::LoggingV2::LoggingService.new
1814
+ @client.authorization = Google::Auth.get_application_default(
1815
+ LOGGING_SCOPE)
1816
+ end
1817
+ end
1818
+
1819
+ def api_client
1820
+ # For gRPC side, the Channel will take care of tokens and their renewal
1821
+ # (https://grpc.io/docs/guides/auth.html#authentication-api).
1822
+ if !@use_grpc && @client.authorization.expired?
1823
+ begin
1824
+ @client.authorization.fetch_access_token!
1825
+ rescue MultiJson::ParseError
1826
+ # Workaround an issue in the API client; just re-raise a more
1827
+ # descriptive error for the user (which will still cause a retry).
1828
+ raise Google::APIClient::ClientError,
1829
+ 'Unable to fetch access token (no scopes configured?)'
1829
1830
  end
1830
1831
  end
1831
1832
  @client
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-google-cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.13.pre.memory.1
4
+ version: 0.6.13.pre.memory.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Derr
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-01-16 00:00:00.000000000 Z
12
+ date: 2018-01-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd
@@ -87,14 +87,14 @@ dependencies:
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '1.8'
90
+ version: 1.8.3
91
91
  type: :runtime
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: '1.8'
97
+ version: 1.8.3
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: json
100
100
  requirement: !ruby/object:Gem::Requirement