fbe 0.29.1 → 0.30.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f08a090d74c79938d45d53b09d1cdb6fafada89c54b5c33b2b4154a1174ac38c
4
- data.tar.gz: d927725171355f731620718cc2d7125e1f8e961af53e01c4d36e03c288fcd640
3
+ metadata.gz: d28d22ca3024f7acbd6630b903aeaaf5391e2debb3cd7dbab920c664473f1567
4
+ data.tar.gz: 955bd9e464b2450eeeee67c9cbcc222687c00a1bb6bc5d9b5e37539d7b43700b
5
5
  SHA512:
6
- metadata.gz: 32999571b725d7b68de93231ea2bdb1731ddc2a8d2c84bbf84d248fd25fae5223a3fb3b6cb85c73364815548019055420344d2bc3bba4ef14e57450f131026c5
7
- data.tar.gz: 6e26bb3ba8c15c24912b46c3a7841ebd59ab17a9ee3f530e7d19968efdbc8da9d20acaefa9fdece7c61999240118972277588b9ceda5e5a033cb4ef9be94166f
6
+ metadata.gz: 87935f90c30759d39a960e0c44c717bf7cd6080114aa538546b3970efdec95449a3e749fbe6b575cf064cbd536f133a694d1ba11a9e608cf6fc43c058ec85867
7
+ data.tar.gz: e1b306dfdb743aac0efaaa41fbaa73aeb327cdeae33a254046211eb98608c876e7ae351800dde5ff72a74741774985cad53c264a51d24d8cfa12cb570d044189
@@ -16,6 +16,6 @@ jobs:
16
16
  runs-on: ubuntu-24.04
17
17
  steps:
18
18
  - uses: actions/checkout@v5
19
- - uses: crate-ci/typos@v1.35.6
19
+ - uses: crate-ci/typos@v1.35.7
20
20
  with:
21
21
  config: .github/.typos.toml
data/Gemfile.lock CHANGED
@@ -63,7 +63,7 @@ GEM
63
63
  bigdecimal (3.2.2)
64
64
  builder (3.3.0)
65
65
  concurrent-ruby (1.3.5)
66
- connection_pool (2.5.3)
66
+ connection_pool (2.5.4)
67
67
  crack (1.0.0)
68
68
  bigdecimal
69
69
  rexml
@@ -76,7 +76,7 @@ GEM
76
76
  ellipsized (0.3.0)
77
77
  ethon (0.15.0)
78
78
  ffi (>= 1.15.0)
79
- factbase (0.15.6)
79
+ factbase (0.15.7)
80
80
  backtrace (~> 0.4)
81
81
  decoor (~> 0.1)
82
82
  ellipsized (~> 0.3)
@@ -121,7 +121,7 @@ GEM
121
121
  iri (0.11.2)
122
122
  joined (0.4.0)
123
123
  json (2.13.2)
124
- judges (0.53.3)
124
+ judges (0.53.6)
125
125
  backtrace (~> 0.4)
126
126
  baza.rb (~> 0.5)
127
127
  concurrent-ruby (~> 1.2)
@@ -203,7 +203,7 @@ GEM
203
203
  rubocop-ast (1.46.0)
204
204
  parser (>= 3.3.7.2)
205
205
  prism (~> 1.4)
206
- rubocop-minitest (0.38.1)
206
+ rubocop-minitest (0.38.2)
207
207
  lint_roller (~> 1.1)
208
208
  rubocop (>= 1.75.0, < 2.0)
209
209
  rubocop-ast (>= 1.38.0, < 2.0)
@@ -49,12 +49,17 @@ end
49
49
  # @param [Judges::Options] options Options containing 'repositories' field with masks
50
50
  # @param [Hash] global Global cache for storing API responses
51
51
  # @param [Loog] loog Logger for debug output
52
+ # @param [Time] start When did we start the entire pipeline
52
53
  # @param [quota_aware] Boolean Should we stop if quota is off?
54
+ # @param [lifetime_aware] Boolean Should we stop if lifetime is over?
53
55
  # @return [Array<String>] Shuffled list of repository full names (e.g., 'org/repo')
54
56
  # @raise [RuntimeError] If no repositories match the provided masks
55
57
  # @note Exclusion patterns must start with '-' (e.g., '-org/pattern*')
56
58
  # @note Results are shuffled to distribute load when processing
57
- def Fbe.unmask_repos(options: $options, global: $global, loog: $loog, quota_aware: true)
59
+ def Fbe.unmask_repos(
60
+ options: $options, global: $global, loog: $loog, start: $start,
61
+ quota_aware: true, lifetime_aware: true
62
+ )
58
63
  raise 'Repositories mask is not specified' unless options.repositories
59
64
  raise 'Repositories mask is empty' if options.repositories.empty?
60
65
  repos = []
@@ -82,7 +87,11 @@ def Fbe.unmask_repos(options: $options, global: $global, loog: $loog, quota_awar
82
87
  return repos unless block_given?
83
88
  repos.each do |repo|
84
89
  if quota_aware && octo.off_quota?
85
- $loog.info("No GitHub quota left, it is time to stop at #{repo}")
90
+ loog.info("No GitHub quota left, it is time to stop at #{repo}")
91
+ break
92
+ end
93
+ if lifetime_aware && options.lifetime && Time.now - start > options.lifetime - 10
94
+ loog.info("No time left, it is time to stop at #{repo}")
86
95
  break
87
96
  end
88
97
  yield repo
data/lib/fbe.rb CHANGED
@@ -10,5 +10,5 @@
10
10
  # License:: MIT
11
11
  module Fbe
12
12
  # Current version of the gem (changed by +.rultor.yml+ on every release)
13
- VERSION = '0.29.1' unless const_defined?(:VERSION)
13
+ VERSION = '0.30.0' unless const_defined?(:VERSION)
14
14
  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.29.1
4
+ version: 0.30.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko