mn2pdf 1.41 → 1.44
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release-tag.yml +30 -29
- data/.github/workflows/release.yml +10 -1
- data/.gitignore +4 -0
- data/Rakefile +20 -11
- data/bin/mn2pdf.jar +0 -0
- data/lib/mn2pdf/version.rb +2 -1
- data/lib/mn2pdf.rb +3 -3
- data/mn2pdf.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 936eaf64d0aea6ed9ae25c32edd6169a90e80081aac15191f20fb0586480ff05
|
4
|
+
data.tar.gz: 3bdbb20e9a30232c9c3803121f441d157eff01aa8bc05c4e3adf6cc313f83070
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ceb38c1f4cd4547ba85c71085c1a6b8f2e73e32de96d8d9bbfee0eb2023ae12305568eac81a57f6d575769357c9e3a1ae96699fb86f5320f0e6b9792de25e55a
|
7
|
+
data.tar.gz: 664323a700fcc3baa3bdbaf9d64c3ee269b510a2312adb78319951711f6f967bef9442406294c48853b20edfdbf243dc455751e6bcf2859d876f666c3ef90ffc
|
@@ -9,41 +9,42 @@ jobs:
|
|
9
9
|
runs-on: ubuntu-18.04
|
10
10
|
if: startsWith(github.event.client_payload.ref, 'refs/tags/v')
|
11
11
|
steps:
|
12
|
-
- uses: actions/checkout@
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
git config --global user.email "metanorma-ci@users.noreply.github.com"
|
17
|
-
git remote add github "https://metanorma-ci:${{ secrets.METANORMA_CI_PAT_TOKEN }}@github.com/$GITHUB_REPOSITORY.git"
|
18
|
-
git pull github ${GITHUB_REF} --ff-only
|
12
|
+
- uses: actions/checkout@v2
|
13
|
+
with:
|
14
|
+
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
15
|
+
|
19
16
|
- name: Parse mn2pdf version
|
20
17
|
env:
|
21
18
|
MN2PDF_TAG: ${{ github.event.client_payload.ref }}
|
22
|
-
run:
|
23
|
-
|
24
|
-
-
|
25
|
-
uses: actions/setup-ruby@v1
|
19
|
+
run: echo MN2PDF_VERSION=${MN2PDF_TAG#*/v} >> ${GITHUB_ENV}
|
20
|
+
|
21
|
+
- uses: ruby/setup-ruby@v1
|
26
22
|
with:
|
27
23
|
ruby-version: '2.6'
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
run: |
|
39
|
-
rm -f bin/mn2pdf.jar
|
40
|
-
rake bin/mn2pdf.jar
|
41
|
-
- name: Run specs
|
42
|
-
run: |
|
43
|
-
bundle exec rake
|
24
|
+
bundler-cache: true
|
25
|
+
|
26
|
+
- run: gem install gem-release
|
27
|
+
|
28
|
+
- run: gem bump --version ${MN2PDF_VERSION} --no-commit
|
29
|
+
|
30
|
+
- run: bundle exec rake bin/mn2pdf.jar
|
31
|
+
|
32
|
+
- run: bundle exec rake
|
33
|
+
|
44
34
|
- name: Push commit and tag
|
45
35
|
run: |
|
46
|
-
git
|
36
|
+
git config --global user.name "metanorma-ci"
|
37
|
+
git config --global user.email "metanorma-ci@users.noreply.github.com"
|
38
|
+
git add -u lib/mn2pdf/version.rb
|
47
39
|
git commit -m "Bump version to ${MN2PDF_VERSION}"
|
48
40
|
git tag v${MN2PDF_VERSION}
|
49
|
-
git push
|
41
|
+
git push origin HEAD:${GITHUB_REF} --tags
|
42
|
+
|
43
|
+
- if: failure()
|
44
|
+
uses: JasonEtco/create-an-issue@v2
|
45
|
+
env:
|
46
|
+
GITHUB_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
47
|
+
with:
|
48
|
+
assignees: CAMOBAP
|
49
|
+
update_existing: true
|
50
|
+
search_existing: all
|
@@ -23,7 +23,7 @@ jobs:
|
|
23
23
|
ruby-version: '2.6'
|
24
24
|
bundler-cache: true
|
25
25
|
|
26
|
-
- run:
|
26
|
+
- run: bundle exec rake bin/mn2pdf.jar
|
27
27
|
|
28
28
|
- run: bundle exec rake
|
29
29
|
|
@@ -48,3 +48,12 @@ jobs:
|
|
48
48
|
chmod 0600 ~/.gem/credentials
|
49
49
|
gem release
|
50
50
|
|
51
|
+
- if: failure()
|
52
|
+
uses: JasonEtco/create-an-issue@v2
|
53
|
+
env:
|
54
|
+
GITHUB_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
55
|
+
with:
|
56
|
+
assignees: CAMOBAP
|
57
|
+
update_existing: true
|
58
|
+
search_existing: all
|
59
|
+
|
data/.gitignore
CHANGED
data/Rakefile
CHANGED
@@ -1,17 +1,26 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rspec/core/rake_task"
|
3
|
+
require "open-uri"
|
4
|
+
require_relative "lib/mn2pdf/version"
|
4
5
|
|
5
6
|
RSpec::Core::RakeTask.new(:spec)
|
6
7
|
|
7
|
-
task :
|
8
|
+
task default: ["bin/mn2pdf.jar", :spec]
|
8
9
|
|
9
|
-
|
10
|
+
def jar_url(ver)
|
11
|
+
"https://github.com/metanorma/mn2pdf/releases/download/v#{ver}/mn2pdf-#{ver}.jar"
|
12
|
+
end
|
10
13
|
|
11
|
-
file
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
file "bin/mn2pdf.jar" do |file|
|
15
|
+
if Mn2pdf::VERSION != Mn2pdf::MN2PDF_JAR_VERSION
|
16
|
+
begin
|
17
|
+
URI.parse(jar_url(Mn2pdf::VERSION)).open
|
18
|
+
abort(%(MN2PDF_JAR_VERSION in lib/mn2pdf/version.rb is outdated!
|
19
|
+
Assign VERSION to MN2PDF_JAR_VERSION))
|
20
|
+
rescue OpenURI::HTTPError, Errno::ENOENT
|
21
|
+
# expected
|
22
|
+
end
|
16
23
|
end
|
17
|
-
|
24
|
+
url = jar_url(Mn2pdf::MN2PDF_JAR_VERSION)
|
25
|
+
File.binwrite(file.name, URI.parse(url).read)
|
26
|
+
end
|
data/bin/mn2pdf.jar
CHANGED
Binary file
|
data/lib/mn2pdf/version.rb
CHANGED
data/lib/mn2pdf.rb
CHANGED
@@ -3,8 +3,6 @@ require "rbconfig"
|
|
3
3
|
require "tempfile"
|
4
4
|
require "yaml"
|
5
5
|
|
6
|
-
require "mn2pdf/version"
|
7
|
-
|
8
6
|
module Mn2pdf
|
9
7
|
MN2PDF_JAR_PATH = File.join(File.dirname(__FILE__), "../bin/mn2pdf.jar")
|
10
8
|
DEFAULT_JAVA_OPTS = ["-Xss5m", "-Xmx2048m"].freeze
|
@@ -47,7 +45,8 @@ module Mn2pdf
|
|
47
45
|
manifest = options.delete(FONTS_MANIFEST)
|
48
46
|
|
49
47
|
options.each do |k, v|
|
50
|
-
|
48
|
+
sep = k.to_s.end_with?("=") ? "" : " "
|
49
|
+
cmd << "#{k}#{sep}#{quote(v)}"
|
51
50
|
end
|
52
51
|
if manifest
|
53
52
|
dump_fontist_manifest_locations(manifest) do |manifest_path|
|
@@ -87,6 +86,7 @@ module Mn2pdf
|
|
87
86
|
end
|
88
87
|
|
89
88
|
def self.quote(str)
|
89
|
+
return "" if str.nil? || str.empty?
|
90
90
|
return str if /^'.*'$/.match(str) || /^".*"$/.match(str)
|
91
91
|
|
92
92
|
%("#{str}")
|
data/mn2pdf.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.bindir = "bin"
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
spec.files = `git ls-files`.split("\n")
|
22
|
-
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
22
|
+
spec.test_files = `git ls-files -- {spec}/*`.split("\n") << "bin/mn2pdf.jar"
|
23
23
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
24
24
|
|
25
25
|
# Specify which files should be added to the gem when it is released.
|
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.
|
4
|
+
version: '1.44'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
mn2pdf converts Metanorma XML into PDF.
|
@@ -56,8 +56,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '0'
|
58
58
|
requirements: []
|
59
|
-
rubygems_version: 3.0.3
|
59
|
+
rubygems_version: 3.0.3.1
|
60
60
|
signing_key:
|
61
61
|
specification_version: 4
|
62
62
|
summary: mn2pdf converts Metanorma XML into PDF.
|
63
|
-
test_files:
|
63
|
+
test_files:
|
64
|
+
- bin/mn2pdf.jar
|