fbe 0.0.77 → 0.0.78

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: 9ddebcf39a53a329190de82fa2ac0cd7396b3e2ba61f78a42071e2178a9b8d90
4
- data.tar.gz: 05f078caf57e2b5f62454f01526c13b29f8e86988ed59d1f2c3edca46f2b60f3
3
+ metadata.gz: 8be7701ad73edc6322026cac63ded7eec6c24d32d49db8687639d6794eb07aa6
4
+ data.tar.gz: b70c04b466d25b1c9dcf90f5fb4d6d781c13a5f511aba1568b4acf3f64d5ebd8
5
5
  SHA512:
6
- metadata.gz: 43aeba7ea29b28572827becf136f47c9dd6ed152c3469f94364acd68c389a9acb6cb55810317407e92a58d7a23dd0658f01662269ab1eb47c5749d9661096cb8
7
- data.tar.gz: cf05b37c19c84c0414ab8eec86edc2fb700c371083dbdb67bbaf87cce8052db206c5bda8c5d119dc6b11b947da5ab89681da46901c779689a1a90997fa8304a5
6
+ metadata.gz: 5c6562c2e9d0c0b01e3a533df5fa4c93f0775543f6c6c46c5830bade030015055fd96dc1ee34424204a3147c5560a1312df624aab029ba9629fbc9a71c726c23
7
+ data.tar.gz: bb2e16aea231b2de20d5e938011916c89aef6c5fe03ea4acd0b1a17317dafc68a9ef9b0a9ec860acb1fd7d170dd65cad018e46b8b87a1af7b42d8f409299b949
@@ -31,7 +31,7 @@ jobs:
31
31
  name: test
32
32
  strategy:
33
33
  matrix:
34
- os: [ubuntu-20.04, macos-12, windows-2022]
34
+ os: [ubuntu-22.04, macos-12]
35
35
  ruby: [3.2]
36
36
  runs-on: ${{ matrix.os }}
37
37
  steps:
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
@@ -27,5 +27,5 @@
27
27
  # License:: MIT
28
28
  module Fbe
29
29
  # Current version of the gem (changed by +.rultor.yml+ on every release)
30
- VERSION = '0.0.77'
30
+ VERSION = '0.0.78'
31
31
  end
@@ -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({ 'testing' => true, 'zerocracy_token' => '00000-0000-0000-00000' })
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fbe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.77
4
+ version: 0.0.78
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko