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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ddebcf39a53a329190de82fa2ac0cd7396b3e2ba61f78a42071e2178a9b8d90
4
- data.tar.gz: 05f078caf57e2b5f62454f01526c13b29f8e86988ed59d1f2c3edca46f2b60f3
3
+ metadata.gz: ebef11abe73e837c5c5d7c6aa46e78d6f7d966e5aece1c50935b2cbfa90a3e6e
4
+ data.tar.gz: b7fc21e82bdec29ed980b00f84249cf7c68ef000c930f87622769513dea10582
5
5
  SHA512:
6
- metadata.gz: 43aeba7ea29b28572827becf136f47c9dd6ed152c3469f94364acd68c389a9acb6cb55810317407e92a58d7a23dd0658f01662269ab1eb47c5749d9661096cb8
7
- data.tar.gz: cf05b37c19c84c0414ab8eec86edc2fb700c371083dbdb67bbaf87cce8052db206c5bda8c5d119dc6b11b947da5ab89681da46901c779689a1a90997fa8304a5
6
+ metadata.gz: ae7f0dfbf143569ce8d0b088b53a1d7febfbb083b784885e35fbf578db2a8fd4bed2320d053d28a2e378f1e7fbb613a23cfd24f271efc0fe39e07266a28ed0a8
7
+ data.tar.gz: 6c2f4ff1c9c950a30837657742961a4f404f2358f82282db0285710589cf4890688f8070bb8569329255e3bd49d8902f16ced914811f0dcbff909983defbaa04
@@ -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/octo.rb CHANGED
@@ -246,7 +246,7 @@ class Fbe::FakeOctokit
246
246
  created_at: random_time,
247
247
  updated_at: random_time,
248
248
  pushed_at: random_time,
249
- size: 470,
249
+ size: name == 'yegor256/empty-repo' ? 0 : 470,
250
250
  stargazers_count: 1,
251
251
  watchers_count: 1,
252
252
  language: 'Ruby',
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.79'
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.79
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko