diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eec2515b..eca01570 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: - "3.1" - "3.2" - "3.3" - - "jruby-9.3.10" # oldest supported jruby + - "jruby-9.3.15" - "jruby" include: # HEAD-versions - ruby-version: "head" @@ -47,12 +47,7 @@ jobs: with: rubygems: latest ruby-version: ${{ matrix.ruby-version }} - bundler-cache: ${{ !startsWith(matrix.ruby-version, 'jruby') }} - - name: Bundler install (JRuby workaround) - if: ${{ startsWith(matrix.ruby-version, 'jruby') }} - run: | - gem install psych - bundle install + bundler-cache: true - name: Run tests run: bundle exec rspec diff --git a/Gemfile b/Gemfile index 2c02c1ec..01cdd86d 100644 --- a/Gemfile +++ b/Gemfile @@ -4,5 +4,7 @@ source "https://rubygems.org" gemspec -# https://github.com/ruby/psych/issues/655 -gem "psych", "!= 5.1.1", platforms: %i[jruby] +# Affects us on JRuby 9.3.15. +# +# @see https://github.com/rails/rails/issues/54260 +gem "logger" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4b932571..3eb4bad4 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -18,6 +18,9 @@ end end +# @see https://github.com/rails/rails/issues/54260 +require "logger" if RUBY_ENGINE == "jruby" && RUBY_ENGINE_VERSION.start_with?("9.3") + require "pundit" require "pundit/rspec" require "active_model/naming" diff --git a/spec/support/lib/controller.rb b/spec/support/lib/controller.rb index 8715ecf1..8dd68c8a 100644 --- a/spec/support/lib/controller.rb +++ b/spec/support/lib/controller.rb @@ -28,9 +28,7 @@ def #{method}(*args, **kwargs, &block) include Pundit::Authorization # Mark protected methods public so they may be called in test - # rubocop:disable Style/AccessModifierDeclarations public(*Pundit::Authorization.protected_instance_methods) - # rubocop:enable Style/AccessModifierDeclarations def initialize(current_user, action_name, params) @current_user = current_user