fbe 0.0.77 → 0.0.78
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/.github/workflows/rake.yml +1 -1
- data/lib/fbe/enter.rb +1 -0
- data/lib/fbe.rb +1 -1
- data/test/fbe/test_enter.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8be7701ad73edc6322026cac63ded7eec6c24d32d49db8687639d6794eb07aa6
|
4
|
+
data.tar.gz: b70c04b466d25b1c9dcf90f5fb4d6d781c13a5f511aba1568b4acf3f64d5ebd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c6562c2e9d0c0b01e3a533df5fa4c93f0775543f6c6c46c5830bade030015055fd96dc1ee34424204a3147c5560a1312df624aab029ba9629fbc9a71c726c23
|
7
|
+
data.tar.gz: bb2e16aea231b2de20d5e938011916c89aef6c5fe03ea4acd0b1a17317dafc68a9ef9b0a9ec860acb1fd7d170dd65cad018e46b8b87a1af7b42d8f409299b949
|
data/.github/workflows/rake.yml
CHANGED
data/lib/fbe/enter.rb
CHANGED
@@ -33,6 +33,7 @@ require_relative '../fbe'
|
|
33
33
|
# @param [Loog] loog The logging facility
|
34
34
|
# @return [String] Full name of the user
|
35
35
|
def Fbe.enter(badge, why, options: $options, loog: $loog, &)
|
36
|
+
return yield unless options.testing.nil?
|
36
37
|
baza = BazaRb.new('api.zerocracy.com', 443, options.zerocracy_token, loog:)
|
37
38
|
baza.enter(options.job_name, badge, why, options.job_id.to_i, &)
|
38
39
|
end
|
data/lib/fbe.rb
CHANGED
data/test/fbe/test_enter.rb
CHANGED
@@ -34,11 +34,17 @@ require_relative '../../lib/fbe/enter'
|
|
34
34
|
class TestEnter < Minitest::Test
|
35
35
|
def test_simple
|
36
36
|
WebMock.disable_net_connect!
|
37
|
-
options = Judges::Options.new({ '
|
37
|
+
options = Judges::Options.new({ 'zerocracy_token' => '00000-0000-0000-00000' })
|
38
38
|
stub_request(:get, 'https://api.zerocracy.com/valves/result?badge=foo')
|
39
39
|
.to_return(status: 204)
|
40
40
|
stub_request(:post, 'https://api.zerocracy.com/valves/add?badge=foo&job=0&result=hi&why=no%20reason')
|
41
41
|
.to_return(status: 302)
|
42
42
|
assert_equal('hi', Fbe.enter('foo', 'no reason', options:, loog: Loog::NULL) { 'hi' })
|
43
43
|
end
|
44
|
+
|
45
|
+
def test_in_testing_mode
|
46
|
+
WebMock.enable_net_connect!
|
47
|
+
options = Judges::Options.new({ 'testing' => true })
|
48
|
+
assert_equal('hi', Fbe.enter('foo', 'no reason', options:, loog: Loog::NULL) { 'hi' })
|
49
|
+
end
|
44
50
|
end
|