pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/textproc/ruby-nori



Module Name:    pkgsrc
Committed By:   taca
Date:           Mon Jul 20 05:43:08 UTC 2026

Modified Files:
        pkgsrc/textproc/ruby-nori: Makefile PLIST distinfo

Log Message:
textproc/ruby-nori: update to 2.9.1

2.9.0 (2026-07-05)

Changed

* The :standards profile no longer applies schema-less typing.  Under
  Nori.new(standards: true), :advanced_typecasting now defaults to false (an
  explicit advanced_typecasting: true still wins), and the bare
  un-namespaced type= and nil= attributes become ordinary attributes instead
  of casting instructions.  No more type= conversions (integer, date,
  decimal, array, file, ...), and only a prefixed xsi:nil="true" marks an
  element nil.  These conventions come from Rails' Hash.from_xml (inherited
  via crack and merb), not from any XML spec.  Without a schema, character
  data is just text.  Knowing that <id>123</id> holds an integer is the
  business of a schema-aware layer, not a guess from string shape.  Parsing
  without the profile is completely unchanged.

Added

* Add the :serializable profile option.  Nori.new(serializable: true)
  returns plain, directly-serializable data with no custom value classes.  A
  text node that also has attributes becomes a Hash in the XML JSON
  convention ({"#text" => content} merged with our existing @-prefixed
  attributes instead of a Nori::StringWithAttributes, and a text node
  without attributes becomes a plain String.  A type="file" node is no
  longer decoded into a Nori::StringIOFile, it folds into text and
  attributes like any other node, leaving the base64 content untouched for
  the caller to decode.  That type= decoding is a Rails/ActiveSupport
  Hash.from_xml convention Nori inherited via crack and merb, not part of
  any XML spec, which is why the plain-data profile drops it.  With this,
  values survive to_json, to_yaml, and Marshal.  Opt-in on the 2.x line,
  probably the default in Nori 3.0.  Reported by @ArnoldMEDLINQ (#107),
  thanks to @dub357 for pinpointing the cause and finding #106, and thanks
  to @ekzobrain whose hash-shape approach this builds on.

2.9.1 (2026-07-05)

Fixed

* Under :serializable, a typecast value no longer drops the node's
  attributes.  A text node whose content gets converted to a non-String (by
  :advanced_typecasting or a bare type= cast) now takes the same hash shape
  as string values: <status source="ldap">true</status> becomes {"#text" =>
  true, "@source" => "ldap"} instead of a bare true that silently lost
  @source.  This closes a data-dependent hole in the profile's
  no-silent-loss promise, where the same element kept or dropped its
  attributes depending on what its text happened to look like.  The value at
  #text is whatever the typecasting produced.  Combined with standards: true
  no typecasting happens and #text is always a string.

* The #text key of the :serializable hash shape now goes through
  :convert_tags_to like every other key.  Previously a key-converting
  formula (for example one that symbolizes keys) produced converted element
  and attribute keys next to a raw "#text" string key in the same hash.
  Nori's contract is that a :convert_tags_to formula sees every key it
  emits, which also means a caller who prefers a plain text key over the XML
  JSON convention can now map "#text" in their formula.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/textproc/ruby-nori/Makefile \
    pkgsrc/textproc/ruby-nori/PLIST
cvs rdiff -u -r1.5 -r1.6 pkgsrc/textproc/ruby-nori/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/ruby-nori/Makefile
diff -u pkgsrc/textproc/ruby-nori/Makefile:1.3 pkgsrc/textproc/ruby-nori/Makefile:1.4
--- pkgsrc/textproc/ruby-nori/Makefile:1.3      Sun Sep 22 06:47:30 2024
+++ pkgsrc/textproc/ruby-nori/Makefile  Mon Jul 20 05:43:08 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.3 2024/09/22 06:47:30 taca Exp $
+# $NetBSD: Makefile,v 1.4 2026/07/20 05:43:08 taca Exp $
 
-DISTNAME=      nori-2.7.1
+DISTNAME=      nori-2.9.1
 CATEGORIES=    textproc
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
Index: pkgsrc/textproc/ruby-nori/PLIST
diff -u pkgsrc/textproc/ruby-nori/PLIST:1.3 pkgsrc/textproc/ruby-nori/PLIST:1.4
--- pkgsrc/textproc/ruby-nori/PLIST:1.3 Sun Sep 22 06:47:30 2024
+++ pkgsrc/textproc/ruby-nori/PLIST     Mon Jul 20 05:43:08 2026
@@ -1,17 +1,8 @@
-@comment $NetBSD: PLIST,v 1.3 2024/09/22 06:47:30 taca Exp $
+@comment $NetBSD: PLIST,v 1.4 2026/07/20 05:43:08 taca Exp $
 ${GEM_HOME}/cache/${GEM_NAME}.gem
-${GEM_LIBDIR}/.devcontainer/devcontainer.json
-${GEM_LIBDIR}/.github/dependabot.yml
-${GEM_LIBDIR}/.github/workflows/test.yml
-${GEM_LIBDIR}/.gitignore
-${GEM_LIBDIR}/.rspec
 ${GEM_LIBDIR}/CHANGELOG.md
-${GEM_LIBDIR}/Gemfile
 ${GEM_LIBDIR}/LICENSE
 ${GEM_LIBDIR}/README.md
-${GEM_LIBDIR}/Rakefile
-${GEM_LIBDIR}/benchmark/benchmark.rb
-${GEM_LIBDIR}/benchmark/soap_response.xml
 ${GEM_LIBDIR}/lib/nori.rb
 ${GEM_LIBDIR}/lib/nori/core_ext.rb
 ${GEM_LIBDIR}/lib/nori/core_ext/hash.rb
@@ -22,10 +13,4 @@ ${GEM_LIBDIR}/lib/nori/string_utils.rb
 ${GEM_LIBDIR}/lib/nori/string_with_attributes.rb
 ${GEM_LIBDIR}/lib/nori/version.rb
 ${GEM_LIBDIR}/lib/nori/xml_utility_node.rb
-${GEM_LIBDIR}/nori.gemspec
-${GEM_LIBDIR}/spec/nori/api_spec.rb
-${GEM_LIBDIR}/spec/nori/core_ext/hash_spec.rb
-${GEM_LIBDIR}/spec/nori/nori_spec.rb
-${GEM_LIBDIR}/spec/nori/string_utils_spec.rb
-${GEM_LIBDIR}/spec/spec_helper.rb
 ${GEM_HOME}/specifications/${GEM_NAME}.gemspec

Index: pkgsrc/textproc/ruby-nori/distinfo
diff -u pkgsrc/textproc/ruby-nori/distinfo:1.5 pkgsrc/textproc/ruby-nori/distinfo:1.6
--- pkgsrc/textproc/ruby-nori/distinfo:1.5      Sun Sep 22 06:47:30 2024
+++ pkgsrc/textproc/ruby-nori/distinfo  Mon Jul 20 05:43:08 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.5 2024/09/22 06:47:30 taca Exp $
+$NetBSD: distinfo,v 1.6 2026/07/20 05:43:08 taca Exp $
 
-BLAKE2s (nori-2.7.1.gem) = 9858d0a65de74f9255db146eb2fe961ee569571953ad8cff895be8e808fb22f3
-SHA512 (nori-2.7.1.gem) = e42de719a53886bc06f45199a516830985fa135946d30f7dfab17ddefbb72d2a86a95cca7692878c74e90986ddfb9c9ed50981981b42eca73fc0913a0309cf85
-Size (nori-2.7.1.gem) = 24064 bytes
+BLAKE2s (nori-2.9.1.gem) = 6f5c7ecb0fadcbc562359f13608c1d4164bf6e32c5da7db4661018f84a87885a
+SHA512 (nori-2.9.1.gem) = a41a4647c8da86cbab3e0ed06718832d6b32551ca52081a8e3dd010f19cdb4a12ca1387cebd806e4161e0fa803f4a089251cb240e319cc73be9b4a405f9f75f6
+Size (nori-2.9.1.gem) = 19968 bytes



Home | Main Index | Thread Index | Old Index