diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml index 1c001ba0..82c90579 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - ruby: [2.5, 2.6, 2.7, '3.0', jruby-9.2] + ruby: [2.7, '3.0', 3.1, ruby-head, jruby-9.3] env: BUNDLE_WITHOUT: "benchmark" diff --git a/README.md b/README.md index 5c7071b7..deaaf69a 100644 --- a/README.md +++ b/README.md @@ -877,7 +877,7 @@ SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter ## Ruby version compatibility -SimpleCov is built in [Continuous Integration] on Ruby 2.5+ as well as JRuby 9.2+. +SimpleCov is built in [Continuous Integration] on Ruby 2.7+ as well as JRuby 9.3+. Note for JRuby => You need to pass JRUBY_OPTS="--debug" or create .jrubyrc and add debug.fullTrace=true diff --git a/lib/simplecov.rb b/lib/simplecov.rb index fa514e01..5881846a 100644 --- a/lib/simplecov.rb +++ b/lib/simplecov.rb @@ -342,7 +342,7 @@ def start_coverage_measurement if coverage_start_arguments_supported? start_coverage_with_criteria else - Coverage.start + Coverage.start unless Coverage.running? end end @@ -351,7 +351,7 @@ def start_coverage_with_criteria [lookup_corresponding_ruby_coverage_name(criterion), true] end.to_h - Coverage.start(start_arguments) + Coverage.start(start_arguments) unless Coverage.running? end CRITERION_TO_RUBY_COVERAGE = { diff --git a/lib/simplecov/configuration.rb b/lib/simplecov/configuration.rb index a93bb279..fb45061f 100644 --- a/lib/simplecov/configuration.rb +++ b/lib/simplecov/configuration.rb @@ -440,7 +440,9 @@ def coverage_start_arguments_supported? end end - alias branch_coverage_supported? coverage_start_arguments_supported? + def branch_coverage_supported? + coverage_start_arguments_supported? && RUBY_ENGINE != "jruby" + end private diff --git a/test_projects/rails/rspec_rails/Gemfile b/test_projects/rails/rspec_rails/Gemfile index fed72b63..e901d3ee 100644 --- a/test_projects/rails/rspec_rails/Gemfile +++ b/test_projects/rails/rspec_rails/Gemfile @@ -14,7 +14,7 @@ else end # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem "rails", "~> 6.1.0" +gem "rails", "~> 6.1.4" # Use Puma as the app server gem "puma", "~> 5.0" # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder @@ -39,7 +39,7 @@ end group :test do # Adds support for Capybara system testing and selenium driver - gem "capybara", ">= 3.26" + gem "capybara", ">= 3.36.0" # 'selenium-webdriver' and 'webdrivers' did not work with Ruby 3.0 at the # moment this file was updated. Since they are not needed to run # SimpleCov's specs, they have been commented out diff --git a/test_projects/rails/rspec_rails/Gemfile.lock b/test_projects/rails/rspec_rails/Gemfile.lock index 58111847..3453456a 100644 --- a/test_projects/rails/rspec_rails/Gemfile.lock +++ b/test_projects/rails/rspec_rails/Gemfile.lock @@ -9,72 +9,67 @@ PATH GEM remote: https://rubygems.org/ specs: - actioncable (6.1.0) - actionpack (= 6.1.0) - activesupport (= 6.1.0) + actioncable (6.1.7) + actionpack (= 6.1.7) + activesupport (= 6.1.7) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.0) - actionpack (= 6.1.0) - activejob (= 6.1.0) - activerecord (= 6.1.0) - activestorage (= 6.1.0) - activesupport (= 6.1.0) + actionmailbox (6.1.7) + actionpack (= 6.1.7) + activejob (= 6.1.7) + activerecord (= 6.1.7) + activestorage (= 6.1.7) + activesupport (= 6.1.7) mail (>= 2.7.1) - actionmailer (6.1.0) - actionpack (= 6.1.0) - actionview (= 6.1.0) - activejob (= 6.1.0) - activesupport (= 6.1.0) + actionmailer (6.1.7) + actionpack (= 6.1.7) + actionview (= 6.1.7) + activejob (= 6.1.7) + activesupport (= 6.1.7) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.0) - actionview (= 6.1.0) - activesupport (= 6.1.0) + actionpack (6.1.7) + actionview (= 6.1.7) + activesupport (= 6.1.7) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.0) - actionpack (= 6.1.0) - activerecord (= 6.1.0) - activestorage (= 6.1.0) - activesupport (= 6.1.0) + actiontext (6.1.7) + actionpack (= 6.1.7) + activerecord (= 6.1.7) + activestorage (= 6.1.7) + activesupport (= 6.1.7) nokogiri (>= 1.8.5) - actionview (6.1.0) - activesupport (= 6.1.0) + actionview (6.1.7) + activesupport (= 6.1.7) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.0) - activesupport (= 6.1.0) + activejob (6.1.7) + activesupport (= 6.1.7) globalid (>= 0.3.6) - activemodel (6.1.0) - activesupport (= 6.1.0) - activerecord (6.1.0) - activemodel (= 6.1.0) - activesupport (= 6.1.0) - activerecord-jdbc-adapter (61.1-java) - activerecord (~> 6.1.0) - activerecord-jdbcsqlite3-adapter (61.1-java) - activerecord-jdbc-adapter (= 61.1) - jdbc-sqlite3 (~> 3.8, < 3.30) - activestorage (6.1.0) - actionpack (= 6.1.0) - activejob (= 6.1.0) - activerecord (= 6.1.0) - activesupport (= 6.1.0) - marcel (~> 0.3.1) - mimemagic (~> 0.3.2) - activesupport (6.1.0) + activemodel (6.1.7) + activesupport (= 6.1.7) + activerecord (6.1.7) + activemodel (= 6.1.7) + activesupport (= 6.1.7) + activestorage (6.1.7) + actionpack (= 6.1.7) + activejob (= 6.1.7) + activerecord (= 6.1.7) + activesupport (= 6.1.7) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (6.1.7) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - addressable (2.7.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) bindex (0.8.1) bootsnap (1.5.1) msgpack (~> 1.0) @@ -82,83 +77,84 @@ GEM msgpack (~> 1.0) builder (3.2.4) byebug (11.1.3) - capybara (3.34.0) + capybara (3.36.0) addressable + matrix mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) - regexp_parser (~> 1.5) + regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) concurrent-ruby (1.1.7) crass (1.0.6) diff-lcs (1.4.4) docile (1.4.0) erubi (1.10.0) - globalid (0.4.2) - activesupport (>= 4.2.0) + globalid (1.0.0) + activesupport (>= 5.0) i18n (1.8.5) concurrent-ruby (~> 1.0) jbuilder (2.10.1) activesupport (>= 5.0.0) - jdbc-sqlite3 (3.28.0) loofah (2.8.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) + marcel (1.0.2) + matrix (0.4.2) method_source (1.0.0) - mimemagic (0.3.10) - nokogiri (~> 1) - rake - mini_mime (1.0.2) - mini_portile2 (2.4.0) - minitest (5.14.2) + mini_mime (1.1.2) + mini_portile2 (2.5.3) + minitest (5.15.0) msgpack (1.3.3) msgpack (1.3.3-java) nio4r (2.5.4) nio4r (2.5.4-java) - nokogiri (1.10.10) - mini_portile2 (~> 2.4.0) - nokogiri (1.10.10-java) - public_suffix (4.0.6) + nokogiri (1.11.0) + mini_portile2 (~> 2.5.0) + racc (~> 1.4) + nokogiri (1.11.0-java) + racc (~> 1.4) + public_suffix (4.0.7) puma (5.1.1) nio4r (~> 2.0) puma (5.1.1-java) nio4r (~> 2.0) + racc (1.6.0) + racc (1.6.0-java) rack (2.2.3) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.0) - actioncable (= 6.1.0) - actionmailbox (= 6.1.0) - actionmailer (= 6.1.0) - actionpack (= 6.1.0) - actiontext (= 6.1.0) - actionview (= 6.1.0) - activejob (= 6.1.0) - activemodel (= 6.1.0) - activerecord (= 6.1.0) - activestorage (= 6.1.0) - activesupport (= 6.1.0) + rails (6.1.7) + actioncable (= 6.1.7) + actionmailbox (= 6.1.7) + actionmailer (= 6.1.7) + actionpack (= 6.1.7) + actiontext (= 6.1.7) + actionview (= 6.1.7) + activejob (= 6.1.7) + activemodel (= 6.1.7) + activerecord (= 6.1.7) + activestorage (= 6.1.7) + activesupport (= 6.1.7) bundler (>= 1.15.0) - railties (= 6.1.0) + railties (= 6.1.7) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.1.0) - actionpack (= 6.1.0) - activesupport (= 6.1.0) + railties (6.1.7) + actionpack (= 6.1.7) + activesupport (= 6.1.7) method_source - rake (>= 0.8.7) + rake (>= 12.2) thor (~> 1.0) rake (13.0.3) - regexp_parser (1.8.2) + regexp_parser (2.6.1) rspec-core (3.10.0) rspec-support (~> 3.10.0) rspec-expectations (3.10.0) @@ -179,26 +175,27 @@ GEM simplecov-html (0.12.3) simplecov_json_formatter (0.1.3) spring (2.1.1) - sprockets (4.0.2) + sprockets (4.1.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) + sqlite3 (1.4.4) thor (1.0.1) tzinfo (2.0.4) concurrent-ruby (~> 1.0) - tzinfo-data (1.2020.4) + tzinfo-data (1.2022.6) tzinfo (>= 1.0.0) web-console (4.1.0) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - websocket-driver (0.7.3) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) - websocket-driver (0.7.3-java) + websocket-driver (0.7.5-java) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) @@ -211,16 +208,17 @@ PLATFORMS universal-java-1.8 DEPENDENCIES - activerecord-jdbcsqlite3-adapter (~> 61.0) bootsnap (>= 1.4.4) byebug - capybara (>= 3.26) + capybara (>= 3.36.0) jbuilder (~> 2.7) + public_suffix (= 4.0.7) puma (~> 5.0) - rails (~> 6.1.0) + rails (~> 6.1.4) rspec-rails simplecov! spring + sqlite3 (~> 1.4) tzinfo-data web-console (>= 4.1.0)