diff --git a/.dassie/Gemfile b/.dassie/Gemfile index cd769ca88b..25a441e4ca 100644 --- a/.dassie/Gemfile +++ b/.dassie/Gemfile @@ -30,6 +30,8 @@ if RUBY_PLATFORM =~ /musl/ end gem 'hydra-role-management' +gem 'active-fedora', git: 'https://github.com/samvera/active_fedora.git', branch: 'main' + gemspec name: 'hyrax', path: ENV.fetch('HYRAX_ENGINE_PATH', '..') gem 'jbuilder', '~> 2.5' gem 'jquery-rails' @@ -37,7 +39,7 @@ gem 'okcomputer' gem 'pg', '~> 1.3' gem 'puma' gem 'rack-mini-profiler', require: ['prepend_net_http_patch'] -gem 'rails', '6.1.7.10' +gem 'rails', '~> 8.0' gem 'riiif', '~> 2.8' gem 'rsolr', '>= 1.0', '< 3' gem 'sass-rails', '~> 6.0' diff --git a/.dassie/config/routes.rb b/.dassie/config/routes.rb index a971d8189a..b27e96997e 100644 --- a/.dassie/config/routes.rb +++ b/.dassie/config/routes.rb @@ -9,7 +9,7 @@ concern :searchable, Blacklight::Routes::Searchable.new - resource :catalog, only: [:index], as: 'catalog', path: '/catalog', controller: 'catalog' do + resource :catalog, only: [:show], as: 'catalog', path: '/catalog', controller: 'catalog' do concerns :searchable end devise_for :users diff --git a/.koppie/Gemfile b/.koppie/Gemfile index 2b7e264a90..81da6e524b 100644 --- a/.koppie/Gemfile +++ b/.koppie/Gemfile @@ -29,6 +29,8 @@ if RUBY_PLATFORM =~ /musl/ end gem 'hydra-role-management' +gem 'active-fedora', git: 'https://github.com/samvera/active_fedora.git', branch: 'main' + gemspec name: 'hyrax', path: ENV.fetch('HYRAX_ENGINE_PATH', '..') gem 'jbuilder', '~> 2.5' gem 'jquery-rails' @@ -36,7 +38,7 @@ gem 'okcomputer' gem 'pg', '~> 1.3' gem 'puma' gem 'rack-mini-profiler', require: ['prepend_net_http_patch'] -gem 'rails', '~> 7.2', '< 8.0' +gem 'rails', '~> 8.0' gem 'riiif', '~> 2.8' gem 'rsolr', '>= 1.0', '< 3' gem 'sass-rails', '~> 6.0' diff --git a/.koppie/config/routes.rb b/.koppie/config/routes.rb index 71a170e350..8719ce7755 100644 --- a/.koppie/config/routes.rb +++ b/.koppie/config/routes.rb @@ -8,7 +8,7 @@ concern :searchable, Blacklight::Routes::Searchable.new - resource :catalog, only: [:index], as: 'catalog', path: '/catalog', controller: 'catalog' do + resource :catalog, only: [:show], as: 'catalog', path: '/catalog', controller: 'catalog' do concerns :searchable end devise_for :users diff --git a/.koppie/db/schema.rb b/.koppie/db/schema.rb index f2343b3dcf..1482b5fe25 100644 --- a/.koppie/db/schema.rb +++ b/.koppie/db/schema.rb @@ -10,9 +10,9 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.2].define(version: 2024_06_06_205216) do +ActiveRecord::Schema[8.0].define(version: 2024_06_06_205216) do # These are extensions that must be enabled in order to support this database - enable_extension "plpgsql" + enable_extension "pg_catalog.plpgsql" enable_extension "uuid-ossp" create_table "bookmarks", id: :serial, force: :cascade do |t| diff --git a/Gemfile b/Gemfile index 5023f2915b..2a572cec29 100644 --- a/Gemfile +++ b/Gemfile @@ -10,6 +10,8 @@ else gemspec end +gem 'active-fedora', git: 'https://github.com/samvera/active_fedora.git', branch: 'main' + group :development, :test do gem 'benchmark-ips' gem 'easy_translate' diff --git a/app/models/hyrax/operation.rb b/app/models/hyrax/operation.rb index f66def7cbd..f57618012a 100644 --- a/app/models/hyrax/operation.rb +++ b/app/models/hyrax/operation.rb @@ -7,14 +7,13 @@ class Operation < ActiveRecord::Base FAILURE = 'failure' SUCCESS = 'success' - enum( - status: { + enum :status, + { FAILURE => FAILURE, PENDING => PENDING, PERFORMING => PERFORMING, SUCCESS => SUCCESS } - ) self.table_name = 'curation_concerns_operations' acts_as_nested_set diff --git a/app/models/hyrax/permission_template_access.rb b/app/models/hyrax/permission_template_access.rb index 8522d74da2..afbd53e5bc 100644 --- a/app/models/hyrax/permission_template_access.rb +++ b/app/models/hyrax/permission_template_access.rb @@ -18,13 +18,12 @@ class PermissionTemplateAccess < ActiveRecord::Base GROUP = 'group' USER = 'user' - enum( - access: { + enum :access, + { VIEW => VIEW, DEPOSIT => DEPOSIT, MANAGE => MANAGE } - ) # @api public # diff --git a/app/models/proxy_deposit_request.rb b/app/models/proxy_deposit_request.rb index 1cc1bf4cd2..4b419e1ea0 100644 --- a/app/models/proxy_deposit_request.rb +++ b/app/models/proxy_deposit_request.rb @@ -118,14 +118,13 @@ def send_request_transfer_message_as_part_of_update CANCELED = 'canceled' REJECTED = 'rejected' - enum( - status: { + enum :status, + { ACCEPTED => ACCEPTED, CANCELED => CANCELED, PENDING => PENDING, REJECTED => REJECTED } - ) # @param [TrueClass,FalseClass] reset (false) if true, reset the access controls. This revokes edit access from the depositor def transfer!(reset = false) diff --git a/app/models/sipity/notification.rb b/app/models/sipity/notification.rb index bb8629babf..fb46799340 100644 --- a/app/models/sipity/notification.rb +++ b/app/models/sipity/notification.rb @@ -18,7 +18,7 @@ class Notification < ActiveRecord::Base NOTIFICATION_TYPE_EMAIL = 'email' # TODO: There are other types, but for now, we are assuming just emails to send. - enum(notification_type: { NOTIFICATION_TYPE_EMAIL => NOTIFICATION_TYPE_EMAIL }) + enum :notification_type, { NOTIFICATION_TYPE_EMAIL => NOTIFICATION_TYPE_EMAIL } def self.valid_notification_types notification_types.keys diff --git a/app/models/sipity/notification_recipient.rb b/app/models/sipity/notification_recipient.rb index d5f237274e..aa9fc06d7f 100644 --- a/app/models/sipity/notification_recipient.rb +++ b/app/models/sipity/notification_recipient.rb @@ -7,12 +7,11 @@ class NotificationRecipient < ActiveRecord::Base belongs_to :notification, class_name: 'Sipity::Notification' belongs_to :role, class_name: 'Sipity::Role' - enum( - recipient_strategy: { + enum :recipient_strategy, + { 'to' => 'to', 'cc' => 'cc', 'bcc' => 'bcc' } - ) end end diff --git a/hyrax.gemspec b/hyrax.gemspec index 371b15f55a..9eb4384238 100644 --- a/hyrax.gemspec +++ b/hyrax.gemspec @@ -32,7 +32,7 @@ SUMMARY # NOTE: rails does not follow sem-ver conventions, it's # minor version releases can include breaking changes; see # http://guides.rubyonrails.org/maintenance_policy.html - spec.add_dependency 'rails', '> 6.1', '< 8.0' + spec.add_dependency 'rails', '~> 8.0' spec.add_dependency 'active-fedora', '~> 15.0' spec.add_dependency 'almond-rails', '~> 0.1' @@ -86,7 +86,7 @@ SUMMARY spec.add_dependency 'signet' spec.add_dependency 'tinymce-rails', '~> 5.10' spec.add_dependency 'valkyrie', '~> 3.5' - spec.add_dependency 'view_component', '~> 2.74.1' # Pin until blacklight is updated with workaround for https://github.com/ViewComponent/view_component/issues/1565 + spec.add_dependency 'view_component' spec.add_dependency 'sprockets', '3.7.2' # 3.7.3 fails feature specs spec.add_dependency 'sass-rails', '~> 6.0' spec.add_dependency 'select2-rails', '~> 3.5'