mn2sts 1.5.0 → 1.7.0
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 +42 -0
- data/.github/workflows/release-tag.yml +1 -1
- data/.gitignore +1 -0
- data/.rubocop.yml +6 -0
- data/README.adoc +1 -1
- data/bin/mn2sts.jar +0 -0
- data/lib/mn2sts.rb +19 -13
- data/lib/mn2sts/version.rb +1 -1
- metadata +5 -6
- data/.github/workflows/macos.yml +0 -39
- data/.github/workflows/ubuntu.yml +0 -53
- data/.github/workflows/windows.yml +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84134e4826fac149e49b29741ebad354ac2e8d0b402e433aaa61c1af6d1d98c4
|
4
|
+
data.tar.gz: eecd2dfeddf705273eb3fc9b74429b3011c10f620f23cac835f1115d791652f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d5d3bae86be38ea48e9edca1f5dd94ced9f282b15f43fa6a8cef1fc7dbaff2019e2994bd1a14e22171b70890f0eb04e8a60e2d02d0153e711b9c8fddacc2a02
|
7
|
+
data.tar.gz: d3ff1a5f058b4df8484abb3d089b2b42b2e0a7a915a347b52f1a3f112df26235ef1d2e9a7c50ca7ab807f23da1b6684642e37a128b8c7a59c32d0795c9e8978a
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
|
+
name: rake
|
4
|
+
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
branches: [ master, main ]
|
8
|
+
tags: [ v* ]
|
9
|
+
pull_request:
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
rake:
|
13
|
+
name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
|
14
|
+
runs-on: ${{ matrix.os }}
|
15
|
+
continue-on-error: ${{ matrix.experimental }}
|
16
|
+
strategy:
|
17
|
+
fail-fast: false
|
18
|
+
matrix:
|
19
|
+
ruby: [ '2.7', '2.6', '2.5', '2.4' ]
|
20
|
+
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
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
|
+
steps:
|
33
|
+
- uses: actions/checkout@v2
|
34
|
+
with:
|
35
|
+
submodules: true
|
36
|
+
|
37
|
+
- uses: ruby/setup-ruby@v1
|
38
|
+
with:
|
39
|
+
ruby-version: ${{ matrix.ruby }}
|
40
|
+
bundler-cache: true
|
41
|
+
|
42
|
+
- run: bundle exec rake
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
# This project follows the Ribose OSS style guide.
|
2
|
+
# https://github.com/riboseinc/oss-guides
|
3
|
+
# All project-specific additions and overrides should be specified in this file.
|
4
|
+
|
5
|
+
inherit_from:
|
6
|
+
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
|
data/README.adoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= mn2sts Ruby gem
|
2
2
|
|
3
|
-
image:https://img.shields.io/gem/v/
|
3
|
+
image:https://img.shields.io/gem/v/mn2sts.svg["Gem Version", link="https://rubygems.org/gems/mn2sts"]
|
4
4
|
image:https://github.com/metanorma/mn2sts-ruby/workflows/ubuntu/badge.svg["Ubuntu Build Status", link="https://github.com/metanorma/mn2sts-ruby/actions?query=workflow%3Aubuntu"]
|
5
5
|
image:https://github.com/metanorma/mn2sts-ruby/workflows/macos/badge.svg["OSX Build Status", link="https://github.com/metanorma/mn2sts-ruby/actions?query=workflow%3Amacos"]
|
6
6
|
image:https://github.com/metanorma/mn2sts-ruby/workflows/windows/badge.svg["Windows Build Status", link="https://github.com/metanorma/mn2sts-ruby/actions?query=workflow%3Awindows"]
|
data/bin/mn2sts.jar
CHANGED
Binary file
|
data/lib/mn2sts.rb
CHANGED
@@ -1,29 +1,36 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "open3"
|
2
|
+
require "mn2sts/version"
|
3
3
|
|
4
4
|
module Mn2sts
|
5
|
-
MN2STS_JAR_PATH = File.join(File.dirname(__FILE__),
|
5
|
+
MN2STS_JAR_PATH = File.join(File.dirname(__FILE__), "../bin/mn2sts.jar")
|
6
|
+
|
7
|
+
def self.jvm_options
|
8
|
+
options = []
|
9
|
+
|
10
|
+
if RbConfig::CONFIG["host_os"].match?(/darwin|mac os/)
|
11
|
+
options << "-Dapple.awt.UIElement=true"
|
12
|
+
end
|
13
|
+
|
14
|
+
options
|
15
|
+
end
|
6
16
|
|
7
17
|
def self.help
|
8
|
-
cmd = [
|
9
|
-
message,
|
18
|
+
cmd = ["java", *jvm_options, "-jar", MN2STS_JAR_PATH].join(" ")
|
19
|
+
message, = Open3.capture3(cmd)
|
10
20
|
message
|
11
21
|
end
|
12
22
|
|
13
23
|
def self.version
|
14
|
-
cmd = [
|
15
|
-
message,
|
24
|
+
cmd = ["java", *jvm_options, "-jar", MN2STS_JAR_PATH, "-v"].join(" ")
|
25
|
+
message, = Open3.capture3(cmd)
|
16
26
|
message.strip
|
17
27
|
end
|
18
28
|
|
19
29
|
def self.convert(xml_path_in, xml_path_out, opts = {})
|
20
30
|
return if xml_path_in.nil? || xml_path_out.nil?
|
21
31
|
|
22
|
-
|
23
|
-
|
24
|
-
'--xml-file-in', xml_path_in,
|
25
|
-
'--xml-file-out', xml_path_out
|
26
|
-
].join(' ')
|
32
|
+
cmd = ["java", "-Xss5m", "-Xmx1024m", *jvm_options, "-jar", MN2STS_JAR_PATH,
|
33
|
+
"--xml-file-in", xml_path_in, "--xml-file-out", xml_path_out].join(" ")
|
27
34
|
|
28
35
|
cmd += " --output-format iso" if opts[:iso]
|
29
36
|
|
@@ -35,5 +42,4 @@ module Mn2sts
|
|
35
42
|
raise error_str
|
36
43
|
end
|
37
44
|
end
|
38
|
-
|
39
45
|
end
|
data/lib/mn2sts/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mn2sts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
mn2sts converts Metanorma XML into NISO STS XML.
|
@@ -20,13 +20,12 @@ executables: []
|
|
20
20
|
extensions: []
|
21
21
|
extra_rdoc_files: []
|
22
22
|
files:
|
23
|
-
- ".github/workflows/
|
23
|
+
- ".github/workflows/rake.yml"
|
24
24
|
- ".github/workflows/release-tag.yml"
|
25
25
|
- ".github/workflows/release.yml"
|
26
|
-
- ".github/workflows/ubuntu.yml"
|
27
|
-
- ".github/workflows/windows.yml"
|
28
26
|
- ".gitignore"
|
29
27
|
- ".rspec"
|
28
|
+
- ".rubocop.yml"
|
30
29
|
- CODE_OF_CONDUCT.md
|
31
30
|
- Gemfile
|
32
31
|
- README.adoc
|
@@ -56,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
55
|
- !ruby/object:Gem::Version
|
57
56
|
version: '0'
|
58
57
|
requirements: []
|
59
|
-
rubygems_version: 3.
|
58
|
+
rubygems_version: 3.1.4
|
60
59
|
signing_key:
|
61
60
|
specification_version: 4
|
62
61
|
summary: mn2sts converts Metanorma XML into NISO STS XML.
|
data/.github/workflows/macos.yml
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
name: macos
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
branches: [ master ]
|
8
|
-
pull_request:
|
9
|
-
paths-ignore:
|
10
|
-
- .github/workflows/ubuntu.yml
|
11
|
-
- .github/workflows/windows.yml
|
12
|
-
|
13
|
-
jobs:
|
14
|
-
test-macos:
|
15
|
-
name: Test on Ruby ${{ matrix.ruby }} macOS
|
16
|
-
runs-on: macos-latest
|
17
|
-
continue-on-error: ${{ matrix.experimental }}
|
18
|
-
strategy:
|
19
|
-
fail-fast: false
|
20
|
-
matrix:
|
21
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
22
|
-
experimental: [false]
|
23
|
-
include:
|
24
|
-
- ruby: '2.7'
|
25
|
-
experimental: true
|
26
|
-
steps:
|
27
|
-
- uses: actions/checkout@master
|
28
|
-
- name: Use Ruby
|
29
|
-
uses: actions/setup-ruby@v1
|
30
|
-
with:
|
31
|
-
ruby-version: ${{ matrix.ruby }}
|
32
|
-
architecture: 'x64'
|
33
|
-
- name: Update gems
|
34
|
-
run: |
|
35
|
-
sudo gem install bundler --force
|
36
|
-
bundle install --jobs 4 --retry 3
|
37
|
-
- name: Run specs
|
38
|
-
run: |
|
39
|
-
bundle exec rake
|
@@ -1,53 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
name: ubuntu
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
branches: [ master ]
|
8
|
-
tags:
|
9
|
-
- '*'
|
10
|
-
pull_request:
|
11
|
-
paths-ignore:
|
12
|
-
- .github/workflows/macos.yml
|
13
|
-
- .github/workflows/windows.yml
|
14
|
-
|
15
|
-
jobs:
|
16
|
-
test-linux:
|
17
|
-
name: Test on Ruby ${{ matrix.ruby }} Ubuntu
|
18
|
-
runs-on: ubuntu-latest
|
19
|
-
continue-on-error: ${{ matrix.experimental }}
|
20
|
-
strategy:
|
21
|
-
fail-fast: false
|
22
|
-
matrix:
|
23
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
24
|
-
experimental: [false]
|
25
|
-
include:
|
26
|
-
- ruby: '2.7'
|
27
|
-
experimental: true
|
28
|
-
steps:
|
29
|
-
- uses: actions/checkout@master
|
30
|
-
- name: Use Ruby
|
31
|
-
uses: actions/setup-ruby@v1
|
32
|
-
with:
|
33
|
-
ruby-version: ${{ matrix.ruby }}
|
34
|
-
architecture: 'x64'
|
35
|
-
- name: Update gems
|
36
|
-
run: |
|
37
|
-
gem install bundler
|
38
|
-
bundle install --jobs 4 --retry 3
|
39
|
-
- name: Run specs
|
40
|
-
run: |
|
41
|
-
bundle exec rake
|
42
|
-
- name: Trigger dependent repositories
|
43
|
-
if: github.ref == 'refs/heads/master' && matrix.ruby == '2.6'
|
44
|
-
env:
|
45
|
-
GH_USERNAME: ${{ secrets.PAT_USERNAME }}
|
46
|
-
GH_ACCESS_TOKEN: ${{ secrets.PAT_TOKEN }}
|
47
|
-
run: |
|
48
|
-
curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/trigger-gh-actions.sh
|
49
|
-
[[ -f ".github/workflows/dependent_repos.env" ]] && source .github/workflows/dependent_repos.env
|
50
|
-
for repo in $DEPENDENT_REPOS
|
51
|
-
do
|
52
|
-
sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY "{ \"ref\": \"${GITHUB_REF}\" }"
|
53
|
-
done
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
name: windows
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
branches: [ master ]
|
8
|
-
pull_request:
|
9
|
-
paths-ignore:
|
10
|
-
- .github/workflows/macos.yml
|
11
|
-
- .github/workflows/ubuntu.yml
|
12
|
-
|
13
|
-
jobs:
|
14
|
-
test-windows:
|
15
|
-
name: Test on Ruby ${{ matrix.ruby }} Windows
|
16
|
-
runs-on: windows-latest
|
17
|
-
continue-on-error: ${{ matrix.experimental }}
|
18
|
-
strategy:
|
19
|
-
fail-fast: false
|
20
|
-
matrix:
|
21
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
22
|
-
experimental: [false]
|
23
|
-
include:
|
24
|
-
- ruby: '2.7'
|
25
|
-
experimental: true
|
26
|
-
steps:
|
27
|
-
- uses: actions/checkout@master
|
28
|
-
- name: Use Ruby
|
29
|
-
uses: actions/setup-ruby@v1
|
30
|
-
with:
|
31
|
-
ruby-version: ${{ matrix.ruby }}
|
32
|
-
architecture: 'x64'
|
33
|
-
- name: Update gems
|
34
|
-
shell: pwsh
|
35
|
-
run: |
|
36
|
-
gem install bundler
|
37
|
-
bundle config --local path vendor/bundle
|
38
|
-
bundle install --jobs 4 --retry 3
|
39
|
-
- name: Run specs
|
40
|
-
run: |
|
41
|
-
bundle exec rake
|