feat: v2.2 surface — retrieve_trace, process_from_url, error field deprecation (1.2.0) - #4
Merged
Merged
Conversation
…d deprecation
Propagates the v2.2 spec additions to scanii-ruby, following the naming
conventions locked by scanii-java 8.1.0 and the translation patterns
confirmed in scanii-dotnet 7.1.0 and scanii-node 1.2.0.
- Add Scanii::TraceEvent and Scanii::TraceResult model classes
- Add Client#retrieve_trace(id) — GET /v2.2/files/{id}/trace, returns nil on 404
- Add Client#process_from_url(location, ...) — POST /v2.2/files with location as
multipart/form-data field (not urlencoded; cli rejects urlencoded with 405)
- Deprecate ProcessingResult#error with YARD @deprecated + runtime warn
- Bump version to 1.2.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Scanii::TraceResultandScanii::TraceEventmodel classes (new files underlib/scanii/)Client#retrieve_trace(id)— maps toGET /v2.2/files/{id}/trace; returnsnilon 404 (matches dotnet null-on-404 / node undefined-on-404 / Java Optional.empty())Client#process_from_url(location, callback: nil, metadata: nil)— maps toPOST /v2.2/fileswithlocationas a multipart/form-data field (NOT urlencoded; cli rejects urlencoded with 405, confirmed across dotnet + node)ProcessingResult#errorvia YARD@deprecatedcomment + runtimewarnon access; field retained per API_VERSIONING_POLICY.mdTest plan
bundle exec rake test— 60 runs, 149 assertions, 0 failures, 0 errors, 1 skip (pre-existing callback skip)bundle exec rubocop— no offensestest_retrieve_trace_returns_non_empty_events_for_known_id,test_retrieve_trace_returns_nil_for_unknown_id,test_process_from_url_returns_result_with_eicar_finding— all three hard-assert against latest scanii-cli (no self-skip)🤖 Generated with Claude Code