metanorma-bipm 1.2.2 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f9652ed0417da543c2ac78f8b3c1f07523d3263955edd4ebb56ed7d6ad62acd
4
- data.tar.gz: 253e9177d7beb3a0607b486ea0be4a44551cb3b22804a2211f10906d2ddc063d
3
+ metadata.gz: 04e8a940bb602417adbbd2d5dafd80355eb30dd5eb68849d1e5f6235266c5ede
4
+ data.tar.gz: b94d3e7801ecbb2bfb6cd2ce90b617b52808cb5c7a36e54493a122a661b1e1dd
5
5
  SHA512:
6
- metadata.gz: c070212a333befb8e336548e30f914d2f8197bdda5691735fb51d0d589190dd3ea761f05de0b6acd809f3b31f7809e84232bf577238a400fa6e2d5a6c4b7a44b
7
- data.tar.gz: 3803393ec0101d70da575bfafa9af9a2aa3a5d56deea989561fd9d2f77d51b92cce0293f0cd49bf1863f347063438f9508efcf72e4e16a230b3b4a2676428672
6
+ metadata.gz: 92c6b89ab656a9d8d0288e292c151e046af5773ecae72223fc8ef3b4c44ebd9f6be467dee48cd15e6af4c65d7cb3affa973e7dc0512b3a77dd64412a83bdf997
7
+ data.tar.gz: a747ba21ed7ae9ba2b1d4f2546ef786e48946afcf6820b722668442bf912dd9444b4f958875843ee97c1af222fb8b76b3449415213d8e1c39e768d261683d6cb
@@ -9,35 +9,7 @@ on:
9
9
  pull_request:
10
10
 
11
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: [ '3.0', '2.7', '2.6', '2.5' ]
20
- os: [ ubuntu-latest, windows-latest, macos-latest ]
21
- experimental: [ false ]
22
- steps:
23
- - uses: actions/checkout@v2
24
- with:
25
- submodules: true
26
-
27
- - uses: ruby/setup-ruby@v1
28
- with:
29
- ruby-version: ${{ matrix.ruby }}
30
- bundler-cache: true
31
-
32
- - run: bundle exec rake
33
-
34
- tests-passed:
35
- needs: rake
36
- runs-on: ubuntu-latest
37
- steps:
38
- - uses: peter-evans/repository-dispatch@v1
39
- with:
40
- token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
41
- repository: ${{ github.repository }}
42
- event-type: tests-passed
43
- client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
12
+ notify:
13
+ uses: metanorma/metanorma-build-scripts/.github/workflows/mn-processor-rake.yml@main
14
+ secrets:
15
+ pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
data/.gitignore CHANGED
@@ -2,3 +2,5 @@
2
2
  /.byebug_history
3
3
  /.rspec_status
4
4
  /coverage/
5
+ /Gemfile.devel
6
+ /Gemfile.lock
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "asciidoctor/vsd"
4
+ require "metanorma/bipm"
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -8,7 +8,8 @@ module IsoDoc
8
8
  end
9
9
 
10
10
  def convert1(docxml, filename, dir)
11
- @jcgm = docxml&.at(ns("//bibdata/ext/editorialgroup/committee/@acronym"))&.value == "JCGM"
11
+ @jcgm = docxml&.at(ns("//bibdata/ext/editorialgroup/committee/"\
12
+ "@acronym"))&.value == "JCGM"
12
13
  super
13
14
  end
14
15
 
@@ -45,7 +46,7 @@ module IsoDoc
45
46
  identifiers = render_identifier(ids)
46
47
  if biblio then ref_entry_code(ref, ordinal, identifiers, ids)
47
48
  else
48
- ref << identifiers[0] || identifiers[1]
49
+ ref << (identifiers[0] || identifiers[1])
49
50
  ref << " #{identifiers[1]}" if identifiers[0] && identifiers[1]
50
51
  end
51
52
  ref << " " unless biblio && !identifiers[1]
@@ -58,7 +59,7 @@ module IsoDoc
58
59
  identifiers = render_identifier(bibitem_ref_code(bibitem))
59
60
  if biblio then ref_entry_code(ref, ordinal, identifiers, nil)
60
61
  else
61
- ref << identifiers[0] || identifiers[1]
62
+ ref << (identifiers[0] || identifiers[1])
62
63
  ref << " #{identifiers[1]}" if identifiers[0] && identifiers[1]
63
64
  end
64
65
  date_note_process(bibitem, ref)
@@ -71,16 +72,6 @@ module IsoDoc
71
72
  @jcgm ? docxml : super
72
73
  end
73
74
 
74
- def termref_cleanup(docxml)
75
- docxml
76
- .gsub(/\s*\[MODIFICATION\]\s*\[\/TERMREF\]/,
77
- l10n(", #{@i18n.modified} [/TERMREF]"))
78
- .gsub(%r{\s*\[/TERMREF\]\s*</p>\s*<p>\s*\[TERMREF\]}, "; ")
79
- .gsub(/\[TERMREF\]\s*/, l10n("[#{@i18n.source} "))
80
- .gsub(%r{\s*\[/TERMREF\]\s*}, l10n("]"))
81
- .gsub(/\s*\[MODIFICATION\]/, l10n(", #{@i18n.modified} &mdash; "))
82
- end
83
-
84
75
  def error_parse(node, out)
85
76
  case node.name
86
77
  when "blacksquare" then blacksquare_parse(node, out)