From aa7a1a88e54dd6aed52173a52f676b7e9c846427 Mon Sep 17 00:00:00 2001 From: Ohkubo KOHEI Date: Tue, 28 Jan 2025 12:00:04 +0000 Subject: [PATCH 1/4] support ruby 3.4.0 style backtrace string --- app/models/solid_errors/backtrace_line.rb | 2 +- test/test_backtrace.rb | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 test/test_backtrace.rb diff --git a/app/models/solid_errors/backtrace_line.rb b/app/models/solid_errors/backtrace_line.rb index 8ac75c5..8d8194b 100644 --- a/app/models/solid_errors/backtrace_line.rb +++ b/app/models/solid_errors/backtrace_line.rb @@ -2,7 +2,7 @@ module SolidErrors # adapted from: https://github.com/honeybadger-io/honeybadger-ruby/blob/master/lib/honeybadger/backtrace.rb class BacktraceLine # Backtrace line regexp (optionally allowing leading X: for windows support). - INPUT_FORMAT = %r{^((?:[a-zA-Z]:)?[^:]+):(\d+)(?::in `([^']+)')?$} + INPUT_FORMAT = %r{^((?:[a-zA-Z]:)?[^:]+):(\d+)(?::in [`']([^']+)')?$} STRING_EMPTY = "".freeze GEM_ROOT = "[GEM_ROOT]".freeze PROJECT_ROOT = "[PROJECT_ROOT]".freeze diff --git a/test/test_backtrace.rb b/test/test_backtrace.rb new file mode 100644 index 0000000..a51f8f8 --- /dev/null +++ b/test/test_backtrace.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +require "test_helper" + +class TestSolidErrors < Minitest::Test + def test_backtrace + backtrace = SolidErrors::Backtrace.parse(caller(0)).to_a + assert_equal backtrace[0][:method], "TestSolidErrors#test_backtrace" + end +end From 637984cc1143c7209abe2160e3a122f585d29c32 Mon Sep 17 00:00:00 2001 From: Ohkubo KOHEI Date: Wed, 29 Jan 2025 00:14:13 +0000 Subject: [PATCH 2/4] fix error --- test/test_backtrace.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_backtrace.rb b/test/test_backtrace.rb index a51f8f8..24d6226 100644 --- a/test/test_backtrace.rb +++ b/test/test_backtrace.rb @@ -5,6 +5,6 @@ class TestSolidErrors < Minitest::Test def test_backtrace backtrace = SolidErrors::Backtrace.parse(caller(0)).to_a - assert_equal backtrace[0][:method], "TestSolidErrors#test_backtrace" + assert_includes backtrace[0][:method], "test_backtrace" end end From 4242c50b61ca9d796a5d9f57a589f9eaaf190ba1 Mon Sep 17 00:00:00 2001 From: Ohkubo KOHEI Date: Wed, 29 Jan 2025 00:14:21 +0000 Subject: [PATCH 3/4] add ruby 3.4.0 test --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 20e273a..bfafd10 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,6 +17,7 @@ jobs: - '3.1.4' - '3.2.3' - '3.3.0' + - '3.4.0' steps: - uses: actions/checkout@v4 - name: Set up Ruby From b9346697e6549e0117568ba2c51e19a188d47330 Mon Sep 17 00:00:00 2001 From: Ohkubo KOHEI Date: Fri, 14 Feb 2025 03:51:15 +0000 Subject: [PATCH 4/4] update Gemfile.lock --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9a997c5..02a878d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -97,9 +97,9 @@ GEM timeout net-smtp (0.5.0) net-protocol - nokogiri (1.16.7-arm64-darwin) + nokogiri (1.18.2-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.7-x86_64-linux) + nokogiri (1.18.2-x86_64-linux-gnu) racc (~> 1.4) parallel (1.26.3) parser (3.3.4.2) @@ -158,8 +158,8 @@ GEM rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) securerandom (0.3.1) - sqlite3 (2.0.4-arm64-darwin) - sqlite3 (2.0.4-x86_64-linux-gnu) + sqlite3 (2.5.0-arm64-darwin) + sqlite3 (2.5.0-x86_64-linux-gnu) standard (1.40.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0)