mnconvert 1.79.0 → 2.0.0
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.
Potentially problematic release.
This version of mnconvert might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +10 -30
- data/.github/workflows/release-manual.yml +33 -0
- data/.github/workflows/release-tag.yml +10 -32
- data/.github/workflows/release.yml +27 -50
- data/.gitignore +0 -2
- data/Rakefile +9 -10
- data/bin/mnconvert.jar +0 -0
- data/lib/mnconvert/version.rb +2 -2
- data/lib/mnconvert.rb +1 -2
- data/mnconvert.gemspec +1 -1
- metadata +8 -9
- data/.github/RELEASE_ISSUE_TEMPLATE.md +0 -5
- data/.github/workflows/prepare.yml +0 -57
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7a283a92498bf3b58ab9943115c3c989537a64f820ee60b9fe61af28417a095a
|
|
4
|
+
data.tar.gz: 406f771bee4bb2aca206ba9d8e45ce84461719ff09e39cc037b9890d07d25ec4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 28228d72d77dd8adb749de865da095bb3bba3ecb81e6c3b2a03872e149d3a17807b7a45bb8c1b3ce33b05c2cf27f7d7a5a613bf80efb3a033c1c470d8d9b6852
|
|
7
|
+
data.tar.gz: 727e72075bf44398b34f7d25b9ee5d5844e744a08badeef1ffa64801210266c67ec8e24b60b3a54c660004ee7e8fae09494f52b205bb9df94807c4df6794fd96
|
data/.github/workflows/rake.yml
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
|
2
|
+
# See https://github.com/metanorma/cimas
|
|
1
3
|
name: rake
|
|
2
4
|
|
|
3
5
|
on:
|
|
@@ -5,48 +7,26 @@ on:
|
|
|
5
7
|
branches: [ master, main ]
|
|
6
8
|
tags: [ v* ]
|
|
7
9
|
pull_request:
|
|
8
|
-
workflow_dispatch:
|
|
9
10
|
|
|
10
11
|
jobs:
|
|
11
|
-
prepare:
|
|
12
|
-
uses: metanorma/ci/.github/workflows/prepare-rake.yml@main
|
|
13
|
-
|
|
14
|
-
prepare-ieee:
|
|
15
|
-
uses: ./.github/workflows/prepare.yml
|
|
16
|
-
secrets:
|
|
17
|
-
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
|
18
|
-
|
|
19
12
|
rake:
|
|
20
|
-
name: Test on Ruby ${{ matrix.ruby
|
|
13
|
+
name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
|
|
21
14
|
runs-on: ${{ matrix.os }}
|
|
22
|
-
|
|
23
|
-
needs: [prepare, prepare-ieee]
|
|
24
|
-
if: needs.prepare.outputs.push-for-tag != 'true'
|
|
25
|
-
|
|
26
|
-
concurrency:
|
|
27
|
-
group: '${{ github.workflow }}-${{ matrix.os }}-${{ matrix.ruby.version }}-${{ github.head_ref || github.ref_name }}'
|
|
28
|
-
cancel-in-progress: true
|
|
29
|
-
|
|
30
|
-
continue-on-error: ${{ matrix.ruby.experimental }}
|
|
15
|
+
continue-on-error: ${{ matrix.experimental }}
|
|
31
16
|
strategy:
|
|
32
17
|
fail-fast: false
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
18
|
+
matrix:
|
|
19
|
+
ruby: [ '3.0', '2.7', '2.6', '2.5' ]
|
|
20
|
+
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
|
21
|
+
experimental: [ false ]
|
|
36
22
|
steps:
|
|
37
|
-
- uses: actions/checkout@
|
|
23
|
+
- uses: actions/checkout@v2
|
|
38
24
|
with:
|
|
39
25
|
submodules: true
|
|
40
26
|
|
|
41
27
|
- uses: ruby/setup-ruby@v1
|
|
42
28
|
with:
|
|
43
|
-
ruby-version: ${{ matrix.ruby
|
|
29
|
+
ruby-version: ${{ matrix.ruby }}
|
|
44
30
|
bundler-cache: true
|
|
45
|
-
rubygems: ${{ matrix.ruby.rubygems }}
|
|
46
|
-
|
|
47
|
-
- uses: actions/download-artifact@v4.1.7
|
|
48
|
-
with:
|
|
49
|
-
name: ieee-test-input
|
|
50
|
-
path: ieee
|
|
51
31
|
|
|
52
32
|
- run: bundle exec rake
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: release-manual
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
next_version:
|
|
7
|
+
description: |
|
|
8
|
+
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
|
|
9
|
+
required: true
|
|
10
|
+
default: 'skip'
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v2
|
|
17
|
+
with:
|
|
18
|
+
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
|
19
|
+
|
|
20
|
+
- run: |
|
|
21
|
+
git config --global user.name "metanorma-ci"
|
|
22
|
+
git config --global user.email "metanorma-ci@users.noreply.github.com"
|
|
23
|
+
|
|
24
|
+
- uses: ruby/setup-ruby@v1
|
|
25
|
+
with:
|
|
26
|
+
ruby-version: '2.6'
|
|
27
|
+
bundler-cache: true
|
|
28
|
+
|
|
29
|
+
- run: gem install gem-release
|
|
30
|
+
|
|
31
|
+
- if: github.event_name == 'workflow_dispatch' && github.event.inputs.next_version != 'skip'
|
|
32
|
+
run: gem bump --version ${{ github.event.inputs.next_version }} --tag --push
|
|
33
|
+
|
|
@@ -5,28 +5,14 @@ on:
|
|
|
5
5
|
types: [ metanorma/mnconvert ]
|
|
6
6
|
|
|
7
7
|
jobs:
|
|
8
|
-
prepare:
|
|
9
|
-
uses: metanorma/ci/.github/workflows/prepare-rake.yml@main
|
|
10
|
-
|
|
11
|
-
prepare-ieee:
|
|
12
|
-
uses: ./.github/workflows/prepare.yml
|
|
13
|
-
secrets:
|
|
14
|
-
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
|
15
|
-
|
|
16
8
|
tag_repo:
|
|
17
|
-
runs-on: ubuntu-
|
|
18
|
-
if: startsWith(github.event.client_payload.ref, 'refs/tags/v')
|
|
19
|
-
needs: [ prepare, prepare-ieee ]
|
|
9
|
+
runs-on: ubuntu-18.04
|
|
10
|
+
if: false # startsWith(github.event.client_payload.ref, 'refs/tags/v')
|
|
20
11
|
steps:
|
|
21
|
-
- uses: actions/checkout@
|
|
12
|
+
- uses: actions/checkout@v2
|
|
22
13
|
with:
|
|
23
14
|
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
|
24
15
|
|
|
25
|
-
- uses: actions/download-artifact@v4.1.7
|
|
26
|
-
with:
|
|
27
|
-
name: ieee-test-input
|
|
28
|
-
path: ieee
|
|
29
|
-
|
|
30
16
|
- run: |
|
|
31
17
|
git config --global user.name "metanorma-ci"
|
|
32
18
|
git config --global user.email "metanorma-ci@users.noreply.github.com"
|
|
@@ -37,14 +23,16 @@ jobs:
|
|
|
37
23
|
|
|
38
24
|
- uses: ruby/setup-ruby@v1
|
|
39
25
|
with:
|
|
40
|
-
ruby-version:
|
|
26
|
+
ruby-version: '2.6'
|
|
41
27
|
bundler-cache: true
|
|
42
28
|
|
|
43
|
-
- run:
|
|
44
|
-
gem install gem-release
|
|
45
|
-
gem bump --version ${mnconvert_VERSION} --no-commit
|
|
29
|
+
- run: gem install gem-release
|
|
46
30
|
|
|
47
|
-
- run:
|
|
31
|
+
- run: gem bump --version ${mnconvert_VERSION} --no-commit
|
|
32
|
+
|
|
33
|
+
- run: |
|
|
34
|
+
rm -f bin/mnconvert.jar
|
|
35
|
+
rake bin/mnconvert.jar
|
|
48
36
|
|
|
49
37
|
- run: bundle exec rake
|
|
50
38
|
|
|
@@ -54,13 +42,3 @@ jobs:
|
|
|
54
42
|
git commit -m "Bump version to ${mnconvert_VERSION}"
|
|
55
43
|
git tag v${mnconvert_VERSION}
|
|
56
44
|
git push origin HEAD:${GITHUB_REF} --tags
|
|
57
|
-
|
|
58
|
-
- if: failure()
|
|
59
|
-
uses: JasonEtco/create-an-issue@v2
|
|
60
|
-
env:
|
|
61
|
-
GITHUB_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
|
62
|
-
with:
|
|
63
|
-
assignees: CAMOBAP
|
|
64
|
-
update_existing: true
|
|
65
|
-
search_existing: all
|
|
66
|
-
filename: .github/RELEASE_ISSUE_TEMPLATE.md
|
|
@@ -4,61 +4,38 @@ on:
|
|
|
4
4
|
push:
|
|
5
5
|
tags:
|
|
6
6
|
- '*'
|
|
7
|
-
workflow_dispatch:
|
|
8
|
-
inputs:
|
|
9
|
-
next_version:
|
|
10
|
-
description: |
|
|
11
|
-
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
|
|
12
|
-
required: true
|
|
13
|
-
default: 'skip'
|
|
14
7
|
|
|
15
8
|
jobs:
|
|
16
|
-
prepare:
|
|
17
|
-
uses: metanorma/ci/.github/workflows/prepare-rake.yml@main
|
|
18
|
-
|
|
19
|
-
prepare-ieee:
|
|
20
|
-
uses: ./.github/workflows/prepare.yml
|
|
21
|
-
secrets:
|
|
22
|
-
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
|
23
|
-
|
|
24
9
|
release:
|
|
25
|
-
runs-on: ubuntu-
|
|
26
|
-
needs: [ prepare, prepare-ieee ]
|
|
10
|
+
runs-on: ubuntu-18.04
|
|
27
11
|
steps:
|
|
28
|
-
- uses: actions/checkout@
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
git config user.name "metanorma-ci"
|
|
32
|
-
git config user.email "metanorma-ci@users.noreply.github.com"
|
|
33
|
-
|
|
34
|
-
- uses: ruby/setup-ruby@v1
|
|
12
|
+
- uses: actions/checkout@v1
|
|
13
|
+
- name: Use Ruby
|
|
14
|
+
uses: actions/setup-ruby@v1
|
|
35
15
|
with:
|
|
36
|
-
ruby-version:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- run: gem install gem-release
|
|
45
|
-
|
|
46
|
-
- if: github.event_name == 'workflow_dispatch' && inputs.next_version != 'skip'
|
|
16
|
+
ruby-version: '2.6'
|
|
17
|
+
architecture: 'x64'
|
|
18
|
+
- name: Update gems
|
|
19
|
+
run: |
|
|
20
|
+
gem install bundler
|
|
21
|
+
bundle install --jobs 4 --retry 3
|
|
22
|
+
- name: Update mnconvert.jar
|
|
47
23
|
run: |
|
|
48
|
-
gem bump --version ${{ inputs.next_version }} --no-commit
|
|
49
24
|
rm -f bin/mnconvert.jar
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- run: bundle exec rake
|
|
53
|
-
|
|
54
|
-
- if: github.event_name == 'workflow_dispatch' && inputs.next_version != 'skip'
|
|
25
|
+
rake bin/mnconvert.jar
|
|
26
|
+
- name: Run specs
|
|
55
27
|
run: |
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
28
|
+
bundle exec rake
|
|
29
|
+
- name: Publish to rubygems.org
|
|
30
|
+
env:
|
|
31
|
+
RUBYGEMS_API_KEY: ${{secrets.METANORMA_CI_RUBYGEMS_API_KEY}}
|
|
32
|
+
run: |
|
|
33
|
+
gem install gem-release
|
|
34
|
+
touch ~/.gem/credentials
|
|
35
|
+
cat > ~/.gem/credentials << EOF
|
|
36
|
+
---
|
|
37
|
+
:rubygems_api_key: ${RUBYGEMS_API_KEY}
|
|
38
|
+
EOF
|
|
39
|
+
chmod 0600 ~/.gem/credentials
|
|
40
|
+
git status
|
|
41
|
+
gem release
|
data/.gitignore
CHANGED
data/Rakefile
CHANGED
|
@@ -20,32 +20,31 @@ end
|
|
|
20
20
|
file "bin/mnconvert.jar" do |file|
|
|
21
21
|
ver = MnConvert::MNCONVERT_JAR_VERSION
|
|
22
22
|
url = "https://github.com/metanorma/mnconvert/releases/download/v#{ver}/mnconvert-#{ver}.jar"
|
|
23
|
-
puts "Downloading... #{url}"
|
|
24
23
|
File.open(file.name, "wb") do |f|
|
|
25
24
|
f.write uri_open(url).read
|
|
26
25
|
end
|
|
27
26
|
end
|
|
28
27
|
|
|
29
28
|
file "spec/fixtures/rice-en.cd.mn.xml" do |file|
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
uri = "https://raw.githubusercontent.com/metanorma/mn-samples-iso/gh-pages/documents/international-standard/rice-en.cd.xml"
|
|
30
|
+
|
|
32
31
|
File.open(file.name, "w") do |saved_file|
|
|
33
|
-
saved_file.write(uri_open(
|
|
32
|
+
saved_file.write(uri_open(uri).read)
|
|
34
33
|
end
|
|
35
34
|
end
|
|
36
35
|
|
|
37
36
|
file "spec/fixtures/rice-en.final.sts.xml" do |file|
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
uri = "https://raw.githubusercontent.com/metanorma/sts2mn/master/src/test/resources/rice-en.final.sts.xml"
|
|
38
|
+
|
|
40
39
|
File.open(file.name, "w") do |saved_file|
|
|
41
|
-
saved_file.write(uri_open(
|
|
40
|
+
saved_file.write(uri_open(uri).read)
|
|
42
41
|
end
|
|
43
42
|
end
|
|
44
43
|
|
|
45
44
|
file "spec/fixtures/rfc8650.xml" do |file|
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
uri = "https://raw.githubusercontent.com/metanorma/mnconvert/main/src/test/resources/rfc/rfc8650.xml"
|
|
46
|
+
|
|
48
47
|
File.open(file.name, "w") do |saved_file|
|
|
49
|
-
saved_file.write(uri_open(
|
|
48
|
+
saved_file.write(uri_open(uri).read)
|
|
50
49
|
end
|
|
51
50
|
end
|
data/bin/mnconvert.jar
CHANGED
|
Binary file
|
data/lib/mnconvert/version.rb
CHANGED
data/lib/mnconvert.rb
CHANGED
|
@@ -58,7 +58,6 @@ module MnConvert
|
|
|
58
58
|
output_format: "--output-format",
|
|
59
59
|
output_file: "--output",
|
|
60
60
|
xsl_file: "--xsl-file",
|
|
61
|
-
validation_against: "--validation-against",
|
|
62
61
|
}.freeze
|
|
63
62
|
|
|
64
63
|
def java_cmd
|
|
@@ -80,7 +79,7 @@ module MnConvert
|
|
|
80
79
|
end
|
|
81
80
|
|
|
82
81
|
def validate_mn(opts, output_format)
|
|
83
|
-
unless output_format.nil? || %w(iso niso
|
|
82
|
+
unless output_format.nil? || %w(iso niso).include?(output_format.to_s)
|
|
84
83
|
raise StandardError.new("Invalid output format: #{output_format}")
|
|
85
84
|
end
|
|
86
85
|
|
data/mnconvert.gemspec
CHANGED
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
|
20
20
|
spec.require_paths = ["lib"]
|
|
21
21
|
spec.files = `git ls-files`.split("\n")
|
|
22
22
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
|
23
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.
|
|
23
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
|
24
24
|
|
|
25
25
|
# Specify which files should be added to the gem when it is released.
|
|
26
26
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mnconvert
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
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:
|
|
11
|
+
date: 2021-11-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |
|
|
14
14
|
mnconvert converts Metanorma XML into NISO STS XML.
|
|
@@ -20,9 +20,8 @@ executables: []
|
|
|
20
20
|
extensions: []
|
|
21
21
|
extra_rdoc_files: []
|
|
22
22
|
files:
|
|
23
|
-
- ".github/RELEASE_ISSUE_TEMPLATE.md"
|
|
24
|
-
- ".github/workflows/prepare.yml"
|
|
25
23
|
- ".github/workflows/rake.yml"
|
|
24
|
+
- ".github/workflows/release-manual.yml"
|
|
26
25
|
- ".github/workflows/release-tag.yml"
|
|
27
26
|
- ".github/workflows/release.yml"
|
|
28
27
|
- ".gitignore"
|
|
@@ -43,7 +42,7 @@ homepage: https://github.com/metanorma/mnconvert-ruby
|
|
|
43
42
|
licenses:
|
|
44
43
|
- BSD-2-Clause
|
|
45
44
|
metadata: {}
|
|
46
|
-
post_install_message:
|
|
45
|
+
post_install_message:
|
|
47
46
|
rdoc_options: []
|
|
48
47
|
require_paths:
|
|
49
48
|
- lib
|
|
@@ -51,15 +50,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
51
50
|
requirements:
|
|
52
51
|
- - ">="
|
|
53
52
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 2.
|
|
53
|
+
version: 2.4.0
|
|
55
54
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
55
|
requirements:
|
|
57
56
|
- - ">="
|
|
58
57
|
- !ruby/object:Gem::Version
|
|
59
58
|
version: '0'
|
|
60
59
|
requirements: []
|
|
61
|
-
rubygems_version: 3.
|
|
62
|
-
signing_key:
|
|
60
|
+
rubygems_version: 3.0.3.1
|
|
61
|
+
signing_key:
|
|
63
62
|
specification_version: 4
|
|
64
63
|
summary: mnconvert converts Metanorma XML into NISO STS XML.
|
|
65
64
|
test_files: []
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
name: prepare
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_call:
|
|
5
|
-
secrets:
|
|
6
|
-
pat_token:
|
|
7
|
-
required: false
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
prepare:
|
|
11
|
-
uses: metanorma/ci/.github/workflows/prepare-rake.yml@main
|
|
12
|
-
|
|
13
|
-
prepare-ieee:
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
needs: prepare
|
|
16
|
-
concurrency:
|
|
17
|
-
group: '${{ github.workflow }}-${{ github.head_ref || github.ref_name }}'
|
|
18
|
-
cancel-in-progress: true
|
|
19
|
-
steps:
|
|
20
|
-
- run: mkdir ieee
|
|
21
|
-
|
|
22
|
-
- uses: actions/checkout@v3
|
|
23
|
-
with:
|
|
24
|
-
repository: metanorma/ieee-stl
|
|
25
|
-
ref: main
|
|
26
|
-
token: ${{ secrets.pat_token || github.token }}
|
|
27
|
-
path: ieee/stl
|
|
28
|
-
|
|
29
|
-
- uses: actions/checkout@v3
|
|
30
|
-
with:
|
|
31
|
-
repository: metanorma/mn-samples-ieee
|
|
32
|
-
path: ieee/samples
|
|
33
|
-
|
|
34
|
-
- uses: ruby/setup-ruby@v1
|
|
35
|
-
with:
|
|
36
|
-
ruby-version: ${{ needs.prepare.outputs.default-ruby-version }}
|
|
37
|
-
bundler-cache: true
|
|
38
|
-
working-directory: ieee/samples
|
|
39
|
-
|
|
40
|
-
- run: |
|
|
41
|
-
gem install fontist
|
|
42
|
-
fontist --version
|
|
43
|
-
fontist update
|
|
44
|
-
fontist install "STIX Two Math"
|
|
45
|
-
|
|
46
|
-
- uses: actions-mn/site-gen@v1
|
|
47
|
-
with:
|
|
48
|
-
source-path: ieee/samples
|
|
49
|
-
use-bundler: true
|
|
50
|
-
agree-to-terms: true
|
|
51
|
-
|
|
52
|
-
- uses: actions/upload-artifact@v4
|
|
53
|
-
with:
|
|
54
|
-
name: ieee-test-input
|
|
55
|
-
path: |
|
|
56
|
-
ieee/stl/standards-1-7-DTD/standards-1-7-dtd/
|
|
57
|
-
ieee/samples/_site/documents/p987.6/document.xml
|