metanorma-plugin-asciichem 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1e6223e068d96509f6619ac538a85ea541d519ad2e54105854db79cb15baf2a
4
- data.tar.gz: 2563c0395dce5b0da17e60ddeec8bcfe2fccdef0c8ab89142674c8754481fe43
3
+ metadata.gz: 38557a9ad544255e0a1d900860ed6e90a1113cccb568d32007f4c4e7ffc3c123
4
+ data.tar.gz: 8a68e216ad44f73faea707a37c0e2ca417540ba37180e131db29035636634d89
5
5
  SHA512:
6
- metadata.gz: 9bb88c0779ce121450714ecc60ad45b5acd664a47307fd22564a3a800999f471cb17aa648d1d7acc94f9c1a4826b260643c505f8c01d76596968d2e98878aa5e
7
- data.tar.gz: 5c2cf2853e2bebfbb30b98e43ff35b78763c8eb0c37f27a7b359419e702da31f33bf83e52f997160c260299671f1ebe9bd8eaa7a8250c6dd16ab156576ad1fc8
6
+ metadata.gz: 91aaca9dd9733d33b6238c1da2c45cf1f6380ae639fd5bccb08395e5ca70f5a5710a55c46449a7c2970cecccfb6e3f0c789006c6b030e6085957f849d09faab3
7
+ data.tar.gz: fe94c46d1bda2827cdc99728ab69eecd99e7b31323d3a06f9717e01864eb24f4b188c39bf21c44bb5e2af2b4c5d2359ea2cbd154d186a962b22a9a591904f79e
data/CHANGELOG.md CHANGED
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ### Changed
8
+
9
+ - Runtime dependencies slimmed: `asciidoctor` and `nokogiri` are
10
+ gone. The host provides asciidoctor (metanorma-standoc requires
11
+ and registers the gem); the one direct XML touchpoint (setting
12
+ the InChIKey anchor on the emitted bibitem) now goes through
13
+ `moxml` (`~> 0.5`), the same adapter layer the rest of the
14
+ lutaml ecosystem uses.
15
+
7
16
  ## [0.1.1] - 2026-09-22
8
17
 
9
18
  ### Changed
data/README.md CHANGED
@@ -111,9 +111,12 @@ A worked example document ships in `docs/example.adoc`.
111
111
 
112
112
  ## Compatibility
113
113
 
114
- Runtime dependencies are `asciichem` (>= 0.29.2), `asciidoctor`, and
115
- `nokogiri` — the extension operates at the Asciidoctor AST level and
116
- needs no Metanorma gem to run.
114
+ Runtime dependencies are `asciichem` (`~> 0.29`, `>= 0.29.2`) and
115
+ `moxml` — the extension operates at the Asciidoctor AST level and
116
+ needs no Metanorma gem to run. Asciidoctor itself is provided by the
117
+ host (metanorma-standoc requires and registers this gem; outside
118
+ Metanorma, bring your own asciidoctor and register the extension as
119
+ shown under Installation).
117
120
 
118
121
  The full metanorma-standoc compile is exercised by the suite:
119
122
  `spec/metanorma/plugin/asciichem/standoc_spec.rb` compiles a document
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'nokogiri'
3
+ require 'moxml'
4
4
 
5
5
  module Metanorma
6
6
  module Plugin
@@ -89,9 +89,9 @@ module Metanorma
89
89
  # docidentifier; the anchor (InChIKey) replaces it so document
90
90
  # cross-references <<INCHIKEY>> land on the entry.
91
91
  def with_anchor(xml, anchor)
92
- root = Nokogiri::XML(xml).root
93
- root['id'] = anchor
94
- root.to_xml
92
+ doc = Moxml.parse(xml)
93
+ doc.root['id'] = anchor
94
+ doc.to_xml
95
95
  end
96
96
 
97
97
  def bibliography_section(document, entries)
@@ -3,7 +3,7 @@
3
3
  module Metanorma
4
4
  module Plugin
5
5
  module Asciichem
6
- VERSION = '0.1.1'
6
+ VERSION = '0.1.2'
7
7
  end
8
8
  end
9
9
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'asciidoctor' unless defined?(Asciidoctor)
4
3
  require 'asciichem'
5
4
 
6
5
  module Metanorma
@@ -33,16 +33,6 @@ Gem::Specification.new do |spec|
33
33
  end
34
34
  spec.require_paths = ['lib']
35
35
 
36
- # Floors are the versions the suite validates against (pessimistic
37
- # ~>); raise them only with a full-suite run. asciichem needs
38
- # >= 0.29.2 (relaton-bib widening) inside the 0.29 line.
39
36
  spec.add_dependency 'asciichem', '~> 0.29', '>= 0.29.2'
40
- spec.add_dependency 'asciidoctor', '~> 2.0'
41
- spec.add_dependency 'nokogiri', '~> 1.18'
42
-
43
- # metanorma-standoc lives in the Gemfile dev group: it is the
44
- # integration-test backend (spec/metanorma/plugin/asciichem/
45
- # standoc_spec.rb), not a runtime requirement — following the
46
- # plugin contract, metanorma-standoc requires and registers this
47
- # gem, like it does for metanorma-plugin-lutaml.
37
+ spec.add_dependency 'moxml', '~> 0.5'
48
38
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-plugin-asciichem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
@@ -30,33 +30,19 @@ dependencies:
30
30
  - !ruby/object:Gem::Version
31
31
  version: 0.29.2
32
32
  - !ruby/object:Gem::Dependency
33
- name: asciidoctor
33
+ name: moxml
34
34
  requirement: !ruby/object:Gem::Requirement
35
35
  requirements:
36
36
  - - "~>"
37
37
  - !ruby/object:Gem::Version
38
- version: '2.0'
38
+ version: '0.5'
39
39
  type: :runtime
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
42
42
  requirements:
43
43
  - - "~>"
44
44
  - !ruby/object:Gem::Version
45
- version: '2.0'
46
- - !ruby/object:Gem::Dependency
47
- name: nokogiri
48
- requirement: !ruby/object:Gem::Requirement
49
- requirements:
50
- - - "~>"
51
- - !ruby/object:Gem::Version
52
- version: '1.18'
53
- type: :runtime
54
- prerelease: false
55
- version_requirements: !ruby/object:Gem::Requirement
56
- requirements:
57
- - - "~>"
58
- - !ruby/object:Gem::Version
59
- version: '1.18'
45
+ version: '0.5'
60
46
  description: 'Adds [chem] blocks and chem:[] inline macros to Metanorma AsciiDoc:
61
47
  chemistry written in AsciiChem parses to MathML for rendering, and @cite-annotated
62
48
  molecules resolve to dataset-type Relaton bibitems - one per (source, substance),