relaton-render 0.9.2 → 0.9.4

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: '093dc48a9893414c5abdee0073b6295634cfbf6a5c9189db4bd0707694579342'
4
- data.tar.gz: 5d31145a5d427c19cc0bfd3304f6b1a8467525fc619e5ab7f3e9d1e7c40aa9b1
3
+ metadata.gz: cc62874060fb5b96fdf34230578e1c3df77f1397b13e8e29311ea16c70de16b1
4
+ data.tar.gz: 75cb1bba1b02664bfff098b942b12f342228ee430ae1847d5f9400fcf2e1ca1f
5
5
  SHA512:
6
- metadata.gz: 654aa465197829c72232ce8065277d0a378554459f24aee28be8e9925f6e805e794aaa55729773fa0e0fdd99eaa97df216006028e313d191ad3045038743a194
7
- data.tar.gz: a92588028e0d215d35781f0e78a0b5f40bee5ea19ed2c2bf502a78c2063c13449fbf8cb0cf60cdc16d008d865470d5087f2c039e691dd64ac28b117ec658844f
6
+ metadata.gz: de64c09443ea3580207d7dc5060ac895025d0dfd2570ce3ebd20cbada4a800f8b6ce20812a79101db1cefc20c8033d62ff4714f215c3e752651f704c30dd90bc
7
+ data.tar.gz: 4b75f73efc4a552a92752de714107383295fc14afa15e05ca4f2bc8a52aae86d1c712173e25a0903565890f8dc77b0db7d55c2a042ff70abf035711882e8e99c
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+ Gemfile.lock
13
+ .vscode/
14
+ bin/rspec
data/README.adoc CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  image:https://img.shields.io/gem/v/relaton-render.svg["Gem Version", link="https://rubygems.org/gems/relaton-render"]
4
4
  image:https://github.com/metanorma/relaton-render/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/relaton-render/actions?workflow=rake"]
5
- image:https://codeclimate.com/github/metanorma/relaton-render/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/relaton-render"]
5
+ // image:https://codeclimate.com/github/metanorma/relaton-render/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/relaton-render"]
6
6
 
7
7
  Gem that takes a https://github.com/relaton/relaton[Relaton] bibliographic description and
8
8
  a configuration, and generates a https://www.metanorma.org[Metanorma] XML rendering of that description.
@@ -4,7 +4,7 @@ and: と
4
4
  author_and: ","
5
5
  updated: 更新しました
6
6
  viewed: 参照
7
- version: バージョン
7
+ version:
8
8
  also_pub_as: 次のようにも出版されています
9
9
  no_date: 日付なし。
10
10
  no_place: 都市はありません。
@@ -64,7 +64,7 @@ module Relaton
64
64
  end
65
65
 
66
66
  def authoritative_identifier_exclude
67
- %w(METANORMA METANORMA-ORDINAL) + other_identifier_include
67
+ %w(METANORMA METANORMA-ORDINAL TITLE) + other_identifier_include
68
68
  end
69
69
 
70
70
  def other_identifier(doc)
@@ -34,7 +34,7 @@ module Relaton
34
34
  def initialize(opt = {})
35
35
  @htmlentities = HTMLEntities.new
36
36
  @templatecache = CacheManager.instance
37
- customise_liquid
37
+ @liquid_env = create_liquid_environment
38
38
  parse_options(opt)
39
39
  end
40
40
 
@@ -51,9 +51,10 @@ module Relaton
51
51
  end
52
52
  end
53
53
 
54
- def customise_liquid
55
- ::Liquid::Template
56
- .register_filter(::Relaton::Render::Template::CustomFilters)
54
+ def create_liquid_environment
55
+ env = ::Liquid::Environment.new
56
+ env.register_filter(::Relaton::Render::Template::CustomFilters)
57
+ env
57
58
  end
58
59
 
59
60
  # denote start and end of field,
@@ -81,7 +82,7 @@ module Relaton
81
82
  @templatecache.mutex.synchronize do
82
83
  unless t = @templatecache.retrieve(template)
83
84
  t = ::Liquid::Template
84
- .parse(add_field_delim_to_template(template))
85
+ .parse(add_field_delim_to_template(template), environment: @liquid_env)
85
86
  @templatecache.store(template, t)
86
87
  end
87
88
  end
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Render
3
- VERSION = "0.9.2".freeze
3
+ VERSION = "0.9.4".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-render
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.4
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-06-23 00:00:00.000000000 Z
11
+ date: 2025-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -215,6 +215,7 @@ extra_rdoc_files: []
215
215
  files:
216
216
  - ".github/workflows/rake.yml"
217
217
  - ".github/workflows/release.yml"
218
+ - ".gitignore"
218
219
  - ".hound.yml"
219
220
  - ".rubocop.yml"
220
221
  - Gemfile