From 74ab0cd70a2dc9fdcaf9c5cbbc7740636066c24f Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Sat, 29 Jun 2024 18:50:20 +0200 Subject: [PATCH] chore(bundler): Align Ruby helper scripts on `to_yaml` Also do not rely on transitive imports but import 'yaml' explicitly. Signed-off-by: Sebastian Schuberth --- .../bundler/src/main/resources/resolve_dependencies.rb | 1 + .../bundler/src/main/resources/root_dependencies.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/package-managers/bundler/src/main/resources/resolve_dependencies.rb b/plugins/package-managers/bundler/src/main/resources/resolve_dependencies.rb index b61e3017123ec..c74df6c91389c 100755 --- a/plugins/package-managers/bundler/src/main/resources/resolve_dependencies.rb +++ b/plugins/package-managers/bundler/src/main/resources/resolve_dependencies.rb @@ -27,6 +27,7 @@ # [1] https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/lock.rb#L49-L58 require 'bundler' +require 'yaml' # Resolve dependencies independently of the Ruby interpreter. Bundler.settings.set_global(:force_ruby_platform, true) diff --git a/plugins/package-managers/bundler/src/main/resources/root_dependencies.rb b/plugins/package-managers/bundler/src/main/resources/root_dependencies.rb index d57e05efd7f93..f18ec4dc6c953 100755 --- a/plugins/package-managers/bundler/src/main/resources/root_dependencies.rb +++ b/plugins/package-managers/bundler/src/main/resources/root_dependencies.rb @@ -32,4 +32,4 @@ end end -puts(YAML.dump(groups)) +puts(groups.to_yaml)