Skip to content

feat: v2.2 surface — retrieve_trace, process_from_url, error field deprecation (1.2.0) - #4

Merged
rferreira merged 1 commit into
mainfrom
v2.2-surface
May 2, 2026
Merged

rferreira merged 1 commit into
mainfrom
v2.2-surface

Conversation

@rferreira

Copy link
Copy Markdown
Contributor

Summary

  • Add Scanii::TraceResult and Scanii::TraceEvent model classes (new files under lib/scanii/)
  • Add Client#retrieve_trace(id) — maps to GET /v2.2/files/{id}/trace; returns nil on 404 (matches dotnet null-on-404 / node undefined-on-404 / Java Optional.empty())
  • Add Client#process_from_url(location, callback: nil, metadata: nil) — maps to POST /v2.2/files with location as a multipart/form-data field (NOT urlencoded; cli rejects urlencoded with 405, confirmed across dotnet + node)
  • Deprecate ProcessingResult#error via YARD @deprecated comment + runtime warn on access; field retained per API_VERSIONING_POLICY.md
  • Bump version to 1.2.0

Test plan

  • bundle exec rake test — 60 runs, 149 assertions, 0 failures, 0 errors, 1 skip (pre-existing callback skip)
  • bundle exec rubocop — no offenses
  • New integration tests: test_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)
  • CI matrix (Ruby 3.4 + 4.0 on ubuntu/macos/windows) will run on PR open

🤖 Generated with Claude Code

…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>
@rferreira
rferreira merged commit 89f052e into main May 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant