From 97c6219daf71e543b3da58617f561041337cff15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 06:43:37 +0000 Subject: [PATCH 1/3] chore(deps-dev): Bump simplecov from 0.22.0 to 1.0.1 Bumps [simplecov](https://github.com/simplecov-ruby/simplecov) from 0.22.0 to 1.0.1. - [Release notes](https://github.com/simplecov-ruby/simplecov/releases) - [Changelog](https://github.com/simplecov-ruby/simplecov/blob/main/CHANGELOG.md) - [Commits](https://github.com/simplecov-ruby/simplecov/compare/v0.22.0...v1.0.1) --- updated-dependencies: - dependency-name: simplecov dependency-version: 1.0.1 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index 303e6b6b..a1bbfa5a 100644 --- a/Gemfile +++ b/Gemfile @@ -120,7 +120,7 @@ group :test do gem 'rspec-retry' gem 'selenium-webdriver' gem 'shoulda-matchers', '~> 8.0' - gem 'simplecov', '~> 0.22.0', require: false + gem 'simplecov', '~> 1.0.1', require: false gem 'simplecov_json_formatter' gem 'timecop' gem 'webmock' diff --git a/Gemfile.lock b/Gemfile.lock index 29f2523a..f9441398 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -174,7 +174,6 @@ GEM irb (~> 1.10) reline (>= 0.3.8) diff-lcs (1.6.2) - docile (1.4.1) domain_name (0.6.20240107) dotenv (3.2.0) dotenv-rails (3.2.0) @@ -539,11 +538,7 @@ GEM shellany (0.0.1) shoulda-matchers (8.0.1) activesupport (>= 7.2) - simplecov (0.22.0) - docile (~> 1.1) - simplecov-html (~> 0.11) - simplecov_json_formatter (~> 0.1) - simplecov-html (0.13.2) + simplecov (1.0.1) simplecov_json_formatter (0.1.4) simpleidn (0.2.3) snaky_hash (2.0.3) @@ -663,7 +658,7 @@ DEPENDENCIES sentry-rails sentry-ruby shoulda-matchers (~> 8.0) - simplecov (~> 0.22.0) + simplecov (~> 1.0.1) simplecov_json_formatter sprockets-rails stimulus-rails From 5eb5a656d488338f4d60109ca3e9f01549612952 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 16 Jul 2026 21:14:46 +0000 Subject: [PATCH 2/3] fix(cucumber): remove SimpleCov.running check for SimpleCov 1.0 --- features/support/env.rb | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/features/support/env.rb b/features/support/env.rb index d15cf509..bbf07ed7 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -7,15 +7,13 @@ require 'simplecov' require 'simplecov_json_formatter' -# Only start SimpleCov if it hasn't been started -unless SimpleCov.running - SimpleCov.start 'rails' do - track_files 'app/**/*.rb' - formatter SimpleCov::Formatter::MultiFormatter.new([ - SimpleCov::Formatter::HTMLFormatter, - SimpleCov::Formatter::JSONFormatter - ]) - end +# Start SimpleCov coverage reporting for cucumber runs +SimpleCov.start 'rails' do + track_files 'app/**/*.rb' + formatter SimpleCov::Formatter::MultiFormatter.new([ + SimpleCov::Formatter::HTMLFormatter, + SimpleCov::Formatter::JSONFormatter + ]) end require 'cucumber/rails' From 75f83ff989165184c03f5fa78270928ad1da3514 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Fri, 17 Jul 2026 16:13:27 +0000 Subject: [PATCH 3/3] chore(deps-dev): refactor SimpleCov config and remove redundant gem Consolidate SimpleCov configuration into a shared `config/simplecov.rb` to ensure consistency between RSpec and Cucumber suites. Remove the `simplecov_json_formatter` gem and its explicit requires, as JSON formatting is now natively bundled in SimpleCov 1.0.1. This cleanup also removes the `SimpleCov.running` guard, which is no longer supported or necessary in the new version. Co-authored-by: Claude Code --- Gemfile | 1 - Gemfile.lock | 2 -- config/simplecov.rb | 21 +++++++++++++++++++++ features/support/env.rb | 15 +++------------ spec/spec_helper.rb | 15 ++++----------- 5 files changed, 28 insertions(+), 26 deletions(-) create mode 100644 config/simplecov.rb diff --git a/Gemfile b/Gemfile index a1bbfa5a..f43276a6 100644 --- a/Gemfile +++ b/Gemfile @@ -121,7 +121,6 @@ group :test do gem 'selenium-webdriver' gem 'shoulda-matchers', '~> 8.0' gem 'simplecov', '~> 1.0.1', require: false - gem 'simplecov_json_formatter' gem 'timecop' gem 'webmock' end diff --git a/Gemfile.lock b/Gemfile.lock index f9441398..7b1191c5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -539,7 +539,6 @@ GEM shoulda-matchers (8.0.1) activesupport (>= 7.2) simplecov (1.0.1) - simplecov_json_formatter (0.1.4) simpleidn (0.2.3) snaky_hash (2.0.3) hashie (>= 0.1.0, < 6) @@ -659,7 +658,6 @@ DEPENDENCIES sentry-ruby shoulda-matchers (~> 8.0) simplecov (~> 1.0.1) - simplecov_json_formatter sprockets-rails stimulus-rails strong_migrations diff --git a/config/simplecov.rb b/config/simplecov.rb new file mode 100644 index 00000000..9272e8fc --- /dev/null +++ b/config/simplecov.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Shared SimpleCov configuration used by both test suites so their coverage +# setup never drifts: +# * RSpec -> required from spec/spec_helper.rb +# * Cucumber -> required from features/support/env.rb +# +# This must be required before any application code loads so SimpleCov can hook +# into Coverage. As of SimpleCov 1.0 the JSON formatter is bundled with the gem +# (the standalone simplecov_json_formatter gem is no longer needed), and calling +# SimpleCov.start more than once in a process is a no-op rather than an error. +require 'simplecov' + +SimpleCov.start 'rails' do + formatter SimpleCov::Formatter::MultiFormatter.new( + [ + SimpleCov::Formatter::HTMLFormatter, + SimpleCov::Formatter::JSONFormatter + ] + ) +end diff --git a/features/support/env.rb b/features/support/env.rb index bbf07ed7..c6b820b4 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -3,18 +3,9 @@ # Database Cleaner configuration is loaded in features/support/database_cleaner.rb -# Configure SimpleCov before requiring other files -require 'simplecov' -require 'simplecov_json_formatter' - -# Start SimpleCov coverage reporting for cucumber runs -SimpleCov.start 'rails' do - track_files 'app/**/*.rb' - formatter SimpleCov::Formatter::MultiFormatter.new([ - SimpleCov::Formatter::HTMLFormatter, - SimpleCov::Formatter::JSONFormatter - ]) -end +# Start SimpleCov coverage reporting before requiring any application code. +# The configuration is shared with the RSpec suite (see config/simplecov.rb). +require_relative '../../config/simplecov' require 'cucumber/rails' require 'rspec/mocks' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 21fc7fed..2e403a42 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -17,17 +17,10 @@ # See https://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration # require 'codeclimate-test-reporter' -require 'simplecov' -require 'simplecov_json_formatter' -SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([ - SimpleCov::Formatter::HTMLFormatter, - SimpleCov::Formatter::JSONFormatter - ]) - -SimpleCov.start 'rails' do - # add_filter '/app/controllers/api' - # add_filter '/app/controllers/bcourses_controller.rb' -end +# Shared SimpleCov configuration (see config/simplecov.rb) so the RSpec and +# Cucumber suites stay in sync. Add project-wide coverage filters there, e.g.: +# skip '/app/controllers/api' +require_relative '../config/simplecov' # load libraries from lib $LOAD_PATH.unshift(File.expand_path('../lib', __dir__))