metanorma-plugin-lutaml 0.7.50 → 0.7.52

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: f27b6ec54fcac0ddd7555f3058124ff88197ebed8b616200deacb2e62ab796d5
4
- data.tar.gz: b765db1783fd82e76ffcd22c3ec8340d335dfcc27058da3be7ce5127a0ca1136
3
+ metadata.gz: 5143a55197f330fa87b88710e79bf63344aad4779aecae7ef186a81dd27aba19
4
+ data.tar.gz: 0cb16d6b7b4df65c9c5ac6a88c7dec6e10405e1a15eea853c8bf1c6b34433927
5
5
  SHA512:
6
- metadata.gz: 5c2ab27419d029d9b28a8fc6a03ee906505718d64a91cb405a4af15cb4761918b50c2d84668d33bd68ce2c444c72e6ae29a701367d98d5de0e0b35489741abdf
7
- data.tar.gz: '0112029fbc5e4998a3a5ec2e19b0785db703b02eb379902ef47c720e2799965491d06947e40d35222694b81a8a2a5fbd432edeadf5a4d4ba55c87d8d4337c0d0'
6
+ metadata.gz: 2c25460c133c03e54cfbd846185e995320cc6ecef16826ab926da7fd2d319b440a06549354bf34fe5937fee1d0316bfaac9ca60ebb4f7ae0aa8b48ac9311b99f
7
+ data.tar.gz: db23e5a0d74dbe6b40e4cdd88bdf2f3918dc652e7187ef5c7dcfae19add6865d6c8f65281a70d7c3475014c3d0af442fde716d229d15e1d6f493f316be5f8d9c
@@ -0,0 +1,24 @@
1
+ # Formerly cimas-managed. Now consumer-owned per metanorma/cimas#68
2
+ # (workflow-file conversion from cimas-synced copied stubs to reusable-workflow
3
+ # references). Pins metanorma/ci reusable at @v1 (moving major, three-tier
4
+ # tagging discipline per metanorma/ci#372).
5
+ name: rake
6
+
7
+ on:
8
+ push:
9
+ branches: [ master, main ]
10
+ tags: [ v* ]
11
+ pull_request:
12
+
13
+ permissions:
14
+ contents: write
15
+
16
+ jobs:
17
+ rake:
18
+ uses: metanorma/ci/.github/workflows/generic-rake.yml@v1
19
+ with:
20
+ setup-tools: graphviz
21
+ submodules: true
22
+ choco-cache: true
23
+ secrets:
24
+ pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
data/Gemfile CHANGED
@@ -13,9 +13,6 @@ rescue StandardError
13
13
  end
14
14
 
15
15
  gem "canon"
16
- gem "html2doc", github: "metanorma/html2doc", branch: "main"
17
- gem "metanorma", github: "metanorma/metanorma", branch: "main"
18
- gem "metanorma-standoc", github: "metanorma/metanorma-standoc", branch: "main"
19
16
  gem "rake"
20
17
  gem "rspec"
21
18
  gem "rspec-html-matchers"
data/Gemfile.devel CHANGED
@@ -1,2 +1,9 @@
1
- gem "metanorma-standoc", github: "metanorma/metanorma-standoc", branch: "main"
2
- gem "metanorma", github: "metanorma/metanorma", branch: "main"
1
+ gem "metanorma-standoc", github: "metanorma/metanorma-standoc", ref: "5ca49c85bbcc1422e48c4b625a66f7f026dc6832"
2
+ gem "metanorma", github: "metanorma/metanorma", ref: "a899a9a6fc933dca0a53166d6633b609311b14e6"
3
+ # relaton v3 prerelease line (rubyzip ~> 3.4, matching lutaml-model);
4
+ # relaton-cli's v2line branch allows relaton 3 while keeping version
5
+ # 2.1.2 for metanorma-standoc's constraint; the metanorma/standoc
6
+ # refs are the known-good pair (newer standoc@main needs unreleased
7
+ # metanorma-document components)
8
+ gem "relaton", github: "relaton/relaton", ref: "65742ac31bce9e006072e1ace440c984352201f3"
9
+ gem "relaton-cli", github: "relaton/relaton-cli", branch: "feat/allow-relaton-v3-v2line"
@@ -25,6 +25,11 @@ module Metanorma
25
25
  CachedRepoAdapter.new(model)
26
26
  when Expressir::Model::Repository, Expressir::Model::ExpFile
27
27
  RepoAdapter.new(model)
28
+ when Expressir::Express::LazyRepository
29
+ # Remark decoration walks real models; hydrate the lazy
30
+ # repository up front. The artifact still wins on load —
31
+ # wire JSON hydrates per file instead of a full re-parse.
32
+ RepoAdapter.new(model.to_eager)
28
33
  when Expressir::Model::ModelElement
29
34
  ModelAdapter.new(model)
30
35
  else
@@ -11,7 +11,7 @@ module Metanorma
11
11
  module Lutaml
12
12
  module LutamlDiagramBase
13
13
  def process(parent, reader, attrs)
14
- uml_document = ::Lutaml::Lml::Parser
14
+ uml_document = ::Lutaml::Lml
15
15
  .parse(lutaml_file(parent.document, reader))
16
16
  filename = generate_file(parent, reader, uml_document)
17
17
  through_attrs = generate_attrs(attrs)
@@ -141,6 +141,14 @@ module Metanorma
141
141
  cache_full_path = cache_path &&
142
142
  Utils.relative_file_path(document, cache_path)
143
143
 
144
+ if express_artifact?(
145
+ Utils.relative_file_path(document, path),
146
+ )
147
+ return load_express_repo_from_path(
148
+ document, Utils.relative_file_path(document, path)
149
+ )
150
+ end
151
+
144
152
  # If there is cache and "force read" not set.
145
153
  if !force_read && cache_full_path && File.file?(cache_full_path)
146
154
  return load_express_repo_from_cache(cache_full_path)
@@ -191,11 +199,24 @@ module Metanorma
191
199
  end
192
200
 
193
201
  def load_express_repo_from_path(document, path)
202
+ return load_express_from_artifact(path) if express_artifact?(path)
194
203
  return load_express_from_folder(path) if File.directory?(path)
195
204
 
196
205
  load_express_from_index(document, path)
197
206
  end
198
207
 
208
+ def express_artifact?(path)
209
+ path.to_s.end_with?(".exscs")
210
+ end
211
+
212
+ # Compiled-set artifacts (EXSCS1) hydrate per file on first
213
+ # touch: rendering one schema's page costs one hydration, not
214
+ # the whole repository. The artifact already carries content
215
+ # digests, so the expressir Cache layer does not apply.
216
+ def load_express_from_artifact(path)
217
+ Expressir::Express::LazyRepository.new(path.to_s)
218
+ end
219
+
199
220
  def load_express_from_folder(folder)
200
221
  file_paths = Dir["#{folder}/*.exp"]
201
222
  ::Expressir::Express::Parser.from_files(file_paths)
@@ -1,7 +1,7 @@
1
1
  module Metanorma
2
2
  module Plugin
3
3
  module Lutaml
4
- VERSION = "0.7.50".freeze
4
+ VERSION = "0.7.52".freeze
5
5
  end
6
6
  end
7
7
  end
@@ -51,6 +51,7 @@ module Metanorma
51
51
  id_name_mapping: parser.id_name_mapping,
52
52
  lookup: lookup,
53
53
  with_gen: true,
54
+ with_assoc: true,
54
55
  with_absolute_path: true,
55
56
  }
56
57
  end
@@ -30,13 +30,13 @@ Gem::Specification.new do |spec|
30
30
 
31
31
  spec.add_dependency "asciidoctor"
32
32
  spec.add_dependency "coradoc", "~> 1.1.8"
33
- spec.add_dependency "ea", "~> 0.2"
33
+ spec.add_dependency "ea"
34
34
  spec.add_dependency "expressir", "~> 2.3", ">= 2.3.5"
35
35
  spec.add_dependency "isodoc"
36
36
  spec.add_dependency "liquid"
37
37
  spec.add_dependency "lutaml-lml"
38
38
  spec.add_dependency "lutaml-model", "~> 0.8.4"
39
- spec.add_dependency "lutaml-uml", "~> 0.5"
39
+ spec.add_dependency "lutaml-uml", ">= 0.5", "< 2"
40
40
  spec.add_dependency "ogc-gml", "~> 1.1"
41
41
  spec.add_dependency "relaton-cli"
42
42
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-plugin-lutaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.50
4
+ version: 0.7.52
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-07-19 00:00:00.000000000 Z
11
+ date: 2026-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: ea
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '0.2'
47
+ version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '0.2'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: expressir
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -132,16 +132,22 @@ dependencies:
132
132
  name: lutaml-uml
133
133
  requirement: !ruby/object:Gem::Requirement
134
134
  requirements:
135
- - - "~>"
135
+ - - ">="
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0.5'
138
+ - - "<"
139
+ - !ruby/object:Gem::Version
140
+ version: '2'
138
141
  type: :runtime
139
142
  prerelease: false
140
143
  version_requirements: !ruby/object:Gem::Requirement
141
144
  requirements:
142
- - - "~>"
145
+ - - ">="
143
146
  - !ruby/object:Gem::Version
144
147
  version: '0.5'
148
+ - - "<"
149
+ - !ruby/object:Gem::Version
150
+ version: '2'
145
151
  - !ruby/object:Gem::Dependency
146
152
  name: ogc-gml
147
153
  requirement: !ruby/object:Gem::Requirement
@@ -177,6 +183,7 @@ executables: []
177
183
  extensions: []
178
184
  extra_rdoc_files: []
179
185
  files:
186
+ - ".github/workflows/rake.yml"
180
187
  - ".github/workflows/release.yml"
181
188
  - ".gitignore"
182
189
  - ".rubocop.yml"