Skip to content

Commit

Permalink
Add JRuby support
Browse files Browse the repository at this point in the history
  • Loading branch information
bensheldon committed Dec 31, 2020
1 parent 80f3daf commit 3fe830b
Show file tree
Hide file tree
Showing 22 changed files with 257 additions and 144 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
ruby: [2.5, 2.6, 2.7, 3.0]
ruby: [2.5, 2.6, 2.7, 3.0, jruby-9.2.13.0]
pg: [12.5, 10.8]
env:
PGHOST: localhost
Expand Down
7 changes: 5 additions & 2 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ appraise "rails-6.1" do
gem "rails", "~> 6.1"
end

appraise "rails-head" do
gem "rails", github: "rails/rails", branch: "master"
unless RUBY_PLATFORM.include?('java')
# activerecord-jdbcpostgresql-adapter does not have a compatible version
appraise "rails-head" do
gem "rails", github: "rails/rails", branch: "master"
end
end
24 changes: 14 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ gemspec
# Git. Remember to move these dependencies to your gemspec before releasing
# your gem to rubygems.org.

# To use a debugger
# gem 'byebug', group: [:development, :test]
#
group :lint do
gem "erb_lint", ">= 0.0.35"
gem "mdl"
gem "rubocop"
gem "rubocop-performance"
gem "rubocop-rails"
gem "rubocop-rspec"
gem 'activerecord-jdbcpostgresql-adapter', platforms: [:jruby]
gem 'pg', platforms: [:mri, :mingw, :x64_mingw]

platforms :ruby do
gem "rbtrace"

group :lint do
gem "erb_lint", ">= 0.0.35"
gem "mdl"
gem "rubocop"
gem "rubocop-performance"
gem "rubocop-rails"
gem "rubocop-rspec"
end
end
85 changes: 21 additions & 64 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,20 @@ PATH
activejob (>= 5.2.0)
activerecord (>= 5.2.0)
concurrent-ruby (>= 1.0.2)
pg (>= 1.0.0)
railties (>= 5.2.0)
thor (>= 0.14.1)
zeitwerk (>= 2.0)

GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.0)
actionpack (= 6.1.0)
activesupport (= 6.1.0)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.0)
actionpack (= 6.1.0)
activejob (= 6.1.0)
activerecord (= 6.1.0)
activestorage (= 6.1.0)
activesupport (= 6.1.0)
mail (>= 2.7.1)
actionmailer (6.1.0)
actionpack (= 6.1.0)
actionview (= 6.1.0)
activejob (= 6.1.0)
activesupport (= 6.1.0)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.0)
actionview (= 6.1.0)
activesupport (= 6.1.0)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.0)
actionpack (= 6.1.0)
activerecord (= 6.1.0)
activestorage (= 6.1.0)
activesupport (= 6.1.0)
nokogiri (>= 1.8.5)
actionview (6.1.0)
activesupport (= 6.1.0)
builder (~> 3.1)
Expand All @@ -59,13 +33,11 @@ GEM
activerecord (6.1.0)
activemodel (= 6.1.0)
activesupport (= 6.1.0)
activestorage (6.1.0)
actionpack (= 6.1.0)
activejob (= 6.1.0)
activerecord (= 6.1.0)
activesupport (= 6.1.0)
marcel (~> 0.3.1)
mimemagic (~> 0.3.2)
activerecord-jdbc-adapter (61.0-java)
activerecord (~> 6.1.0)
activerecord-jdbcpostgresql-adapter (61.0-java)
activerecord-jdbc-adapter (= 61.0)
jdbc-postgres (>= 9.4, < 43)
activesupport (6.1.0)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
Expand Down Expand Up @@ -119,6 +91,7 @@ GEM
faraday-http-cache (2.2.0)
faraday (>= 0.8)
ffi (1.14.2)
ffi (1.14.2-java)
foreman (0.87.2)
gem-release (2.2.0)
github_changelog_generator (1.15.2)
Expand All @@ -134,25 +107,21 @@ GEM
html_tokenizer (0.0.7)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
jdbc-postgres (42.2.14)
kramdown (2.3.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
loofah (2.8.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
mdl (0.11.0)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.1)
mixlib-cli (~> 2.1, >= 2.1.1)
mixlib-config (>= 2.2.1, < 4)
mixlib-shellout
method_source (1.0.0)
mimemagic (0.3.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.2)
Expand All @@ -165,8 +134,10 @@ GEM
multi_json (1.15.0)
multipart-post (2.1.1)
nio4r (2.5.4)
nio4r (2.5.4-java)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
nokogiri (1.10.10-java)
octokit (4.20.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
Expand All @@ -178,29 +149,20 @@ GEM
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry (0.13.1-java)
coderay (~> 1.1)
method_source (~> 1.0)
spoon (~> 0.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (4.0.6)
puma (5.1.1)
nio4r (~> 2.0)
puma (5.1.1-java)
nio4r (~> 2.0)
rack (2.2.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.1.0)
actioncable (= 6.1.0)
actionmailbox (= 6.1.0)
actionmailer (= 6.1.0)
actionpack (= 6.1.0)
actiontext (= 6.1.0)
actionview (= 6.1.0)
activejob (= 6.1.0)
activemodel (= 6.1.0)
activerecord (= 6.1.0)
activestorage (= 6.1.0)
activesupport (= 6.1.0)
bundler (>= 1.15.0)
railties (= 6.1.0)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
Expand Down Expand Up @@ -270,21 +232,13 @@ GEM
rubyzip (>= 1.2.2)
sigdump (0.2.4)
smart_properties (1.15.0)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
spoon (0.0.6)
ffi
thor (1.0.1)
tomlrb (2.0.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unicode-display_width (1.7.0)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.26)
Expand All @@ -293,9 +247,12 @@ GEM
zeitwerk (2.4.2)

PLATFORMS
java
ruby
universal-java-11

DEPENDENCIES
activerecord-jdbcpostgresql-adapter
appraisal
capybara
database_cleaner
Expand All @@ -308,9 +265,9 @@ DEPENDENCIES
kramdown
kramdown-parser-gfm
mdl
pg
pry-rails
puma
rails
rbtrace
rspec-rails
rubocop
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ For more of the story of GoodJob, read the [introductory blog post](https://isla
## Table of contents

- [Set up](#set-up)
- [Compatibility](#compatibility)
- [Configuration](#configuration)
- [Command-line options](#command-line-options)
- [`good_job start`](#good_job-start)
Expand Down Expand Up @@ -123,6 +124,12 @@ For more of the story of GoodJob, read the [introductory blog post](https://isla
Additional configuration is likely necessary, see the reference below for async configuration.
## Compatibility
- **Ruby on Rails:** 5.2+
- **Ruby:** MRI 2.5+. JRuby 9.13+ (_JRuby's `activerecord-jdbcpostgresql-adapter` gem does not support Postgres LISTEN/NOTIFY)._
- **Postgres:** 9.6+

## Configuration

### Command-line options
Expand Down
20 changes: 13 additions & 7 deletions gemfiles/rails_5.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@

source "https://rubygems.org"

gem "activerecord-jdbcpostgresql-adapter", platforms: [:jruby]
gem "pg", platforms: [:mri, :mingw, :x64_mingw]
gem "rails", "~> 5.2.0"

group :lint do
gem "erb_lint", ">= 0.0.35"
gem "mdl"
gem "rubocop"
gem "rubocop-performance"
gem "rubocop-rails"
gem "rubocop-rspec"
platforms :ruby do
gem "rbtrace"

group :lint do
gem "erb_lint", ">= 0.0.35"
gem "mdl"
gem "rubocop"
gem "rubocop-performance"
gem "rubocop-rails"
gem "rubocop-rspec"
end
end

gemspec path: "../"
Loading

0 comments on commit 3fe830b

Please sign in to comment.