From 64a571f2f3105852eb63125226b8550a658a2df3 Mon Sep 17 00:00:00 2001 From: Bernhard Suttner Date: Thu, 17 Apr 2025 19:23:40 +0200 Subject: [PATCH] Refs #38357 - Support of ruby version 3.4 --- .github/matrix.json | 2 +- Gemfile | 4 ++++ bundler.d/bmc.rb | 4 ++++ lib/proxy/log.rb | 1 + smart_proxy.gemspec | 1 + 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/matrix.json b/.github/matrix.json index 1785aed14..a6cc68a24 100644 --- a/.github/matrix.json +++ b/.github/matrix.json @@ -1,3 +1,3 @@ { - "ruby": ["2.7", "3.0"] + "ruby": ["2.7", "3.0", "3.1", "3.2", "3.3", "3.4"] } diff --git a/Gemfile b/Gemfile index 725b3be9f..c11e1fa80 100644 --- a/Gemfile +++ b/Gemfile @@ -10,3 +10,7 @@ gem "ffi", "<1.17" if RUBY_VERSION < '3.0' Dir[File.join(__dir__, 'bundler.d', '*.rb')].each do |bundle| eval_gemfile(bundle) end + +# Changed from a default gem to a bundled gem in Ruby 3.4 +# See: https://stdgems.org/new-in/3.4/ +gem 'syslog' if RUBY_VERSION >= '3.4' diff --git a/bundler.d/bmc.rb b/bundler.d/bmc.rb index db242e53c..fc737e5b4 100644 --- a/bundler.d/bmc.rb +++ b/bundler.d/bmc.rb @@ -1,4 +1,8 @@ group :bmc do gem 'rubyipmi', '>= 0.10.0' gem 'redfish_client', '>= 0.6.0' + # observer is a transitive dependency of rubyipmi + # Changed from a default gem to a bundled gem in Ruby 3.4 See https://stdgems.org/new-in/3.4/ + # This is a workaround, till https://github.com/logicminds/rubyipmi/pull/61 is live + gem 'observer' if RUBY_VERSION >= '3.4' end diff --git a/lib/proxy/log.rb b/lib/proxy/log.rb index 0e2744f42..0b413fb6c 100644 --- a/lib/proxy/log.rb +++ b/lib/proxy/log.rb @@ -1,3 +1,4 @@ +require 'logger' require 'logging' require 'proxy/log_buffer/decorator' require 'proxy/time_utils' diff --git a/smart_proxy.gemspec b/smart_proxy.gemspec index 2b1b75eb5..d99bc6678 100644 --- a/smart_proxy.gemspec +++ b/smart_proxy.gemspec @@ -16,6 +16,7 @@ Gem::Specification.new do |s| s.add_dependency 'base64' s.add_dependency 'json' s.add_dependency 'logging' + s.add_dependency 'ostruct' s.add_dependency 'rack', '>= 1.3' s.add_dependency 'rexml', '~> 3.2' s.add_dependency 'sd_notify', '~> 0.1'