fluent-plugin-google-cloud 0.7.12 → 0.7.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/fluent-plugin-google-cloud.gemspec +3 -3
- data/lib/fluent/plugin/out_google_cloud.rb +4 -15
- data/test/plugin/base_test.rb +6 -5
- data/test/plugin/constants.rb +8 -0
- data/test/plugin/test_out_google_cloud_grpc.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 121ed882fad27b0eb910d9fb8e95e7840fce8430d20ee7b85e53b39280b8f68c
|
4
|
+
data.tar.gz: aa3d64df2c47d080323032bbbf7aa7faee7b7fd58cb5796007bbdb4fac84d02c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b94c6ac4c29f6d7f2312ab9976dd1dabab6f532ccb52e717191a6b225dd65defef117623067131648d72e2494ae5f380a6475d633db87c568dd9153932895c94
|
7
|
+
data.tar.gz: 2bda121660d6d9eebac56db54283ef49cbfb4db1d482e933fb33549fd1eac4fa33038b0f1024555c05ee0f4d3333953b9ead825e9afc468d27a31fc7beee7fc0
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fluent-plugin-google-cloud (0.7.
|
5
|
-
fluentd (= 1.2
|
4
|
+
fluent-plugin-google-cloud (0.7.13)
|
5
|
+
fluentd (= 1.4.2)
|
6
6
|
google-api-client (= 0.28.4)
|
7
7
|
google-cloud-logging (= 1.6.0)
|
8
8
|
google-protobuf (= 3.6.1)
|
9
9
|
googleapis-common-protos (= 1.3.7)
|
10
|
-
googleauth (= 0.
|
10
|
+
googleauth (= 0.8.1)
|
11
11
|
grpc (= 1.14.2)
|
12
12
|
json (= 2.1.0)
|
13
13
|
|
@@ -26,7 +26,7 @@ GEM
|
|
26
26
|
dig_rb (1.0.1)
|
27
27
|
faraday (0.15.4)
|
28
28
|
multipart-post (>= 1.2, < 3)
|
29
|
-
fluentd (1.2
|
29
|
+
fluentd (1.4.2)
|
30
30
|
cool.io (>= 1.4.5, < 2.0.0)
|
31
31
|
dig_rb (~> 1.0.0)
|
32
32
|
http_parser.rb (>= 0.5.1, < 0.7.0)
|
@@ -68,10 +68,10 @@ GEM
|
|
68
68
|
grpc (~> 1.0)
|
69
69
|
googleapis-common-protos-types (1.0.4)
|
70
70
|
google-protobuf (~> 3.0)
|
71
|
-
googleauth (0.
|
71
|
+
googleauth (0.8.1)
|
72
72
|
faraday (~> 0.12)
|
73
73
|
jwt (>= 1.4, < 3.0)
|
74
|
-
memoist (~> 0.
|
74
|
+
memoist (~> 0.16)
|
75
75
|
multi_json (~> 1.11)
|
76
76
|
os (>= 0.9, < 2.0)
|
77
77
|
signet (~> 0.7)
|
@@ -82,7 +82,7 @@ GEM
|
|
82
82
|
http_parser.rb (0.6.0)
|
83
83
|
httpclient (2.8.3)
|
84
84
|
json (2.1.0)
|
85
|
-
jwt (2.1
|
85
|
+
jwt (2.2.1)
|
86
86
|
memoist (0.16.0)
|
87
87
|
metaclass (0.0.4)
|
88
88
|
mime-types (3.2.2)
|
@@ -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.7.
|
13
|
+
gem.version = '0.7.13'
|
14
14
|
gem.authors = ['Stackdriver Agents Team']
|
15
15
|
gem.email = ['stackdriver-agents@google.com']
|
16
16
|
gem.required_ruby_version = Gem::Requirement.new('>= 2.2')
|
@@ -19,9 +19,9 @@ eos
|
|
19
19
|
gem.test_files = gem.files.grep(/^(test)/)
|
20
20
|
gem.require_paths = ['lib']
|
21
21
|
|
22
|
-
gem.add_runtime_dependency 'fluentd', '1.2
|
22
|
+
gem.add_runtime_dependency 'fluentd', '1.4.2'
|
23
23
|
gem.add_runtime_dependency 'googleapis-common-protos', '1.3.7'
|
24
|
-
gem.add_runtime_dependency 'googleauth', '0.
|
24
|
+
gem.add_runtime_dependency 'googleauth', '0.8.1'
|
25
25
|
gem.add_runtime_dependency 'google-api-client', '0.28.4'
|
26
26
|
gem.add_runtime_dependency 'google-cloud-logging', '1.6.0'
|
27
27
|
gem.add_runtime_dependency 'google-protobuf', '3.6.1'
|
@@ -40,23 +40,12 @@ module Google
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
+
# Patch the gcloud command used by googleauth to avoid spamming stderr.
|
43
44
|
module Google
|
44
45
|
module Auth
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
def self.make_creds(options = {})
|
49
|
-
json_key_io, scope = options.values_at(:json_key_io, :scope)
|
50
|
-
if json_key_io
|
51
|
-
json_key = MultiJson.load(json_key_io.read)
|
52
|
-
project_id = json_key['project_id']
|
53
|
-
end
|
54
|
-
creds = super_make_creds(
|
55
|
-
json_key_io: StringIO.new(MultiJson.dump(json_key)), scope: scope)
|
56
|
-
creds.instance_variable_set(:@project_id, project_id) if project_id
|
57
|
-
creds
|
58
|
-
end
|
59
|
-
attr_reader :project_id
|
46
|
+
module CredentialsLoader
|
47
|
+
GCLOUD_CONFIG_COMMAND =
|
48
|
+
'config config-helper --format json --verbosity none'.freeze
|
60
49
|
end
|
61
50
|
end
|
62
51
|
end
|
data/test/plugin/base_test.rb
CHANGED
@@ -29,12 +29,13 @@ module BaseTest
|
|
29
29
|
# delete environment variables that googleauth uses to find credentials.
|
30
30
|
ENV.delete(CREDENTIALS_PATH_ENV_VAR)
|
31
31
|
# service account env.
|
32
|
-
ENV.delete(
|
33
|
-
ENV.delete(
|
32
|
+
ENV.delete(PRIVATE_KEY_VAR)
|
33
|
+
ENV.delete(CLIENT_EMAIL_VAR)
|
34
|
+
ENV.delete(PROJECT_ID_VAR)
|
34
35
|
# authorized_user env.
|
35
|
-
ENV.delete(
|
36
|
-
ENV.delete(
|
37
|
-
ENV.delete(
|
36
|
+
ENV.delete(CLIENT_ID_VAR)
|
37
|
+
ENV.delete(CLIENT_SECRET_VAR)
|
38
|
+
ENV.delete(REFRESH_TOKEN_VAR)
|
38
39
|
# home var, which is used to find $HOME/.gcloud/...
|
39
40
|
ENV.delete('HOME')
|
40
41
|
|
data/test/plugin/constants.rb
CHANGED
@@ -232,6 +232,14 @@ module Constants
|
|
232
232
|
project_id: ''
|
233
233
|
}.freeze
|
234
234
|
|
235
|
+
# Special googleauth environment variables.
|
236
|
+
PROJECT_ID_VAR = 'GOOGLE_PROJECT_ID'.freeze
|
237
|
+
PRIVATE_KEY_VAR = 'GOOGLE_PRIVATE_KEY'.freeze
|
238
|
+
CLIENT_EMAIL_VAR = 'GOOGLE_CLIENT_EMAIL'.freeze
|
239
|
+
CLIENT_ID_VAR = 'GOOGLE_CLIENT_ID'.freeze
|
240
|
+
CLIENT_SECRET_VAR = 'GOOGLE_CLIENT_SECRET'.freeze
|
241
|
+
REFRESH_TOKEN_VAR = 'GOOGLE_REFRESH_TOKEN'.freeze
|
242
|
+
|
235
243
|
# Configuration files for various test scenarios.
|
236
244
|
APPLICATION_DEFAULT_CONFIG = %(
|
237
245
|
).freeze
|
@@ -377,9 +377,9 @@ class GoogleCloudOutputGRPCTest < Test::Unit::TestCase
|
|
377
377
|
class GRPCLoggingMockFailingService <
|
378
378
|
Google::Cloud::Logging::V2::LoggingServiceV2Client
|
379
379
|
def initialize(error, failed_attempts)
|
380
|
+
super()
|
380
381
|
@error = error
|
381
382
|
@failed_attempts = failed_attempts
|
382
|
-
super()
|
383
383
|
end
|
384
384
|
|
385
385
|
# rubocop:disable Lint/UnusedMethodArgument
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-google-cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stackdriver Agents Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.2
|
19
|
+
version: 1.4.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.2
|
26
|
+
version: 1.4.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: googleapis-common-protos
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.8.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.8.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: google-api-client
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|