Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport] Test on Rails 8 #3369

Open
wants to merge 4 commits into
base: release-4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:
additional_engine_cart_rails_options: [""]
additional_name: [""]
include:
- rails_version: "~> 8.0"
ruby: "3.3"
blacklight_version: "~> 8.0"
bootstrap_version: "~> 5.0"
additional_name: Rails 8
- rails_version: "~> 7.2"
ruby: "3.3"
blacklight_version: "~> 7.34"
Expand All @@ -33,7 +38,7 @@ jobs:
blacklight_version: "~> 8.0"
bootstrap_version: ~> 4.0
additional_name: Blacklight 8
additional_engine_cart_rails_options: "-j rollup -a sprockets"
additional_engine_cart_rails_options: "-j rollup --css bootstrap"
env:
RAILS_VERSION: ${{ matrix.rails_version }}
BLACKLIGHT_VERSION: ${{ matrix.blacklight_version }}
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/spotlight/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def start_new_search_session?
def solr_document_params
params.require(:solr_document).permit(:exhibit_tag_list,
uploaded_resource: [:url],
sidecar: [:public, { data: [editable_solr_document_params] }])
sidecar: [:public, { data: editable_solr_document_params }])
end

def editable_solr_document_params
Expand Down
4 changes: 2 additions & 2 deletions blacklight-spotlight.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ these collections.)
s.add_dependency 'oauth2'
s.add_dependency 'openseadragon'
s.add_dependency 'ostruct', '!= 0.3.0', '!= 0.3.1', '!= 0.3.2'
s.add_dependency 'paper_trail', '>= 11.0', '< 16'
s.add_dependency 'rails', '>= 7.0', '< 8'
s.add_dependency 'paper_trail', '>= 11.0', '< 17'
s.add_dependency 'rails', '>= 7.1', '< 9'
s.add_dependency 'redcarpet', '>= 2.0.1', '< 4'
s.add_dependency 'riiif', '~> 2.0'
s.add_dependency 'roar', '~> 1.1'
Expand Down
4 changes: 2 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

concern :searchable, Blacklight::Routes::Searchable.new

resource :catalog, only: [:index], as: 'catalog', path: '/catalog', controller: 'catalog' do
resource :catalog, only: [], as: 'catalog', path: '/catalog', controller: 'catalog' do
concerns :searchable

collection do
Expand Down Expand Up @@ -124,7 +124,7 @@

resources :contacts, only: %i[edit update destroy]

resources :pages, only: [:update_all] do
resources :pages do
collection do
patch :update_all
end
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/spotlight/catalog_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Spotlight::CatalogController, type: :controller do
RSpec.describe Spotlight::CatalogController, type: :controller do
include ActiveJob::TestHelper
routes { Spotlight::Engine.routes }
let(:exhibit) { FactoryBot.create(:exhibit) }
Expand Down
4 changes: 2 additions & 2 deletions spec/features/javascript/blocks/solr_documents_block_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe 'Solr Document Block', default_max_wait_time: 15, feature: true, versioning: true do
RSpec.describe 'Solr Document Block', default_max_wait_time: 30, feature: true, versioning: true do
let(:exhibit) { FactoryBot.create(:exhibit) }
let(:exhibit_curator) { FactoryBot.create(:exhibit_curator, exhibit:) }
let(:feature_page) do
Expand Down Expand Up @@ -52,7 +52,7 @@
expect(page).to have_selector '.items-block .box', count: 2, visible: true
end

it 'allows you to choose from a multi-image solr document (and persist through edits)', default_max_wait_time: 30, js: true do
it 'allows you to choose from a multi-image solr document (and persist through edits)', js: true do
fill_in_solr_document_block_typeahead_field with: 'xd327cm9378'

expect(page).to have_css('[data-panel-image-pagination]', text: /Image 1 of 2/, visible: true)
Expand Down
Loading