Skip to content

Commit

Permalink
Fix CI [ part 2 ] (#645)
Browse files Browse the repository at this point in the history
* Fix CI

* Restrict ruby version 3.1 only

* Fix rails 6 deprecation warnings
  • Loading branch information
chaadow authored Aug 15, 2024
1 parent dc23611 commit f494b4f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,34 @@ on:
branches:
- master

permissions:
contents: read

jobs:
test:
name: Ruby ${{ matrix.ruby }} - Gemfile ${{ matrix.gemfile }}
name: Ruby ${{ matrix.ruby }} - ${{ matrix.rails }}
runs-on: ubuntu-latest

strategy:
matrix:
ruby: [3.1, 3.2, 3.3]
gemfile:
rails:
- rails_7.0
- rails_7.1
- rails_7.2
- rails_edge
env:
RAILS_ENV: test
DISPLAY: ":99.0"
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.rails }}.gemfile

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.rails }}.gemfile

- name: Set up PhantomJS
run: |
Expand Down
2 changes: 2 additions & 0 deletions best_in_place.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ DESC
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

s.required_ruby_version = '>= 3.1.0'

s.add_runtime_dependency 'actionpack', '>= 7.0'
s.add_runtime_dependency 'railties', '>= 7.0'
end
4 changes: 2 additions & 2 deletions lib/best_in_place/engine.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module BestInPlace
class Engine < Rails::Engine
initializer 'best_in_place' do
ActionView::Base.send(:include, BestInPlace::Helper)
ActionController::Base.send(:include, BestInPlace::ControllerExtensions)
ActiveSupport.on_load(:action_view) { include BestInPlace::Helper }
ActiveSupport.on_load(:action_controller_base) { include BestInPlace::ControllerExtensions }
end
end
end
2 changes: 1 addition & 1 deletion lib/best_in_place/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module BestInPlace
class Railtie < ::Rails::Railtie #:nodoc:
config.after_initialize do
BestInPlace::ViewHelpers = ActionView::Base.new({}, {}, "")
BestInPlace::ViewHelpers = ActionView::Base.empty
end
end
end

0 comments on commit f494b4f

Please sign in to comment.