Skip to content

Commit

Permalink
Update with rails on Jruby9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyCTHsu committed Nov 25, 2024
1 parent 7f72e43 commit ed6ea7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 1 addition & 7 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,7 @@ namespace :test do
desc 'Run all tests'
task all: TEST_METADATA.map { |k, _| "test:#{k}" }

major, minor, = if defined?(RUBY_ENGINE_VERSION)
Gem::Version.new(RUBY_ENGINE_VERSION).segments
else
# For Ruby < 2.3
Gem::Version.new(RUBY_VERSION).segments
end

major, minor, = Gem::Version.new(RUBY_ENGINE_VERSION).segments
ruby_runtime = "#{RUBY_ENGINE}-#{major}.#{minor}"

TEST_METADATA.each do |key, spec_metadata|
Expand Down
7 changes: 7 additions & 0 deletions tasks/edge.rake
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ require_relative 'runtime_matcher'
namespace :edge do
desc 'Update all the groups with gemspec dependencies'
task :gemspec do |_t, _args|
major, minor, = Gem::Version.new(RUBY_ENGINE_VERSION).segments
ruby_runtime = "#{RUBY_ENGINE}-#{major}.#{minor}"

candidates = Set.new

TEST_METADATA.each do |_, metadata|
metadata.each do |group, rubies|
# Exceptions:
# Rails 4.x is not supported on JRuby 9.2 (which is RUBY_VERSION 2.5)
next false if ruby_runtime == 'jruby-9.2' && group.start_with?('rails4')

candidates << group if RuntimeMatcher.match?(rubies)
end
end
Expand Down

0 comments on commit ed6ea7f

Please sign in to comment.