fbe 0.0.77 → 0.0.79
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +1 -1
- data/lib/fbe/enter.rb +1 -0
- data/lib/fbe/octo.rb +1 -1
- 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: ebef11abe73e837c5c5d7c6aa46e78d6f7d966e5aece1c50935b2cbfa90a3e6e
|
4
|
+
data.tar.gz: b7fc21e82bdec29ed980b00f84249cf7c68ef000c930f87622769513dea10582
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae7f0dfbf143569ce8d0b088b53a1d7febfbb083b784885e35fbf578db2a8fd4bed2320d053d28a2e378f1e7fbb613a23cfd24f271efc0fe39e07266a28ed0a8
|
7
|
+
data.tar.gz: 6c2f4ff1c9c950a30837657742961a4f404f2358f82282db0285710589cf4890688f8070bb8569329255e3bd49d8902f16ced914811f0dcbff909983defbaa04
|
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/octo.rb
CHANGED
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
|