From 105e9ce22ccc14c87c1ac1b53452d32c7ab31fa1 Mon Sep 17 00:00:00 2001
From: Rob Kaufman <rob@notch8.com>
Date: Wed, 15 Jan 2025 11:03:36 -0800
Subject: [PATCH] hyrax 5 is out but does not support ruby 2.7 (#1005)

hyrax 5 is out but does not support ruby 2.7. use conditional logic to continue to support old hyrax for now
---
 Gemfile | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/Gemfile b/Gemfile
index f35b4129..096f4da6 100644
--- a/Gemfile
+++ b/Gemfile
@@ -16,7 +16,14 @@ gem 'blacklight'
 gem 'bootstrap-sass', '~> 3.4.1'
 gem 'coderay'
 gem 'factory_bot_rails'
-gem 'hyrax', '>= 2.3'
+
+# Conditional logic based on Ruby version
+if RUBY_VERSION >= '3.0.0'
+  gem 'hyrax', '>= 2.3'
+else
+  gem 'hyrax', '~> 4.0'
+end
+
 gem 'oai'
 gem 'rsolr', '>= 1.0'
 gem 'rspec-rails'