fbe 0.2.0 → 0.2.2

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: 44dddb35ca02d476dd5dfe586952118aa9f3a4fa5387c1daf272d26c168b09bf
4
- data.tar.gz: 0bf256a95f4f3cfa1fed6a131d7b247e2efb3ffe47466877ec0aad7d203cba12
3
+ metadata.gz: aa708f0ca57e441134dbb83f996be14fd85a7d5b85c8f09ad4e204f282d1643a
4
+ data.tar.gz: 23e7474baf4bc880c60aa3b0e51c108de4d41c6557e710cbd46d3a30ba299c75
5
5
  SHA512:
6
- metadata.gz: c629481c01b322d26dbb23ad9831e0274a4c9abc4246e3c64311ec54885ba52b1b751fd496b877a7e5fe9bd5ef54da8ff92b4ba0b02cc77b676677a34b381878
7
- data.tar.gz: 5811f6cc833dafcfb9904f094b2fa85b5c56af6b52650a68c25d03050b127fa3a106302093a79b6c592d6c71f76be9ca139cb9808a0cdcf121fd80158bb13bd3
6
+ metadata.gz: ccd6bcb8d9f944b096d814febdbf0638e9e8be6d9867c401527c25474df5304fe1050787145bfc1fd1d604dc42acbced58e1e6eb3d535e6814b1faf85cf3a369
7
+ data.tar.gz: f8c6afccba9e97dff31586ee5d68065e2c86f1b9875eacfc9a17aa436b4edf757356c0a33d953336caea28bfbbfda580e382eae78d170a86e082051b93c5a864
data/Gemfile CHANGED
@@ -8,9 +8,10 @@ gemspec
8
8
 
9
9
  gem 'minitest', '5.25.5', require: false
10
10
  gem 'minitest-reporters', '>=1.7', require: false
11
+ gem 'qbash', '>0', require: false
11
12
  gem 'rake', '>=13', require: false
12
13
  gem 'rspec-rails', '>0', require: false
13
- gem 'rubocop', '1.73.2', require: false
14
+ gem 'rubocop', '1.74.0', require: false
14
15
  gem 'rubocop-minitest', '>0', require: false
15
16
  gem 'rubocop-performance', '>0', require: false
16
17
  gem 'rubocop-rake', '>0', require: false
data/Gemfile.lock CHANGED
@@ -194,6 +194,11 @@ GEM
194
194
  date
195
195
  stringio
196
196
  public_suffix (6.0.1)
197
+ qbash (0.4.0)
198
+ backtrace (> 0)
199
+ elapsed (> 0)
200
+ loog (> 0)
201
+ tago (> 0)
197
202
  racc (1.8.1)
198
203
  rack (3.1.12)
199
204
  rack-session (2.1.0)
@@ -244,7 +249,7 @@ GEM
244
249
  rspec-mocks (~> 3.13)
245
250
  rspec-support (~> 3.13)
246
251
  rspec-support (3.13.2)
247
- rubocop (1.73.2)
252
+ rubocop (1.74.0)
248
253
  json (~> 2.3)
249
254
  language_server-protocol (~> 3.17.0.2)
250
255
  lint_roller (~> 1.1.0)
@@ -323,9 +328,10 @@ DEPENDENCIES
323
328
  fbe!
324
329
  minitest (= 5.25.5)
325
330
  minitest-reporters (>= 1.7)
331
+ qbash (> 0)
326
332
  rake (>= 13)
327
333
  rspec-rails (> 0)
328
- rubocop (= 1.73.2)
334
+ rubocop (= 1.74.0)
329
335
  rubocop-minitest (> 0)
330
336
  rubocop-performance (> 0)
331
337
  rubocop-rake (> 0)
data/Rakefile CHANGED
@@ -3,6 +3,7 @@
3
3
  # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Zerocracy
4
4
  # SPDX-License-Identifier: MIT
5
5
 
6
+ require 'qbash'
6
7
  require 'rubygems'
7
8
  require 'rake'
8
9
  require 'rake/clean'
@@ -17,7 +18,7 @@ end
17
18
 
18
19
  ENV['RACK_ENV'] = 'test'
19
20
 
20
- task default: %i[clean test rubocop yard]
21
+ task default: %i[clean test picks reqs rubocop yard]
21
22
 
22
23
  require 'rake/testtask'
23
24
  desc 'Run all unit tests'
@@ -29,6 +30,20 @@ Rake::TestTask.new(:test) do |test|
29
30
  test.verbose = false
30
31
  end
31
32
 
33
+ desc 'Run them via Ruby, one by one'
34
+ task :picks do
35
+ Dir['test/**/*.rb'].each do |f|
36
+ qbash("bundle exec ruby #{Shellwords.escape(f)}", log: $stdout)
37
+ end
38
+ end
39
+
40
+ desc 'Require them via Ruby, one by one'
41
+ task :reqs do
42
+ Dir['lib/**/*.rb'].each do |f|
43
+ qbash("bundle exec ruby #{Shellwords.escape(f)}", log: $stdout)
44
+ end
45
+ end
46
+
32
47
  require 'yard'
33
48
  desc 'Build Yard documentation'
34
49
  YARD::Rake::YardocTask.new do |t|
data/lib/fbe/fb.rb CHANGED
@@ -3,12 +3,15 @@
3
3
  # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Zerocracy
4
4
  # SPDX-License-Identifier: MIT
5
5
 
6
- require 'loog'
7
- require 'judges'
8
6
  require 'factbase'
9
7
  require 'factbase/logged'
10
8
  require 'factbase/pre'
11
9
  require 'factbase/rules'
10
+ require 'factbase/cached/cached_factbase'
11
+ require 'factbase/indexed/indexed_factbase'
12
+ require 'factbase/sync/sync_factbase'
13
+ require 'judges'
14
+ require 'loog'
12
15
  require_relative '../fbe'
13
16
 
14
17
  # Returns an instance of +Factbase+ (cached).
@@ -39,6 +42,12 @@ def Fbe.fb(fb: $fb, global: $global, options: $options, loog: $loog)
39
42
  f._version = "#{Factbase::VERSION}/#{Judges::VERSION}/#{options.action_version}"
40
43
  f._job = options.job_id unless options.job_id.nil?
41
44
  end
42
- Factbase::Logged.new(fbe, loog)
45
+ Factbase::SyncFactbase.new(
46
+ Factbase::IndexedFactbase.new(
47
+ Factbase::CachedFactbase.new(
48
+ Factbase::Logged.new(fbe, loog)
49
+ )
50
+ )
51
+ )
43
52
  end
44
53
  end
@@ -6,6 +6,7 @@
6
6
  require 'graphql/client'
7
7
  require 'graphql/client/http'
8
8
  require 'loog'
9
+ require_relative '../fbe'
9
10
 
10
11
  # Creates an instance of {Fbe::Graph}.
11
12
  #
@@ -3,6 +3,7 @@
3
3
  # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Zerocracy
4
4
  # SPDX-License-Identifier: MIT
5
5
 
6
+ require 'faraday'
6
7
  require 'faraday/logging/formatter'
7
8
  require_relative '../../fbe'
8
9
  require_relative '../../fbe/middleware'
@@ -4,6 +4,7 @@
4
4
  # SPDX-License-Identifier: MIT
5
5
 
6
6
  require 'faraday'
7
+ require_relative '../middleware'
7
8
 
8
9
  # Faraday Middleware that monitors GitHub API rate limits.
9
10
  #
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.2.0'
13
+ VERSION = '0.2.2' unless const_defined?(:VERSION)
14
14
  end
@@ -5,7 +5,12 @@
5
5
 
6
6
  require 'faraday'
7
7
  require 'logger'
8
+ require 'loog'
9
+ require 'judges'
10
+ require 'judges/options'
8
11
  require_relative '../../../lib/fbe/middleware'
12
+ require_relative '../../../lib/fbe/middleware/quota'
13
+ require_relative '../../test__helper'
9
14
 
10
15
  class QuotaTest < Minitest::Test
11
16
  class FakeApp
@@ -3,9 +3,11 @@
3
3
  # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Zerocracy
4
4
  # SPDX-License-Identifier: MIT
5
5
 
6
+ require 'judges/options'
6
7
  require 'loog'
7
- require_relative '../test__helper'
8
+ require 'webmock/minitest'
8
9
  require_relative '../../lib/fbe/enter'
10
+ require_relative '../test__helper'
9
11
 
10
12
  # Test.
11
13
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
@@ -6,6 +6,7 @@
6
6
  require 'judges/options'
7
7
  require 'webmock/minitest'
8
8
  require 'loog'
9
+ require_relative '../test__helper'
9
10
  require_relative '../../lib/fbe/github_graph'
10
11
 
11
12
  # Test.
@@ -3,9 +3,11 @@
3
3
  # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Zerocracy
4
4
  # SPDX-License-Identifier: MIT
5
5
 
6
+ require 'factbase'
7
+ require 'judges/options'
6
8
  require 'loog'
7
- require_relative '../test__helper'
8
9
  require_relative '../../lib/fbe/issue'
10
+ require_relative '../test__helper'
9
11
 
10
12
  # Test.
11
13
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
data/test/fbe/test_sec.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Zerocracy
4
4
  # SPDX-License-Identifier: MIT
5
5
 
6
+ require 'factbase'
6
7
  require_relative '../test__helper'
7
8
  require_relative '../../lib/fbe/sec'
8
9
 
data/test/fbe/test_who.rb CHANGED
@@ -3,9 +3,11 @@
3
3
  # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Zerocracy
4
4
  # SPDX-License-Identifier: MIT
5
5
 
6
+ require 'factbase'
7
+ require 'judges/options'
6
8
  require 'loog'
7
- require_relative '../test__helper'
8
9
  require_relative '../../lib/fbe/who'
10
+ require_relative '../test__helper'
9
11
 
10
12
  # Test.
11
13
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fbe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-13 00:00:00.000000000 Z
10
+ date: 2025-03-14 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: backtrace