From 09dbec18c3ba145f00fc1e428d47464905035f31 Mon Sep 17 00:00:00 2001 From: Daniel Pepper Date: Thu, 17 Sep 2026 17:15:12 -0700 Subject: [PATCH] chore: update rubocop and standard Brings the lint gems current (rubocop 1.70.0 -> 1.88.2, standard 1.44.0 -> 1.56.0) and fixes the one offense the upgrade surfaces. --- Gemfile.lock | 54 ++++++++++++----------- test/file_utils_test.rb | 7 +++ vite_ruby/lib/vite_ruby/cli/file_utils.rb | 2 +- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 267080c5..ef84ffc3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -98,7 +98,7 @@ GEM mutex_m tzinfo (~> 2.0) ansi (1.5.0) - ast (2.4.2) + ast (2.4.3) base64 (0.3.0) benchmark (0.5.0) benchmark-ips (2.14.0) @@ -126,8 +126,8 @@ GEM prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.9.1) - language_server-protocol (3.17.0.3) + json (2.21.2) + language_server-protocol (3.17.0.6) lint_roller (1.1.0) logger (1.7.0) loofah (2.25.2) @@ -166,8 +166,8 @@ GEM nokogiri (1.19.4) mini_portile2 (~> 2.8.2) racc (~> 1.4) - parallel (1.26.3) - parser (3.3.6.0) + parallel (2.2.0) + parser (3.3.12.0) ast (~> 2.4.1) racc pp (0.6.4) @@ -232,27 +232,31 @@ GEM prism (>= 1.6.0) rbs (>= 4.0.0) tsort - regexp_parser (2.10.0) + regexp_parser (2.12.0) reline (0.7.0) io-console (~> 0.5) - rubocop (1.70.0) + rubocop (1.88.2) json (~> 2.3) - language_server-protocol (>= 3.17.0) - parallel (~> 1.10) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) + parallel (>= 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.36.2, < 2.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.37.0) - parser (>= 3.3.1.0) - rubocop-minitest (0.36.0) - rubocop (>= 1.61, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) - rubocop-performance (1.23.1) - rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (1.50.0) + parser (>= 3.3.7.2) + prism (~> 1.7) + rubocop-minitest (0.40.0) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) + rubocop-performance (1.26.1) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) ruby-progressbar (1.13.0) simplecov (0.22.0) docile (~> 1.1) @@ -261,25 +265,25 @@ GEM simplecov-html (0.13.1) simplecov_json_formatter (0.1.4) spring (2.1.1) - standard (1.44.0) + standard (1.56.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.70.0) + rubocop (~> 1.88.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.6) + standard-performance (~> 1.8) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.6.0) + standard-performance (1.9.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.23.0) + rubocop-performance (~> 1.26.0) thor (1.5.0) timeout (0.4.0) tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (3.1.4) - unicode-emoji (~> 4.0, >= 4.0.4) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) unicode-emoji (4.2.0) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) diff --git a/test/file_utils_test.rb b/test/file_utils_test.rb index a6693c9a..04868ed2 100644 --- a/test/file_utils_test.rb +++ b/test/file_utils_test.rb @@ -41,6 +41,13 @@ def test_write assert_content path, "Hello\nWorld" end + def test_write_nested_content + path = root.join("write_nested") + write(path, "Hello\n", ["World", "!"]) + + assert_content path, "Hello\nWorld!" + end + def test_append path = root.join("append.rb") content = <<~CONTENT diff --git a/vite_ruby/lib/vite_ruby/cli/file_utils.rb b/vite_ruby/lib/vite_ruby/cli/file_utils.rb index 36763868..0fa9d6cf 100644 --- a/vite_ruby/lib/vite_ruby/cli/file_utils.rb +++ b/vite_ruby/lib/vite_ruby/cli/file_utils.rb @@ -14,7 +14,7 @@ class << self def write(path, *content) mkdir_p(path) File.open(path, File::CREAT | File::WRONLY | File::TRUNC) do |file| - file.write(Array(content).flatten.join) + file.write(Array(content).join) end end