diff --git a/fdk.gemspec b/fdk.gemspec index 29e985e..6094fdd 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 diff --git a/lib/fdk/context.rb b/lib/fdk/context.rb index da9a032..ea86c10 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 de1132d..bfa93b2 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 c3c23b2..c87f211 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)