Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ jobs:
strategy:
matrix:
java-version: [8, 21, 25]
ruby-version: [jruby-9.4, jruby-10.0]
ruby-version: [jruby-9.4, jruby-10.0, jruby-10.1]
task: ['', integration]
exclude:
# JRuby 10 requires Java 21 minimum
- ruby-version: jruby-10.0
- ruby-version: jruby-10.0 # JRuby 10 requires Java 21 minimum
java-version: 8
- ruby-version: jruby-10.1 # JRuby 10 requires Java 21 minimum
java-version: 8

fail-fast: false
Expand Down Expand Up @@ -50,7 +51,7 @@ jobs:
run: gem uninstall -a jruby-launcher

- name: Install dependencies
run: bundle install
run: BUNDLE_JOBS=1 bundle install

- name: Run tests
run: bundle exec rake ${{ matrix.task }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 2.1.1 (UNRELEASED)

- #623: fix: ensure compatibility with JRuby 10.1
- #583: fix: Create config dir if it's missing for simpler usage
- #588: fix: NullPointerException during shutdown with executable war files
- #589: fix: Jetty wars don't have console logging enabled by default
Expand Down
4 changes: 2 additions & 2 deletions spec/warbler/bundler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def apply_silently
run_in_directory "spec/sample_bundler"

before do
bundle 'config', 'deployment', 'true'
bundle 'config', 'set', 'deployment', 'true'
end

it "includes the bundler gem" do
Expand All @@ -258,7 +258,7 @@ def apply_silently
end

after do
bundle 'config', 'deployment', 'false'
bundle 'config', 'set', 'deployment', 'false'
end
end

Expand Down
31 changes: 8 additions & 23 deletions spec/warbler/jar_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -351,39 +351,24 @@ def apply_silently

it "collects gem files with dependencies" do
use_config do |config|
config.gems << 'virtus'
config.gems << 'rspec-expectations'
config.gem_dependencies = true
end
apply_silently
expect(file_list(%r{WEB-INF/gems/gems/axiom-types.*/lib})).to_not be_empty
expect(file_list(%r{WEB-INF/gems/specifications/axiom-types.*\.gemspec})).to_not be_empty
expect(file_list(%r{WEB-INF/gems/gems/equalizer.*/lib/equalizer/version.rb$})).to_not be_empty
# NOTE: rdoc is tricky as its dependency json is a default gem
#use_config do |config|
# config.gems << "rdoc"
# config.gem_dependencies = true
#end
#apply_silently
#expect(file_list(%r{WEB-INF/gems/gems/json.*/lib/json.rb})).to_not be_empty
#expect(file_list(%r{WEB-INF/gems/specifications/json.*\.gemspec})).to_not be_empty
expect(file_list(%r{WEB-INF/gems/gems/rspec-support.*/lib})).to_not be_empty
expect(file_list(%r{WEB-INF/gems/specifications/rspec-support.*\.gemspec})).to_not be_empty
expect(file_list(%r{WEB-INF/gems/gems/diff-lcs.*/lib/diff/lcs/version.rb$})).to_not be_empty
end

it "collects gem files without dependencies" do
use_config do |config|
config.gems << 'virtus'
config.gems << 'rspec-expectations'
config.gem_dependencies = false
end
apply_silently
expect(file_list(%r{WEB-INF/gems/gems/axiom-types.*/lib})).to be_empty
expect(file_list(%r{WEB-INF/gems/specifications/axiom-types.*\.gemspec})).to be_empty
expect(file_list(%r{WEB-INF/gems/gems/equalizer.*/lib/equalizer/version.rb$})).to be_empty
#use_config do |config|
# config.gems << "rdoc"
# config.gem_dependencies = false
#end
#apply_silently
#expect(file_list(%r{WEB-INF/gems/gems/json.*/lib/json.rb})).to be_empty
#expect(file_list(%r{WEB-INF/gems/specifications/json.*\.gemspec})).to be_empty
expect(file_list(%r{WEB-INF/gems/gems/rspec-support.*/lib})).to be_empty
expect(file_list(%r{WEB-INF/gems/specifications/rspec-support.*\.gemspec})).to be_empty
expect(file_list(%r{WEB-INF/gems/gems/diff-lcs.*/lib/diff/lcs/version.rb$})).to be_empty
end

it "adds ENV['GEM_HOME'] to init.rb" do
Expand Down
3 changes: 2 additions & 1 deletion spec/warbler/jbundler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

require File.expand_path('../../spec_helper', __FILE__)

describe Warbler::Jar, "with JBundler" do
should_skip = "JBundler is deprecated and not supported on Ruby 4.0 / JRuby 10.1" if RUBY_VERSION.to_f >= 4.0 || false
describe Warbler::Jar, "with JBundler", skip: should_skip do
use_fresh_rake_application
use_fresh_environment
run_out_of_process_with_drb
Expand Down
12 changes: 8 additions & 4 deletions warbler.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,16 @@ bundle up all of your application files for deployment to a Java environment.}

gem.add_runtime_dependency 'rake', ['~> 13.0', '>= 13.0.3']
gem.add_runtime_dependency 'rexml', '~> 3.0'
gem.add_runtime_dependency 'jruby-jars', ['>= 9.4', '< 10.1']
gem.add_runtime_dependency 'jruby-rack', ['>= 1.2.6', '< 1.4']
gem.add_runtime_dependency 'jruby-jars', ['>= 9.4', '< 10.2']
gem.add_runtime_dependency 'jruby-rack', ['>= 1.2.7', '< 1.4']
gem.add_runtime_dependency 'rubyzip', ['>= 2.1.0', '< 4']
gem.add_runtime_dependency 'ostruct', '~> 0.6.2'

gem.add_development_dependency 'rspec', '~> 3.0'
gem.add_development_dependency 'drb', ['~> 2.2', '>= 2.2.3']
gem.add_development_dependency 'jbundler', '~> 0.9.5'
gem.add_development_dependency 'bigdecimal', '< 5' # Needed workaround jbundler > maven-tools > vertus > axiom-types lack of explicit bigdecimal dependency for for JRuby 10
gem.add_development_dependency 'ruby-maven', '~> 3.9'
gem.add_development_dependency 'bigdecimal' # Needed workaround for maven-tools > vertus > axiom-types lack of explicit bigdecimal dependency for JRuby 10

# JBundler is unsupported on JRuby 10.1
gem.add_development_dependency 'jbundler', '~> 0.9.5' if RUBY_VERSION.to_f < 4.0
end
Loading