From 489b56c89bab930176cf016bae34b643646071e3 Mon Sep 17 00:00:00 2001 From: Rishabh Srivastav Date: Wed, 15 Sep 2021 15:27:02 +0530 Subject: [PATCH 1/2] Updated to the latest dependencies --- fdk.gemspec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fdk.gemspec b/fdk.gemspec index 29e985e4..6094fddd 100644 --- a/fdk.gemspec +++ b/fdk.gemspec @@ -13,10 +13,10 @@ Gem::Specification.new do |s| s.license = "Apache-2.0" s.required_ruby_version = ">= 2.5" - s.add_runtime_dependency "json", "~> 2.1", ">= 2.1.0" - s.add_runtime_dependency "webrick", "~> 1.4", ">= 1.4.2" - s.add_development_dependency "net_http_unix", "~> 0.2", ">= 0.2.1" - s.add_development_dependency "rubocop", "~> 0.60" + s.add_runtime_dependency "json", "~> 2.5", ">= 2.5.1" + s.add_runtime_dependency "webrick", "~> 1.7", ">= 1.7.0" + s.add_development_dependency "net_http_unix", "~> 0.2", ">= 0.2.2" + s.add_development_dependency "rubocop", "~> 1.21" s.files = Dir["Rakefile", "{bin,lib,man,test,spec}/**/*", "README*", "LICENSE*"] & `git ls-files -z`.split("\0") end From 68093a5319fdb1b910ff2fc6c9192b39a0d8ce18 Mon Sep 17 00:00:00 2001 From: Rishabh Srivastav Date: Wed, 15 Sep 2021 16:10:07 +0530 Subject: [PATCH 2/2] Rubocop correction --- lib/fdk/context.rb | 6 ++---- lib/fdk/function.rb | 1 + lib/fdk/listener.rb | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/fdk/context.rb b/lib/fdk/context.rb index da9a032f..ea86c107 100644 --- a/lib/fdk/context.rb +++ b/lib/fdk/context.rb @@ -82,8 +82,7 @@ class Context # Replace X with the upper cased name of the config variable you set. # e.g. minio_secret=secret will be exposed via MINIO_SECRET env var. - attr_reader :headers - attr_reader :response_headers + attr_reader :headers, :response_headers def initialize(headers_in, headers_out) @headers = headers_in @@ -123,8 +122,7 @@ def http_context # Represents the context data (inbound && outbound) # for the execution passed as HTTP headers class HTTPContext - attr_reader :headers - attr_reader :response_headers + attr_reader :headers, :response_headers def initialize(ctx) fn_http_h_ = "fn-http-h-" diff --git a/lib/fdk/function.rb b/lib/fdk/function.rb index de1132d8..bfa93b23 100644 --- a/lib/fdk/function.rb +++ b/lib/fdk/function.rb @@ -20,6 +20,7 @@ module FDK # Function represents a function function or lambda class Function attr_reader :format, :function + def initialize(function:, format:) raise "'#{format}' not supported in Ruby FDK." unless format == "http-stream" diff --git a/lib/fdk/listener.rb b/lib/fdk/listener.rb index c3c23b2e..c87f2113 100644 --- a/lib/fdk/listener.rb +++ b/lib/fdk/listener.rb @@ -89,7 +89,7 @@ def socket_path end def private_socket_path - socket_path + ".private" + "#{socket_path}.private" end def log_frame_header(headers)