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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 566d5b5ffb2a58c2d3b24f4c11fcceba7ab0c6f1e6490b19583dc2ed9c2c2722
4
- data.tar.gz: aa9202fe0306336241bf7fafcf8c24111819175d54e9c51bba133c65394f2e0c
3
+ metadata.gz: 9ad292c63a7a396addd53b783a43b4f5e511c09b434d4145e495ac00428b2bba
4
+ data.tar.gz: 782ee5b6d37e5774b97d2d0ff0f00aa2dc9fc0ac7630476ad743fd695381933d
5
5
  SHA512:
6
- metadata.gz: d8994ac34a230e7c16f65da65680ef4dc235f19faffa28b91c754dc48bfeceb9fc848b388ce973aec5c385d3e30cc7bc6dd51e91e4ac2980c40ec07a4254c567
7
- data.tar.gz: 430308b6a21f43054f4f275162c5df940946a344691b184357ec9b3690dbfe6bb69eafd82e99e52b133c31fbe12908fc7e2e4ef4c756b073fca196c8cb1dbb84
6
+ metadata.gz: 21a6eb1330b2e742d4b39dcc1eaad9ecac3b4f14ae7ef0cf9a1e8900b148b281d58ebca6890e416606cbccc0b3bcb152c06a2854ec973121ef3b6abdb7110714
7
+ data.tar.gz: 2e9eb875056d2ad42c37aaaec76d345abfc0d63a9b2e61f1a0d89c75b4737f5879e22b094163b98ce56bfe6682a119ff9d2bb357deae6b55058b2057f9deee00
@@ -29,7 +29,6 @@ jobs:
29
29
  uses: actions/setup-ruby@v1
30
30
  with:
31
31
  ruby-version: ${{ matrix.ruby }}
32
- architecture: 'x64'
33
32
  - name: Update gems
34
33
  run: |
35
34
  sudo gem install bundler --force
@@ -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 dependent repositories
43
- if: github.ref == 'refs/heads/master' && matrix.ruby == '2.6'
41
+ - name: Trigger repositories
42
+ if: matrix.ruby == '2.6'
44
43
  env:
45
- GH_USERNAME: ${{ secrets.PAT_USERNAME }}
46
- GH_ACCESS_TOKEN: ${{ secrets.PAT_TOKEN }}
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
- for repo in $DEPENDENT_REPOS
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 "{ \"ref\": \"${GITHUB_REF}\" }"
55
+ sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY "$CLIENT_PAYLOAD"
53
56
  done
@@ -29,7 +29,6 @@ jobs:
29
29
  uses: actions/setup-ruby@v1
30
30
  with:
31
31
  ruby-version: ${{ matrix.ruby }}
32
- architecture: 'x64'
33
32
  - name: Update gems
34
33
  shell: pwsh
35
34
  run: |
@@ -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].
Binary file
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Mn2pdf
2
- VERSION = '1.18'
2
+ VERSION = '1.22.1'
3
3
  end
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: '1.18'
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-06-24 00:00:00.000000000 Z
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: []