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

Commit 793ebae

Browse files
authored
Merge pull request #34 from cbeer/newer-rails
Test on newer versions of rails
2 parents 1c8ed6f + 7672517 commit 793ebae

File tree

2 files changed

+32
-13
lines changed

2 files changed

+32
-13
lines changed

.github/workflows/ruby.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,33 @@ name: CI
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
pull_request:
7-
branches: [ master ]
7+
branches: [master]
88

99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
rails_version: [6.1.7.8]
15-
ruby: [3.1, 3.2, 3.3]
14+
rails_version: [7.2.0]
15+
ruby: [3.2, 3.3]
16+
include:
17+
- ruby: 3.3
18+
rails_version: 7.1.3.4
19+
- ruby: 3.2
20+
rails_version: 7.0.8.4
21+
- ruby: 3.1
22+
rails_version: 6.1.7.8
1623
env:
1724
RAILS_VERSION: ${{ matrix.rails_version }}
1825
steps:
19-
- uses: actions/checkout@v2
20-
- name: Set up Ruby ${{ matrix.ruby }}
21-
uses: ruby/setup-ruby@v1
22-
with:
23-
ruby-version: ${{ matrix.ruby }}
24-
- name: Install dependencies with Rails ${{ matrix.rails_version }}
25-
run: bundle install
26-
- name: Run tests
27-
run: bundle exec rake
26+
- uses: actions/checkout@v2
27+
- name: Set up Ruby ${{ matrix.ruby }}
28+
uses: ruby/setup-ruby@v1
29+
with:
30+
ruby-version: ${{ matrix.ruby }}
31+
- name: Install dependencies with Rails ${{ matrix.rails_version }}
32+
run: bundle install
33+
- name: Run tests
34+
run: bundle exec rake

lib/openseadragon/engine.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@ module Openseadragon
22
class Engine < ::Rails::Engine
33
isolate_namespace Openseadragon
44

5+
config.before_configuration do
6+
# see https://github.com/fxn/zeitwerk#for_gem
7+
# openseadragon_rails puts a generator into LOCAL APP lib/generators, so tell
8+
# zeitwerk to ignore the whole directory? If we're using a recent
9+
# enough version of Rails to have zeitwerk config
10+
#
11+
# See: https://github.com/cbeer/engine_cart/issues/117
12+
if Rails.try(:autoloaders).try(:main).respond_to?(:ignore)
13+
Rails.autoloaders.main.ignore(Rails.root.join('lib/generators'))
14+
end
15+
end
16+
517
initializer 'openseadragon.assets.precompile' do |app|
618
app.config.assets.precompile += %w[openseadragon/*.png]
719
end

0 commit comments

Comments
 (0)