metanorma-plugin-glossarist 0.1.5 → 0.1.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d812a199689659153655480f40c426d2fbde384d892b6b9f90793dc69f9850d8
|
4
|
+
data.tar.gz: 5d6e5645e1ec1a97a357c3c959bd5a6dbea43f607032fbcfd9aee420f4a8fcc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a936ef9f83abcf27f16c45d31020969dba9decd76df34ed7e908e3a2165fa2527422823db3a8c91785ba1762550a171e9e1fa4f895621e32701233dcee3abc4c
|
7
|
+
data.tar.gz: 69a9f2a0a632de754786b49fc0c646fcc810538b5df9cfb218ef296176bb388bbe80fa4d052bb340e0ec9b9766d1460046f8460fc3aa1021c979f467114dae89
|
@@ -27,11 +27,20 @@ module Liquid
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
+
def load_collection(folder_path)
|
31
|
+
@@collections ||= {}
|
32
|
+
|
33
|
+
return @@collections[folder_path] if @@collections[folder_path]
|
34
|
+
|
35
|
+
collection = ::Glossarist::ManagedConceptCollection.new
|
36
|
+
collection.load_from_files(folder_path)
|
37
|
+
@@collections[folder_path] = collection
|
38
|
+
end
|
39
|
+
|
30
40
|
def render(context)
|
31
41
|
@contexts.each do |local_context|
|
32
42
|
context_file = local_context[:file_path].strip
|
33
|
-
collection =
|
34
|
-
collection.load_from_files(context_file)
|
43
|
+
collection = load_collection(context_file)
|
35
44
|
|
36
45
|
context[local_context[:name]] = Liquid::Drops::ConceptsDrop.new(collection, @filters)
|
37
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-plugin-glossarist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|