From 14e8e1cd6abc86258427780f261fd61c325c4b3e Mon Sep 17 00:00:00 2001 From: Orien Madgwick <497874+orien@users.noreply.github.com> Date: Wed, 7 Feb 2024 19:46:37 +1100 Subject: [PATCH 1/3] Bump Ruby from 2.7.8 to 3.0.6 --- .ruby-version | 2 +- Dockerfile | 2 +- Gemfile.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ruby-version b/.ruby-version index 6a81b4c83..818bd47ab 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.8 +3.0.6 diff --git a/Dockerfile b/Dockerfile index a9d5fcf28..1b91ca41f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.7.8-slim +FROM ruby:3.0.6-slim # Install dependencies RUN \ diff --git a/Gemfile.lock b/Gemfile.lock index 7b886e797..d58d41ef1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -803,7 +803,7 @@ DEPENDENCIES webmock RUBY VERSION - ruby 2.7.8p225 + ruby 3.0.6p216 BUNDLED WITH 2.4.22 From 3e5c1e98e8ab480c79b49375732eb790d0a68ad4 Mon Sep 17 00:00:00 2001 From: Orien Madgwick <497874+orien@users.noreply.github.com> Date: Mon, 12 Feb 2024 09:57:10 +1100 Subject: [PATCH 2/3] Bump pagy from 3.14.0 to 4.11.0 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index d58d41ef1..e099c3089 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -505,7 +505,7 @@ GEM omniauth-rails_csrf_protection (1.0.1) actionpack (>= 4.2) omniauth (~> 2.0) - pagy (3.14.0) + pagy (4.11.0) parallel (1.24.0) parallel_tests (2.32.0) parallel From 0cb8914794f9ccd5bf779b606739f286f7e4f4d7 Mon Sep 17 00:00:00 2001 From: Orien Madgwick <497874+orien@users.noreply.github.com> Date: Mon, 12 Feb 2024 10:27:07 +1100 Subject: [PATCH 3/3] Samson Hooks uses kwargs for Ruby 3 compatibility --- lib/samson/hooks.rb | 4 ++-- plugins/env/lib/samson_env/samson_plugin.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/samson/hooks.rb b/lib/samson/hooks.rb index 0a51174fc..adbbc4dbe 100644 --- a/lib/samson/hooks.rb +++ b/lib/samson/hooks.rb @@ -178,8 +178,8 @@ def only_callbacks_for_plugin(plugin_name, hook_name) end # use - def fire(name, *args) - traced(name) { hooks(name).map { |hook| hook.call(*args) } } + def fire(name, *args, **kwargs) + traced(name) { hooks(name).map { |hook| hook.call(*args, **kwargs) } } end def render_views(name, view, *args) diff --git a/plugins/env/lib/samson_env/samson_plugin.rb b/plugins/env/lib/samson_env/samson_plugin.rb index 99f430da8..d97f5f702 100644 --- a/plugins/env/lib/samson_env/samson_plugin.rb +++ b/plugins/env/lib/samson_env/samson_plugin.rb @@ -77,8 +77,8 @@ def write_dotenv(base_file, groups) end # TODO: use for write_env_files -Samson::Hooks.callback :deploy_env do |*args| - EnvironmentVariable.env(*args) +Samson::Hooks.callback :deploy_env do |*args, **kwargs| + EnvironmentVariable.env(*args, **kwargs) end Samson::Hooks.callback(:link_parts_for_resource) do