judges 0.39.2 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -117,4 +117,28 @@ class TestUpdate < Minitest::Test
117
117
  refute_nil(sum.seconds)
118
118
  end
119
119
  end
120
+
121
+ def test_appends_to_existing_summary
122
+ Dir.mktmpdir do |d|
123
+ save_it(File.join(d, 'foo/foo.rb'), 'mistake here')
124
+ file = File.join(d, 'base.fb')
125
+ fb = Factbase.new
126
+ fb.insert.then do |f|
127
+ f.what = 'judges-summary'
128
+ f.error = 'first'
129
+ f.error = 'second'
130
+ end
131
+ File.binwrite(file, fb.export)
132
+ Judges::Update.new(Loog::NULL).run(
133
+ { 'quiet' => true, 'summary' => true, 'max-cycles' => 2 },
134
+ [d, file]
135
+ )
136
+ fb = Factbase.new
137
+ fb.import(File.binread(file))
138
+ sums = fb.query('(eq what "judges-summary")').each.to_a
139
+ assert_equal(1, sums.size)
140
+ sum = sums.first
141
+ assert_equal(3, sum['error'].size)
142
+ end
143
+ end
120
144
  end
data/test/test__helper.rb CHANGED
@@ -6,14 +6,27 @@
6
6
  $stdout.sync = true
7
7
 
8
8
  require 'simplecov'
9
- SimpleCov.external_at_exit = true
10
- SimpleCov.start
11
-
12
9
  require 'simplecov-cobertura'
13
- SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
10
+ unless SimpleCov.running || ENV['PICKS']
11
+ SimpleCov.command_name('test')
12
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
13
+ [
14
+ SimpleCov::Formatter::HTMLFormatter,
15
+ SimpleCov::Formatter::CoberturaFormatter
16
+ ]
17
+ )
18
+ SimpleCov.minimum_coverage 80
19
+ SimpleCov.minimum_coverage_by_file 80
20
+ SimpleCov.start do
21
+ add_filter 'test/'
22
+ add_filter 'vendor/'
23
+ add_filter 'target/'
24
+ track_files 'lib/**/*.rb'
25
+ track_files '*.rb'
26
+ end
27
+ end
14
28
 
15
29
  require 'minitest/autorun'
16
-
17
30
  require 'minitest/reporters'
18
31
  Minitest::Reporters.use! [Minitest::Reporters::SpecReporter.new]
19
32
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: judges
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.39.2
4
+ version: 0.40.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-05 00:00:00.000000000 Z
10
+ date: 2025-04-19 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: backtrace
@@ -260,7 +260,6 @@ files:
260
260
  - ".pdd"
261
261
  - ".rubocop.yml"
262
262
  - ".rultor.yml"
263
- - ".simplecov"
264
263
  - Gemfile
265
264
  - Gemfile.lock
266
265
  - LICENSE.txt
data/.simplecov DELETED
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- #
4
- # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Yegor Bugayenko
5
- # SPDX-License-Identifier: MIT
6
-
7
- if Gem.win_platform?
8
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
9
- SimpleCov::Formatter::HTMLFormatter
10
- ]
11
- SimpleCov.start do
12
- add_filter '/test/'
13
- add_filter '/features/'
14
- end
15
- else
16
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
17
- [SimpleCov::Formatter::HTMLFormatter]
18
- )
19
- SimpleCov.start do
20
- add_filter '/test/'
21
- add_filter '/features/'
22
- minimum_coverage 20
23
- end
24
- end