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 +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +6 -3
- data/lib/metanorma/plugin/asciichem/citations.rb +4 -4
- data/lib/metanorma/plugin/asciichem/version.rb +1 -1
- data/lib/metanorma/plugin/asciichem.rb +0 -1
- data/metanorma-plugin-asciichem.gemspec +1 -11
- metadata +4 -18
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 38557a9ad544255e0a1d900860ed6e90a1113cccb568d32007f4c4e7ffc3c123
|
|
4
|
+
data.tar.gz: 8a68e216ad44f73faea707a37c0e2ca417540ba37180e131db29035636634d89
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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` (
|
|
115
|
-
`
|
|
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 '
|
|
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
|
-
|
|
93
|
-
root['id'] = anchor
|
|
94
|
-
|
|
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)
|
|
@@ -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 '
|
|
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.
|
|
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:
|
|
33
|
+
name: moxml
|
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
|
35
35
|
requirements:
|
|
36
36
|
- - "~>"
|
|
37
37
|
- !ruby/object:Gem::Version
|
|
38
|
-
version: '
|
|
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: '
|
|
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),
|