From 1e63acdb3aac19953045c25e407e8b4548478ac7 Mon Sep 17 00:00:00 2001 From: "restyled-io[bot]" <32688539+restyled-io[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 18:23:57 -0600 Subject: [PATCH] Restyled by standardrb (#1103) Co-authored-by: Restyled.io --- packaging/homebrew/homebrew.rb | 36 +++++++++++----------- src/plugins/core/assets/rubygems_plugin.rb | 8 ++--- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packaging/homebrew/homebrew.rb b/packaging/homebrew/homebrew.rb index 2e7e1dd91..ea50bb15a 100644 --- a/packaging/homebrew/homebrew.rb +++ b/packaging/homebrew/homebrew.rb @@ -1,44 +1,44 @@ # frozen_string_literal: true class Rtx < Formula - desc 'Multi-language runtime manager' - homepage 'https://github.com/jdx/rtx' - license 'MIT' - version '$RTX_VERSION' + desc "Multi-language runtime manager" + homepage "https://github.com/jdx/rtx" + license "MIT" + version "$RTX_VERSION" on_macos do if Hardware::CPU.intel? - url 'https://rtx.pub/v$RTX_VERSION/rtx-v$RTX_VERSION-macos-x64.tar.xz' - sha256 '$RTX_CHECKSUM_MACOS_X86_64' + url "https://rtx.pub/v$RTX_VERSION/rtx-v$RTX_VERSION-macos-x64.tar.xz" + sha256 "$RTX_CHECKSUM_MACOS_X86_64" end if Hardware::CPU.arm? - url 'https://rtx.pub/v$RTX_VERSION/rtx-v$RTX_VERSION-macos-arm64.tar.xz' - sha256 '$RTX_CHECKSUM_MACOS_ARM64' + url "https://rtx.pub/v$RTX_VERSION/rtx-v$RTX_VERSION-macos-arm64.tar.xz" + sha256 "$RTX_CHECKSUM_MACOS_ARM64" end end on_linux do if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url 'https://rtx.pub/v$RTX_VERSION/rtx-v$RTX_VERSION-linux-arm64.tar.xz' - sha256 '$RTX_CHECKSUM_LINUX_ARM64' + url "https://rtx.pub/v$RTX_VERSION/rtx-v$RTX_VERSION-linux-arm64.tar.xz" + sha256 "$RTX_CHECKSUM_LINUX_ARM64" end if Hardware::CPU.intel? - url 'https://rtx.pub/v$RTX_VERSION/rtx-v$RTX_VERSION-linux-x64.tar.xz' - sha256 '$RTX_CHECKSUM_LINUX_X86_64' + url "https://rtx.pub/v$RTX_VERSION/rtx-v$RTX_VERSION-linux-x64.tar.xz" + sha256 "$RTX_CHECKSUM_LINUX_X86_64" end end def install - bin.install 'bin/rtx' - man1.install 'man/man1/rtx.1' - generate_completions_from_executable(bin / 'rtx', 'completion') + bin.install "bin/rtx" + man1.install "man/man1/rtx.1" + generate_completions_from_executable(bin / "rtx", "completion") lib.mkpath - touch lib / '.disable-self-update' + touch lib / ".disable-self-update" end test do system "#{bin}/rtx --version" - system "#{bin}/rtx", 'install', 'node@20.0.0' - assert_match 'v20.0.0', shell_output("#{bin}/rtx exec node@20.0.0 -- node -v") + system "#{bin}/rtx", "install", "node@20.0.0" + assert_match "v20.0.0", shell_output("#{bin}/rtx exec node@20.0.0 -- node -v") end end diff --git a/src/plugins/core/assets/rubygems_plugin.rb b/src/plugins/core/assets/rubygems_plugin.rb index 83ba5834f..bd88173f6 100644 --- a/src/plugins/core/assets/rubygems_plugin.rb +++ b/src/plugins/core/assets/rubygems_plugin.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true def debug? - !!ENV['RTX_DEBUG'] + !!ENV["RTX_DEBUG"] end def log_debug(msg) @@ -9,11 +9,11 @@ def log_debug(msg) end def reshim - if `which ruby`.strip != '' - log_debug 'reshim' + if `which ruby`.strip != "" + log_debug "reshim" `rtx reshim` else - log_debug 'reshim skipped: ruby not found' + log_debug "reshim skipped: ruby not found" end end