mn2pdf 1.41.1 → 1.42

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: 0f6b75a4c0cb45a4c674233bd1375d83636d08428d0a85dfa7c4b49cd84f0a96
4
- data.tar.gz: 26caeb9c3f8a3f7ad24c565e9515aad2701e248dc2a97efab5e139f5adb3c1a3
3
+ metadata.gz: db62f71291a732bacb13e82a70ec9cb01f0d69a080789d5e902d84e4cf4af4ff
4
+ data.tar.gz: 8f37a061dce13a8dcd177d13d60ced92b748931e0ec07d50238b1664e804a810
5
5
  SHA512:
6
- metadata.gz: 15b8bfc72495756a092fe272037a1bbe988054fcde62e7398694e0c04d664f6c949416274496f7970b199ebdc4c047d8c443f635d4ccbdb26a92385373283082
7
- data.tar.gz: 95073bc9550325ac5435e71c21249a992ffdcb74118f87631c81c84086809c08a481484e3089405439cf85403c0b4455d8d82c95ffcbba6a15d060b3738e7572
6
+ metadata.gz: bc4e9b4719bd80929a8afcbd4c807fbff780c7be89708e085a6f9ff94f637609b6a0c9b66075a89e3c337d80e77ba5fbaf9577cb7aef05940c56694b1a691747
7
+ data.tar.gz: 9ea36a7f942960412485261396183f0a6c0ac2a753e72a2d24cf4e2f759113fb08c63aaae2917fa6359c9c95c15f20eca8402e70b75ce894012369be42d336b2
@@ -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@v1
13
- - name: Add writable remote
14
- run: |
15
- git config --global user.name "metanorma-ci"
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
- echo MN2PDF_VERSION=${MN2PDF_TAG#*/v} >> ${GITHUB_ENV}
24
- - name: Use Ruby
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
- architecture: 'x64'
29
- - name: Update gems
30
- run: |
31
- gem install gem-release
32
- gem install bundler
33
- bundle install --jobs 4 --retry 3
34
- - name: Update version
35
- run: |
36
- gem bump --version ${MN2PDF_VERSION} --no-commit
37
- - name: Update mn2pdf.jar
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 add -u bin/mn2pdf.jar lib/mn2pdf/version.rb
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 github HEAD:${GITHUB_REF} --tags
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: rm -f bin/mn2pdf.jar && bundle exec rake bin/mn2pdf.jar
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
@@ -10,3 +10,7 @@
10
10
 
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
+
14
+ .rubocop-http*
15
+
16
+ /bin/mn2pdf.jar
data/Rakefile CHANGED
@@ -1,17 +1,26 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
- require_relative 'lib/mn2pdf/version'
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 :default => :spec
8
+ task default: ["bin/mn2pdf.jar", :spec]
8
9
 
9
- require 'open-uri'
10
+ def jar_url(ver)
11
+ "https://github.com/metanorma/mn2pdf/releases/download/v#{ver}/mn2pdf-#{ver}.jar"
12
+ end
10
13
 
11
- file 'bin/mn2pdf.jar' do |file|
12
- ver = Mn2pdf::MN2PDF_JAR_VERSION
13
- url = "https://github.com/metanorma/mn2pdf/releases/download/v#{ver}/mn2pdf-#{ver}.jar"
14
- File.open(file.name, 'wb') do |file|
15
- file.write open(url).read
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
- end
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
@@ -1,4 +1,4 @@
1
1
  module Mn2pdf
2
- VERSION = "1.41.1".freeze
3
- MN2PDF_JAR_VERSION = "1.41".freeze
2
+ VERSION = "1.42".freeze
3
+ MN2PDF_JAR_VERSION = VERSION
4
4
  end
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.41.1
4
+ version: '1.42'
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-02-11 00:00:00.000000000 Z
11
+ date: 2022-04-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  mn2pdf converts Metanorma XML into PDF.
@@ -60,4 +60,5 @@ 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