judges 0.0.36 → 0.0.37

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 33bb660b81ce0bef691810c81d0862408485e8351ffbf5feaa1f2210bf2c3185
4
- data.tar.gz: da9ed740765a9dd6ab61c747aab5b735ea93d5317b4aaf1de0a31cffc9424fc5
3
+ metadata.gz: 9e81cc6dc7d8235244b8b4ae58c481e023a7bca24b1867d534182eb271848d96
4
+ data.tar.gz: b8c6db7f004f69f6a36a823c84847edc56cc3bbbac182509c313885d25682369
5
5
  SHA512:
6
- metadata.gz: '00183c3ee715b3a5a178491ccc429e227c1a94b6cb214ef356c0ec02eee0f3acb59eb5929f3b74d465a889bbf6a79daf47f6a6777274a7cf30794fd7309a4afb'
7
- data.tar.gz: a777275d1be76618f198712deed4bb10019a266e3d6b985fba45a066ebc1aabba6403945d06bb4d11a9f5f9c89fec66b7a7f690096de73b2a923d300a359200c
6
+ metadata.gz: fb9ac6b946a3ebde4df93b170ebc47caccd0d903d38dd48d2825fc625c1d6577300ba3b2d6867485a871820f8e323e1014debe5dca447fe4a1a3a096d53020e4
7
+ data.tar.gz: fd0614960a2ce36d0ea2ae84a3dd4c7053f11d06945f712c00400e182dfc322196609b0bd21cfa61eedab7908090686bc1f86ed1cb4aab6cfde6ed534a4cd117
data/Gemfile CHANGED
@@ -33,5 +33,5 @@ gem 'rubocop-performance', '1.21.0', require: false
33
33
  gem 'rubocop-rspec', '2.29.2', require: false
34
34
  gem 'simplecov', '0.22.0', require: false
35
35
  gem 'simplecov-cobertura', '2.1.0', require: false
36
- gem 'webmock', '3.19.1', require: false
36
+ gem 'webmock', '3.23.1', require: false
37
37
  gem 'yard', '0.9.36', require: false
data/Gemfile.lock CHANGED
@@ -155,7 +155,7 @@ GEM
155
155
  rdoc (6.7.0)
156
156
  psych (>= 4.0.0)
157
157
  regexp_parser (2.9.2)
158
- reline (0.5.7)
158
+ reline (0.5.8)
159
159
  io-console (~> 0.5)
160
160
  rexml (3.2.8)
161
161
  strscan (>= 3.0.9)
@@ -223,7 +223,7 @@ GEM
223
223
  tzinfo (2.0.6)
224
224
  concurrent-ruby (~> 1.0)
225
225
  unicode-display_width (2.5.0)
226
- webmock (3.19.1)
226
+ webmock (3.23.1)
227
227
  addressable (>= 2.8.0)
228
228
  crack (>= 0.3.2)
229
229
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -250,7 +250,7 @@ DEPENDENCIES
250
250
  rubocop-rspec (= 2.29.2)
251
251
  simplecov (= 0.22.0)
252
252
  simplecov-cobertura (= 2.1.0)
253
- webmock (= 3.19.1)
253
+ webmock (= 3.23.1)
254
254
  yard (= 0.9.36)
255
255
 
256
256
  BUNDLED WITH
@@ -28,7 +28,7 @@ Feature: Test
28
28
  $foo = 42
29
29
  """
30
30
  Then I run bin/judges with "test --lib mylib mypacks"
31
- Then Stdout contains "All 1 judge(s) and 0 tests passed"
31
+ Then Stdout contains "All 1 judge(s) but no tests passed"
32
32
  And Exit code is zero
33
33
 
34
34
  Scenario: Enable only one category
data/judges.gemspec CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
26
26
  s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
27
27
  s.required_ruby_version = '>=3.2'
28
28
  s.name = 'judges'
29
- s.version = '0.0.36'
29
+ s.version = '0.0.37'
30
30
  s.license = 'MIT'
31
31
  s.summary = 'Command-Line Tool for a Factbase'
32
32
  s.description =
data/lib/judges/baza.rb CHANGED
@@ -152,11 +152,12 @@ class Judges::Baza
152
152
  allowed = [allowed] unless allowed.is_a?(Array)
153
153
  mtd = (ret.request.original_options[:method] || '???').upcase
154
154
  url = ret.effective_url
155
- @loog.debug(
156
- "#{mtd} #{url} -> #{ret.code}\n " \
157
- "#{(ret.headers || {}).map { |k, v| "#{k}: #{v}" }.join("\n ")}"
158
- )
159
- return if allowed.include?(ret.code)
155
+ log = "#{mtd} #{url} -> #{ret.code}"
156
+ if allowed.include?(ret.code)
157
+ @loog.debug(log)
158
+ return
159
+ end
160
+ @loog.debug("#{log}\n #{(ret.headers || {}).map { |k, v| "#{k}: #{v}" }.join("\n ")}")
160
161
  msg =
161
162
  "Invalid response code ##{ret.code} " \
162
163
  "at #{mtd} #{url} (#{ret.headers['X-Zerocracy-Flash']})"
@@ -74,6 +74,7 @@ class Judges::Test
74
74
  packs += 1
75
75
  end
76
76
  throw :'👍 No judges tested' if packs.zero?
77
+ throw :"👍 All #{packs} judge(s) but no tests passed" if tests.zero?
77
78
  throw :"👍 All #{packs} judge(s) and #{tests} tests passed" if errors.empty?
78
79
  throw :"❌ #{packs} judge(s) tested, #{errors.size} of them failed"
79
80
  end
data/lib/judges.rb CHANGED
@@ -25,5 +25,5 @@
25
25
  # Copyright:: Copyright (c) 2024 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module Judges
28
- VERSION = '0.0.36'
28
+ VERSION = '0.0.37'
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: judges
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.36
4
+ version: 0.0.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-29 00:00:00.000000000 Z
11
+ date: 2024-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backtrace