From 97b7d678d68eb999d65f2bf738619dda8e36f257 Mon Sep 17 00:00:00 2001 From: VasilevNStas Date: Mon, 29 Jun 2026 20:00:32 +0300 Subject: [PATCH] #278 add upper version bounds for fbe and judges Both fbe and judges are pre-1.0 gems where minor version bumps may introduce breaking changes (API changes, CLI option changes, S-expression query changes, exit code changes). Changing from `>0` to `~>0` constrains updates to the 0.x series, preventing `bundle update` from accidentally jumping to a hypothetical 1.0 release. The Gemfile.lock already pins exact versions, but the Gemfile constraint protects against lockfile regeneration. Other gems with `>0` (rubocop-*) are dev-only tools and less critical. --- Gemfile | 4 +-- Gemfile.lock | 76 +++++++++++++++++++++++++++++----------------------- README.md | 14 +++++----- 3 files changed, 52 insertions(+), 42 deletions(-) diff --git a/Gemfile b/Gemfile index ceb810d..5f3ec49 100644 --- a/Gemfile +++ b/Gemfile @@ -5,8 +5,8 @@ source 'https://rubygems.org' -gem 'fbe', '>0' -gem 'judges', '>0', require: false +gem 'fbe', '~>0' +gem 'judges', '~>0', require: false gem 'minitest', '~>6.0', require: false gem 'minitest-reporters', '~>1.7', require: false gem 'rake', '~>13.2', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 6eb129a..d80ec8c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - activesupport (8.1.1) + activesupport (8.1.3) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) @@ -14,13 +14,13 @@ GEM securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) uri (>= 0.13.1) - addressable (2.8.8) + addressable (2.9.0) public_suffix (>= 2.0.2, < 8.0) ansi (1.6.0) ast (2.4.3) backtrace (0.4.1) base64 (0.3.0) - baza.rb (0.11.2) + baza.rb (0.14.4) backtrace (~> 0.4) elapsed (~> 0.2) faraday (~> 2.13) @@ -32,21 +32,21 @@ GEM retries (~> 0.0) tago (~> 0.2) typhoeus (~> 1.4) - bigdecimal (3.3.1) + bigdecimal (4.1.2) builder (3.3.0) - concurrent-ruby (1.3.5) - connection_pool (2.5.5) + concurrent-ruby (1.3.7) + connection_pool (3.0.2) decoor (0.1.0) docile (1.4.1) drb (2.2.3) - elapsed (0.2.0) + elapsed (0.3.1) loog (~> 0.6) tago (~> 0.1) ellipsized (0.3.0) ethon (0.18.0) ffi (>= 1.15.0) logger - factbase (0.19.2) + factbase (0.19.13) backtrace (~> 0.4) decoor (~> 0.1) ellipsized (~> 0.3) @@ -57,24 +57,24 @@ GEM others (~> 0.1) tago (~> 0.1) yaml (~> 0.3) - faraday (2.14.0) + faraday (2.14.3) faraday-net_http (>= 2.0, < 3.5) json logger - faraday-http-cache (2.5.1) + faraday-http-cache (2.7.0) faraday (>= 0.8) - faraday-multipart (1.1.1) + faraday-multipart (1.2.0) multipart-post (~> 2.0) - faraday-net_http (3.4.2) + faraday-net_http (3.4.4) net-http (~> 0.5) - faraday-retry (2.3.2) + faraday-retry (2.4.0) faraday (~> 2.0) - fbe (0.47.0) + fbe (0.48.5) backtrace (~> 0.4) baza.rb (~> 0.9) decoor (~> 0.1) ellipsized (~> 0.3) - factbase (~> 0.11) + factbase (~> 0.19) faraday (~> 2.0) faraday-http-cache (~> 2.5) faraday-multipart (~> 1.1) @@ -93,35 +93,38 @@ GEM tago (~> 0.1) veils (~> 0.4) verbose (~> 0.0) - ffi (1.17.2-x86_64-linux-gnu) + ffi (1.17.4-x86_64-darwin) + ffi (1.17.4-x86_64-linux-gnu) fiber-storage (1.0.1) filesize (0.2.0) gli (2.22.2) ostruct - graphql (2.5.16) + graphql (2.6.3) base64 fiber-storage logger graphql-client (0.26.0) activesupport (>= 3.0) graphql (>= 1.13.0) - i18n (1.14.7) + i18n (1.15.2) concurrent-ruby (~> 1.0) intercepted (0.2.0) - iri (0.11.3) + iri (0.11.8) joined (0.4.0) - json (2.18.0) - judges (0.58.1) + json (2.20.0) + judges (0.60.4) backtrace (~> 0.4) baza.rb (~> 0.10) concurrent-ruby (~> 1.2) elapsed (~> 0.2) + ellipsized (~> 0.3) factbase (~> 0.16) gli (~> 2.21) iri (~> 0.11) loog (~> 0.6) moments (~> 0.3) nokogiri (~> 1.10) + octokit (~> 10.0) others (~> 0.1) retries (~> 0.0) tago (~> 0.2) @@ -130,11 +133,12 @@ GEM typhoeus (~> 1.3) language_server-protocol (3.17.0.5) lint_roller (1.1.0) - liquid (5.11.0) + liquid (5.13.0) bigdecimal strscan (>= 3.1.1) logger (1.7.0) - loog (0.6.1) + loog (0.8.0) + ellipsized logger (~> 1.0) minitest (6.0.6) drb (~> 2.0) @@ -146,9 +150,11 @@ GEM ruby-progressbar moments (0.3.0) multipart-post (2.4.1) - net-http (0.8.0) + net-http (0.9.1) uri (>= 0.11.1) - nokogiri (1.18.10-x86_64-linux-gnu) + nokogiri (1.19.4-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.19.4-x86_64-linux-gnu) racc (~> 1.4) obk (0.3.2) octokit (10.0.0) @@ -161,7 +167,7 @@ GEM ast (~> 2.4.1) racc prism (1.9.0) - public_suffix (6.0.2) + public_suffix (7.0.5) racc (1.8.1) rainbow (3.1.1) rake (13.4.2) @@ -207,13 +213,14 @@ GEM simplecov (~> 0.19) simplecov-html (0.13.2) simplecov_json_formatter (0.1.4) - sqlite3 (2.8.1-x86_64-linux-gnu) - strscan (3.1.5) - tago (0.6.0) - timeout (0.5.0) + sqlite3 (2.9.5-x86_64-darwin) + sqlite3 (2.9.5-x86_64-linux-gnu) + strscan (3.1.8) + tago (0.7.0) + timeout (0.6.1) total (0.4.2) - typhoeus (1.4.1) - ethon (>= 0.9.0) + typhoeus (1.6.0) + ethon (>= 0.18.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (3.1.5) @@ -227,12 +234,13 @@ GEM yaml (0.4.0) PLATFORMS + x86_64-darwin-24 x86_64-linux x86_64-linux-gnu DEPENDENCIES - fbe (> 0) - judges (> 0) + fbe (~> 0) + judges (~> 0) minitest (~> 6.0) minitest-reporters (~> 1.7) rake (~> 13.2) diff --git a/README.md b/README.md index cf5f5a0..bfe11f7 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ based on business rules. Judges run in cycles until no new facts are produced. ## Project Structure -``` +```text judges//.rb — judge implementation, auto-discovered judges//.yml — YAML test for the judge (data-driven) lib/ — shared Ruby libraries @@ -41,7 +41,7 @@ bundle exec rake mkdir judges/hello-world ``` -2. Write the judge logic in `judges/hello-world/hello-world.rb`: +1. Write the judge logic in `judges/hello-world/hello-world.rb`: ```ruby # frozen_string_literal: true @@ -56,7 +56,7 @@ Fbe.fb.query('(and (exists hi) (absent hello))').each do |f| end ``` -3. Write a YAML test in `judges/hello-world/hello-world.yml`: +1. Write a YAML test in `judges/hello-world/hello-world.yml`: ```yaml # SPDX-FileCopyrightText: Copyright (c) 2024-2026 Zerocracy @@ -74,13 +74,13 @@ expected: - /fb/f[_id=1]/hello ``` -4. Run the judge YAML tests: +1. Run the judge YAML tests: ```bash bundle exec judges test --no-log --disable live --lib lib judges ``` -5. Run the full build: +1. Run the full build: ```bash bundle exec rake @@ -90,13 +90,15 @@ If everything is clean, your judge is ready. ## Commands + | Command | Purpose | -|---------|---------| +| ------- | ------- | | `bundle exec rake` | Full build (test + judges + rubocop) | | `bundle exec rake test` | Ruby unit tests only | | `bundle exec judges test --no-log --disable live --lib lib judges` | Judge YAML tests | | `bundle exec rubocop` | Code style check | | `docker build -t swarm .` | Build Docker image (requires Dockerfile) | + ## How to Contribute