cov-loupe 3.0.0 → 4.0.0.pre
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 +4 -4
- data/AGENTS.md +230 -0
- data/CLAUDE.md +5 -0
- data/CODE_OF_CONDUCT.md +62 -0
- data/CONTRIBUTING.md +102 -0
- data/GEMINI.md +5 -0
- data/README.md +154 -51
- data/RELEASE_NOTES.md +452 -0
- data/dev/images/cov-loupe-icon-lores.png +0 -0
- data/dev/images/cov-loupe-icon-square.png +0 -0
- data/dev/images/cov-loupe-icon.png +0 -0
- data/dev/images/cov-loupe-logo.png +0 -0
- data/dev/prompts/README.md +74 -0
- data/dev/prompts/archive/architectural-review-and-actions-prompt.md +53 -0
- data/dev/prompts/archive/investigate-and-report-issues-prompt.md +33 -0
- data/dev/prompts/archive/produce-action-items-prompt.md +25 -0
- data/dev/prompts/guidelines/ai-code-evaluator-guidelines.md +337 -0
- data/dev/prompts/improve/refactor-test-suite.md +18 -0
- data/dev/prompts/improve/simplify-code-logic.md +133 -0
- data/dev/prompts/improve/update-documentation.md +21 -0
- data/dev/prompts/review/comprehensive-codebase-review.md +176 -0
- data/dev/prompts/review/identify-action-items.md +143 -0
- data/dev/prompts/review/verify-code-changes.md +54 -0
- data/dev/prompts/validate/create-screencast-outline.md +234 -0
- data/dev/prompts/validate/test-documentation-examples.md +180 -0
- data/docs/QUICKSTART.md +63 -0
- data/docs/assets/images/cov-loupe-logo-lores.png +0 -0
- data/docs/assets/images/cov-loupe-logo.png +0 -0
- data/docs/assets/images/favicon.png +0 -0
- data/docs/assets/stylesheets/branding.css +16 -0
- data/docs/assets/stylesheets/extra.css +15 -0
- data/docs/code_of_conduct.md +1 -0
- data/docs/contributing.md +1 -0
- data/docs/dev/ARCHITECTURE.md +56 -11
- data/docs/dev/DEVELOPMENT.md +116 -12
- data/docs/dev/FUTURE_ENHANCEMENTS.md +14 -0
- data/docs/dev/README.md +3 -2
- data/docs/dev/RELEASING.md +2 -0
- data/docs/dev/arch-decisions/README.md +10 -7
- data/docs/dev/arch-decisions/application-architecture.md +259 -0
- data/docs/dev/arch-decisions/coverage-data-quality.md +193 -0
- data/docs/dev/arch-decisions/output-character-mode.md +217 -0
- data/docs/dev/arch-decisions/path-resolution.md +90 -0
- data/docs/dev/arch-decisions/{004-x-arch-decision.md → policy-validation.md} +32 -28
- data/docs/dev/arch-decisions/{005-x-arch-decision.md → simplecov-integration.md} +47 -44
- data/docs/dev/presentations/cov-loupe-presentation.md +15 -13
- data/docs/examples/mcp-inputs.md +3 -0
- data/docs/examples/prompts.md +3 -0
- data/docs/examples/success_predicates.md +3 -0
- data/docs/fixtures/demo_project/.resultset.json +170 -0
- data/docs/fixtures/demo_project/README.md +6 -0
- data/docs/fixtures/demo_project/app/controllers/admin/audit_logs_controller.rb +19 -0
- data/docs/fixtures/demo_project/app/controllers/orders_controller.rb +26 -0
- data/docs/fixtures/demo_project/app/models/order.rb +20 -0
- data/docs/fixtures/demo_project/app/models/user.rb +19 -0
- data/docs/fixtures/demo_project/lib/api/client.rb +22 -0
- data/docs/fixtures/demo_project/lib/ops/jobs/cleanup_job.rb +16 -0
- data/docs/fixtures/demo_project/lib/ops/jobs/report_job.rb +17 -0
- data/docs/fixtures/demo_project/lib/payments/processor.rb +15 -0
- data/docs/fixtures/demo_project/lib/payments/refund_service.rb +15 -0
- data/docs/fixtures/demo_project/lib/payments/reporting/exporter.rb +16 -0
- data/docs/index.md +1 -0
- data/docs/license.md +3 -0
- data/docs/release_notes.md +3 -0
- data/docs/user/ADVANCED_USAGE.md +208 -115
- data/docs/user/CLI_FALLBACK_FOR_LLMS.md +2 -0
- data/docs/user/CLI_USAGE.md +276 -101
- data/docs/user/ERROR_HANDLING.md +4 -4
- data/docs/user/EXAMPLES.md +121 -128
- data/docs/user/INSTALLATION.md +9 -28
- data/docs/user/LIBRARY_API.md +227 -122
- data/docs/user/MCP_INTEGRATION.md +114 -203
- data/docs/user/README.md +5 -1
- data/docs/user/TROUBLESHOOTING.md +49 -27
- data/docs/user/installing-a-prelease-version-of-covloupe.md +43 -0
- data/docs/user/{V2-BREAKING-CHANGES.md → migrations/MIGRATING_TO_V2.md} +62 -72
- data/docs/user/migrations/MIGRATING_TO_V3.md +72 -0
- data/docs/user/migrations/MIGRATING_TO_V4.md +591 -0
- data/docs/user/migrations/README.md +22 -0
- data/docs/user/prompts/README.md +9 -0
- data/docs/user/prompts/non-web-coverage-analysis-prompt.md +103 -0
- data/docs/user/prompts/rails-coverage-analysis-prompt.md +94 -0
- data/docs/user/prompts/use-cli-not-mcp-prompt.md +53 -0
- data/examples/cli_demo.sh +77 -0
- data/examples/filter_and_table_demo-output.md +114 -0
- data/examples/filter_and_table_demo.rb +174 -0
- data/examples/fixtures/demo_project/coverage/.resultset.json +10 -0
- data/examples/mcp-inputs/README.md +66 -0
- data/examples/mcp-inputs/coverage_detailed.json +1 -0
- data/examples/mcp-inputs/coverage_raw.json +1 -0
- data/examples/mcp-inputs/coverage_summary.json +1 -0
- data/examples/mcp-inputs/list.json +1 -0
- data/examples/mcp-inputs/uncovered_lines.json +1 -0
- data/examples/prompts/README.md +27 -0
- data/examples/prompts/custom_resultset.txt +2 -0
- data/examples/prompts/detailed_with_source.txt +2 -0
- data/examples/prompts/list_lowest.txt +2 -0
- data/examples/prompts/summary.txt +2 -0
- data/examples/prompts/uncovered.txt +2 -0
- data/examples/success_predicates/README.md +198 -0
- data/examples/success_predicates/all_files_above_threshold_predicate.rb +21 -0
- data/examples/success_predicates/directory_specific_thresholds_predicate.rb +30 -0
- data/examples/success_predicates/project_coverage_minimum_predicate.rb +6 -0
- data/lib/cov_loupe/base_tool.rb +229 -20
- data/lib/cov_loupe/cli.rb +132 -23
- data/lib/cov_loupe/commands/base_command.rb +25 -6
- data/lib/cov_loupe/commands/command_factory.rb +0 -1
- data/lib/cov_loupe/commands/detailed_command.rb +10 -5
- data/lib/cov_loupe/commands/list_command.rb +2 -1
- data/lib/cov_loupe/commands/raw_command.rb +7 -5
- data/lib/cov_loupe/commands/summary_command.rb +12 -7
- data/lib/cov_loupe/commands/totals_command.rb +74 -10
- data/lib/cov_loupe/commands/uncovered_command.rb +7 -5
- data/lib/cov_loupe/commands/validate_command.rb +11 -3
- data/lib/cov_loupe/commands/version_command.rb +6 -4
- data/lib/cov_loupe/{app_config.rb → config/app_config.rb} +13 -5
- data/lib/cov_loupe/config/app_context.rb +43 -0
- data/lib/cov_loupe/config/boolean_type.rb +91 -0
- data/lib/cov_loupe/config/logger.rb +92 -0
- data/lib/cov_loupe/{option_normalizers.rb → config/option_normalizers.rb} +55 -24
- data/lib/cov_loupe/{option_parser_builder.rb → config/option_parser_builder.rb} +46 -24
- data/lib/cov_loupe/coverage/coverage_calculator.rb +53 -0
- data/lib/cov_loupe/coverage/coverage_reporter.rb +63 -0
- data/lib/cov_loupe/coverage/coverage_table_formatter.rb +133 -0
- data/lib/cov_loupe/{error_handler.rb → errors/error_handler.rb} +21 -33
- data/lib/cov_loupe/{errors.rb → errors/errors.rb} +48 -71
- data/lib/cov_loupe/formatters/formatters.rb +75 -0
- data/lib/cov_loupe/formatters/source_formatter.rb +18 -7
- data/lib/cov_loupe/formatters/table_formatter.rb +80 -0
- data/lib/cov_loupe/loaders/all.rb +15 -0
- data/lib/cov_loupe/loaders/all_cli.rb +10 -0
- data/lib/cov_loupe/loaders/all_mcp.rb +23 -0
- data/lib/cov_loupe/loaders/resultset_loader.rb +147 -0
- data/lib/cov_loupe/mcp_server.rb +3 -2
- data/lib/cov_loupe/model/model.rb +520 -0
- data/lib/cov_loupe/model/model_data.rb +13 -0
- data/lib/cov_loupe/model/model_data_cache.rb +116 -0
- data/lib/cov_loupe/option_parsers/env_options_parser.rb +17 -6
- data/lib/cov_loupe/option_parsers/error_helper.rb +16 -10
- data/lib/cov_loupe/output_chars.rb +192 -0
- data/lib/cov_loupe/paths/glob_utils.rb +100 -0
- data/lib/cov_loupe/{path_relativizer.rb → paths/path_relativizer.rb} +5 -13
- data/lib/cov_loupe/paths/path_utils.rb +265 -0
- data/lib/cov_loupe/paths/volume_case_sensitivity.rb +173 -0
- data/lib/cov_loupe/presenters/base_coverage_presenter.rb +9 -13
- data/lib/cov_loupe/presenters/coverage_payload_presenter.rb +21 -0
- data/lib/cov_loupe/presenters/payload_caching.rb +23 -0
- data/lib/cov_loupe/presenters/project_coverage_presenter.rb +73 -21
- data/lib/cov_loupe/presenters/project_totals_presenter.rb +16 -10
- data/lib/cov_loupe/repositories/coverage_repository.rb +149 -0
- data/lib/cov_loupe/resolvers/coverage_line_resolver.rb +90 -76
- data/lib/cov_loupe/resolvers/{resolver_factory.rb → resolver_helpers.rb} +6 -5
- data/lib/cov_loupe/resolvers/resultset_path_resolver.rb +40 -12
- data/lib/cov_loupe/scripts/command_execution.rb +113 -0
- data/lib/cov_loupe/scripts/latest_ci_status.rb +97 -0
- data/lib/cov_loupe/scripts/pre_release_check.rb +164 -0
- data/lib/cov_loupe/scripts/setup_doc_server.rb +23 -0
- data/lib/cov_loupe/scripts/start_doc_server.rb +24 -0
- data/lib/cov_loupe/staleness/stale_status.rb +23 -0
- data/lib/cov_loupe/staleness/staleness_checker.rb +328 -0
- data/lib/cov_loupe/staleness/staleness_message_formatter.rb +91 -0
- data/lib/cov_loupe/tools/coverage_detailed_tool.rb +14 -15
- data/lib/cov_loupe/tools/coverage_raw_tool.rb +14 -14
- data/lib/cov_loupe/tools/coverage_summary_tool.rb +16 -16
- data/lib/cov_loupe/tools/coverage_table_tool.rb +139 -21
- data/lib/cov_loupe/tools/coverage_totals_tool.rb +31 -13
- data/lib/cov_loupe/tools/help_tool.rb +16 -20
- data/lib/cov_loupe/tools/list_tool.rb +65 -0
- data/lib/cov_loupe/tools/uncovered_lines_tool.rb +14 -14
- data/lib/cov_loupe/tools/validate_tool.rb +18 -24
- data/lib/cov_loupe/tools/version_tool.rb +8 -3
- data/lib/cov_loupe/version.rb +1 -1
- data/lib/cov_loupe.rb +83 -55
- metadata +184 -154
- data/docs/dev/BRANCH_ONLY_COVERAGE.md +0 -158
- data/docs/dev/arch-decisions/001-x-arch-decision.md +0 -95
- data/docs/dev/arch-decisions/002-x-arch-decision.md +0 -159
- data/docs/dev/arch-decisions/003-x-arch-decision.md +0 -165
- data/lib/cov_loupe/app_context.rb +0 -26
- data/lib/cov_loupe/constants.rb +0 -22
- data/lib/cov_loupe/coverage_reporter.rb +0 -31
- data/lib/cov_loupe/formatters.rb +0 -51
- data/lib/cov_loupe/mode_detector.rb +0 -56
- data/lib/cov_loupe/model.rb +0 -339
- data/lib/cov_loupe/presenters/coverage_detailed_presenter.rb +0 -14
- data/lib/cov_loupe/presenters/coverage_raw_presenter.rb +0 -14
- data/lib/cov_loupe/presenters/coverage_summary_presenter.rb +0 -14
- data/lib/cov_loupe/presenters/coverage_uncovered_presenter.rb +0 -14
- data/lib/cov_loupe/resultset_loader.rb +0 -131
- data/lib/cov_loupe/staleness_checker.rb +0 -247
- data/lib/cov_loupe/table_formatter.rb +0 -64
- data/lib/cov_loupe/tools/all_files_coverage_tool.rb +0 -51
- data/lib/cov_loupe/util.rb +0 -88
- data/spec/MCP_INTEGRATION_TESTS_README.md +0 -111
- data/spec/TIMESTAMPS.md +0 -48
- data/spec/all_files_coverage_tool_spec.rb +0 -53
- data/spec/app_config_spec.rb +0 -142
- data/spec/base_tool_spec.rb +0 -62
- data/spec/cli/show_default_report_spec.rb +0 -33
- data/spec/cli_enumerated_options_spec.rb +0 -90
- data/spec/cli_error_spec.rb +0 -184
- data/spec/cli_format_spec.rb +0 -123
- data/spec/cli_json_options_spec.rb +0 -50
- data/spec/cli_source_spec.rb +0 -44
- data/spec/cli_spec.rb +0 -192
- data/spec/cli_table_spec.rb +0 -28
- data/spec/cli_usage_spec.rb +0 -42
- data/spec/commands/base_command_spec.rb +0 -107
- data/spec/commands/command_factory_spec.rb +0 -76
- data/spec/commands/detailed_command_spec.rb +0 -34
- data/spec/commands/list_command_spec.rb +0 -28
- data/spec/commands/raw_command_spec.rb +0 -69
- data/spec/commands/summary_command_spec.rb +0 -34
- data/spec/commands/totals_command_spec.rb +0 -34
- data/spec/commands/uncovered_command_spec.rb +0 -55
- data/spec/commands/validate_command_spec.rb +0 -213
- data/spec/commands/version_command_spec.rb +0 -38
- data/spec/constants_spec.rb +0 -61
- data/spec/cov_loupe/formatters/source_formatter_spec.rb +0 -267
- data/spec/cov_loupe/formatters_spec.rb +0 -76
- data/spec/cov_loupe/presenters/base_coverage_presenter_spec.rb +0 -79
- data/spec/cov_loupe_model_spec.rb +0 -454
- data/spec/cov_loupe_module_spec.rb +0 -37
- data/spec/cov_loupe_opts_spec.rb +0 -185
- data/spec/coverage_reporter_spec.rb +0 -102
- data/spec/coverage_table_tool_spec.rb +0 -59
- data/spec/coverage_totals_tool_spec.rb +0 -37
- data/spec/error_handler_spec.rb +0 -197
- data/spec/error_mode_spec.rb +0 -139
- data/spec/errors_edge_cases_spec.rb +0 -312
- data/spec/errors_stale_spec.rb +0 -83
- data/spec/file_based_mcp_tools_spec.rb +0 -99
- data/spec/help_tool_spec.rb +0 -26
- data/spec/integration_spec.rb +0 -789
- data/spec/logging_fallback_spec.rb +0 -128
- data/spec/mcp_logging_spec.rb +0 -44
- data/spec/mcp_server_integration_spec.rb +0 -23
- data/spec/mcp_server_spec.rb +0 -106
- data/spec/mode_detector_spec.rb +0 -153
- data/spec/model_error_handling_spec.rb +0 -269
- data/spec/model_staleness_spec.rb +0 -79
- data/spec/option_normalizers_spec.rb +0 -203
- data/spec/option_parsers/env_options_parser_spec.rb +0 -221
- data/spec/option_parsers/error_helper_spec.rb +0 -222
- data/spec/path_relativizer_spec.rb +0 -98
- data/spec/presenters/coverage_detailed_presenter_spec.rb +0 -19
- data/spec/presenters/coverage_raw_presenter_spec.rb +0 -15
- data/spec/presenters/coverage_summary_presenter_spec.rb +0 -15
- data/spec/presenters/coverage_uncovered_presenter_spec.rb +0 -16
- data/spec/presenters/project_coverage_presenter_spec.rb +0 -87
- data/spec/presenters/project_totals_presenter_spec.rb +0 -144
- data/spec/resolvers/coverage_line_resolver_spec.rb +0 -282
- data/spec/resolvers/resolver_factory_spec.rb +0 -61
- data/spec/resolvers/resultset_path_resolver_spec.rb +0 -60
- data/spec/resultset_loader_spec.rb +0 -167
- data/spec/shared_examples/README.md +0 -115
- data/spec/shared_examples/coverage_presenter_examples.rb +0 -66
- data/spec/shared_examples/file_based_mcp_tools.rb +0 -179
- data/spec/shared_examples/formatted_command_examples.rb +0 -64
- data/spec/shared_examples/mcp_tool_text_json_response.rb +0 -16
- data/spec/spec_helper.rb +0 -127
- data/spec/staleness_checker_spec.rb +0 -374
- data/spec/staleness_more_spec.rb +0 -42
- data/spec/support/cli_helpers.rb +0 -22
- data/spec/support/control_flow_helpers.rb +0 -20
- data/spec/support/fake_mcp.rb +0 -40
- data/spec/support/io_helpers.rb +0 -29
- data/spec/support/mcp_helpers.rb +0 -35
- data/spec/support/mcp_runner.rb +0 -66
- data/spec/support/mocking_helpers.rb +0 -30
- data/spec/table_format_spec.rb +0 -70
- data/spec/tools/validate_tool_spec.rb +0 -132
- data/spec/tools_error_handling_spec.rb +0 -130
- data/spec/util_spec.rb +0 -154
- data/spec/version_spec.rb +0 -123
- data/spec/version_tool_spec.rb +0 -141
- /data/{spec/fixtures/project1 → examples/fixtures/demo_project}/lib/bar.rb +0 -0
- /data/{spec/fixtures/project1 → examples/fixtures/demo_project}/lib/foo.rb +0 -0
- /data/lib/cov_loupe/{config_parser.rb → config/config_parser.rb} +0 -0
- /data/lib/cov_loupe/{predicate_evaluator.rb → config/predicate_evaluator.rb} +0 -0
- /data/lib/cov_loupe/{error_handler_factory.rb → errors/error_handler_factory.rb} +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Installing a Prerelease Version of cov-loupe
|
|
2
|
+
|
|
3
|
+
Prerelease versions of gems (those containing `.pre`, `.alpha`, `.beta`, `.rc`, etc.) are **not** installed by default in RubyGems.
|
|
4
|
+
|
|
5
|
+
## Command Line Installation
|
|
6
|
+
|
|
7
|
+
When users run `gem install cov-loupe`, RubyGems installs the latest **stable** version, skipping any prereleases.
|
|
8
|
+
|
|
9
|
+
To install a prerelease, you must explicitly opt in:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
# Install the latest prerelease
|
|
13
|
+
gem install cov-loupe --pre
|
|
14
|
+
|
|
15
|
+
# Install a specific prerelease version
|
|
16
|
+
gem install cov-loupe -v 4.0.0.pre
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Gemfile
|
|
20
|
+
|
|
21
|
+
In a Gemfile, you need to explicitly specify the prerelease version:
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
# Exact version
|
|
25
|
+
gem 'cov-loupe', '4.0.0.pre'
|
|
26
|
+
|
|
27
|
+
# Or allow any 4.0.0 prerelease
|
|
28
|
+
gem 'cov-loupe', '~> 4.0.0.pre'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Without an explicit version constraint that includes the prerelease suffix, Bundler will skip prereleases just like `gem install` does.
|
|
32
|
+
|
|
33
|
+
## Gemspec Dependencies
|
|
34
|
+
|
|
35
|
+
For gemspec dependencies on prerelease gems, you must specify the prerelease version explicitly:
|
|
36
|
+
|
|
37
|
+
```ruby
|
|
38
|
+
spec.add_dependency 'cov-loupe', '~> 4.0.0.pre'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Key Point
|
|
42
|
+
|
|
43
|
+
Version constraints like `~> 4.0` or `>= 4.0` will **not** match prereleases. You must include the prerelease segment in the constraint for it to match.
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
# V2.0 Breaking Changes Guide
|
|
1
|
+
# V2.0 Breaking Changes and Migration Guide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[Back to main README](../../index.md)
|
|
4
|
+
|
|
5
|
+
This document describes all breaking changes introduced in version 2.0.0 of simplecov-mcp. These changes improve consistency, clarity, and alignment with Ruby conventions.
|
|
6
|
+
|
|
7
|
+
> Note: Current versions use the boolean `--raise-on-stale` / `raise_on_stale` flag (short form `-S`) for staleness enforcement. The `--staleness` and `stale` names referenced below are kept for historical context about the v1→v2 transition.
|
|
4
8
|
|
|
5
9
|
---
|
|
6
10
|
|
|
7
11
|
## Table of Contents
|
|
8
12
|
|
|
9
13
|
- [Command Line Interface Changes](#command-line-interface-changes)
|
|
10
|
-
- [Options Must Precede Subcommands](#options-must-precede-subcommands)
|
|
11
|
-
- [--stale Renamed to --staleness](#--stale-renamed-to---staleness)
|
|
12
|
-
- [--source-context Renamed to --context-lines](#--source-context-renamed-to---context-lines)
|
|
13
|
-
- [--source Now Requires Explicit Mode](#--source-now-requires-explicit-mode)
|
|
14
|
-
- [--json Replaced with --format](#--json-replaced-with---format)
|
|
15
14
|
- [Error Mode Values Changed](#error-mode-values-changed)
|
|
16
|
-
- [--success-predicate Replaced with validate Subcommand](#--success-predicate-replaced-with-validate-subcommand)
|
|
17
15
|
- [Default Sort Order Changed](#default-sort-order-changed)
|
|
18
16
|
- [MCP Tool Changes](#mcp-tool-changes)
|
|
19
17
|
- [stale Parameter Renamed to staleness](#stale-parameter-renamed-to-staleness)
|
|
20
|
-
- [Error Mode Values Changed](#error-mode-values-changed-1)
|
|
21
18
|
- [MCP Tool Arguments Use Symbols](#mcp-tool-arguments-use-symbols)
|
|
22
19
|
- [Ruby API Changes](#ruby-api-changes)
|
|
23
20
|
- [CLIConfig Renamed to AppConfig](#cliconfig-renamed-to-appconfig)
|
|
@@ -30,25 +27,17 @@ This document describes all breaking changes introduced in version 2.0.0 of cov-
|
|
|
30
27
|
|
|
31
28
|
## Command Line Interface Changes
|
|
32
29
|
|
|
33
|
-
### Options Must Precede Subcommands
|
|
34
30
|
|
|
35
|
-
**Change:** Global options must now appear *before* the subcommand, not after.
|
|
36
31
|
|
|
37
|
-
**
|
|
32
|
+
**Migration:** Move all global options before the subcommand name. These options are:
|
|
38
33
|
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
cov-loupe list --resultset coverage --format json
|
|
42
|
-
cov-loupe summary lib/foo.rb --json
|
|
43
|
-
```
|
|
34
|
+
`-r`, `-R`, `-f`, `-o`, `-s`, `-c`, `-C`, `-S`, `-g`, `-l`, `-F`, and `-e`
|
|
44
35
|
|
|
45
|
-
**
|
|
36
|
+
**Exception:** The `validate` subcommand has its own subcommand-specific option `-i/--inline` that must appear *after* the subcommand:
|
|
46
37
|
```bash
|
|
47
|
-
cov-loupe
|
|
48
|
-
cov-loupe --format json summary lib/foo.rb
|
|
38
|
+
cov-loupe validate -i '->(m) { m.list.all? { |f| f["percentage"] >= 80 } }'
|
|
49
39
|
```
|
|
50
40
|
|
|
51
|
-
**Migration:** Move all global options (flags like `-r`, `-f`, `-S`, etc.) before the subcommand name.
|
|
52
41
|
|
|
53
42
|
---
|
|
54
43
|
|
|
@@ -60,14 +49,14 @@ cov-loupe --format json summary lib/foo.rb
|
|
|
60
49
|
|
|
61
50
|
**Before (v1.x):**
|
|
62
51
|
```bash
|
|
63
|
-
|
|
52
|
+
simplecov-mcp --stale error list
|
|
64
53
|
```
|
|
65
54
|
|
|
66
55
|
**After (v2.x):**
|
|
67
56
|
```bash
|
|
68
|
-
|
|
57
|
+
simplecov-mcp --staleness error list
|
|
69
58
|
# OR use the short form:
|
|
70
|
-
|
|
59
|
+
simplecov-mcp -S error list
|
|
71
60
|
```
|
|
72
61
|
|
|
73
62
|
**Migration:** Replace `--stale` with `--staleness` (or continue using `-S`).
|
|
@@ -82,14 +71,14 @@ cov-loupe -S error list
|
|
|
82
71
|
|
|
83
72
|
**Before (v1.x):**
|
|
84
73
|
```bash
|
|
85
|
-
|
|
74
|
+
simplecov-mcp --source uncovered --source-context 3 uncovered lib/foo.rb
|
|
86
75
|
```
|
|
87
76
|
|
|
88
77
|
**After (v2.x):**
|
|
89
78
|
```bash
|
|
90
|
-
|
|
79
|
+
simplecov-mcp --source uncovered --context-lines 3 uncovered lib/foo.rb
|
|
91
80
|
# OR use the short form:
|
|
92
|
-
|
|
81
|
+
simplecov-mcp -s uncovered -c 3 uncovered lib/foo.rb
|
|
93
82
|
```
|
|
94
83
|
|
|
95
84
|
**Migration:** Replace `--source-context` with `--context-lines` (or use `-c`).
|
|
@@ -105,15 +94,15 @@ cov-loupe -s uncovered -c 3 uncovered lib/foo.rb
|
|
|
105
94
|
**Before (v1.x):**
|
|
106
95
|
```bash
|
|
107
96
|
# Implied 'full' mode
|
|
108
|
-
|
|
97
|
+
simplecov-mcp --source summary lib/foo.rb
|
|
109
98
|
```
|
|
110
99
|
|
|
111
100
|
**After (v2.x):**
|
|
112
101
|
```bash
|
|
113
102
|
# Must specify mode explicitly
|
|
114
|
-
|
|
103
|
+
simplecov-mcp --source full summary lib/foo.rb
|
|
115
104
|
# OR
|
|
116
|
-
|
|
105
|
+
simplecov-mcp --source uncovered summary lib/foo.rb
|
|
117
106
|
```
|
|
118
107
|
|
|
119
108
|
**Migration:** Add an explicit mode (`full` or `uncovered`) after `--source`.
|
|
@@ -122,23 +111,23 @@ cov-loupe --source uncovered summary lib/foo.rb
|
|
|
122
111
|
|
|
123
112
|
### --json Replaced with --format
|
|
124
113
|
|
|
125
|
-
**Change:** The `--json` flag (and related `-j`, `-J`, `--pretty-json` flags) have been removed. Use
|
|
114
|
+
**Change:** The `--json` flag (and related `-j`, `-J`, `--pretty-json` flags) have been removed. Use `-f/--format` instead.
|
|
126
115
|
|
|
127
116
|
**Rationale:** Supports multiple output formats beyond JSON (YAML, awesome_print, etc.) with a consistent interface.
|
|
128
117
|
|
|
129
118
|
**Before (v1.x):**
|
|
130
119
|
```bash
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
120
|
+
simplecov-mcp --json list
|
|
121
|
+
simplecov-mcp -j summary lib/foo.rb
|
|
122
|
+
simplecov-mcp --pretty-json list
|
|
134
123
|
```
|
|
135
124
|
|
|
136
125
|
**After (v2.x):**
|
|
137
126
|
```bash
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
127
|
+
simplecov-mcp --format json list
|
|
128
|
+
simplecov-mcp -f j summary lib/foo.rb # Short form
|
|
129
|
+
simplecov-mcp --format pretty-json list
|
|
130
|
+
simplecov-mcp -f J list # Short form for pretty-json
|
|
142
131
|
```
|
|
143
132
|
|
|
144
133
|
**Available formats:**
|
|
@@ -146,7 +135,7 @@ cov-loupe -f J list # Short form for pretty-json
|
|
|
146
135
|
- `json` or `j` - Single-line JSON
|
|
147
136
|
- `pretty-json` or `J` - Pretty-printed JSON
|
|
148
137
|
- `yaml` or `y` - YAML format
|
|
149
|
-
- `
|
|
138
|
+
- `awesome_print` or `ap` - Colored awesome_print format (requires `awesome_print` gem)
|
|
150
139
|
|
|
151
140
|
**Migration:** Replace `--json` with `--format json` (or `-f j`). Replace `--pretty-json` with `--format pretty-json` (or `-f J`).
|
|
152
141
|
|
|
@@ -164,17 +153,17 @@ The old values are **no longer supported**.
|
|
|
164
153
|
|
|
165
154
|
**Before (v1.x):**
|
|
166
155
|
```bash
|
|
167
|
-
|
|
168
|
-
|
|
156
|
+
simplecov-mcp --error-mode on list
|
|
157
|
+
simplecov-mcp --error-mode trace list
|
|
169
158
|
```
|
|
170
159
|
|
|
171
160
|
**After (v2.x):**
|
|
172
161
|
```bash
|
|
173
|
-
|
|
174
|
-
|
|
162
|
+
simplecov-mcp --error-mode log list
|
|
163
|
+
simplecov-mcp --error-mode debug list
|
|
175
164
|
# OR use short forms:
|
|
176
|
-
|
|
177
|
-
|
|
165
|
+
simplecov-mcp --error-mode l list
|
|
166
|
+
simplecov-mcp --error-mode d list
|
|
178
167
|
```
|
|
179
168
|
|
|
180
169
|
**Error modes:**
|
|
@@ -194,16 +183,16 @@ cov-loupe --error-mode d list
|
|
|
194
183
|
|
|
195
184
|
**Before (v1.x):**
|
|
196
185
|
```bash
|
|
197
|
-
|
|
186
|
+
simplecov-mcp --success-predicate policy.rb
|
|
198
187
|
```
|
|
199
188
|
|
|
200
189
|
**After (v2.x):**
|
|
201
190
|
```bash
|
|
202
191
|
# File-based policy
|
|
203
|
-
|
|
192
|
+
simplecov-mcp validate policy.rb
|
|
204
193
|
|
|
205
194
|
# Inline policy (new feature)
|
|
206
|
-
|
|
195
|
+
simplecov-mcp validate -i '->(m) { m.list.all? { |f| f["percentage"] >= 80 } }'
|
|
207
196
|
```
|
|
208
197
|
|
|
209
198
|
**Migration:** Replace `--success-predicate FILE` with `validate FILE`.
|
|
@@ -214,22 +203,23 @@ cov-loupe validate -i '->(m) { m.all_files.all? { |f| f["percentage"] >= 80 } }'
|
|
|
214
203
|
|
|
215
204
|
**Change:** The default sort order for the `list` command changed from `ascending` to `descending`.
|
|
216
205
|
|
|
217
|
-
**Rationale:** Most users want to see
|
|
206
|
+
**Rationale:** Most users want to see worst-covered files last so that when scrolling is finished
|
|
207
|
+
the worst-covered files are displayed on the screen.
|
|
218
208
|
|
|
219
209
|
**Before (v1.x):**
|
|
220
210
|
```bash
|
|
221
211
|
# Shows worst coverage first by default
|
|
222
|
-
|
|
212
|
+
simplecov-mcp list
|
|
223
213
|
```
|
|
224
214
|
|
|
225
215
|
**After (v2.x):**
|
|
226
216
|
```bash
|
|
227
217
|
# Shows best coverage first by default
|
|
228
|
-
|
|
218
|
+
simplecov-mcp list
|
|
229
219
|
|
|
230
220
|
# To get old behavior (worst first):
|
|
231
|
-
|
|
232
|
-
|
|
221
|
+
simplecov-mcp --sort-order ascending list
|
|
222
|
+
simplecov-mcp -o a list # Short form
|
|
233
223
|
```
|
|
234
224
|
|
|
235
225
|
**Migration:** If you relied on ascending order (worst coverage first), explicitly specify `--sort-order ascending` or `-o a`.
|
|
@@ -274,7 +264,7 @@ cov-loupe -o a list # Short form
|
|
|
274
264
|
}
|
|
275
265
|
```
|
|
276
266
|
|
|
277
|
-
**Affected tools:** All file-based tools (`coverage_summary_tool`, `coverage_detailed_tool`, `coverage_raw_tool`, `uncovered_lines_tool`) and aggregate tools (`
|
|
267
|
+
**Affected tools:** All file-based tools (`coverage_summary_tool`, `coverage_detailed_tool`, `coverage_raw_tool`, `uncovered_lines_tool`) and aggregate tools (`list_tool`, `coverage_totals_tool`).
|
|
278
268
|
|
|
279
269
|
**Migration:** Replace `"stale"` with `"staleness"` in all MCP tool calls.
|
|
280
270
|
|
|
@@ -388,13 +378,13 @@ config = CovLoupe::AppConfig.new(
|
|
|
388
378
|
**Before (v1.x):**
|
|
389
379
|
```bash
|
|
390
380
|
# Silently clamped to 0
|
|
391
|
-
|
|
381
|
+
simplecov-mcp --source-context -5 uncovered lib/foo.rb
|
|
392
382
|
```
|
|
393
383
|
|
|
394
384
|
**After (v2.x):**
|
|
395
385
|
```bash
|
|
396
386
|
# Raises ArgumentError
|
|
397
|
-
|
|
387
|
+
simplecov-mcp --context-lines -5 uncovered lib/foo.rb
|
|
398
388
|
# Error: Context lines must be non-negative (got: -5)
|
|
399
389
|
```
|
|
400
390
|
|
|
@@ -426,26 +416,26 @@ cov-loupe --context-lines -5 uncovered lib/foo.rb
|
|
|
426
416
|
**Before (v1.x):**
|
|
427
417
|
```bash
|
|
428
418
|
#!/bin/bash
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
419
|
+
simplecov-mcp list --json --stale error --sort-order ascending
|
|
420
|
+
simplecov-mcp summary lib/foo.rb --json
|
|
421
|
+
simplecov-mcp uncovered lib/bar.rb --source=uncovered --source-context 3
|
|
422
|
+
simplecov-mcp --success-predicate policy.rb
|
|
433
423
|
```
|
|
434
424
|
|
|
435
425
|
**After (v2.x):**
|
|
436
426
|
```bash
|
|
437
427
|
#!/bin/bash
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
428
|
+
simplecov-mcp --format json --staleness error --sort-order ascending list
|
|
429
|
+
simplecov-mcp --format json summary lib/foo.rb
|
|
430
|
+
simplecov-mcp --source uncovered --context-lines 3 uncovered lib/bar.rb
|
|
431
|
+
simplecov-mcp validate policy.rb
|
|
442
432
|
```
|
|
443
433
|
|
|
444
434
|
### Environment Variable Migration
|
|
445
435
|
|
|
446
436
|
**Before (v1.x):**
|
|
447
437
|
```bash
|
|
448
|
-
export
|
|
438
|
+
export SIMPLECOV_MCP_OPTS="--stale error --json"
|
|
449
439
|
```
|
|
450
440
|
|
|
451
441
|
**After (v2.x):**
|
|
@@ -459,14 +449,14 @@ export COV_LOUPE_OPTS="--staleness error --format json"
|
|
|
459
449
|
|
|
460
450
|
If you encounter issues migrating to v2.0:
|
|
461
451
|
|
|
462
|
-
1. Check the [
|
|
463
|
-
2. Review the [
|
|
464
|
-
3. See [
|
|
465
|
-
4. Open an issue at https://github.com/keithrbennett/
|
|
452
|
+
1. Check the [Troubleshooting](../TROUBLESHOOTING.md) guide
|
|
453
|
+
2. Review the [CLI Usage](../CLI_USAGE.md) for complete CLI reference
|
|
454
|
+
3. See [MCP Integration](../MCP_INTEGRATION.md) for MCP tool documentation
|
|
455
|
+
4. Open an issue at https://github.com/keithrbennett/simplecov-mcp/issues
|
|
466
456
|
|
|
467
457
|
---
|
|
468
458
|
|
|
469
459
|
**See also:**
|
|
470
|
-
- [RELEASE_NOTES.md](../../
|
|
471
|
-
- [
|
|
472
|
-
- [
|
|
460
|
+
- [RELEASE_NOTES.md](../../release_notes.md) - Full release notes with new features
|
|
461
|
+
- [CLI Usage](../CLI_USAGE.md) - Complete CLI reference
|
|
462
|
+
- [MCP Integration](../MCP_INTEGRATION.md) - MCP tool reference
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# V3.0 Breaking Changes Guide
|
|
2
|
+
|
|
3
|
+
[Back to main README](../../index.md)
|
|
4
|
+
|
|
5
|
+
This document describes the breaking changes introduced in version 3.0.0, which primarily involve the renaming of the gem from `simplecov-mcp` to `cov-loupe`. These changes affect the gem name, executable, Ruby API, and configuration.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## What Changed
|
|
10
|
+
|
|
11
|
+
The project has been completely renamed, impacting various aspects:
|
|
12
|
+
|
|
13
|
+
### Gem & Executable
|
|
14
|
+
* **Gem name**: `simplecov-mcp` → `cov-loupe`
|
|
15
|
+
* **Executable**: `simplecov-mcp` → `cov-loupe`
|
|
16
|
+
* **Repository**: `github.com/keithrbennett/simplecov-mcp` → `github.com/keithrbennett/cov-loupe`
|
|
17
|
+
|
|
18
|
+
### Ruby API
|
|
19
|
+
* **Module Name**: `SimpleCovMcp` → `CovLoupe`
|
|
20
|
+
* **Require Path**: `require 'simplecov_mcp'` → `require 'cov_loupe'`
|
|
21
|
+
|
|
22
|
+
### Configuration
|
|
23
|
+
* **Environment variable**: `SIMPLECOV_MCP_OPTS` → `COV_LOUPE_OPTS`
|
|
24
|
+
* **Log file**: `simplecov_mcp.log` → `cov_loupe.log`
|
|
25
|
+
* **Documentation alias**: `smcp` → `clp`
|
|
26
|
+
|
|
27
|
+
## What Stayed the Same
|
|
28
|
+
|
|
29
|
+
* **Core functionality**: No breaking changes to features, CLI command logic (other than the executable name), or the internal structure of the `CoverageModel` logic.
|
|
30
|
+
* **MCP Protocol**: The JSON-RPC tool definitions and behaviors remain consistent.
|
|
31
|
+
|
|
32
|
+
## Migration Steps
|
|
33
|
+
|
|
34
|
+
To upgrade from `simplecov-mcp` (v2.x) to `cov-loupe` (v3.x), follow these steps:
|
|
35
|
+
|
|
36
|
+
1. **Uninstall the old gem**:
|
|
37
|
+
```bash
|
|
38
|
+
gem uninstall simplecov-mcp
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
2. **Install the new gem**:
|
|
42
|
+
```bash
|
|
43
|
+
gem install cov-loupe
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
3. **Update scripts and aliases**:
|
|
47
|
+
* Change all occurrences of the `simplecov-mcp` command to `cov-loupe` in your shell scripts, CI/CD configurations, and shell aliases.
|
|
48
|
+
|
|
49
|
+
4. **Update Ruby code**:
|
|
50
|
+
* Find: `require 'simplecov_mcp'`
|
|
51
|
+
* Replace with: `require 'cov_loupe'`
|
|
52
|
+
* Find: `SimpleCovMcp`
|
|
53
|
+
* Replace with: `CovLoupe`
|
|
54
|
+
|
|
55
|
+
5. **Update environment variables**:
|
|
56
|
+
* Rename any `SIMPLECOV_MCP_OPTS` environment variables to `COV_LOUPE_OPTS`.
|
|
57
|
+
|
|
58
|
+
6. **Update log file references**:
|
|
59
|
+
* If you rely on the default log file, it will now be named `cov_loupe.log`. Update any scripts or tools that reference `simplecov_mcp.log`.
|
|
60
|
+
|
|
61
|
+
**Note**: The old `simplecov-mcp` gem (v2.0.1) will remain available on RubyGems but will not receive further updates.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Getting Help
|
|
66
|
+
|
|
67
|
+
If you encounter issues migrating to v3.0:
|
|
68
|
+
|
|
69
|
+
1. Check the [Troubleshooting](../TROUBLESHOOTING.md) guide.
|
|
70
|
+
2. Review the [CLI Usage](../CLI_USAGE.md) for complete CLI reference.
|
|
71
|
+
3. See [MCP Integration](../MCP_INTEGRATION.md) for MCP tool documentation.
|
|
72
|
+
4. Open an issue at https://github.com/keithrbennett/cov-loupe/issues.
|