Skip to content

Commit

Permalink
Merge branch 'main' into cleanup/rm-toolbelt
Browse files Browse the repository at this point in the history
  • Loading branch information
gschueler authored Jun 30, 2023
2 parents e231d97 + ce774b1 commit a9f9e44
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildConfig = "3.0.3"
owasp = "7.1.0.1"
jacksonDatabind = "2.14.2"
picocli = "4.6.3"
snakeYaml = "1.33"
snakeYaml = "2.0"
#used for authz lib integration
rundeck = "4.2.0-20220509"
testcontainers = "1.17.2"
Expand Down
9 changes: 9 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<trusting group="org.yaml" name="snakeyaml" version="1.30"/>
<trusting group="org.yaml" name="snakeyaml" version="1.31"/>
<trusting group="org.yaml" name="snakeyaml" version="1.33"/>
<trusting group="org.yaml" name="snakeyaml" version="2.0"/>
</trusted-key>
<trusted-key id="144219b604dde6a2383fa0ee9c6404ebce3e4464" group="com.github.zafarkhaja" name="java-semver" version="0.9.0"/>
<trusted-key id="19beab2d799c020f17c69126b16698a4adf4d638">
Expand Down Expand Up @@ -4493,6 +4494,14 @@
<sha256 value="ea7d48fd45321a6033d97cd288186d48e5e92cc0c7066e7388d7c4ceb4af5957" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.yaml" name="snakeyaml" version="2.0">
<artifact name="snakeyaml-2.0.jar">
<sha256 value="880c9d896e4b74a06c549c15ca496450165d6909fa15d7e662bee8f6a66d7afa" origin="Generated by Gradle"/>
</artifact>
<artifact name="snakeyaml-2.0.pom">
<sha256 value="43c761f92b549c8b08fb992080253e49f0a983e544ef0663c1f4f9d68eb52616" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="pl.allegro.tech.build" name="axion-release-plugin" version="1.13.9">
<artifact name="axion-release-plugin-1.13.9.jar">
<pgp value="79eb1eae95f376ab9629429de2d0f3764b54797f"/>
Expand Down
10 changes: 2 additions & 8 deletions rd-cli-tool/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,8 @@ set -e
RD_CONF=${RD_CONF:-$HOME/.$APP_NAME/$APP_NAME.conf}
test -f $RD_CONF && . $RD_CONF
export RD_EXT_DIR=${RD_EXT_DIR:-$HOME/.$APP_NAME/extv2}
'''
)
def setJ11AddOpens=appendConfigData.curry(
'^APP_ARGS=.*$',
'''
if $JAVACMD --add-opens 2>&1 | grep 'requires modules' >/dev/null; then
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang.invoke=ALL-UNNAMED"
if [ ! -z "$(java --add-opens 2>&1 | grep 'requires modules')" ]; then
export JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang.invoke=ALL-UNNAMED"
fi
'''
)
Expand All @@ -126,7 +121,6 @@ fi
.readLines()
.collect(setE)
.collect(setClasspath)
.collect(setJ11AddOpens)
.join('\n')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ private static void configYamlFormat(final RdBuilder belt, final RdClientConfig
DumperOptions.FlowStyle.FLOW
);
dumperOptions.setPrettyFlow(config.getBool("RD_YAML_PRETTY", true));
Representer representer = new Representer();
Representer representer = new Representer(dumperOptions);
representer.addClassTag(JobItem.class, Tag.MAP);
representer.addClassTag(ScheduledJobItem.class, Tag.MAP);
representer.addClassTag(DateInfo.class, Tag.MAP);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.rundeck.client.tool.options.ProjectNameOptions;
import org.rundeck.client.tool.options.ProjectRequiredNameOptions;
import org.rundeck.client.tool.options.UnparsedConfigOptions;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.SafeConstructor;
import picocli.CommandLine;
Expand Down Expand Up @@ -157,7 +158,7 @@ public static Map<String, String> loadConfig(final ConfigFileOptions opts,
inputConfig.putAll(map);
break;
case yaml:
Yaml yaml = new Yaml(new SafeConstructor());
Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));
try (FileInputStream fis = new FileInputStream(input)) {
Object load = yaml.load(fis);
if (load instanceof Map) {
Expand Down

0 comments on commit a9f9e44

Please sign in to comment.