mirror of https://github.com/docusealco/docuseal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 KiB
11 KiB
0.9.1
- Fix
MultiXml.method(:load)resolving toKernel#load. The legacyMultiXmlconstant forwarded calls toMultiXMLviamethod_missing, butModule#methoddoesn't consultmethod_missing, soMultiXml.method(:load)resolved to the inheritedKernel#loadand crashed withLoadErrorwhen invoked. Replacesmethod_missingwith explicit singleton-method forwarders for every public method onMultiXML, mirroring the analogous fix in MultiJSON.
0.9.0
- Add
MultiXML.with_parserfor fiber-local scoped parser overrides, matchingMultiJSON.with_adapter. The override lives inFiber[:multi_xml_parser], so concurrent fibers and threads each see their own parser without racing on a shared module variable; nested calls save and restore the previous value. - Add
MultiXML.parse_options/MultiXML.parse_options=for process-wide default options, matchingMultiJSON.parse_options. Accepts aHashor a callable (Proc/lambda); a callable receives the call-site hash as its sole positional argument so defaults can be computed per-call. Defaults merge betweenDEFAULT_OPTIONSand call-site overrides. - Introduce
MultiXML::Parserbase module — built-in parsers declare their backend exception class via aParseErrorconstant, matching theMultiJSON::Adapterconvention. Custom parsers can either extendMultiXML::Parserand defineParseErroror keep defining a.parse_errormethod directly; both styles are accepted. - Add
MultiXML::ParserLoadError, raised when the parser spec is invalid, requiring the parser file raisesLoadError, or the resolved parser doesn't satisfy the contract (must respond to.parseand define either aParseErrorconstant or a.parse_errormethod). Inherits fromArgumentErrorand carries the original exception's class name in its message, matchingMultiJSON::AdapterError. - Rename
MultiXmlconstant toMultiXML(all caps), matching the style ofMultiJSON. The oldMultiXmlconstant continues to work but emits a one-time deprecation warning on first use and will be removed in v1.0. - Add
MultiXML.loadas a deprecated alias forMultiXML.parse, matching the style ofMultiJSON.load→MultiJSON.parse. Will be removed in v1.0. - Rename the
:symbolize_keysoption to:symbolize_names, matching Ruby stdlib'sJSON.parseand MultiJSON. The old option continues to work but emits a one-time deprecation warning; it will be removed in v1.0. - Add
:namespacesoption toMultiXML.parsefor consistent namespace handling across parsers — two modes produce byte-identical output on every backend::strip(default) — drop xmlns declarations and prefixes; keeps today's libxml/nokogiri output so most users see no change:preserve— keep source prefixes (e.g."atom:rel") and surfacexmlns/xmlns:*declarations as attributes
- Fix REXML keeping attribute prefixes (
"gd:etag") while other backends stripped them (#31) - Fix Ox prepending namespace prefixes to element names (
"aws:Item") when other backends didn't (#30) - Handle namespaced attribute name collisions consistently across backends. When attributes with different prefixes strip to the same local name (e.g.
foo:idandbar:idboth becomingid), values are collected in an array in document order, with attribute values ahead of any colliding child elements. The libxml SAX parser falls back to its DOM backend in this case since the SAX callback drops attribute prefixes. - Fix Ox mixed-content text aggregation in the SAX parser
- Raise
ArgumentErroron an unknown:namespacesmode undasherize_keysnow runs only in:stripmode so prefixed keys aren't rewritten under:preserve- Reorder
PARSER_PREFERENCEsoogais tried beforerexml, matching the throughput ranking in the bundled benchmark suite. Affects auto-detection only when neitherox,libxml-ruby, nornokogiriis available; explicitly selecting a parser is unchanged. - Use a TruffleRuby-specific
PARSER_PREFERENCEordering (rexml,libxml,oga,nokogiri) since TruffleRuby's JIT favors pure-Ruby parsers and penalizes FFI-bound ones. On other engines the default ordering is unchanged. - Add a parser benchmark suite (
rake benchmark) and document per-engine throughput rankings in the README. CI verifies thatPARSER_PREFERENCEmatches the benchmark ranking on MRI, JRuby, and TruffleRuby. - Restore JRuby support (dropped in 0.8.0) and add TruffleRuby (native + JVM) to the CI matrix, matching the test coverage of MultiJSON. TruffleRuby is excluded from Windows runners since the
setup-rubyaction doesn't support it there. - Add Ruby 4.0 to the CI matrix
- Support libxml-ruby 6.0.0 by switching from
require "libxml"(removed in 6.0) torequire "libxml-ruby", which is present in both 5.x and 6.x - Drop redundant
::Psych::SyntaxErrordeclaration from the RBS signature to fix a "Different superclasses are specified" type-checking error under rbs v4
0.8.1
0.8.0
- Add per-parse :parser option to MultiXml.parse
- Add SAX parsers for Nokogiri and LibXML
- Fix inconsistent whitespace handling across parsers
- Make parsing errors inspectable with cause and xml accessors
- Drop support for JRuby
0.7.2
0.7.1
0.7.0
0.6.0
0.5.5
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
0.4.4
0.4.3
0.4.2
- Fix bug in dealing with xml element attributes for both REXML and Ox
- Make Ox the preferred XML parser
0.4.1
0.4.0
0.3.0
- Remove core class monkeypatches
- Sort out some class / singleton class issues
- Have parsers refer to toplevel CONTENT_ROOT instead of defining it
- Move redundant input sanitizing to top-level
- Refactor libxml and nokogiri parsers to inherit from a common ancestor
0.2.2
0.2.1
- Add BlueCloth gem as development dependency for Markdown formatting
- Replace BlueCloth with Maruku for JRuby compatibility