Skip to content

Commit

Permalink
Merge pull request #1035 from mame/support-ruby-3
Browse files Browse the repository at this point in the history
Support Ruby 3.0, 3.1 and 3.2
  • Loading branch information
colszowka committed Nov 29, 2022
2 parents efdb08d + 27f1f26 commit 0f1c69a
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 98 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions lib/simplecov.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 = {
Expand Down
4 changes: 3 additions & 1 deletion lib/simplecov/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions test_projects/rails/rspec_rails/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
180 changes: 89 additions & 91 deletions test_projects/rails/rspec_rails/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,156 +9,152 @@ 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)
bootsnap (1.5.1-java)
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)
Expand All @@ -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)
Expand All @@ -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)

Expand Down

0 comments on commit 0f1c69a

Please sign in to comment.