metanorma-plugin-lutaml 0.3.2 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +3 -13
- data/.hound.yml +5 -0
- data/.rubocop.yml +10 -0
- data/lib/metanorma/plugin/lutaml/lutaml_diagram_block.rb +3 -3
- data/lib/metanorma/plugin/lutaml/lutaml_preprocessor.rb +3 -2
- data/lib/metanorma/plugin/lutaml/utils.rb +3 -3
- data/lib/metanorma/plugin/lutaml/version.rb +1 -1
- data/metanorma-plugin-lutaml.gemspec +1 -1
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfe1f241f558def33ef0fc13446d842d50aac1b1003cade580fa3b62e730b722
|
4
|
+
data.tar.gz: 2d12efe1688915194f16cd857e6ca4deaf9852b98407112363bf106dcf3e60a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6c46b1d885bc2cb06ea76c4dd5ff057e2b2944579403c8582b43e8a66fe5cb67046b49c1d00526410aba63c0f1614900d3a65e681d67e5f75a3d9b66fc18fd9
|
7
|
+
data.tar.gz: 3da558c2e348387e60bdc1d0b079150c032e11dcf60731b8083b766dc129b10322c9e3f06892bfc06b8524df1ad453ed1d519153b19f55c7b34734ed20e4f614
|
data/.github/workflows/rake.yml
CHANGED
@@ -4,7 +4,7 @@ name: rake
|
|
4
4
|
|
5
5
|
on:
|
6
6
|
push:
|
7
|
-
branches: [ master, main
|
7
|
+
branches: [ master, main ]
|
8
8
|
tags: [ v* ]
|
9
9
|
pull_request:
|
10
10
|
|
@@ -16,19 +16,9 @@ jobs:
|
|
16
16
|
strategy:
|
17
17
|
fail-fast: false
|
18
18
|
matrix:
|
19
|
-
ruby: [ '
|
19
|
+
ruby: [ '3.0', '2.7', '2.6', '2.5' ]
|
20
20
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
21
21
|
experimental: [ false ]
|
22
|
-
include:
|
23
|
-
- ruby: '3.0'
|
24
|
-
os: 'ubuntu-latest'
|
25
|
-
experimental: true
|
26
|
-
- ruby: '3.0'
|
27
|
-
os: 'windows-latest'
|
28
|
-
experimental: true
|
29
|
-
- ruby: '3.0'
|
30
|
-
os: 'macos-latest'
|
31
|
-
experimental: true
|
32
22
|
steps:
|
33
23
|
- uses: actions/checkout@master
|
34
24
|
|
@@ -49,5 +39,5 @@ jobs:
|
|
49
39
|
with:
|
50
40
|
token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
|
51
41
|
repository: ${{ github.repository }}
|
52
|
-
event-type:
|
42
|
+
event-type: tests-passed
|
53
43
|
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
|
data/.hound.yml
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
|
+
inherit_from:
|
4
|
+
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
|
5
|
+
|
6
|
+
# local repo-specific modifications
|
7
|
+
# ...
|
8
|
+
|
9
|
+
AllCops:
|
10
|
+
TargetRubyVersion: 2.5
|
@@ -27,7 +27,7 @@ module Metanorma
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def process(parent, reader, attrs)
|
30
|
-
uml_document = ::Lutaml::Uml::Parsers::Dsl.parse(lutaml_temp(reader))
|
30
|
+
uml_document = ::Lutaml::Uml::Parsers::Dsl.parse(lutaml_temp(parent.document, reader))
|
31
31
|
filename = generate_file(parent, reader, uml_document)
|
32
32
|
through_attrs = generate_attrs(attrs)
|
33
33
|
through_attrs["target"] = filename
|
@@ -39,8 +39,8 @@ module Metanorma
|
|
39
39
|
|
40
40
|
private
|
41
41
|
|
42
|
-
def lutaml_temp(reader)
|
43
|
-
temp_file = Tempfile.new(["lutaml", ".lutaml"])
|
42
|
+
def lutaml_temp(document, reader)
|
43
|
+
temp_file = Tempfile.new(["lutaml", ".lutaml"], Utils.relative_file_path(document, ''))
|
44
44
|
temp_file.puts(reader.read)
|
45
45
|
temp_file.rewind
|
46
46
|
temp_file
|
@@ -21,8 +21,9 @@ module Metanorma
|
|
21
21
|
document,
|
22
22
|
input_lines
|
23
23
|
)
|
24
|
-
|
25
|
-
|
24
|
+
result_content = processed_lines(document, input_lines, express_indexes)
|
25
|
+
result_reader = Asciidoctor::PreprocessorReader.new(document, result_content)
|
26
|
+
result_reader
|
26
27
|
end
|
27
28
|
|
28
29
|
protected
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require "expressir/
|
1
|
+
require "expressir/express/cache"
|
2
2
|
require "metanorma/plugin/lutaml/liquid/custom_filters"
|
3
3
|
|
4
4
|
::Liquid::Template.register_filter(Metanorma::Plugin::Lutaml::Liquid::CustomFilters)
|
@@ -53,7 +53,7 @@ module Metanorma
|
|
53
53
|
express_write_cache(cache_full_path, wrapper.original_document, document)
|
54
54
|
end
|
55
55
|
wrapper
|
56
|
-
rescue Expressir::
|
56
|
+
rescue Expressir::Error
|
57
57
|
FileUtils.rm_rf(cache_full_path)
|
58
58
|
process_express_index(path, cache_path, document, true)
|
59
59
|
rescue StandardError => e
|
@@ -68,7 +68,7 @@ module Metanorma
|
|
68
68
|
|
69
69
|
def express_write_cache(path, repository, document)
|
70
70
|
root_path = Pathname.new(relative_file_path(document, ""))
|
71
|
-
Expressir::
|
71
|
+
Expressir::Express::Cache
|
72
72
|
.to_file(path,
|
73
73
|
repository,
|
74
74
|
root_path: root_path)
|
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_development_dependency "equivalent-xml"
|
34
34
|
spec.add_development_dependency "metanorma-standoc"
|
35
35
|
spec.add_development_dependency "pry", "~> 0.12.2"
|
36
|
-
spec.add_development_dependency "rake", "~>
|
36
|
+
spec.add_development_dependency "rake", "~> 13"
|
37
37
|
spec.add_development_dependency "rspec", "~> 3.6"
|
38
38
|
spec.add_development_dependency "rubocop", "= 0.54.0"
|
39
39
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
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.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: liquid
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
145
|
+
version: '13'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
152
|
+
version: '13'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rspec
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -243,6 +243,8 @@ extra_rdoc_files: []
|
|
243
243
|
files:
|
244
244
|
- ".github/workflows/rake.yml"
|
245
245
|
- ".gitignore"
|
246
|
+
- ".hound.yml"
|
247
|
+
- ".rubocop.yml"
|
246
248
|
- CODE_OF_CONDUCT.md
|
247
249
|
- Dockerfile
|
248
250
|
- Gemfile
|
@@ -281,7 +283,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
281
283
|
- !ruby/object:Gem::Version
|
282
284
|
version: '0'
|
283
285
|
requirements: []
|
284
|
-
rubygems_version: 3.
|
286
|
+
rubygems_version: 3.1.6
|
285
287
|
signing_key:
|
286
288
|
specification_version: 4
|
287
289
|
summary: Metanorma plugin for LutaML
|