Skip to content

Commit 7dca89d

Browse files
committed
Merge remote-tracking branch 'upstream/main' into add-method-coverage-support
2 parents 15ab790 + 1d8f692 commit 7dca89d

File tree

12 files changed

+86
-102
lines changed

12 files changed

+86
-102
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
- package-ecosystem: bundler
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"

.github/workflows/stable.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,22 @@ jobs:
88

99
strategy:
1010
matrix:
11-
ruby: [2.7, '3.0', 3.1, 3.2, ruby-head, jruby-9.3]
11+
ruby: [2.7, '3.0', 3.1, 3.2, ruby-head, jruby-9.4]
1212

1313
env:
1414
BUNDLE_WITHOUT: "benchmark"
1515
JRUBY_OPTS: "--debug"
1616
SIMPLECOV_HTML_MODE: "methods" # TODO: remove after simplecov-html release
1717

1818
steps:
19-
- uses: actions/checkout@v3
20-
21-
- name: Get sqlite for Rails test projects
22-
run: sudo apt-get install libsqlite3-dev
19+
- uses: actions/checkout@v4
2320

2421
- name: Setup ruby
2522
uses: ruby/setup-ruby@v1
2623
with:
2724
ruby-version: ${{ matrix.ruby }}
25+
rubygems: latest
2826
bundler-cache: true # 'bundle install' and cache
2927

30-
- name: Get the newest rubygems version to rid ourselves of warnings
31-
run: gem update --system --no-document
32-
33-
- name: Install dependencies
34-
run: |
35-
bundle config set --local without benchmark
36-
bundle install --jobs=3
37-
3828
- name: Run tests
3929
run: bundle exec rake

.github/workflows/unstable.yml

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,24 @@ on:
66

77
jobs:
88
test:
9-
runs-on: ubuntu-16.04
9+
runs-on: ubuntu-latest
1010

1111
strategy:
1212
matrix:
1313
ruby: [ruby-head, jruby-head]
1414

15-
steps:
16-
- uses: actions/checkout@v3
17-
18-
- name: Set up RVM
19-
run: curl -sSL https://get.rvm.io | bash
20-
21-
- name: Set up Ruby
22-
run: |
23-
source $HOME/.rvm/scripts/rvm
24-
rvm install ${{ matrix.ruby }} --binary --autolibs=disable
25-
rvm --default use ${{ matrix.ruby }}
15+
env:
16+
BUNDLE_WITHOUT: "benchmark"
17+
JRUBY_OPTS: "--debug"
2618

27-
- name: Install java
28-
run: sudo apt-get -y install openjdk-8-jre-headless
29-
if: matrix.ruby == 'jruby-head'
30-
31-
- name: Get sqlite for Rails test projects
32-
run: sudo apt-get install libsqlite3-dev
33-
34-
- name: Install dependencies
35-
run: |
36-
source $HOME/.rvm/scripts/rvm
37-
bundle config set --local without benchmark
38-
bundle install --jobs=3
19+
steps:
20+
- uses: actions/checkout@v4
3921

40-
- name: Run tests (MRI)
41-
run: |
42-
source $HOME/.rvm/scripts/rvm
43-
bundle exec rake
44-
if: matrix.ruby == 'ruby-head'
22+
- name: Setup ruby
23+
uses: ruby/setup-ruby@v1
24+
with:
25+
ruby-version: ${{ matrix.ruby }}
26+
bundler-cache: true # 'bundle install' and cache
4527

46-
- name: Run tests (JRuby)
47-
run: |
48-
source $HOME/.rvm/scripts/rvm
49-
JRUBY_OPTS=--debug bundle exec rake
50-
if: matrix.ruby == 'jruby-head'
28+
- name: Run tests
29+
run: bundle exec rake

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ group :development do
1919
gem "apparition", github: "twalpole/apparition" # LOCKED: When this is released, use a released version https://github.com/twalpole/apparition/pull/79
2020
gem "aruba", "~> 1.0"
2121
gem "capybara", "~> 3.31"
22+
gem "rackup"
2223
gem "cucumber", "~> 4.0"
2324
gem "minitest"
2425
gem "rake", "~> 13.0"

Gemfile.lock

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ GIT
88

99
GIT
1010
remote: https://github.com/umbrellio/simplecov-html.git
11-
revision: fc9c7a1beaa75bad3a925d1296b94fcd0c96b126
11+
revision: dea7be12fce6364e9d7a7529a4fcd52075c18af8
1212
branch: add-method-coverage-support
1313
specs:
1414
simplecov-html (0.12.3)
@@ -30,8 +30,8 @@ GEM
3030
minitest (>= 5.1)
3131
tzinfo (~> 2.0)
3232
zeitwerk (~> 2.3)
33-
addressable (2.8.0)
34-
public_suffix (>= 2.0.2, < 5.0)
33+
addressable (2.8.5)
34+
public_suffix (>= 2.0.2, < 6.0)
3535
aruba (1.1.2)
3636
bundler (>= 1.17, < 3.0)
3737
childprocess (>= 2.0, < 5.0)
@@ -42,8 +42,9 @@ GEM
4242
ast (2.4.2)
4343
benchmark-ips (2.9.2)
4444
builder (3.2.4)
45-
capybara (3.35.3)
45+
capybara (3.39.2)
4646
addressable
47+
matrix
4748
mini_mime (>= 0.1.3)
4849
nokogiri (~> 1.8)
4950
rack (>= 1.6.0)
@@ -91,20 +92,22 @@ GEM
9192
ffi (1.15.5-java)
9293
i18n (1.8.11)
9394
concurrent-ruby (~> 1.0)
95+
json (2.6.3)
96+
json (2.6.3-java)
9497
matrix (0.4.2)
9598
method_source (1.0.0)
9699
middleware (0.1.0)
97-
mini_mime (1.1.2)
98-
mini_portile2 (2.6.1)
100+
mini_mime (1.1.5)
101+
mini_portile2 (2.8.4)
99102
minitest (5.15.0)
100103
multi_test (0.1.2)
101-
nokogiri (1.12.5)
102-
mini_portile2 (~> 2.6.1)
104+
nokogiri (1.15.4)
105+
mini_portile2 (~> 2.8.2)
103106
racc (~> 1.4)
104-
nokogiri (1.12.5-java)
107+
nokogiri (1.15.4-java)
105108
racc (~> 1.4)
106-
parallel (1.21.0)
107-
parser (3.1.0.0)
109+
parallel (1.22.1)
110+
parser (3.1.3.0)
108111
ast (~> 2.4.1)
109112
power_assert (2.0.1)
110113
protobuf-cucumber (3.10.8)
@@ -119,15 +122,18 @@ GEM
119122
coderay (~> 1.1)
120123
method_source (~> 1.0)
121124
spoon (~> 0.0)
122-
public_suffix (4.0.6)
123-
racc (1.6.0)
124-
racc (1.6.0-java)
125-
rack (2.2.3.1)
126-
rack-test (1.1.0)
127-
rack (>= 1.0, < 3)
125+
public_suffix (5.0.3)
126+
racc (1.7.1)
127+
racc (1.7.1-java)
128+
rack (3.0.8)
129+
rack-test (2.1.0)
130+
rack (>= 1.3)
131+
rackup (2.0.0)
132+
rack (>= 3)
133+
webrick
128134
rainbow (3.1.1)
129135
rake (13.0.6)
130-
regexp_parser (2.2.0)
136+
regexp_parser (2.8.1)
131137
rexml (3.2.5)
132138
rspec (3.10.0)
133139
rspec-core (~> 3.10.0)
@@ -142,17 +148,18 @@ GEM
142148
diff-lcs (>= 1.2.0, < 2.0)
143149
rspec-support (~> 3.10.0)
144150
rspec-support (3.10.3)
145-
rubocop (1.24.1)
151+
rubocop (1.42.0)
152+
json (~> 2.3)
146153
parallel (~> 1.10)
147-
parser (>= 3.0.0.0)
154+
parser (>= 3.1.2.1)
148155
rainbow (>= 2.2.2, < 4.0)
149156
regexp_parser (>= 1.8, < 3.0)
150-
rexml
151-
rubocop-ast (>= 1.15.1, < 2.0)
157+
rexml (>= 3.2.5, < 4.0)
158+
rubocop-ast (>= 1.24.1, < 2.0)
152159
ruby-progressbar (~> 1.7)
153160
unicode-display_width (>= 1.4.0, < 3.0)
154-
rubocop-ast (1.15.1)
155-
parser (>= 3.0.1.1)
161+
rubocop-ast (1.24.1)
162+
parser (>= 3.1.1.0)
156163
ruby-progressbar (1.11.0)
157164
simplecov_json_formatter (0.1.3)
158165
spoon (0.0.6)
@@ -166,7 +173,7 @@ GEM
166173
thread_safe (0.3.6-java)
167174
tzinfo (2.0.4)
168175
concurrent-ruby (~> 1.0)
169-
unicode-display_width (2.1.0)
176+
unicode-display_width (2.3.0)
170177
webrick (1.7.0)
171178
websocket-driver (0.7.5)
172179
websocket-extensions (>= 0.1.0)
@@ -191,6 +198,7 @@ DEPENDENCIES
191198
matrix
192199
minitest
193200
pry
201+
rackup
194202
rake (~> 13.0)
195203
rspec (~> 3.2)
196204
rubocop
@@ -200,4 +208,4 @@ DEPENDENCIES
200208
webrick
201209

202210
BUNDLED WITH
203-
2.4.3
211+
2.5.3

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SimpleCov [![Gem Version](https://badge.fury.io/rb/simplecov.svg)](https://badge
99
* [Rubygem]
1010
* [Continuous Integration]
1111

12-
[Coverage]: https://ruby-doc.org/stdlib/libdoc/coverage/rdoc/Coverage.html "API doc for Ruby's Coverage library"
12+
[Coverage]: https://docs.ruby-lang.org/en/3.2/Coverage.html "API doc for Ruby's Coverage library"
1313
[Source Code]: https://github.com/simplecov-ruby/simplecov "Source Code @ GitHub"
1414
[API documentation]: http://rubydoc.info/gems/simplecov/frames "RDoc API Documentation at Rubydoc.info"
1515
[Configuration]: http://rubydoc.info/gems/simplecov/SimpleCov/Configuration "Configuration options API documentation"
@@ -651,7 +651,7 @@ To configure this, use `.at_fork`.
651651
```ruby
652652
SimpleCov.enable_for_subprocesses true
653653
SimpleCov.at_fork do |pid|
654-
# This needs a unique name so it won't be ovewritten
654+
# This needs a unique name so it won't be overwritten
655655
SimpleCov.command_name "#{SimpleCov.command_name} (subprocess: #{pid})"
656656
# be quiet, the parent process will be in charge of output and checking coverage totals
657657
SimpleCov.print_error_status = false

doc/alternate-formatters.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,3 @@ t_wada AA formatter for SimpleCov
6464
*by [Chiefpansancolt](https://github.com/chiefpansancolt)*
6565

6666
A TailwindCSS & TailwindUI Designed HTML formatter with clean and easy search of files with a tabular left Navigation.
67-
68-
#### [simplecov-material](https://github.com/chiefpansancolt/simplecov-material)
69-
*by [Chiefpansancolt](https://github.com/chiefpansancolt)*
70-
71-
A Material Designed HTML formatter with clean and easy search of files with a tabular left Navigation.

lib/simplecov/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def refuse_coverage_drop(*criteria)
358358
# SimpleCov.add_filter do |src_file|
359359
# File.basename(src_file.filename) == 'environment.rb'
360360
# end # Will exclude environment.rb files from the results
361-
# * as an array of strings that are matched against all sorce files' file
361+
# * as an array of strings that are matched against all source files' file
362362
# paths and then ignored (basically string filter multiple times)
363363
# SimpleCov.add_filter ['app/models', 'app/helpers'] # ignores both dirs
364364
# * as an instance of a subclass of SimpleCov::Filter. See the documentation there

lib/simplecov/source_file.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def covered_strength
8787
end
8888

8989
def no_lines?
90-
lines.length.zero? || (lines.length == never_lines.size)
90+
lines.empty? || (lines.length == never_lines.size)
9191
end
9292

9393
def relevant_lines

spec/result_merger_spec.rb

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -326,24 +326,22 @@
326326
end
327327
CODE
328328

329-
# rubocop:disable Security/Open
330-
other_process = open("|ruby -e #{Shellwords.escape(test_script)} 2>/dev/null")
331-
# rubocop:enable Security/Open
329+
IO.popen("ruby -e #{Shellwords.escape(test_script)} 2>/dev/null") do |other_process|
330+
SimpleCov::ResultMerger.synchronize_resultset do
331+
# wait until the child process is going, and then wait some more
332+
# so we can be sure it blocks on the lock we already have.
333+
sleep 0.1 until other_process.gets == "running\n"
334+
sleep 1
335+
336+
# despite the sleeps, this will be written first since we got
337+
# the first lock
338+
File.open(file.path, "a") { |f| f.write("process 1\n") }
339+
end
332340

333-
SimpleCov::ResultMerger.synchronize_resultset do
334-
# wait until the child process is going, and then wait some more
335-
# so we can be sure it blocks on the lock we already have.
336-
sleep 0.1 until other_process.gets == "running\n"
337-
sleep 1
338-
339-
# despite the sleeps, this will be written first since we got
340-
# the first lock
341-
File.open(file.path, "a") { |f| f.write("process 1\n") }
341+
# wait for it to finish
342+
other_process.gets
342343
end
343344

344-
# wait for it to finish
345-
other_process.gets
346-
347345
expect(file.read).to eq("process 1\nprocess 2\n")
348346
end
349347
end

0 commit comments

Comments
 (0)