Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #34 from cbeer/newer-rails
Browse files Browse the repository at this point in the history
Test on newer versions of rails
  • Loading branch information
cbeer authored Aug 15, 2024
2 parents 1c8ed6f + 7672517 commit 793ebae
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 13 deletions.
33 changes: 20 additions & 13 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,33 @@ name: CI

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
rails_version: [6.1.7.8]
ruby: [3.1, 3.2, 3.3]
rails_version: [7.2.0]
ruby: [3.2, 3.3]
include:
- ruby: 3.3
rails_version: 7.1.3.4
- ruby: 3.2
rails_version: 7.0.8.4
- ruby: 3.1
rails_version: 6.1.7.8
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
- 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
12 changes: 12 additions & 0 deletions lib/openseadragon/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@ module Openseadragon
class Engine < ::Rails::Engine
isolate_namespace Openseadragon

config.before_configuration do
# see https://github.com/fxn/zeitwerk#for_gem
# openseadragon_rails puts a generator into LOCAL APP lib/generators, so tell
# zeitwerk to ignore the whole directory? If we're using a recent
# enough version of Rails to have zeitwerk config
#
# See: https://github.com/cbeer/engine_cart/issues/117
if Rails.try(:autoloaders).try(:main).respond_to?(:ignore)
Rails.autoloaders.main.ignore(Rails.root.join('lib/generators'))
end
end

initializer 'openseadragon.assets.precompile' do |app|
app.config.assets.precompile += %w[openseadragon/*.png]
end
Expand Down

0 comments on commit 793ebae

Please sign in to comment.