judges 0.0.35 → 0.0.37
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.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +3 -3
- data/features/push.feature +2 -1
- data/features/test.feature +1 -1
- data/judges.gemspec +1 -1
- data/lib/judges/baza.rb +11 -7
- data/lib/judges/commands/test.rb +1 -0
- data/lib/judges.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e81cc6dc7d8235244b8b4ae58c481e023a7bca24b1867d534182eb271848d96
|
4
|
+
data.tar.gz: b8c6db7f004f69f6a36a823c84847edc56cc3bbbac182509c313885d25682369
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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.
|
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.
|
253
|
+
webmock (= 3.23.1)
|
254
254
|
yard (= 0.9.36)
|
255
255
|
|
256
256
|
BUNDLED WITH
|
data/features/push.feature
CHANGED
@@ -4,7 +4,8 @@ Feature: Push
|
|
4
4
|
Scenario: Push a small factbase
|
5
5
|
Given We are online
|
6
6
|
Given I make a temp directory
|
7
|
-
Then I run bin/judges with "--verbose eval simple.fb '$fb.insert.foo = 42'"
|
7
|
+
Then I run bin/judges with "--verbose eval simple.fb '(0..1000).each { $fb.insert.foo = 42 }'"
|
8
|
+
And Exit code is zero
|
8
9
|
Then I run bin/judges with "push --token 00000000-0000-0000-0000-000000000000 simple simple.fb"
|
9
10
|
Then Stdout contains "Pushed"
|
10
11
|
And Exit code is zero
|
data/features/test.feature
CHANGED
@@ -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)
|
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.
|
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
@@ -49,7 +49,8 @@ class Judges::Baza
|
|
49
49
|
home.append('push').append(name).to_s,
|
50
50
|
body: data,
|
51
51
|
headers: headers.merge(
|
52
|
-
'Content-
|
52
|
+
'Content-Type' => 'application/octet-stream',
|
53
|
+
'Content-Length' => data.size
|
53
54
|
),
|
54
55
|
connecttimeout: @timeout,
|
55
56
|
timeout: @timeout
|
@@ -68,7 +69,9 @@ class Judges::Baza
|
|
68
69
|
File.open(file, 'wb') do |f|
|
69
70
|
request = Typhoeus::Request.new(
|
70
71
|
home.append('pull').append("#{id}.fb").to_s,
|
71
|
-
headers
|
72
|
+
headers: headers.merge(
|
73
|
+
'Accept' => 'application/octet-stream'
|
74
|
+
),
|
72
75
|
connecttimeout: @timeout,
|
73
76
|
timeout: @timeout
|
74
77
|
)
|
@@ -149,11 +152,12 @@ class Judges::Baza
|
|
149
152
|
allowed = [allowed] unless allowed.is_a?(Array)
|
150
153
|
mtd = (ret.request.original_options[:method] || '???').upcase
|
151
154
|
url = ret.effective_url
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
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 ")}")
|
157
161
|
msg =
|
158
162
|
"Invalid response code ##{ret.code} " \
|
159
163
|
"at #{mtd} #{url} (#{ret.headers['X-Zerocracy-Flash']})"
|
data/lib/judges/commands/test.rb
CHANGED
@@ -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
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.
|
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-
|
11
|
+
date: 2024-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backtrace
|