mn2pdf 1.18 → 1.22.1
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 +4 -4
- data/.github/workflows/macos.yml +0 -1
- data/.github/workflows/ubuntu.yml +10 -7
- data/.github/workflows/windows.yml +0 -1
- data/README.adoc +3 -1
- data/bin/mn2pdf.jar +0 -0
- data/lib/mn2pdf.rb +2 -2
- data/lib/mn2pdf/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ad292c63a7a396addd53b783a43b4f5e511c09b434d4145e495ac00428b2bba
|
4
|
+
data.tar.gz: 782ee5b6d37e5774b97d2d0ff0f00aa2dc9fc0ac7630476ad743fd695381933d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21a6eb1330b2e742d4b39dcc1eaad9ecac3b4f14ae7ef0cf9a1e8900b148b281d58ebca6890e416606cbccc0b3bcb152c06a2854ec973121ef3b6abdb7110714
|
7
|
+
data.tar.gz: 2e9eb875056d2ad42c37aaaec76d345abfc0d63a9b2e61f1a0d89c75b4737f5879e22b094163b98ce56bfe6682a119ff9d2bb357deae6b55058b2057f9deee00
|
data/.github/workflows/macos.yml
CHANGED
@@ -31,7 +31,6 @@ jobs:
|
|
31
31
|
uses: actions/setup-ruby@v1
|
32
32
|
with:
|
33
33
|
ruby-version: ${{ matrix.ruby }}
|
34
|
-
architecture: 'x64'
|
35
34
|
- name: Update gems
|
36
35
|
run: |
|
37
36
|
gem install bundler
|
@@ -39,15 +38,19 @@ jobs:
|
|
39
38
|
- name: Run specs
|
40
39
|
run: |
|
41
40
|
bundle exec rake
|
42
|
-
- name: Trigger
|
43
|
-
if:
|
41
|
+
- name: Trigger repositories
|
42
|
+
if: matrix.ruby == '2.6'
|
44
43
|
env:
|
45
|
-
GH_USERNAME:
|
46
|
-
GH_ACCESS_TOKEN: ${{ secrets.
|
44
|
+
GH_USERNAME: metanorma-ci
|
45
|
+
GH_ACCESS_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
47
46
|
run: |
|
48
47
|
curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/trigger-gh-actions.sh
|
49
48
|
[[ -f ".github/workflows/dependent_repos.env" ]] && source .github/workflows/dependent_repos.env
|
50
|
-
|
49
|
+
CLIENT_PAYLOAD=$(cat <<EOF
|
50
|
+
"{ "ref": "${GITHUB_REF}", "repo": "${GITHUB_REPOSITORY}" }"
|
51
|
+
EOF
|
52
|
+
)
|
53
|
+
for repo in $REPOS
|
51
54
|
do
|
52
|
-
sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY "
|
55
|
+
sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY "$CLIENT_PAYLOAD"
|
53
56
|
done
|
data/README.adoc
CHANGED
@@ -30,9 +30,11 @@ Or include it in your gemspec.
|
|
30
30
|
[source,ruby]
|
31
31
|
----
|
32
32
|
require 'mn2pdf'
|
33
|
-
Mn2pdf.convert(sample_xml_path, output_pdf_path, sample_xsl_path)
|
33
|
+
Mn2pdf.convert(sample_xml_path, output_pdf_path, sample_xsl_path, options = "")
|
34
34
|
----
|
35
35
|
|
36
|
+
The options are any options trailing in the mn2pdf Java executable, e.g. `--split-by-language`.
|
37
|
+
|
36
38
|
== Updating the gem
|
37
39
|
|
38
40
|
Update `lib/mn2pdf/version.rb` to the desired version of https://github.com/metanorma/mn2pdf[mn2pdf].
|
data/bin/mn2pdf.jar
CHANGED
Binary file
|
data/lib/mn2pdf.rb
CHANGED
@@ -16,13 +16,13 @@ module Mn2pdf
|
|
16
16
|
message.strip
|
17
17
|
end
|
18
18
|
|
19
|
-
def self.convert(url_path, output_path, xsl_stylesheet)
|
19
|
+
def self.convert(url_path, output_path, xsl_stylesheet, options = "")
|
20
20
|
return if url_path.nil? || output_path.nil? || xsl_stylesheet.nil?
|
21
21
|
|
22
22
|
puts MN2PDF_JAR_PATH
|
23
23
|
cmd = ['java', '-Xss5m', '-Xmx1024m', '-jar', MN2PDF_JAR_PATH, '--xml-file',
|
24
24
|
url_path, '--xsl-file', xsl_stylesheet, '--pdf-file',
|
25
|
-
output_path].join(' ')
|
25
|
+
output_path, options].join(' ')
|
26
26
|
|
27
27
|
puts cmd
|
28
28
|
_, error_str, status = Open3.capture3(cmd)
|
data/lib/mn2pdf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mn2pdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.22.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
mn2pdf converts Metanorma XML into PDF.
|
@@ -41,7 +41,7 @@ homepage: https://github.com/metanorma/mn2pdf-ruby
|
|
41
41
|
licenses:
|
42
42
|
- BSD-2-Clause
|
43
43
|
metadata: {}
|
44
|
-
post_install_message:
|
44
|
+
post_install_message:
|
45
45
|
rdoc_options: []
|
46
46
|
require_paths:
|
47
47
|
- lib
|
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
57
|
version: '0'
|
58
58
|
requirements: []
|
59
59
|
rubygems_version: 3.0.3
|
60
|
-
signing_key:
|
60
|
+
signing_key:
|
61
61
|
specification_version: 4
|
62
62
|
summary: mn2pdf converts Metanorma XML into PDF.
|
63
63
|
test_files: []
|