From 6c95bcb24450e24559bc1918b980bd2ddfb09f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Wed, 8 Apr 2026 15:51:15 -0600 Subject: [PATCH 01/13] Bump to Ruby 4.0 --- .ruby-version | 2 +- Gemfile.lock | 23 +++++++++++++---------- Gemfile.next.lock | 23 +++++++++++++---------- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/.ruby-version b/.ruby-version index 2aa5131..4d54dad 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.4.7 +4.0.2 diff --git a/Gemfile.lock b/Gemfile.lock index 5887a09..63b5bfe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -183,13 +183,13 @@ GEM faraday-em_synchrony (1.0.1) faraday-excon (1.1.0) faraday-httpclient (1.0.1) - faraday-multipart (1.1.1) + faraday-multipart (1.2.0) multipart-post (~> 2.0) faraday-net_http (1.0.2) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) - faraday-retry (1.0.3) + faraday-retry (1.0.4) faraday_middleware (1.2.1) faraday (~> 1.0) fog-aws (3.29.0) @@ -261,7 +261,10 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2024.1001) mini_mime (1.1.5) - minitest (5.26.0) + mini_portile2 (2.8.9) + minitest (6.0.3) + drb (~> 2.0) + prism (~> 1.5) msgpack (1.7.2) multi_json (1.15.0) multipart-post (2.4.1) @@ -275,9 +278,8 @@ GEM next_rails (1.4.8) rainbow (>= 3) nio4r (2.7.4) - nokogiri (1.18.10-arm64-darwin) - racc (~> 1.4) - nokogiri (1.18.10-x86_64-linux-gnu) + nokogiri (1.18.10) + mini_portile2 (~> 2.8.2) racc (~> 1.4) octokit (9.2.0) faraday (>= 1, < 3) @@ -289,6 +291,7 @@ GEM pp (0.6.3) prettyprint prettyprint (0.2.0) + prism (1.9.0) process_executer (1.1.0) propshaft (0.9.0) actionpack (>= 7.0.0) @@ -455,9 +458,9 @@ GEM railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (3.1.4) - unicode-emoji (~> 4.0, >= 4.0.4) - unicode-emoji (4.0.4) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.2.0) uri (1.0.4) useragent (0.16.11) vcr (6.3.1) @@ -533,7 +536,7 @@ DEPENDENCIES webmock RUBY VERSION - ruby 3.4.7p58 + ruby 4.0.2p0 BUNDLED WITH 2.5.13 diff --git a/Gemfile.next.lock b/Gemfile.next.lock index 1ddb4c0..4c33466 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -185,13 +185,13 @@ GEM faraday-em_synchrony (1.0.1) faraday-excon (1.1.0) faraday-httpclient (1.0.1) - faraday-multipart (1.1.1) + faraday-multipart (1.2.0) multipart-post (~> 2.0) faraday-net_http (1.0.2) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) - faraday-retry (1.0.3) + faraday-retry (1.0.4) faraday_middleware (1.2.1) faraday (~> 1.0) fog-aws (3.29.0) @@ -264,7 +264,10 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2024.1001) mini_mime (1.1.5) - minitest (5.26.0) + mini_portile2 (2.8.9) + minitest (6.0.3) + drb (~> 2.0) + prism (~> 1.5) msgpack (1.7.2) multi_json (1.15.0) multipart-post (2.4.1) @@ -278,9 +281,8 @@ GEM next_rails (1.4.8) rainbow (>= 3) nio4r (2.7.4) - nokogiri (1.18.10-arm64-darwin) - racc (~> 1.4) - nokogiri (1.18.10-x86_64-linux-gnu) + nokogiri (1.18.10) + mini_portile2 (~> 2.8.2) racc (~> 1.4) octokit (9.2.0) faraday (>= 1, < 3) @@ -292,6 +294,7 @@ GEM pp (0.6.3) prettyprint prettyprint (0.2.0) + prism (1.9.0) process_executer (1.1.0) propshaft (0.9.0) actionpack (>= 7.0.0) @@ -458,9 +461,9 @@ GEM railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (3.1.4) - unicode-emoji (~> 4.0, >= 4.0.4) - unicode-emoji (4.0.4) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.2.0) uri (1.0.4) useragent (0.16.11) vcr (6.3.1) @@ -536,7 +539,7 @@ DEPENDENCIES webmock RUBY VERSION - ruby 3.4.7p58 + ruby 4.0.2p0 BUNDLED WITH 2.5.13 From 66a2b8d6f3d04518d385ee91b37dacb5efc7952b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Wed, 8 Apr 2026 15:53:19 -0600 Subject: [PATCH 02/13] Remove Gems that are unused --- Gemfile | 2 -- Gemfile.lock | 12 ------------ Gemfile.next.lock | 12 ------------ 3 files changed, 26 deletions(-) diff --git a/Gemfile b/Gemfile index 932de1c..2cd2b5d 100644 --- a/Gemfile +++ b/Gemfile @@ -30,7 +30,6 @@ gem "octokit", "~> 9.1" gem "octopoller", "~> 0.3" gem "ostruct" gem "propshaft", "~> 0.8" -gem "pry-rails", "~> 0.3" gem "puma", "~> 6.4" gem "rails_bootstrap_navbar", "~> 3.0" if next? @@ -53,7 +52,6 @@ gem "turbo-rails", "~> 2.0" group :development do gem "annotaterb", "~> 4.4", require: false gem "better_errors", "~> 2.8" - gem "binding_of_caller", "~> 1.0" gem "rails-erd" end diff --git a/Gemfile.lock b/Gemfile.lock index 63b5bfe..16343fe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -121,8 +121,6 @@ GEM rack (>= 0.9.0) rouge (>= 1.0.0) bigdecimal (3.3.1) - binding_of_caller (1.0.1) - debug_inspector (>= 1.2.0) bootsnap (1.18.3) msgpack (~> 1.2) bootstrap (5.3.3) @@ -136,7 +134,6 @@ GEM codecov (0.2.12) json simplecov - coderay (1.1.3) concurrent-ruby (1.3.5) connection_pool (2.5.4) crack (1.0.0) @@ -151,7 +148,6 @@ GEM database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) date (3.4.1) - debug_inspector (1.2.0) diff-lcs (1.5.1) docile (1.4.1) dotenv (3.1.2) @@ -255,7 +251,6 @@ GEM net-pop net-smtp marcel (1.1.0) - method_source (1.1.0) mime-types (3.6.0) logger mime-types-data (~> 3.2015) @@ -298,11 +293,6 @@ GEM activesupport (>= 7.0.0) rack railties (>= 7.0.0) - pry (0.14.2) - coderay (~> 1.1) - method_source (~> 1.0) - pry-rails (0.3.11) - pry (>= 0.13.0) psych (5.2.6) date stringio @@ -487,7 +477,6 @@ DEPENDENCIES aws-sdk-s3 (~> 1.8) baseline! better_errors (~> 2.8) - binding_of_caller (~> 1.0) bootsnap (~> 1.17) bootstrap (~> 5.3.3) byebug (~> 11.1) @@ -513,7 +502,6 @@ DEPENDENCIES ostruct pg propshaft (~> 0.8) - pry-rails (~> 0.3) puma (~> 6.4) rails (~> 8.0.0) rails-controller-testing diff --git a/Gemfile.next.lock b/Gemfile.next.lock index 4c33466..6deb06e 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -123,8 +123,6 @@ GEM rack (>= 0.9.0) rouge (>= 1.0.0) bigdecimal (3.3.1) - binding_of_caller (1.0.1) - debug_inspector (>= 1.2.0) bootsnap (1.18.3) msgpack (~> 1.2) bootstrap (5.3.3) @@ -138,7 +136,6 @@ GEM codecov (0.2.12) json simplecov - coderay (1.1.3) concurrent-ruby (1.3.5) connection_pool (2.5.4) crack (1.0.0) @@ -153,7 +150,6 @@ GEM database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) date (3.4.1) - debug_inspector (1.2.0) diff-lcs (1.5.1) docile (1.4.1) dotenv (3.1.2) @@ -258,7 +254,6 @@ GEM net-pop net-smtp marcel (1.1.0) - method_source (1.1.0) mime-types (3.6.0) logger mime-types-data (~> 3.2015) @@ -301,11 +296,6 @@ GEM activesupport (>= 7.0.0) rack railties (>= 7.0.0) - pry (0.14.2) - coderay (~> 1.1) - method_source (~> 1.0) - pry-rails (0.3.11) - pry (>= 0.13.0) psych (5.2.6) date stringio @@ -490,7 +480,6 @@ DEPENDENCIES aws-sdk-s3 (~> 1.8) baseline! better_errors (~> 2.8) - binding_of_caller (~> 1.0) bootsnap (~> 1.17) bootstrap (~> 5.3.3) byebug (~> 11.1) @@ -516,7 +505,6 @@ DEPENDENCIES ostruct pg propshaft (~> 0.8) - pry-rails (~> 0.3) puma (~> 6.4) rails (~> 8.1.0) rails-controller-testing From a75ae455042c4b79fbc11b196c2dda2b97e24112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Wed, 8 Apr 2026 16:09:09 -0600 Subject: [PATCH 03/13] Update VCR to 6.4.0 for Ruby 4.0 compatibility CGI.parse was removed in Ruby 4.0, causing VCR 6.3.1 to fail. --- Gemfile.lock | 3 +-- Gemfile.next.lock | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 16343fe..b932fcf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -453,8 +453,7 @@ GEM unicode-emoji (4.2.0) uri (1.0.4) useragent (0.16.11) - vcr (6.3.1) - base64 + vcr (6.4.0) webmock (3.23.1) addressable (>= 2.8.0) crack (>= 0.3.2) diff --git a/Gemfile.next.lock b/Gemfile.next.lock index 6deb06e..efe82f1 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -456,8 +456,7 @@ GEM unicode-emoji (4.2.0) uri (1.0.4) useragent (0.16.11) - vcr (6.3.1) - base64 + vcr (6.4.0) webmock (3.23.1) addressable (>= 2.8.0) crack (>= 0.3.2) From bfa74755785acc164de9b796640a905773b38826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Wed, 8 Apr 2026 16:21:41 -0600 Subject: [PATCH 04/13] Remove byebug gem Unmaintained since 2022 and incompatible with Ruby 4.0 (C extension). Ruby 4.0 ships with the debug gem as a built-in replacement. --- Gemfile | 1 - Gemfile.lock | 2 -- Gemfile.next.lock | 2 -- 3 files changed, 5 deletions(-) diff --git a/Gemfile b/Gemfile index 2cd2b5d..f2d4745 100644 --- a/Gemfile +++ b/Gemfile @@ -57,7 +57,6 @@ end # Run against this stable release group :development, :test do - gem "byebug", "~> 11.1" gem "codecov", require: false gem "database_cleaner-active_record" gem "factory_bot_rails", "~> 6.2" diff --git a/Gemfile.lock b/Gemfile.lock index b932fcf..2d2bffc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -129,7 +129,6 @@ GEM bootstrap-navbar (3.2.2) gem_config (~> 0.3) builder (3.3.0) - byebug (11.1.3) choice (0.2.0) codecov (0.2.12) json @@ -478,7 +477,6 @@ DEPENDENCIES better_errors (~> 2.8) bootsnap (~> 1.17) bootstrap (~> 5.3.3) - byebug (~> 11.1) codecov dartsass-rails (~> 0.5) database_cleaner-active_record diff --git a/Gemfile.next.lock b/Gemfile.next.lock index efe82f1..18f9e11 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -131,7 +131,6 @@ GEM bootstrap-navbar (3.2.2) gem_config (~> 0.3) builder (3.3.0) - byebug (11.1.3) choice (0.2.0) codecov (0.2.12) json @@ -481,7 +480,6 @@ DEPENDENCIES better_errors (~> 2.8) bootsnap (~> 1.17) bootstrap (~> 5.3.3) - byebug (~> 11.1) codecov dartsass-rails (~> 0.5) database_cleaner-active_record From ae3d56cefac68940b60c323dd1db54c65a0643d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Wed, 8 Apr 2026 18:37:05 -0600 Subject: [PATCH 05/13] Remove better_errors gem Its dependency rouge uses CGI.parse which is removed in Ruby 4.0. Rails built-in error pages are sufficient for development. --- Gemfile | 1 - Gemfile.lock | 6 ------ Gemfile.next.lock | 6 ------ 3 files changed, 13 deletions(-) diff --git a/Gemfile b/Gemfile index f2d4745..aaf5c46 100644 --- a/Gemfile +++ b/Gemfile @@ -51,7 +51,6 @@ gem "turbo-rails", "~> 2.0" group :development do gem "annotaterb", "~> 4.4", require: false - gem "better_errors", "~> 2.8" gem "rails-erd" end diff --git a/Gemfile.lock b/Gemfile.lock index 2d2bffc..6aac757 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -116,10 +116,6 @@ GEM aws-eventstream (~> 1, >= 1.0.2) base64 (0.2.0) benchmark (0.4.1) - better_errors (2.10.1) - erubi (>= 1.0.0) - rack (>= 0.9.0) - rouge (>= 1.0.0) bigdecimal (3.3.1) bootsnap (1.18.3) msgpack (~> 1.2) @@ -369,7 +365,6 @@ GEM reline (0.6.2) io-console (~> 0.5) rexml (3.3.7) - rouge (4.3.0) rspec-core (3.13.0) rspec-support (~> 3.13.0) rspec-expectations (3.13.1) @@ -474,7 +469,6 @@ DEPENDENCIES annotaterb (~> 4.4) aws-sdk-s3 (~> 1.8) baseline! - better_errors (~> 2.8) bootsnap (~> 1.17) bootstrap (~> 5.3.3) codecov diff --git a/Gemfile.next.lock b/Gemfile.next.lock index 18f9e11..2690227 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -118,10 +118,6 @@ GEM aws-sigv4 (1.9.0) aws-eventstream (~> 1, >= 1.0.2) base64 (0.2.0) - better_errors (2.10.1) - erubi (>= 1.0.0) - rack (>= 0.9.0) - rouge (>= 1.0.0) bigdecimal (3.3.1) bootsnap (1.18.3) msgpack (~> 1.2) @@ -372,7 +368,6 @@ GEM reline (0.6.2) io-console (~> 0.5) rexml (3.3.7) - rouge (4.3.0) rspec-core (3.13.0) rspec-support (~> 3.13.0) rspec-expectations (3.13.1) @@ -477,7 +472,6 @@ DEPENDENCIES annotaterb (~> 4.4) aws-sdk-s3 (~> 1.8) baseline! - better_errors (~> 2.8) bootsnap (~> 1.17) bootstrap (~> 5.3.3) codecov From f081fe54b6846e2cb0de9cc60798b902431beaa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Wed, 8 Apr 2026 18:42:38 -0600 Subject: [PATCH 06/13] Remove explicit faraday gems from Gemfile faraday, faraday_middleware, faraday-multipart, and faraday-retry were listed explicitly but never used directly in app code. Octokit pulls in faraday transitively via sawyer. Removing the explicit pins allows faraday to resolve to 2.x (from 1.x), dropping the deprecated faraday_middleware and several unused adapter gems. --- Gemfile | 4 ---- Gemfile.lock | 39 ++++++++------------------------------- Gemfile.next.lock | 39 ++++++++------------------------------- 3 files changed, 16 insertions(+), 66 deletions(-) diff --git a/Gemfile b/Gemfile index aaf5c46..6a612f0 100644 --- a/Gemfile +++ b/Gemfile @@ -15,10 +15,6 @@ gem "bootsnap", "~> 1.17", require: false gem "bootstrap", "~> 5.3.3" gem "dartsass-rails", "~> 0.5" gem "dotenv", "~> 3.1.2" -gem "faraday" -gem "faraday_middleware" -gem "faraday-multipart" -gem "faraday-retry" gem "fog-aws" gem "gems", github: "rubygems/gems" # TODO: use released version when > 1.2.0 is released gem "git", "~> 2.1" diff --git a/Gemfile.lock b/Gemfile.lock index 6aac757..56178c7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -158,31 +158,12 @@ GEM factory_bot_rails (6.4.3) factory_bot (~> 6.4) railties (>= 5.0.0) - faraday (1.10.4) - faraday-em_http (~> 1.0) - faraday-em_synchrony (~> 1.0) - faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0) - faraday-multipart (~> 1.0) - faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.0) - faraday-patron (~> 1.0) - faraday-rack (~> 1.0) - faraday-retry (~> 1.0) - ruby2_keywords (>= 0.0.4) - faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.1) - faraday-excon (1.1.0) - faraday-httpclient (1.0.1) - faraday-multipart (1.2.0) - multipart-post (~> 2.0) - faraday-net_http (1.0.2) - faraday-net_http_persistent (1.2.0) - faraday-patron (1.0.0) - faraday-rack (1.0.0) - faraday-retry (1.0.4) - faraday_middleware (1.2.1) - faraday (~> 1.0) + faraday (2.14.1) + faraday-net_http (>= 2.0, < 3.5) + json + logger + faraday-net_http (3.4.2) + net-http (~> 0.5) fog-aws (3.29.0) base64 (~> 0.2.0) fog-core (~> 2.6) @@ -257,7 +238,8 @@ GEM prism (~> 1.5) msgpack (1.7.2) multi_json (1.15.0) - multipart-post (2.4.1) + net-http (0.9.1) + uri (>= 0.11.1) net-imap (0.5.12) date net-protocol @@ -384,7 +366,6 @@ GEM rspec-support (3.13.1) ruby-graphviz (1.2.5) rexml - ruby2_keywords (0.0.5) rufus-scheduler (3.9.1) fugit (~> 1.1, >= 1.1.6) sass-embedded (1.77.8-arm64-darwin) @@ -476,10 +457,6 @@ DEPENDENCIES database_cleaner-active_record dotenv (~> 3.1.2) factory_bot_rails (~> 6.2) - faraday - faraday-multipart - faraday-retry - faraday_middleware fog-aws gems! git (~> 2.1) diff --git a/Gemfile.next.lock b/Gemfile.next.lock index 2690227..e865948 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -160,31 +160,12 @@ GEM factory_bot_rails (6.4.3) factory_bot (~> 6.4) railties (>= 5.0.0) - faraday (1.10.4) - faraday-em_http (~> 1.0) - faraday-em_synchrony (~> 1.0) - faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0) - faraday-multipart (~> 1.0) - faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.0) - faraday-patron (~> 1.0) - faraday-rack (~> 1.0) - faraday-retry (~> 1.0) - ruby2_keywords (>= 0.0.4) - faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.1) - faraday-excon (1.1.0) - faraday-httpclient (1.0.1) - faraday-multipart (1.2.0) - multipart-post (~> 2.0) - faraday-net_http (1.0.2) - faraday-net_http_persistent (1.2.0) - faraday-patron (1.0.0) - faraday-rack (1.0.0) - faraday-retry (1.0.4) - faraday_middleware (1.2.1) - faraday (~> 1.0) + faraday (2.14.1) + faraday-net_http (>= 2.0, < 3.5) + json + logger + faraday-net_http (3.4.2) + net-http (~> 0.5) fog-aws (3.29.0) base64 (~> 0.2.0) fog-core (~> 2.6) @@ -260,7 +241,8 @@ GEM prism (~> 1.5) msgpack (1.7.2) multi_json (1.15.0) - multipart-post (2.4.1) + net-http (0.9.1) + uri (>= 0.11.1) net-imap (0.6.3) date net-protocol @@ -387,7 +369,6 @@ GEM rspec-support (3.13.1) ruby-graphviz (1.2.5) rexml - ruby2_keywords (0.0.5) rufus-scheduler (3.9.1) fugit (~> 1.1, >= 1.1.6) sass-embedded (1.77.8-arm64-darwin) @@ -479,10 +460,6 @@ DEPENDENCIES database_cleaner-active_record dotenv (~> 3.1.2) factory_bot_rails (~> 6.2) - faraday - faraday-multipart - faraday-retry - faraday_middleware fog-aws gems! git (~> 2.1) From 9b9dded86367c5fbee5e3d15515ee443fdb0d81a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Wed, 8 Apr 2026 23:10:24 -0600 Subject: [PATCH 07/13] Replace codecov gem with codecov/codecov-action The codecov gem is deprecated and archived. Replace it with the official Codecov GitHub Action which picks up SimpleCov's coverage output and uploads it using the existing CODECOV_TOKEN secret. --- .github/workflows/test.yml | 6 +++++- Gemfile | 1 - Gemfile.lock | 11 +---------- Gemfile.next.lock | 4 ---- spec/spec_helper.rb | 10 ++-------- 5 files changed, 8 insertions(+), 24 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1253dee..f13f6b9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -94,5 +94,9 @@ jobs: - name: Run tests env: BUNDLE_GEMFILE: ${{ matrix.gemfile }} - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: COVERAGE=true bundle exec rspec spec + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/Gemfile b/Gemfile index 6a612f0..9bd13b2 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,6 @@ end # Run against this stable release group :development, :test do - gem "codecov", require: false gem "database_cleaner-active_record" gem "factory_bot_rails", "~> 6.2" gem "rspec-rails", "~> 6.1.0" diff --git a/Gemfile.lock b/Gemfile.lock index 56178c7..e565209 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -126,9 +126,6 @@ GEM gem_config (~> 0.3) builder (3.3.0) choice (0.2.0) - codecov (0.2.12) - json - simplecov concurrent-ruby (1.3.5) connection_pool (2.5.4) crack (1.0.0) @@ -212,7 +209,7 @@ GEM rdoc (>= 4.0.0) reline (>= 0.4.2) jmespath (1.6.2) - json (2.10.1) + json (2.19.3) kredis (1.7.0) activemodel (>= 6.0.0) activesupport (>= 6.0.0) @@ -370,8 +367,6 @@ GEM fugit (~> 1.1, >= 1.1.6) sass-embedded (1.77.8-arm64-darwin) google-protobuf (~> 4.26) - sass-embedded (1.77.8-x86_64-linux-gnu) - google-protobuf (~> 4.26) sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) @@ -440,10 +435,7 @@ GEM zeitwerk (2.7.3) PLATFORMS - arm64-darwin-23 - arm64-darwin-24 arm64-darwin-25 - x86_64-linux DEPENDENCIES amazing_print (~> 1.5) @@ -452,7 +444,6 @@ DEPENDENCIES baseline! bootsnap (~> 1.17) bootstrap (~> 5.3.3) - codecov dartsass-rails (~> 0.5) database_cleaner-active_record dotenv (~> 3.1.2) diff --git a/Gemfile.next.lock b/Gemfile.next.lock index e865948..0870a78 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -128,9 +128,6 @@ GEM gem_config (~> 0.3) builder (3.3.0) choice (0.2.0) - codecov (0.2.12) - json - simplecov concurrent-ruby (1.3.5) connection_pool (2.5.4) crack (1.0.0) @@ -455,7 +452,6 @@ DEPENDENCIES baseline! bootsnap (~> 1.17) bootstrap (~> 5.3.3) - codecov dartsass-rails (~> 0.5) database_cleaner-active_record dotenv (~> 3.1.2) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ef6e0ea..43217f1 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,18 +1,12 @@ if ENV["COVERAGE"] require "simplecov" require "simplecov-console" - require "codecov" - SimpleCov.start "rails" - formatters = [ + SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([ SimpleCov::Formatter::HTMLFormatter, SimpleCov::Formatter::Console - ] - - formatters << SimpleCov::Formatter::Codecov if ENV['CODECOV_TOKEN'] - - SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(formatters) + ]) end # This file was generated by the `rails generate rspec:install` command. Conventionally, all From aec582070a10b17802c9cc3fa577b6a66ed0b625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Wed, 8 Apr 2026 23:16:01 -0600 Subject: [PATCH 08/13] Add x86_64-linux platform to lockfiles CI runs on ubuntu (x86_64-linux) but lockfiles only had arm64-darwin-25. --- Gemfile.lock | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index e565209..7467829 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -367,6 +367,8 @@ GEM fugit (~> 1.1, >= 1.1.6) sass-embedded (1.77.8-arm64-darwin) google-protobuf (~> 4.26) + sass-embedded (1.77.8-x86_64-linux-gnu) + google-protobuf (~> 4.26) sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) @@ -436,6 +438,7 @@ GEM PLATFORMS arm64-darwin-25 + x86_64-linux DEPENDENCIES amazing_print (~> 1.5) From a2f4afcf47a5d97e4e78f8ebdce563c0d5daa257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Wed, 8 Apr 2026 23:21:37 -0600 Subject: [PATCH 09/13] Add Coverband for production code coverage tracking Tracks which code paths are actually hit in production (web + Sidekiq), helping identify dead code before the DirectResolver migration. - Uses existing Redis via $redis global - Mounts web UI at /coverband behind basic auth (same creds as Sidekiq) - Enables view tracking and background reporting --- Gemfile | 1 + Gemfile.lock | 4 ++++ config/initializers/coverband.rb | 5 +++++ config/routes.rb | 10 ++++++++++ 4 files changed, 20 insertions(+) create mode 100644 config/initializers/coverband.rb diff --git a/Gemfile b/Gemfile index 9bd13b2..8d8a28b 100644 --- a/Gemfile +++ b/Gemfile @@ -12,6 +12,7 @@ gem "amazing_print", "~> 1.5" gem "aws-sdk-s3", "~> 1.8", require: false gem "baseline", github: "fastruby/baseline" gem "bootsnap", "~> 1.17", require: false +gem "coverband", "~> 6.1" gem "bootstrap", "~> 5.3.3" gem "dartsass-rails", "~> 0.5" gem "dotenv", "~> 3.1.2" diff --git a/Gemfile.lock b/Gemfile.lock index 7467829..c6cab02 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -128,6 +128,9 @@ GEM choice (0.2.0) concurrent-ruby (1.3.5) connection_pool (2.5.4) + coverband (6.2.0) + base64 + redis (>= 3.0) crack (1.0.0) bigdecimal rexml @@ -447,6 +450,7 @@ DEPENDENCIES baseline! bootsnap (~> 1.17) bootstrap (~> 5.3.3) + coverband (~> 6.1) dartsass-rails (~> 0.5) database_cleaner-active_record dotenv (~> 3.1.2) diff --git a/config/initializers/coverband.rb b/config/initializers/coverband.rb new file mode 100644 index 0000000..69a2e6c --- /dev/null +++ b/config/initializers/coverband.rb @@ -0,0 +1,5 @@ +Coverband.configure do |config| + config.store = Coverband::Adapters::RedisStore.new($redis) + config.track_views = true + config.background_reporting_enabled = true +end diff --git a/config/routes.rb b/config/routes.rb index 23f4909..19272d4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,6 @@ require "sidekiq/web" require "sidekiq-scheduler/web" +require "coverband" if Rails.env.production? Sidekiq::Web.use Rack::Auth::Basic do |username, password| @@ -9,10 +10,19 @@ }.map { ActiveSupport::SecurityUtils.secure_compare _1, ENV.fetch(_2) } .all? end + + Coverband::Reporters::Web.use Rack::Auth::Basic do |username, password| + { + username => "SIDEKIQ_USERNAME", + password => "SIDEKIQ_PASSWORD" + }.map { ActiveSupport::SecurityUtils.secure_compare _1, ENV.fetch(_2) } + .all? + end end Rails.application.routes.draw do mount Sidekiq::Web => "sidekiq" + mount Coverband::Reporters::Web.new, at: "/coverband" get '/sitemap.xml', to: 'sitemaps#show' get "/robots.txt" => "static#robots" From fca0aa054a60f69475f7e6684e78ca5f0fc3aa44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Wed, 8 Apr 2026 23:30:38 -0600 Subject: [PATCH 10/13] Update Gemfile.next.lock with coverband gem --- Gemfile.next.lock | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gemfile.next.lock b/Gemfile.next.lock index 0870a78..050ac90 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -130,6 +130,9 @@ GEM choice (0.2.0) concurrent-ruby (1.3.5) connection_pool (2.5.4) + coverband (6.2.0) + base64 + redis (>= 3.0) crack (1.0.0) bigdecimal rexml @@ -452,6 +455,7 @@ DEPENDENCIES baseline! bootsnap (~> 1.17) bootstrap (~> 5.3.3) + coverband (~> 6.1) dartsass-rails (~> 0.5) database_cleaner-active_record dotenv (~> 3.1.2) From 56ea98e38a2db9014932550c9a457aa087214ca3 Mon Sep 17 00:00:00 2001 From: Mateus Pereira Date: Thu, 9 Apr 2026 11:39:42 -0300 Subject: [PATCH 11/13] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Juan Vásquez --- config/routes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 19272d4..aace51f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -13,8 +13,8 @@ Coverband::Reporters::Web.use Rack::Auth::Basic do |username, password| { - username => "SIDEKIQ_USERNAME", - password => "SIDEKIQ_PASSWORD" + username => "COVERBAND_USERNAME", + password => "COVERBAND_PASSWORD" }.map { ActiveSupport::SecurityUtils.secure_compare _1, ENV.fetch(_2) } .all? end From 850faaa944c2ef825e128246e757d009a6064b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Thu, 9 Apr 2026 09:44:39 -0600 Subject: [PATCH 12/13] Fix Coverband Redis connection Coverband's initializer was using $redis which is defined in config/initializers/redis.rb. Since initializers load alphabetically, coverband.rb loads before redis.rb, making $redis nil and causing "undefined method 'get' for nil" errors. Create a dedicated Redis connection directly in the Coverband config to avoid the load order dependency. --- config/initializers/coverband.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/initializers/coverband.rb b/config/initializers/coverband.rb index 69a2e6c..9b9dcc9 100644 --- a/config/initializers/coverband.rb +++ b/config/initializers/coverband.rb @@ -1,5 +1,7 @@ Coverband.configure do |config| - config.store = Coverband::Adapters::RedisStore.new($redis) + config.store = Coverband::Adapters::RedisStore.new( + Redis.new(url: ENV["REDIS_URL"], ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }) + ) config.track_views = true config.background_reporting_enabled = true end From 144d13ac3a4d77fc369382e81ff5ad4b99e54c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Thu, 9 Apr 2026 09:44:56 -0600 Subject: [PATCH 13/13] Add Coverband web_enable_clear and ignore settings Enable web_enable_clear so coverage data can be reset from the /coverband UI, useful for getting a clean baseline after deploys. Add ignore list to exclude boot/config files that add noise to the coverage report without providing actionable insights. --- config/initializers/coverband.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/initializers/coverband.rb b/config/initializers/coverband.rb index 9b9dcc9..558ccdb 100644 --- a/config/initializers/coverband.rb +++ b/config/initializers/coverband.rb @@ -4,4 +4,6 @@ ) config.track_views = true config.background_reporting_enabled = true + config.web_enable_clear = true + config.ignore = %w[config/boot.rb config/environment.rb config/puma.rb bin/] end