Skip to content

Commit

Permalink
Fix JRuby CI build (#1475)
Browse files Browse the repository at this point in the history
* Remove obsolete gemfile

* Work around issue with the combination of I18n and JRuby

See jruby/jruby#6547 and
ruby-i18n/i18n#555

* Use correct released versions of activerecord-jdbcsqlite3-adapter

* Require CI to pass on JRuby again

* Build on latest JRuby 9.2 version
  • Loading branch information
mvz authored Mar 30, 2021
1 parent 358981f commit 8aaa5aa
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 17 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ rvm:
- 2.6
- 2.7
- 3.0
- jruby-9.2.8.0
- jruby-9.2.14.0
- ruby-head
before_install:
- gem update --system
Expand Down Expand Up @@ -39,7 +39,6 @@ matrix:
gemfile: gemfiles/5.2.gemfile
allow_failures:
- rvm: ruby-head
- rvm: jruby-9.2.8.0
- gemfile: gemfiles/main.gemfile
branches:
only:
Expand Down
6 changes: 3 additions & 3 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ end

appraise "6.0" do
gem "activerecord", "~> 6.0.0"
gem "activerecord-jdbcsqlite3-adapter", "~> 60.0.rc1", platforms: [:jruby]
gem "activerecord-jdbcsqlite3-adapter", "~> 60.0", platforms: [:jruby]
gem "sqlite3", platforms: [:ruby]
end

appraise "6.1" do
gem "activerecord", "~> 6.1.0"
gem "activerecord-jdbcsqlite3-adapter", "~> 60.0.rc1", platforms: [:jruby]
gem "activerecord-jdbcsqlite3-adapter", "~> 61.0", platforms: [:jruby]
gem "sqlite3", platforms: [:ruby]
end

appraise "main" do
gem "activerecord", git: "https://github.com/rails/rails.git", branch: "main"
gem "activerecord-jdbcsqlite3-adapter", "~> 60.0", platforms: [:jruby]
gem "activerecord-jdbcsqlite3-adapter", "~> 61.0", platforms: [:jruby]
gem "sqlite3", platforms: [:ruby]
end
2 changes: 1 addition & 1 deletion gemfiles/6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "activerecord-jdbcsqlite3-adapter", "~> 60.0.rc1", platforms: [:jruby]
gem "activerecord-jdbcsqlite3-adapter", "~> 60.0", platforms: [:jruby]
gem "sqlite3", platforms: [:ruby]
gem "activerecord", "~> 6.0.0"

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "activerecord-jdbcsqlite3-adapter", "~> 60.0.rc1", platforms: [:jruby]
gem "activerecord-jdbcsqlite3-adapter", "~> 61.0", platforms: [:jruby]
gem "sqlite3", platforms: [:ruby]
gem "activerecord", "~> 6.1.0"

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/main.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "activerecord-jdbcsqlite3-adapter", "~> 60.0", platforms: [:jruby]
gem "activerecord-jdbcsqlite3-adapter", "~> 61.0", platforms: [:jruby]
gem "sqlite3", platforms: [:ruby]
gem "activerecord", git: "https://github.com/rails/rails.git", branch: "main"

Expand Down
9 changes: 0 additions & 9 deletions gemfiles/master.gemfile

This file was deleted.

8 changes: 8 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@

require "factory_bot"

if RUBY_ENGINE == "jruby"
# Workaround for issue in I18n/JRuby combo.
# See https://github.com/jruby/jruby/issues/6547 and
# https://github.com/ruby-i18n/i18n/issues/555
require "i18n/backend"
require "i18n/backend/simple"
end

Dir["spec/support/**/*.rb"].each { |f| require File.expand_path(f) }

RSpec.configure do |config|
Expand Down

0 comments on commit 8aaa5aa

Please sign in to comment.