diff --git a/Gemfile b/Gemfile index 6010395..b356727 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,13 @@ -source 'https://rubygems.org' +# frozen_string_literal: true + +source "https://rubygems.org" # Specify your gem's dependencies in fluent-plugin-gcs.gemspec gemspec + +gem "rake", "~> 13.0" +gem "rr", "= 1.1.2" +gem "test-unit", ">= 3.0.8" +gem "test-unit-rr", ">= 1.0.3" +gem "timecop" +gem "solargraph" diff --git a/fluent-plugin-gcs.gemspec b/fluent-plugin-gcs.gemspec index b87a204..6b48663 100644 --- a/fluent-plugin-gcs.gemspec +++ b/fluent-plugin-gcs.gemspec @@ -22,10 +22,4 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency "fluentd", [">= 0.14.22", "< 2"] spec.add_runtime_dependency "google-cloud-storage", "~> 1.1" - - spec.add_development_dependency "rake", ">= 12.3.3" - spec.add_development_dependency "rr", "= 1.1.2" - spec.add_development_dependency "test-unit", ">= 3.0.8" - spec.add_development_dependency "test-unit-rr", ">= 1.0.3" - spec.add_development_dependency "timecop" end diff --git a/lib/fluent/plugin/out_gcs.rb b/lib/fluent/plugin/out_gcs.rb index 6a6334c..7b34099 100644 --- a/lib/fluent/plugin/out_gcs.rb +++ b/lib/fluent/plugin/out_gcs.rb @@ -131,7 +131,7 @@ def write(chunk) opts.merge!(@encryption_opts) log.debug { "out_gcs: upload chunk:#{chunk.key} to gcs://#{@bucket}/#{path} options: #{opts}" } - @gcs_bucket.upload_file(obj.path, path, opts) + @gcs_bucket.upload_file(obj.path, path, **opts) end end @@ -153,7 +153,7 @@ def hex_random(chunk) def check_object_exists(path) if !@blind_write - return @gcs_bucket.find_file(path, @encryption_opts) + return @gcs_bucket.find_file(path, **@encryption_opts) else return false end