Skip to content

Add Taurus::XML.parse / parse_file module entry points - #14

Merged
ronaldtse merged 1 commit into
mainfrom
fix/xml-module-parse
Aug 20, 2026
Merged

Add Taurus::XML.parse / parse_file module entry points#14
ronaldtse merged 1 commit into
mainfrom
fix/xml-module-parse

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

  • lib/taurus/xml.rb: add Taurus::XML.parse / Taurus::XML.parse_file module-level delegates to Document.parse / Document.parse_file

Why

The README documents Taurus::XML.parse(...) and Taurus::XML.parse_file(...) as the primary entry points, but the gem only shipped Taurus::XML::Document.parse — any code written from the README raised NoMethodError. Found while wiring the serialbench adapter, whose availability probe calls Taurus::XML.parse('<probe/>').

This also restores the Nokogiri ergonomics (Nokogiri::XML(...)Taurus::XML.parse(...)) promised by the migration guide.

Test plan

  • 3 new specs (string, IO, file input) — 179/179 total, 0 failures
  • CI green

The README documents Taurus::XML.parse and Taurus::XML.parse_file,
but only Taurus::XML::Document.parse existed -- code following the
README raised NoMethodError. This surfaced when the serialbench
adapter probed availability with Taurus::XML.parse("<probe/>").

Adds Nokogiri-style module-level delegates (Nokogiri::XML(...)) to
Document.parse / Document.parse_file, with specs for string, IO,
and file input.
@ronaldtse
ronaldtse merged commit 2ee0032 into main Aug 20, 2026
10 of 13 checks passed
@ronaldtse
ronaldtse deleted the fix/xml-module-parse branch August 20, 2026 23:26
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