From 6af5fdcf9505ab1f1d1f2ab14ae603806fec361f Mon Sep 17 00:00:00 2001 From: Ismael Marin Date: Wed, 23 Sep 2026 22:11:09 -0600 Subject: [PATCH 1/2] refactor: decouple task discovery from legacy runner --- lib/skill_bench.rb | 1 + lib/skill_bench/runner.rb | 7 ++--- .../services/batch_runner_service.rb | 8 ++--- lib/skill_bench/task/README.md | 8 +++-- lib/skill_bench/task/directory_finder.rb | 20 +++++++++++++ test/evaluator/runner_test.rb | 29 +++++++++++++++++++ 6 files changed, 61 insertions(+), 12 deletions(-) create mode 100644 lib/skill_bench/task/directory_finder.rb diff --git a/lib/skill_bench.rb b/lib/skill_bench.rb index 3648863..912413c 100644 --- a/lib/skill_bench.rb +++ b/lib/skill_bench.rb @@ -34,6 +34,7 @@ require_relative 'skill_bench/task' require_relative 'skill_bench/task/evaluator' require_relative 'skill_bench/task/file_reader' +require_relative 'skill_bench/runner' # Evaluation orchestration require_relative 'skill_bench/evaluation' diff --git a/lib/skill_bench/runner.rb b/lib/skill_bench/runner.rb index 51bb2ac..1c7068d 100644 --- a/lib/skill_bench/runner.rb +++ b/lib/skill_bench/runner.rb @@ -2,6 +2,7 @@ require 'pathname' require 'parallel' +require_relative 'task/directory_finder' require_relative 'task/evaluator' require_relative 'error_logger' @@ -79,11 +80,7 @@ def call # @param root_path [Pathname] The root directory to search. # @return [Array] A list of task directory paths. def self.discover_task_dirs(root_path) - if File.exist?(root_path.join('task.md')) - [root_path] - else - Dir.glob(root_path.join('**/task.md')).map { |f| Pathname.new(f).parent }.uniq.sort - end + Task::DirectoryFinder.call(root_path) end end end diff --git a/lib/skill_bench/services/batch_runner_service.rb b/lib/skill_bench/services/batch_runner_service.rb index db70deb..64b8061 100644 --- a/lib/skill_bench/services/batch_runner_service.rb +++ b/lib/skill_bench/services/batch_runner_service.rb @@ -4,7 +4,7 @@ require 'parallel' require_relative 'runner_service' require_relative '../output_formatter' -require_relative '../runner' +require_relative '../task/directory_finder' module SkillBench module Services @@ -14,9 +14,7 @@ module Services # {RunnerService} over each, returning an aggregate envelope with # per-eval results and a pass/fail summary. # - # Discovery reuses {SkillBench::Runner.discover_task_dirs} but never - # routes through the deprecated {SkillBench::Task::Evaluator}: each eval - # is executed by the supported {RunnerService}. + # Each discovered eval is executed by the supported {RunnerService}. class BatchRunnerService # Default directory scanned for evals when none is supplied. DEFAULT_EVALS_DIR = 'evals' @@ -80,7 +78,7 @@ def call # # @return [Array] Directories that contain a task.md def discover_eval_dirs - SkillBench::Runner.discover_task_dirs(Pathname.new(evals_dir)) + Task::DirectoryFinder.call(Pathname.new(evals_dir)) end # Runs every eval directory through {RunnerService} concurrently. diff --git a/lib/skill_bench/task/README.md b/lib/skill_bench/task/README.md index 403d820..1d60f42 100644 --- a/lib/skill_bench/task/README.md +++ b/lib/skill_bench/task/README.md @@ -6,11 +6,15 @@ Manages individual evaluation tasks. | File | Class | Purpose | |------|-------|---------| +| `directory_finder.rb` | `Task::DirectoryFinder` | Finds the root task or nested task directories in sorted order | | `evaluator.rb` | `Task::Evaluator` | Orchestrates baseline + context runs + judge scoring | | `file_reader.rb` | `Task::FileReader` | Safely reads task.md and criteria.json | -## Usage +## Find eval task directories ```ruby -result = SkillBench::Task::Evaluator.new(task_dir:).call +root = Pathname.new('evals') +task_dirs = SkillBench::Task::DirectoryFinder.call(root) ``` + +When `evals/task.md` exists, the result contains only `evals`. Otherwise, it contains the nested directories with a `task.md`, sorted by path. `SkillBench::Runner.discover_task_dirs` remains available for older callers. diff --git a/lib/skill_bench/task/directory_finder.rb b/lib/skill_bench/task/directory_finder.rb new file mode 100644 index 0000000..da5a346 --- /dev/null +++ b/lib/skill_bench/task/directory_finder.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +require 'pathname' + +module SkillBench + module Task + # Finds evaluation task directories under a root path. + class DirectoryFinder + # Finds the root task or all nested task directories in sorted order. + # + # @param root_path [Pathname] Directory to search. + # @return [Array] Directories containing a task.md file. + def self.call(root_path) + return [root_path] if File.exist?(root_path.join('task.md')) + + Dir.glob(root_path.join('**/task.md')).map { |path| Pathname.new(path).parent }.uniq.sort + end + end + end +end diff --git a/test/evaluator/runner_test.rb b/test/evaluator/runner_test.rb index 96d27e8..2aa4796 100644 --- a/test/evaluator/runner_test.rb +++ b/test/evaluator/runner_test.rb @@ -15,6 +15,10 @@ def teardown FileUtils.rm_rf(@base_path) end + def test_top_level_entry_point_keeps_deprecated_runner_available + assert SkillBench.const_defined?(:Runner) + end + def test_call_runs_baseline_and_context_and_returns_judge_scores create_eval_fixture('evals/skills/ruby-service-objects/basic-service-object') @@ -61,6 +65,31 @@ def test_call_fails_without_context_when_source_path_cannot_be_inferred assert_equal 'multiple (batch run)', result[:response][:source_path] end + def test_discover_task_dirs_returns_root_task_without_nested_tasks + root = @base_path.join('evals') + create_eval_fixture('evals') + create_eval_fixture('evals/nested') + + assert_equal [root], Runner.discover_task_dirs(root) + end + + def test_discover_task_dirs_returns_nested_tasks_in_sorted_order + create_eval_fixture('evals/z-last') + create_eval_fixture('evals/a-first') + + task_dirs = Runner.discover_task_dirs(@base_path.join('evals')) + task_names = task_dirs.map { |path| path.basename.to_s } + + assert_equal %w[a-first z-last], task_names + end + + def test_discover_task_dirs_returns_empty_array_when_no_tasks_exist + root = @base_path.join('evals') + root.mkpath + + assert_empty Runner.discover_task_dirs(root) + end + private def create_eval_fixture(relative_path) From 1b2d3482ae187bd24a07c754c181b68e0a76e0df Mon Sep 17 00:00:00 2001 From: Ismael Marin Date: Thu, 24 Sep 2026 05:21:55 -0600 Subject: [PATCH 2/2] release: prepare 2.0.0 maintenance release --- .github/workflows/ci.yml | 2 +- .reek.yml | 2 + .rubocop.yml | 2 +- CHANGELOG.md | 9 + CONTRIBUTING.md | 4 +- Gemfile | 16 +- Gemfile.lock | 196 ++++++------------ README.md | 21 +- docs/docker.md | 2 +- docs/first-eval-guide.md | 16 +- lib/skill_bench/clients/base_client.rb | 6 +- lib/skill_bench/judge/variance.rb | 9 +- .../services/output_persistence_service.rb | 2 +- lib/skill_bench/task/README.md | 3 + lib/skill_bench/version.rb | 2 +- ruby-skill-bench.gemspec | 6 +- test/evaluation_runner_test.rb | 12 +- test/evaluator/agent_evaluator_test.rb | 2 +- test/evaluator/ci_integration_test.rb | 2 + test/evaluator/context_hydrator_test.rb | 8 +- test/evaluator/gemspec_test.rb | 11 + .../output_persistence_service_test.rb | 4 +- test/test_helper.rb | 2 +- 23 files changed, 150 insertions(+), 189 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e62d87f..4e14565 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ["3.3", "3.4"] + ruby-version: ["3.3", "3.4", "4.0"] steps: - uses: actions/checkout@v4 diff --git a/.reek.yml b/.reek.yml index b51fb68..40015a6 100644 --- a/.reek.yml +++ b/.reek.yml @@ -191,6 +191,8 @@ detectors: - "SkillBench::Clients::Providers::OpenAI" - "SkillBench::Clients::Providers::OpenCode" - "SkillBench::Clients::Providers::OpenRouter" + - "SkillBench::Clients::Providers::Xai" + - "SkillBench::Clients::Providers::Bedrock" - "SkillBench::Config::Store" - "SkillBench::Cli::Eval::NewEvalOptions" # @options from BaseEvalOptions#initialize - "SkillBench::Cli::Eval::GenerateEvalOptions" # @options from BaseEvalOptions#initialize diff --git a/.rubocop.yml b/.rubocop.yml index b52b894..1296ac7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -5,7 +5,7 @@ plugins: AllCops: SuggestExtensions: false - TargetRubyVersion: 3.1 + TargetRubyVersion: 3.3 NewCops: enable Exclude: - 'evals/**/*' diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aaed30..1f5e234 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ All notable changes to `ruby-skill-bench` will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.0] - 2026-09-24 + +### Changed +- Require Ruby 3.3 or newer. Ruby 3.1 and 3.2 are no longer supported. +- Update the runtime JSON and Parallel dependency major versions and refresh the development and test dependencies. + +### Fixed +- Keep JSON report output pretty-printed with JSON 3. + ## [1.4.0] - 2026-09-13 ### Changed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 525323d..004134c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ Thank you for your interest in contributing to Ruby Skill Bench! This document p ### Prerequisites -- Ruby >= 3.1 +- Ruby >= 3.3 - Bundler - Git - Docker (optional). Needed only for container-isolation work. Live Docker tests are opt-in: `SKILL_BENCH_DOCKER_TESTS=1 bundle exec rake test`. See [docs/docker.md](docs/docker.md). @@ -142,4 +142,4 @@ vulnerability reporting or email the maintainer at ## License -By contributing to Ruby Skill Bench, you agree that your contributions will be licensed under the MIT License. \ No newline at end of file +By contributing to Ruby Skill Bench, you agree that your contributions will be licensed under the MIT License. diff --git a/Gemfile b/Gemfile index 6ce2364..c93e32d 100644 --- a/Gemfile +++ b/Gemfile @@ -7,18 +7,16 @@ gemspec group :development, :test do gem 'bundler-audit', '~> 0.9', require: false - gem 'concurrent-ruby', '>= 1.3.7' - gem 'minitest', '~> 5.0' - gem 'mocha', '~> 2.1' + gem 'minitest', '~> 6.0' + gem 'mocha', '~> 3.0' gem 'rake', '~> 13.4' gem 'reek', '~> 6.5' - gem 'rubocop', '~> 1.70', require: false - gem 'rubocop-minitest', '~> 0.39', require: false - gem 'rubocop-performance', '~> 1.26', require: false + gem 'rubocop', '~> 1.91', require: false + gem 'rubocop-minitest', '~> 0.40', require: false + gem 'rubocop-performance', '~> 1.27', require: false gem 'rubocop-rake', '~> 0.7', require: false gem 'rubocop-yard', require: false - gem 'simplecov', '~> 0.22', require: false - gem 'skunk', '~> 0.5.4' - gem 'webmock', '~> 3.23' + gem 'simplecov', '~> 1.3', require: false + gem 'webmock', '~> 3.26' gem 'yard', '~> 0.9', require: false end diff --git a/Gemfile.lock b/Gemfile.lock index 885322d..c79b6a5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,11 +1,11 @@ PATH remote: . specs: - ruby-skill-bench (1.4.0) + ruby-skill-bench (2.0.0) cgi (~> 0.5.2) faraday (~> 2.14) - json (~> 2.21, >= 2.21.2) - parallel (~> 1.26) + json (~> 3.0) + parallel (~> 2.0) GEM remote: https://rubygems.org/ @@ -13,26 +13,16 @@ GEM addressable (2.9.0) public_suffix (>= 2.0.2, < 8.0) ast (2.4.3) - axiom-types (0.1.1) - descendants_tracker (~> 0.0.4) - ice_nine (~> 0.11.0) - thread_safe (~> 0.3, >= 0.3.1) - bigdecimal (4.1.2) + bigdecimal (4.1.3) bundler-audit (0.9.3) bundler (>= 1.2.0) thor (~> 1.0) cgi (0.5.2) - childprocess (5.1.0) - logger (~> 1.5) - coercible (1.0.0) - descendants_tracker (~> 0.0.1) - concurrent-ruby (1.3.7) + concurrent-ruby (1.3.8) crack (1.0.1) bigdecimal rexml - descendants_tracker (0.0.4) - thread_safe (~> 0.3, >= 0.3.1) - docile (1.4.1) + drb (2.2.3) dry-configurable (1.4.0) dry-core (~> 1.0) zeitwerk (~> 2.6) @@ -62,42 +52,28 @@ GEM dry-inflector (~> 1.0) dry-logic (~> 1.4) zeitwerk (~> 2.6) - erubi (1.13.1) - faraday (2.14.3) + faraday (2.14.4) faraday-net_http (>= 2.0, < 3.5) json logger faraday-net_http (3.4.4) net-http (~> 0.5) - flay (2.14.4) - erubi (~> 1.10) - path_expander (~> 2.0) - prism (~> 1.7) - sexp_processor (~> 4.0) - flog (4.9.4) - path_expander (~> 2.0) - prism (~> 1.7) - sexp_processor (~> 4.8) hashdiff (1.2.1) - ice_nine (0.11.2) - json (2.21.2) - language_server-protocol (3.17.0.5) - launchy (3.1.1) - addressable (~> 2.8) - childprocess (~> 5.0) - logger (~> 1.6) + json (3.0.2) + language_server-protocol (3.17.0.6) lint_roller (1.1.0) logger (1.7.0) - minitest (5.27.0) - mocha (2.8.2) + minitest (6.0.6) + drb (~> 2.0) + prism (~> 1.5) + mocha (3.1.0) ruby2_keywords (>= 0.0.5) net-http (0.9.1) uri (>= 0.11.1) - parallel (1.28.0) - parser (3.3.11.1) + parallel (2.2.0) + parser (3.3.12.0) ast (~> 2.4.1) racc - path_expander (2.0.1) prism (1.9.0) public_suffix (7.0.5) racc (1.8.1) @@ -109,10 +85,10 @@ GEM parser (~> 3.3.0) rainbow (>= 2.0, < 4.0) rexml (~> 3.1) - regexp_parser (2.12.0) + regexp_parser (2.13.0) rexml (3.4.4) - rubocop (1.88.0) - json (~> 2.3) + rubocop (1.91.0) + json (>= 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) parallel (>= 1.10) @@ -122,16 +98,16 @@ GEM rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.49.1) + rubocop-ast (1.50.0) parser (>= 3.3.7.2) prism (~> 1.7) - rubocop-minitest (0.39.1) + rubocop-minitest (0.40.0) lint_roller (~> 1.1) rubocop (>= 1.75.0, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) - rubocop-performance (1.26.1) + rubocop-performance (1.27.0) lint_roller (~> 1.1) - rubocop (>= 1.75.0, < 2.0) + rubocop (>= 1.89.0, < 2.0) rubocop-ast (>= 1.47.1, < 2.0) rubocop-rake (0.7.1) lint_roller (~> 1.1) @@ -142,49 +118,18 @@ GEM yard ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - ruby_parser (3.22.0) - racc (~> 1.5) - sexp_processor (~> 4.16) - rubycritic (4.12.0) - flay (~> 2.13) - flog (~> 4.7) - launchy (>= 2.5.2) - parser (>= 3.3.0.5) - prism (>= 1.6.0) - rainbow (~> 3.1.1) - reek (~> 6.5.0, < 7.0) - rexml - ruby_parser (~> 3.21) - simplecov (>= 0.22.0) - tty-which (~> 0.5.0) - virtus (~> 2.0) - sexp_processor (4.17.5) - simplecov (0.22.0) - docile (~> 1.1) - simplecov-html (~> 0.11) - simplecov_json_formatter (~> 0.1) - simplecov-html (0.13.2) - simplecov_json_formatter (0.1.4) - skunk (0.5.4) - rubycritic (>= 4.5.2, < 5.0) - terminal-table (~> 3.0) - terminal-table (3.0.2) - unicode-display_width (>= 1.1.1, < 3) + simplecov (1.3.0) thor (1.5.0) - thread_safe (0.3.6) - tty-which (0.5.0) - unicode-display_width (2.6.0) + unicode-display_width (3.3.0) + unicode-emoji (~> 4.3) + unicode-emoji (4.3.0) uri (1.1.1) - virtus (2.0.0) - axiom-types (~> 0.1) - coercible (~> 1.0) - descendants_tracker (~> 0.0, >= 0.0.3) - webmock (3.26.2) + webmock (3.26.4) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - yard (0.9.44) - zeitwerk (2.8.2) + yard (0.9.45) + zeitwerk (2.8.3) PLATFORMS arm64-darwin-25 @@ -192,36 +137,30 @@ PLATFORMS DEPENDENCIES bundler-audit (~> 0.9) - concurrent-ruby (>= 1.3.7) - minitest (~> 5.0) - mocha (~> 2.1) + minitest (~> 6.0) + mocha (~> 3.0) rake (~> 13.4) reek (~> 6.5) - rubocop (~> 1.70) - rubocop-minitest (~> 0.39) - rubocop-performance (~> 1.26) + rubocop (~> 1.91) + rubocop-minitest (~> 0.40) + rubocop-performance (~> 1.27) rubocop-rake (~> 0.7) rubocop-yard ruby-skill-bench! - simplecov (~> 0.22) - skunk (~> 0.5.4) - webmock (~> 3.23) + simplecov (~> 1.3) + webmock (~> 3.26) yard (~> 0.9) CHECKSUMS addressable (2.9.0) sha256=7fdf6ac3660f7f4e867a0838be3f6cf722ace541dd97767fa42bc6cfa980c7af ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383 - axiom-types (0.1.1) sha256=c1ff113f3de516fa195b2db7e0a9a95fd1b08475a502ff660d04507a09980383 - bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd - bundler (4.0.18) sha256=02d9a17429de1847b4e0c9f27a9ee4b20c0a74c0a641b4e77195d6019e3618ac + bigdecimal (4.1.3) sha256=61ebe1e5e559bdc3cc6f2c0ee7f427321fc838f59611c294356eb04d6e21cf66 + bundler (4.0.21) sha256=7cbf5499b426076aa16c8d28a59e4c2c3aad5a438402abcd961f0119f29f1dd0 bundler-audit (0.9.3) sha256=81c8766c71e47d0d28a0f98c7eed028539f21a6ea3cd8f685eb6f42333c9b4e9 cgi (0.5.2) sha256=61ca30298171190fd4fa0d8018e57ada456eae9b7a2b78526debf7f0a0e6f8bb - childprocess (5.1.0) sha256=9a8d484be2fd4096a0e90a0cd3e449a05bc3aa33f8ac9e4d6dcef6ac1455b6ec - coercible (1.0.0) sha256=5081ad24352cc8435ce5472bc2faa30260c7ea7f2102cc6a9f167c4d9bffaadc - concurrent-ruby (1.3.7) sha256=4412caec3a5ea2e5fdc52076724c071a81f2c0593d83b2ac8cbb8ca63b3151b0 + concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1 crack (1.0.1) sha256=ff4a10390cd31d66440b7524eb1841874db86201d5b70032028553130b6d4c7e - descendants_tracker (0.0.4) sha256=e9c41dd4cfbb85829a9301ea7e7c48c2a03b26f09319db230e6479ccdc780897 - docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e + drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373 dry-configurable (1.4.0) sha256=e35d1b5f3c081753ef361f564919db79000f32cfa6f20ee3a3ba5921b41b73ce dry-core (1.2.0) sha256=0cc5a7da88df397f153947eeeae42e876e999c1e30900f3c536fb173854e96a1 dry-inflector (1.3.1) sha256=7fb0c2bb04f67638f25c52e7ba39ab435d922a3a5c3cd196120f63accb682dcc @@ -229,58 +168,43 @@ CHECKSUMS dry-logic (1.6.0) sha256=da6fedbc0f90fc41f9b0cc7e6f05f5d529d1efaef6c8dcc8e0733f685745cea2 dry-schema (1.16.0) sha256=cd3aaeabc0f1af66ec82a29096d4c4fb92a0a58b9dae29a22b1bbceb78985727 dry-types (1.9.1) sha256=baebeecdb9f8395d6c9d227b62011279440943e3ef2468fe8ccc1ba11467f178 - erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9 - faraday (2.14.3) sha256=1882247e6766615c8220b4392bf1d27f6ebb63d8e28267587cef1fb0bf37f278 + faraday (2.14.4) sha256=9bb4408c44621b0dbaaaa39e5dbfc4dbe58cc6751b6eb94d16ae9e1f2f2fab6e faraday-net_http (3.4.4) sha256=0e78af151747ed1b00f33e25973b4bc220d7f16c00c39676817c8b12331eb588 - flay (2.14.4) sha256=a62d96a51d1da185aa41ba95b696966df9f7d1d91a457709277f24515895de77 - flog (4.9.4) sha256=12cc054fab7a2cbd2a906514397c4d7788954d530564782d6f14939dc2dfbcbb hashdiff (1.2.1) sha256=9c079dbc513dfc8833ab59c0c2d8f230fa28499cc5efb4b8dd276cf931457cd1 - ice_nine (0.11.2) sha256=5d506a7d2723d5592dc121b9928e4931742730131f22a1a37649df1c1e2e63db - json (2.21.2) sha256=1f1d3b7cf2b3ba1a69beca0bb6db13d5438b80bff3cd54cdaaa620b9b07c1c6a - language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc - launchy (3.1.1) sha256=72b847b5cc961589dde2c395af0108c86ff0119f42d4648d25b5440ebb10059e + json (3.0.2) sha256=8e6d7e7b11384c21230430cef90b71f14849a34a1f4452796670f7c981bd19df + language_server-protocol (3.17.0.6) sha256=5ef2c0c138f8267e1bc631d3328347d354f96724b0af22f2c79516120443b7f0 lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87 logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203 - minitest (5.27.0) sha256=2d3b17f8a36fe7801c1adcffdbc38233b938eb0b4966e97a6739055a45fa77d5 - mocha (2.8.2) sha256=1f77e729db47e72b4ef776461ce20caeec2572ffdf23365b0a03608fee8f4eee + minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1 + mocha (3.1.0) sha256=75f42d69ebfb1f10b32489dff8f8431d37a418120ecdfc07afe3bc183d4e1d56 net-http (0.9.1) sha256=25ba0b67c63e89df626ed8fac771d0ad24ad151a858af2cc8e6a716ca4336996 - parallel (1.28.0) sha256=33e6de1484baf2524792d178b0913fc8eb94c628d6cfe45599ad4458c638c970 - parser (3.3.11.1) sha256=d17ace7aabe3e72c3cc94043714be27cc6f852f104d81aa284c2281aecc65d54 - path_expander (2.0.1) sha256=2de201164bff4719cc4d0b3767286e9977cc832a59c4d70abab571ec86cb41e4 + parallel (2.2.0) sha256=e1059c5fd7b649558a0aec38a769f06a42942bdb40503d005a59c352fe011cd8 + parser (3.3.12.0) sha256=21a6d7f755d5a24dfbdc6e6b772e4e879a52e7631a88bc5a3a134606052c9828 prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85 public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623 racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701 reek (6.5.0) sha256=d26d3a492773b2bbc228888067a21afe33ac07954a17dbd64cdeae42c4c69be1 - regexp_parser (2.12.0) sha256=35a916a1d63190ab5c9009457136ae5f3c0c7512d60291d0d1378ba18ce08ebb + regexp_parser (2.13.0) sha256=d105d95d2138954e73914d2fbfb3d0a8f8605a49a3e89864c32e78b9107cb770 rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142 - rubocop (1.88.0) sha256=e420ddf1662d0ef34bc8a2910ac4b396a7ddda0b51a708264405241734b08e0b - rubocop-ast (1.49.1) sha256=4412f3ee70f6fe4546cc489548e0f6fcf76cafcfa80fa03af67098ffed755035 - rubocop-minitest (0.39.1) sha256=998398d6da4026d297f0f9bf709a1eac5f2b6947c24431f94af08138510cf7ed - rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834 + rubocop (1.91.0) sha256=9c82b7bf391c5d7e3798c5b9996e22a1fe3bd7468e351dfdeb96140c058296d0 + rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db + rubocop-minitest (0.40.0) sha256=353c698199115f12151144cf0b5a96f69bb9d77b660cf6536df2c4250c672a9d + rubocop-performance (1.27.0) sha256=eeeb1374d062a368ee1c787b70eb0b0cc4b184cb1f8565f424760946146d61ce rubocop-rake (0.7.1) sha256=3797f2b6810c3e9df7376c26d5f44f3475eda59eb1adc38e6f62ecf027cbae4d rubocop-yard (1.3.0) sha256=29bc44274e0b10d7db60655e84089328c0aceadd246d24f8e963c67949a60269 ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33 - ruby-skill-bench (1.4.0) + ruby-skill-bench (2.0.0) ruby2_keywords (0.0.5) sha256=ffd13740c573b7301cf7a2e61fc857b2a8e3d3aff32545d6f8300d8bae10e3ef - ruby_parser (3.22.0) sha256=1eb4937cd9eb220aa2d194e352a24dba90aef00751e24c8dfffdb14000f15d23 - rubycritic (4.12.0) sha256=024fed90fe656fa939f6ea80aab17569699ac3863d0b52fd72cb99892247abc8 - sexp_processor (4.17.5) sha256=ae2b48ba98353d5d465ce8759836b7a05f2e12c5879fcd14d7815b026de32f0e - simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5 - simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246 - simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428 - skunk (0.5.4) sha256=627331dc78aec1fdf614feabcf05a88ca84025e364be27aeddca5d7531d1b682 - terminal-table (3.0.2) sha256=f951b6af5f3e00203fb290a669e0a85c5dd5b051b3b023392ccfd67ba5abae91 + simplecov (1.3.0) sha256=d9886307863c1ead47657dcbed869bfffd82318808b09014d8f0ff77dcfe7492 thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73 - thread_safe (0.3.6) sha256=9ed7072821b51c57e8d6b7011a8e282e25aeea3a4065eab326e43f66f063b05a - tty-which (0.5.0) sha256=5824055f0d6744c97e7c4426544f01d519c40d1806ef2ef47d9854477993f466 - unicode-display_width (2.6.0) sha256=12279874bba6d5e4d2728cef814b19197dbb10d7a7837a869bab65da943b7f5a + unicode-display_width (3.3.0) sha256=4b7aa66a4b11db50f6f7e98411215cd0dd10eaecb665d36eec5bcacb3fa0b613 + unicode-emoji (4.3.0) sha256=11c02fa73290378c066bb0562cd4c87d8e1b706fbbe0059ca12746a4244de8ce uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6 - virtus (2.0.0) sha256=8841dae4eb7fcc097320ba5ea516bf1839e5d056c61ee27138aa4bddd6e3d1c2 - webmock (3.26.2) sha256=774556f2ea6371846cca68c01769b2eac0d134492d21f6d0ab5dd643965a4c90 - yard (0.9.44) sha256=eb087e9b631ccd887b049f303d489963945452d5e2a7eb49a5a74a7cf6887f28 - zeitwerk (2.8.2) sha256=7212a61311083c604184b1ea2574b9aa05cd14f855a0841c06985cabe9181d12 + webmock (3.26.4) sha256=8d8da206d217ebe6968cfb09c77f4533c23074e1432bad865f3994eacbaad50d + yard (0.9.45) sha256=52e211493f7cb8a3ebf7e104a25a1e73937a3103092545d34cb88fafebb3dc51 + zeitwerk (2.8.3) sha256=2c85125a8467ce069e20123d1e709a08955c9d29c118c25b46b7b7fafdbb92e5 BUNDLED WITH - 4.0.18 + 4.0.21 diff --git a/README.md b/README.md index 397286f..3bee586 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/igmarin/ruby-skill-bench) -*A high-fidelity evaluation engine for benchmarking AI agent skills across any stack (Rails-first, but extensible).* +Ruby Skill Bench compares how an AI coding agent completes the same task with and without a skill. It runs both attempts in temporary Git sandboxes, then scores them against criteria you define. You can use it with Ruby projects and other stacks. ## Part of the AI Skill Ecosystem @@ -27,12 +27,11 @@ See the [Ecosystem Overview](https://github.com/igmarin/agent-mcp-runtime/blob/m ## Features -- **Side-by-Side Evaluation**: Quantify the "ROI of Context" by comparing baseline vs. skill-enhanced agent runs. -- **Isolated Git Sandboxes**: Every run operates in a temporary repo. Clean diffs, zero side-effects, 100% reproducibility. -- **Blind Judging with Dimensions**: LLM judge scores baseline and context independently across 5 canonical dimensions (Correctness, Skill Adherence, Code Quality, Test Coverage, Documentation). Eval authors configure weights and thresholds via `criteria.json`. -- **Sophisticated ReAct Loop**: Employs a robust `Thought → Tool → Observation` loop to handle complex, multi-step engineering tasks. -- **Multi-Provider Ecosystem**: Native support for **OpenAI**, **Anthropic**, **Google Gemini**, **Azure OpenAI**, **Ollama**, **Groq**, **DeepSeek**, **Mistral**, **OpenCode**, **OpenRouter**, **xAI**, and **Amazon Bedrock**. -- **Standardized Intelligence**: Consistent reporting format regardless of the underlying LLM provider. +- **Compare two runs**: See what changes when an agent receives a skill. +- **Isolate evaluation work**: Each attempt runs in its own temporary Git sandbox. +- **Score against your criteria**: Configure dimensions, weights, and pass thresholds in `criteria.json`. +- **Use your provider**: OpenAI, Anthropic, Google Gemini, Azure OpenAI, Ollama, Groq, DeepSeek, Mistral, OpenCode, OpenRouter, xAI, and Amazon Bedrock are supported. +- **Get consistent reports**: The output format stays the same across providers. --- @@ -118,6 +117,8 @@ Configuration is loaded in this order (later sources override earlier ones): ## Getting Started +Ruby Skill Bench requires Ruby 3.3 or newer. For a guided first run, see the [5-minute first eval guide](docs/first-eval-guide.md). + ### Installation ```bash @@ -184,7 +185,7 @@ skills/ **Example `SKILL.md`:** -```markdown +````markdown # Service Object Skill ## Pattern @@ -200,7 +201,7 @@ All service objects use the `.call` class method and return a standardized hash: 1. Every `.rb` file begins with `# frozen_string_literal: true` 2. Every public method has YARD docs (`@param`, `@return`, `@raise`) 3. `rescue StandardError` blocks must log backtrace -``` +```` --- @@ -1153,7 +1154,7 @@ jobs: The action installs the gem and runs `skill-bench run --all --evals-dir --format ` (adding `--skill` when set and appending `args` verbatim). The run step's exit code is the gate. For a full copy-paste workflow template, see [`examples/ci/`](examples/ci/). -> The gem's own repository CI (`.github/workflows/ci.yml`) runs the test suite — rubocop, reek, and minitest against Ruby 3.3 and 3.4, on push and pull requests — and is separate from the reusable action above. +> The gem's own repository CI (`.github/workflows/ci.yml`) runs RuboCop, Reek, and Minitest on Ruby 3.3, 3.4, and 4.0. This is separate from the reusable action above. To preview the machine-readable output locally: diff --git a/docs/docker.md b/docs/docker.md index 08cf98f..016b1cd 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -10,7 +10,7 @@ execution when a Docker daemon is available. |------|--------| | Image name | `evaluator-sandbox` (`Constants::Sandbox::DOCKER_IMAGE_NAME`) | | Tags | `evaluator-sandbox:` and `evaluator-sandbox:latest` | -| Base | `ruby:3.4-bookworm` (aligns with CI Ruby 3.4; 3.3 hosts still run evals via host Ruby for the orchestrator) | +| Base | `ruby:3.4-bookworm` (commands inside the container use Ruby 3.4; the gem also supports Ruby 3.3 and 4.0 on the host) | | Preinstalled | Ruby (from base), `git`, minimal Debian tools from base image | | Working directory | `/sandbox` (host sandbox dir is bind-mounted here read-write) | | Default process | `sleep infinity` — container stays up for `docker exec` | diff --git a/docs/first-eval-guide.md b/docs/first-eval-guide.md index 1295fac..c9cda44 100644 --- a/docs/first-eval-guide.md +++ b/docs/first-eval-guide.md @@ -6,13 +6,13 @@ Get started with Ruby Skill Bench in 5 minutes. No prior AI eval experience requ ## Prerequisites -- Ruby 3.1+ +- Ruby 3.3+ - Bundler Not sure? Run: ```bash -ruby --version # Should be 3.1 or higher +ruby --version # Should be 3.3 or higher bundle --version # Should print a version number ``` @@ -42,6 +42,14 @@ skill-bench init --openai This creates `skill-bench.json` with the OpenAI provider config. Use `--force` to overwrite. +Before running an eval, set your OpenAI key in the shell. Do not commit API keys to your repository: + +```bash +export SKILL_BENCH_OPENAI_API_KEY=your-api-key +``` + +To try the commands without an API key or network access, initialize the offline mock provider instead: `skill-bench init --mock`. The mock provider is useful for learning the workflow; it does not measure a real model. + **Available providers:** `--openai`, `--anthropic`, `--gemini`, `--ollama`, `--azure`, `--groq`, `--deepseek`, `--mistral`, `--opencode`, `--openrouter`, `--xai`, `--bedrock`, plus `--mock` for an offline config with no API key. > **What is `skill-bench.json`?** This is your config file. It stores your API key, chosen LLM model, timeout, and allowed shell commands. Think of it as `.env` but structured as JSON. You edit it; SkillBench reads it. @@ -66,7 +74,7 @@ This creates `skills/my-service/SKILL.md` with a Rails service object template. **Example `SKILL.md`:** -```markdown +````markdown # Service Object Skill ## Pattern @@ -82,7 +90,7 @@ All service objects use the `.call` class method and return a standardized hash: 1. Every `.rb` file begins with `# frozen_string_literal: true` 2. Every public method has YARD docs (`@param`, `@return`, `@raise`) 3. `rescue StandardError` blocks must log backtrace -```ruby +```` --- diff --git a/lib/skill_bench/clients/base_client.rb b/lib/skill_bench/clients/base_client.rb index dfa4ee3..817ac32 100644 --- a/lib/skill_bench/clients/base_client.rb +++ b/lib/skill_bench/clients/base_client.rb @@ -21,10 +21,10 @@ class BaseClient # @param system_prompt [String] The system instruction for the LLM. # @param messages [Array] The list of conversation messages. # @param tools [Array] (optional) Array of tool definitions. - # @param options [Hash] (optional) Additional provider-specific options. + # Additional keyword options are passed to the selected provider client. # @return [Hash] with :success [Boolean] and :response [Hash] keys. - def self.call(system_prompt:, messages:, tools: [], **options) - new(system_prompt: system_prompt, messages: messages, tools: tools, **options).call + def self.call(system_prompt:, messages:, tools: [], **) + new(system_prompt: system_prompt, messages: messages, tools: tools, **).call end # Initializes the client with validated parameters. diff --git a/lib/skill_bench/judge/variance.rb b/lib/skill_bench/judge/variance.rb index 025cc2d..6384c68 100644 --- a/lib/skill_bench/judge/variance.rb +++ b/lib/skill_bench/judge/variance.rb @@ -20,15 +20,16 @@ def initialize(totals) # @return [Hash] def call nums = Array(@totals).map { |total| Float(total) } - return empty_result(count: nums.size) if nums.size < 2 + count = nums.size + return empty_result(count: count) if count < 2 - mean = nums.sum / nums.size - sample_variance = nums.sum { |value| (value - mean)**2 } / (nums.size - 1) + mean = nums.sum / count + sample_variance = nums.sum { |value| (value - mean)**2 } / (count - 1) { success: true, response: { - n: nums.size, + n: count, mean: mean, stddev: Math.sqrt(sample_variance), spread: nums.max - nums.min diff --git a/lib/skill_bench/services/output_persistence_service.rb b/lib/skill_bench/services/output_persistence_service.rb index 0b154a0..521b49b 100644 --- a/lib/skill_bench/services/output_persistence_service.rb +++ b/lib/skill_bench/services/output_persistence_service.rb @@ -70,7 +70,7 @@ def ensure_directory_exists # # @raise [SystemCallError] when file write operation fails def write_json_file - File.write(@output_path, JSON.generate(@result, pretty: true)) + File.write(@output_path, JSON.pretty_generate(@result)) end end end diff --git a/lib/skill_bench/task/README.md b/lib/skill_bench/task/README.md index 1d60f42..5c48bd6 100644 --- a/lib/skill_bench/task/README.md +++ b/lib/skill_bench/task/README.md @@ -13,6 +13,9 @@ Manages individual evaluation tasks. ## Find eval task directories ```ruby +require 'pathname' +require 'skill_bench' + root = Pathname.new('evals') task_dirs = SkillBench::Task::DirectoryFinder.call(root) ``` diff --git a/lib/skill_bench/version.rb b/lib/skill_bench/version.rb index ed55ca7..9f2482e 100644 --- a/lib/skill_bench/version.rb +++ b/lib/skill_bench/version.rb @@ -2,5 +2,5 @@ module SkillBench # The current gem version. - VERSION = '1.4.0' + VERSION = '2.0.0' end diff --git a/ruby-skill-bench.gemspec b/ruby-skill-bench.gemspec index a8fcfc1..f7a8e50 100644 --- a/ruby-skill-bench.gemspec +++ b/ruby-skill-bench.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |spec| and LLM-powered judges. DESC spec.license = 'MIT' - spec.required_ruby_version = '>= 3.1' + spec.required_ruby_version = '>= 3.3' # Include non-Ruby Docker build context so gem installs can activate container isolation. # Dir globs skip dotfiles — list .dockerignore explicitly. @@ -37,8 +37,8 @@ Gem::Specification.new do |spec| # Runtime dependencies spec.add_dependency 'cgi', '~> 0.5.2' spec.add_dependency 'faraday', '~> 2.14' - spec.add_dependency 'json', '~> 2.21', '>= 2.21.2' - spec.add_dependency 'parallel', '~> 1.26' + spec.add_dependency 'json', '~> 3.0' + spec.add_dependency 'parallel', '~> 2.0' spec.metadata['rubygems_mfa_required'] = 'true' spec.metadata['source_code_uri'] = 'https://github.com/igmarin/ruby-skill-bench' end diff --git a/test/evaluation_runner_test.rb b/test/evaluation_runner_test.rb index 05f33ca..3841ba4 100644 --- a/test/evaluation_runner_test.rb +++ b/test/evaluation_runner_test.rb @@ -99,9 +99,9 @@ def test_surfaces_baseline_error_with_precedence_when_both_judges_fail criteria = build_criteria stub_prompt_paths Judge::Judge.stubs(:call).with { |args| args[:prompt] == 'Baseline prompt' } - .returns({ success: false, response: { error: { message: 'Baseline judge failed' } } }) + .returns({ success: false, response: { error: { message: 'Baseline judge failed' } } }) Judge::Judge.stubs(:call).with { |args| args[:prompt] == 'Context prompt' } - .returns({ success: false, response: { error: { message: 'Context judge failed' } } }) + .returns({ success: false, response: { error: { message: 'Context judge failed' } } }) result = run_with_distinct_outputs(criteria) @@ -117,9 +117,9 @@ def test_surfaces_context_error_when_only_context_judge_fails criteria = build_criteria stub_prompt_paths Judge::Judge.stubs(:call).with { |args| args[:prompt] == 'Baseline prompt' } - .returns({ success: true, response: { judge_response: build_judge_response(10, 8, 6, 4, 2) } }) + .returns({ success: true, response: { judge_response: build_judge_response(10, 8, 6, 4, 2) } }) Judge::Judge.stubs(:call).with { |args| args[:prompt] == 'Context prompt' } - .returns({ success: false, response: { error: { message: 'Context judge failed' } } }) + .returns({ success: false, response: { error: { message: 'Context judge failed' } } }) result = run_with_distinct_outputs(criteria) @@ -178,9 +178,9 @@ def test_all_conditions_receive_identical_judge_context_without_treatment_instru def stub_prompt_paths Judge::Prompt.stubs(:call).with { |args| args[:agent_output] == 'Baseline diff' } - .returns({ success: true, response: { prompt: 'Baseline prompt' } }) + .returns({ success: true, response: { prompt: 'Baseline prompt' } }) Judge::Prompt.stubs(:call).with { |args| args[:agent_output] == 'Context diff' } - .returns({ success: true, response: { prompt: 'Context prompt' } }) + .returns({ success: true, response: { prompt: 'Context prompt' } }) end def run_with_distinct_outputs(criteria) diff --git a/test/evaluator/agent_evaluator_test.rb b/test/evaluator/agent_evaluator_test.rb index 7673ae6..4f6cd21 100644 --- a/test/evaluator/agent_evaluator_test.rb +++ b/test/evaluator/agent_evaluator_test.rb @@ -12,7 +12,7 @@ def test_module_is_defined def test_version_is_accessible assert(defined?(SkillBench::VERSION)) assert_match(/\A\d+\.\d+\.\d+\z/, SkillBench::VERSION) - assert_equal '1.4.0', SkillBench::VERSION + assert_equal '2.0.0', SkillBench::VERSION end def test_module_is_already_loaded? diff --git a/test/evaluator/ci_integration_test.rb b/test/evaluator/ci_integration_test.rb index 484d6c1..1fb75dd 100644 --- a/test/evaluator/ci_integration_test.rb +++ b/test/evaluator/ci_integration_test.rb @@ -24,6 +24,8 @@ def test_workflow_runs_required_checks assert_includes step_names, 'rubocop' assert_includes step_names, 'reek' assert_includes step_names, 'minitest' + assert_equal %w[3.3 3.4 4.0], workflow.dig('jobs', 'test', 'strategy', 'matrix', 'ruby-version') + assert workflow.dig('jobs', 'container-integration'), 'Docker integration job should remain in CI' end end end diff --git a/test/evaluator/context_hydrator_test.rb b/test/evaluator/context_hydrator_test.rb index 3d9ca2f..9332acf 100644 --- a/test/evaluator/context_hydrator_test.rb +++ b/test/evaluator/context_hydrator_test.rb @@ -174,14 +174,14 @@ def test_included_files_are_read_and_stat_at_most_once # to the real implementations so behavior is preserved. def io_spy(tracked, read_counts, size_counts) Module.new do - define_method(:read) do |*args, &block| + define_method(:read) do |*args, **kwargs, &block| read_counts[args.first] += 1 if tracked.include?(args.first) - super(*args, &block) + super(*args, **kwargs, &block) end - define_method(:size) do |*args, &block| + define_method(:size) do |*args, **kwargs, &block| size_counts[args.first] += 1 if tracked.include?(args.first) - super(*args, &block) + super(*args, **kwargs, &block) end end end diff --git a/test/evaluator/gemspec_test.rb b/test/evaluator/gemspec_test.rb index a8c6e72..5bf94f5 100644 --- a/test/evaluator/gemspec_test.rb +++ b/test/evaluator/gemspec_test.rb @@ -16,6 +16,17 @@ def test_package_metadata_points_to_project_sources assert_equal 'true', @spec.metadata['rubygems_mfa_required'] end + def test_package_requires_ruby_3_3_or_newer + assert_equal Gem::Requirement.new('>= 3.3'), @spec.required_ruby_version + end + + def test_runtime_dependencies_use_the_updated_json_and_parallel_majors + dependencies = @spec.dependencies.to_h { |dependency| [dependency.name, dependency.requirement] } + + assert_equal Gem::Requirement.new('~> 3.0'), dependencies.fetch('json') + assert_equal Gem::Requirement.new('~> 2.0'), dependencies.fetch('parallel') + end + def test_package_includes_readme_and_license assert_includes @spec.files, 'README.md' assert_includes @spec.files, 'LICENSE' diff --git a/test/evaluator/services/output_persistence_service_test.rb b/test/evaluator/services/output_persistence_service_test.rb index 0be8276..20c89bd 100644 --- a/test/evaluator/services/output_persistence_service_test.rb +++ b/test/evaluator/services/output_persistence_service_test.rb @@ -28,10 +28,12 @@ def test_call_with_valid_output_path assert result[:success] assert_path_exists output_path - content = JSON.parse(File.read(output_path)) + output = File.read(output_path) + content = JSON.parse(output) assert content['success'] assert_equal 1, content['tasks'].length + assert_match(/\n "success"/, output) end def test_call_with_nil_output_path diff --git a/test/test_helper.rb b/test/test_helper.rb index a1da2b9..c50dec4 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -2,7 +2,7 @@ require 'simplecov' SimpleCov.start do - add_filter '/test/' + skip '/test/' end require 'minitest/autorun'