diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index e48be31..e7d0a48 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -11,26 +11,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - rails_version: [6.1.1] - ruby: [2.7, '3.0'] - env: - RAILS_VERSION: ${{ matrix.rails_version }} - steps: - - uses: actions/checkout@v2 - - name: Set up Ruby ${{ matrix.ruby }} - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - - name: Install dependencies with Rails ${{ matrix.rails_version }} - run: bundle install - - name: Run tests - run: bundle exec rake - test_rails52: - runs-on: ubuntu-latest - strategy: - matrix: - rails_version: [5.2.4.4, 6.0.3.4] - ruby: [2.7] + rails_version: [6.1.4.6] + ruby: ['2.7', '3.0'] + include: + - rails_version: 7.0.2.2 + ruby: '3.0' + - rails_version: 5.2.4.4 + ruby: '2.7' + - rails_version: 6.0.3.4 + ruby: '2.7' env: RAILS_VERSION: ${{ matrix.rails_version }} steps: diff --git a/blacklight-gallery.gemspec b/blacklight-gallery.gemspec index dc71dac..3fa8953 100644 --- a/blacklight-gallery.gemspec +++ b/blacklight-gallery.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] - spec.add_dependency "rails", '>= 5.1', '< 7' + spec.add_dependency "rails", '>= 5.1', '< 8' spec.add_dependency 'blacklight', '~> 7.17' spec.add_development_dependency "rake" diff --git a/lib/generators/blacklight_gallery/install_generator.rb b/lib/generators/blacklight_gallery/install_generator.rb index 7e9a665..0897bad 100644 --- a/lib/generators/blacklight_gallery/install_generator.rb +++ b/lib/generators/blacklight_gallery/install_generator.rb @@ -16,10 +16,9 @@ def assets def configuration inject_into_file 'app/controllers/catalog_controller.rb', after: "configure_blacklight do |config|" do - "\n config.view.gallery.document_component = Blacklight::Gallery::DocumentComponent" \ - "\n # config.view.gallery.classes = 'row-cols-2 row-cols-md-3'" \ - "\n config.view.masonry.document_component = Blacklight::Gallery::DocumentComponent" \ - "\n config.view.slideshow.document_component = Blacklight::Gallery::SlideshowComponent" \ + "\n config.view.gallery(document_component: Blacklight::Gallery::DocumentComponent)" \ + "\n config.view.masonry(document_component: Blacklight::Gallery::DocumentComponent)" \ + "\n config.view.slideshow(document_component: Blacklight::Gallery::SlideshowComponent)" \ "\n config.show.tile_source_field = :content_metadata_image_iiif_info_ssm" \ "\n config.show.partials.insert(1, :openseadragon)" end diff --git a/spec/test_app_templates/Gemfile.extra b/spec/test_app_templates/Gemfile.extra index b62b467..e69de29 100644 --- a/spec/test_app_templates/Gemfile.extra +++ b/spec/test_app_templates/Gemfile.extra @@ -1 +0,0 @@ -gem 'sprockets', '< 4' diff --git a/spec/views/catalog/_document_slideshow.html.erb_spec.rb b/spec/views/catalog/_document_slideshow.html.erb_spec.rb index cc1e7de..291d967 100644 --- a/spec/views/catalog/_document_slideshow.html.erb_spec.rb +++ b/spec/views/catalog/_document_slideshow.html.erb_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "catalog/_document_slideshow.html.erb", :type => :view do +describe "catalog/_document_slideshow", :type => :view do let(:blacklight_config) do Blacklight::Configuration.new do |config| config.track_search_session = false diff --git a/spec/views/catalog/_openseadragon_default.html.erb_spec.rb b/spec/views/catalog/_openseadragon_default.html.erb_spec.rb index bfb4295..be05a1a 100644 --- a/spec/views/catalog/_openseadragon_default.html.erb_spec.rb +++ b/spec/views/catalog/_openseadragon_default.html.erb_spec.rb @@ -3,7 +3,7 @@ describe "catalog/openseadragon_default" do let(:document) { SolrDocument.new } let(:blacklight_config) { Blacklight::Configuration.new } - let(:p) { "catalog/openseadragon_default.html.erb" } + let(:p) { "catalog/openseadragon_default" } before do allow(view).to receive_messages(blacklight_config: blacklight_config, openseadragon_picture_tag: "") @@ -14,9 +14,9 @@ render partial: p, locals: { document: document } expect(rendered).to have_selector ".openseadragon-container" end - + it "should support passing a container class" do render partial: p, locals: { document: document, osd_container_class: "custom-container" } expect(rendered).to have_selector ".custom-container" end -end \ No newline at end of file +end