Skip to content

Commit 00d1253

Browse files
author
Anton Ouzounov
committed
chore(gemspec): update fluentd >= 1.14.x
- update fluentd to 1.14.x gem - update json gem to 2.5.1 - fix deprecation warnings during rake tests: `common.rb:114: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open` Fluentd changelog for [v1.14.x](https://github.com/fluent/fluentd/blob/master/CHANGELOG.md#v1140) Signed-off-by: Anton Ouzounov <[email protected]>
1 parent 2a830e4 commit 00d1253

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

fluent-plugin-google-cloud.gemspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ eos
1010
gem.homepage =
1111
'https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud'
1212
gem.license = 'Apache-2.0'
13-
gem.version = '0.12.3'
13+
gem.version = '0.13.0'
1414
gem.authors = ['Stackdriver Agents Team']
1515
gem.email = ['[email protected]']
1616
gem.required_ruby_version = Gem::Requirement.new('>= 2.2')
@@ -22,14 +22,14 @@ eos
2222
# Note: In order to update the Fluentd version, please update both here and
2323
# also the fluentd version in
2424
# https://github.com/GoogleCloudPlatform/google-fluentd/blob/master/config/software/fluentd.rb.
25-
gem.add_runtime_dependency 'fluentd', '1.13.3'
25+
gem.add_runtime_dependency 'fluentd', '~> 1.14.0'
2626
gem.add_runtime_dependency 'googleapis-common-protos', '1.3.10'
2727
gem.add_runtime_dependency 'googleauth', '0.9.0'
2828
gem.add_runtime_dependency 'google-api-client', '0.30.8'
29-
gem.add_runtime_dependency 'google-cloud-logging', '1.6.6'
29+
gem.add_runtime_dependency 'google-cloud-logging', '1.7.0'
3030
gem.add_runtime_dependency 'google-protobuf', '3.17.3'
3131
gem.add_runtime_dependency 'grpc', '1.31.1'
32-
gem.add_runtime_dependency 'json', '2.4.1'
32+
gem.add_runtime_dependency 'json', '2.5.1'
3333
gem.add_runtime_dependency 'opencensus', '0.5.0'
3434
gem.add_runtime_dependency 'opencensus-stackdriver', '0.4.1'
3535

lib/fluent/plugin/common.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def detect_platform(use_metadata_service)
111111
end
112112

113113
begin
114-
open('http://' + METADATA_SERVICE_ADDR, proxy: false) do |f|
114+
URI.open('http://' + METADATA_SERVICE_ADDR, proxy: false) do |f|
115115
if f.meta['metadata-flavor'] == 'Google'
116116
@log.info 'Detected GCE platform'
117117
return Platform::GCE
@@ -133,9 +133,8 @@ def fetch_gce_metadata(platform, metadata_path)
133133
raise "Called fetch_gce_metadata with platform=#{platform}" unless
134134
platform == Platform::GCE
135135
# See https://cloud.google.com/compute/docs/metadata
136-
open('http://' + METADATA_SERVICE_ADDR + '/computeMetadata/v1/' +
137-
metadata_path, 'Metadata-Flavor' => 'Google', :proxy => false,
138-
&:read)
136+
URI.open('http://' + METADATA_SERVICE_ADDR + '/computeMetadata/v1/' +
137+
metadata_path, 'Metadata-Flavor' => 'Google', :proxy => false, &:read)
139138
end
140139

141140
# EC2 Metadata server returns everything in one call. Store it after the
@@ -145,7 +144,7 @@ def ec2_metadata(platform)
145144
platform == Platform::EC2
146145
unless @ec2_metadata
147146
# See http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html
148-
open('http://' + METADATA_SERVICE_ADDR +
147+
URI.open('http://' + METADATA_SERVICE_ADDR +
149148
'/latest/dynamic/instance-identity/document', proxy: false) do |f|
150149
contents = f.read
151150
@ec2_metadata = JSON.parse(contents)

0 commit comments

Comments
 (0)