mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
Updated: JRuby to 9.2.11.0
- fix: deprecation warnings due JRuby 9.2.11 - fix: compat for upgraded RubyGems 3.0 Fixes #11647
This commit is contained in:
parent
d3d765a455
commit
b7a5f76859
5 changed files with 10 additions and 15 deletions
|
@ -1 +1 @@
|
|||
jruby-9.1.12.0
|
||||
jruby-9.2.11.0
|
||||
|
|
|
@ -54,8 +54,8 @@ public final class OutputStrategyExt {
|
|||
}
|
||||
|
||||
@JRubyMethod
|
||||
public IRubyObject classes() {
|
||||
return map.rb_values();
|
||||
public IRubyObject classes(final ThreadContext context) {
|
||||
return map.values(context);
|
||||
}
|
||||
|
||||
@JRubyMethod
|
||||
|
@ -78,7 +78,7 @@ public final class OutputStrategyExt {
|
|||
String.format(
|
||||
"Could not find output delegator strategy of type '%s'. Value strategies: %s",
|
||||
type.asJavaString(),
|
||||
map.rb_values().stream().map(v -> ((IRubyObject) v).asJavaString())
|
||||
map.values(context).stream().map(v -> ((IRubyObject) v).asJavaString())
|
||||
.collect(Collectors.joining(", "))
|
||||
)
|
||||
);
|
||||
|
|
|
@ -1,20 +1,15 @@
|
|||
package org.logstash.log;
|
||||
|
||||
import co.elastic.logstash.api.DeprecationLogger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.jruby.RubyClass;
|
||||
import org.jruby.RubyModule;
|
||||
import org.jruby.RubyString;
|
||||
import org.jruby.anno.JRubyMethod;
|
||||
import org.jruby.anno.JRubyModule;
|
||||
import org.jruby.javasupport.JavaUtil;
|
||||
import org.jruby.runtime.Block;
|
||||
import org.jruby.runtime.ThreadContext;
|
||||
import org.jruby.runtime.builtin.IRubyObject;
|
||||
import org.jruby.runtime.builtin.InstanceVariables;
|
||||
import org.logstash.RubyUtil;
|
||||
import org.logstash.common.SourceWithMetadata;
|
||||
|
||||
import static org.logstash.RubyUtil.RUBY;
|
||||
|
||||
|
@ -50,7 +45,7 @@ public final class LoggableExt {
|
|||
}
|
||||
|
||||
private static RubyString log4jName(final ThreadContext context, final RubyModule self) {
|
||||
IRubyObject name = self.name19();
|
||||
IRubyObject name = self.name(context);
|
||||
if (name.isNil()) {
|
||||
final RubyClass clazz;
|
||||
if (self instanceof RubyClass) {
|
||||
|
@ -58,7 +53,7 @@ public final class LoggableExt {
|
|||
} else {
|
||||
clazz = self.getMetaClass();
|
||||
}
|
||||
name = clazz.name19();
|
||||
name = clazz.name(context);
|
||||
if (name.isNil()) {
|
||||
name = clazz.to_s();
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ buildscript {
|
|||
dependencies {
|
||||
classpath 'org.yaml:snakeyaml:1.23'
|
||||
classpath "de.undercouch:gradle-download-task:3.2.0"
|
||||
classpath "org.jruby:jruby-complete:9.2.9.0"
|
||||
classpath "org.jruby:jruby-complete:9.2.11.0"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ void gem(File projectDir, File buildDir, String gem, String version, String path
|
|||
jruby.runScriptlet("""
|
||||
require 'rubygems/commands/install_command'
|
||||
cmd = Gem::Commands::InstallCommand.new
|
||||
cmd.handle_options ['--no-ri', '--no-rdoc', '${gem}', '-v', '${version}', '-i', '${path}']
|
||||
cmd.handle_options ['--no-document', '${gem}', '-v', '${version}', '-i', '${path}']
|
||||
begin
|
||||
cmd.execute
|
||||
rescue Gem::SystemExitException => e
|
||||
|
|
|
@ -7,8 +7,8 @@ logstash-core-plugin-api: 2.1.16
|
|||
# jruby must reference a *released* version of jruby which can be downloaded from the official download url
|
||||
# *and* for which jars artifacts are published for compile-time
|
||||
jruby:
|
||||
version: 9.2.9.0
|
||||
sha1: 39ef88eb5e7319402b15c048f638f26e2b9c4f4c
|
||||
version: 9.2.11.0
|
||||
sha1: c92bf2e52132b4d6d120f8dfbae15b36ab20d9d4
|
||||
|
||||
# jruby-runtime-override, if specified, will override the jruby version installed in vendor/jruby for logstash runtime only,
|
||||
# not for the compile-time jars
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue