From 7c4202814d051644c874cde3757f49c45ed7f01f Mon Sep 17 00:00:00 2001 From: Jongmyung Ha Date: Tue, 4 Jun 2024 09:57:11 -0400 Subject: [PATCH 1/3] CICO-98577 Ruby upgrade to 3.1.6 - Handling argument delegation for Ruby 3 https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/ Signed-off-by: Jongmyung Ha --- core/lib/snt/core/services/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/lib/snt/core/services/base.rb b/core/lib/snt/core/services/base.rb index d388fdd..801fd79 100644 --- a/core/lib/snt/core/services/base.rb +++ b/core/lib/snt/core/services/base.rb @@ -10,8 +10,8 @@ def self.inherited(base) end # Provide class level call method as convenience over calling new, then call - def self.call(*args, &block) - new(*args, &block).call + def self.call(...) + new(...).call end # @params From a9c7afa6dbcdc631d891f007597f027c3733e1f5 Mon Sep 17 00:00:00 2001 From: Jongmyung Ha Date: Tue, 4 Jun 2024 10:18:26 -0400 Subject: [PATCH 2/3] CICO-98577 Ruby upgrade to 3.1.6 - Handling argument delegation for Ruby 3 - https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/ - Version change to 3.0.5 - required Ruby version 3 Signed-off-by: Jongmyung Ha --- core/lib/snt/core/version.rb | 2 +- snt.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/lib/snt/core/version.rb b/core/lib/snt/core/version.rb index 66a0f4c..3651fb5 100644 --- a/core/lib/snt/core/version.rb +++ b/core/lib/snt/core/version.rb @@ -1,3 +1,3 @@ module SNT - VERSION = '3.0.4'.freeze + VERSION = '3.0.5'.freeze end diff --git a/snt.gemspec b/snt.gemspec index befdb8f..e99063e 100644 --- a/snt.gemspec +++ b/snt.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |s| s.description = 'Stayntouch' s.homepage = '' - s.required_ruby_version = '>= 2.1.7' + s.required_ruby_version = '>= 3.0.1' s.files = Dir.glob('{bin,lib}/**/*') + %w(README.md) s.bindir = 'bin' From d74af3b64b5a2c697789e381caaeea379797d5f1 Mon Sep 17 00:00:00 2001 From: Jongmyung Ha Date: Tue, 4 Jun 2024 11:11:13 -0400 Subject: [PATCH 3/3] CICO-98577 Ruby upgrade to 3.1.6 - Handling keyword argument for Ruby 3 - https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/ Signed-off-by: Jongmyung Ha --- core/lib/snt/core/services/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/lib/snt/core/services/base.rb b/core/lib/snt/core/services/base.rb index 801fd79..ef1b97d 100644 --- a/core/lib/snt/core/services/base.rb +++ b/core/lib/snt/core/services/base.rb @@ -66,14 +66,14 @@ def execute_completion_callbacks # options [Hash] attributes: # - ignore_errors [boolean] Do not add other service's errors to this service's errors def call_service!(service_class, attributes, options = {}) - merge_result!(service_class.new(attributes).call, options) + merge_result!(service_class.new(**attributes).call, options) end # Call another service by passing the class, its attributes, and options. If other service fails, ignore the errors by default. # options [Hash] attributes: # - ignore_errors [boolean] Do not add other service's errors to this service's errors def call_service(service_class, attributes, options = { ignore_errors: true }) - merge_result(service_class.new(attributes).call, options) + merge_result(service_class.new(**attributes).call, options) end private