metanorma-plugin-lutaml 0.7.18 → 0.7.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ded8b84232dfbf3542afb4dc3da354df981b92ff64ed11e095f12545d1f9a0a
4
- data.tar.gz: 86f209fd978241a799baac34ee851e1770e41dac4406d39c25666b524f9e1c41
3
+ metadata.gz: d95bbbcc424c384a0c2d58374f647eda5e6efc60278c7a2e69b6eefec2e8b012
4
+ data.tar.gz: 00b430d79891b1f9143186a3af2a5eddabe01c8f89f77431b494908164c67bcb
5
5
  SHA512:
6
- metadata.gz: '09d55bf946a368225e301bf893d68dd27bd585ecd56c6c785c396f659c81cc38d663eb3fdfde2eec4814038c022c16cb01e61d05533a7af39b1ac87b649603fa'
7
- data.tar.gz: 2b864cc9a7e32e7643f9aaf33a8e217eef709c2b2df7ecdff820f656f8860ad33569b457b18b9b765689556322b6a8330047c6dba4fd7d60f307638f8995b08c
6
+ metadata.gz: 2f07e00a438eb808adda1c72985a15e5fca581e2afeff305acc78164cf698ec6942c57da3863b767f2551ede925fc8b1eb804977665ff15d07204bb4bf637a60
7
+ data.tar.gz: 9840d71a72679997ec0d6f9c11139c063a843cb1fa3f1920e7a770505d3357b026cde3e67270d8b216fefbeb0f6bfbd595b57e85007896490164f377ed27f2b3
data/README.adoc CHANGED
@@ -145,11 +145,7 @@ And the `lutaml_express` block:
145
145
 
146
146
  [source,adoc]
147
147
  -----
148
- <<<<<<< HEAD
149
- [lutaml_express,example.exp,my_context]
150
- =======
151
148
  [lutaml_express_liquid,example.exp,my_context]
152
- >>>>>>> accd8ee (Remove obsolete codes of macros "lutaml" and "lutaml_express")
153
149
  ----
154
150
  {% for schema in my_context.schemas %}
155
151
  == {{schema.id}}
@@ -102,13 +102,13 @@ module Metanorma
102
102
  block
103
103
  end
104
104
 
105
- def gather_context_liquid_items(index_names:, document:, indexes:, # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
106
- selected_schemas:, options:)
105
+ def gather_context_liquid_items( # rubocop:disable Metrics/AbcSize,Metrics/MethodLength,Metrics/ParameterLists
106
+ index_names:, document:, indexes:, options: {}
107
+ )
107
108
  index_names.map do |path|
108
109
  if indexes[path]
109
110
  indexes[path][:liquid_drop] ||=
110
111
  indexes[path][:wrapper].original_document.to_liquid(
111
- selected_schemas: selected_schemas,
112
112
  options: options,
113
113
  )
114
114
  else
@@ -123,7 +123,6 @@ selected_schemas:, options:)
123
123
  wrapper = load_lutaml_file(document, path)
124
124
  indexes[path] = {
125
125
  liquid_drop: wrapper.original_document.to_liquid(
126
- selected_schemas: selected_schemas,
127
126
  options: options,
128
127
  ),
129
128
  }
@@ -167,13 +166,14 @@ selected_schemas:, options:)
167
166
  index_names:, options:, indexes:)
168
167
  config_yaml_path = options.delete("config_yaml")
169
168
  config = read_config_yaml_file(document, config_yaml_path)
170
- selected_schemas = config["selected_schemas"]
169
+ if config["selected_schemas"]
170
+ options["selected_schemas"] = config["selected_schemas"]
171
+ end
171
172
 
172
173
  all_items = gather_context_liquid_items(
173
174
  index_names: index_names,
174
175
  document: document,
175
176
  indexes: indexes,
176
- selected_schemas: selected_schemas,
177
177
  options: options.merge("document" => document),
178
178
  )
179
179
 
@@ -181,7 +181,6 @@ index_names:, options:, indexes:)
181
181
  repo_drop = item[:liquid_drop]
182
182
  template = ::Liquid::Template.parse(lines.join("\n"))
183
183
  template.assigns[context_name] = repo_drop
184
- template.assigns["selected_schemas"] = selected_schemas
185
184
  template.render
186
185
  end.flatten
187
186
  rescue StandardError => e
@@ -1,7 +1,7 @@
1
1
  module Metanorma
2
2
  module Plugin
3
3
  module Lutaml
4
- VERSION = "0.7.18".freeze
4
+ VERSION = "0.7.19".freeze
5
5
  end
6
6
  end
7
7
  end
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.add_dependency "asciidoctor"
29
29
  spec.add_dependency "coradoc", "~> 1.1.1"
30
- spec.add_dependency "expressir", "~> 2.1.6"
30
+ spec.add_dependency "expressir", "~> 2.1.11"
31
31
  spec.add_dependency "liquid"
32
32
  spec.add_dependency "lutaml", "~> 0.9.25"
33
33
  spec.add_dependency "ogc-gml", "1.0.0"
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.18
4
+ version: 0.7.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-27 00:00:00.000000000 Z
11
+ date: 2025-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 2.1.6
47
+ version: 2.1.11
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: 2.1.6
54
+ version: 2.1.11
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: liquid
57
57
  requirement: !ruby/object:Gem::Requirement