metanorma 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 189106fda9c97a62268cdf23a26f7b10f9784cff4d9cdf590563c0f9e71aaea5
4
- data.tar.gz: feec6fdbfbcdb931b3ca3ce782d9ba35248481902e66ca515b94f60346217dfe
3
+ metadata.gz: 6a7eed0e26e4338f4485a309446b6d0c008dc76773d8672e7560fa672af77b70
4
+ data.tar.gz: a5d36260967385bb27afb23cfc024802e08809212acdbfc369bffa5c46c37196
5
5
  SHA512:
6
- metadata.gz: e6843c3813d6d378a320ccdec21e85174889a0634396a0e1e15eeaf82192bf80414a8e698a7818cfebc575a3925e46007c6a006964179979682e51ea49a173b5
7
- data.tar.gz: 972d7e156885833eab9f91e142dd427dea72093d0a7eee665b5229e6e1dbd41bed117c8e72a09d6be9b6f2360c11eec3fa70eb0eb84807f5656bc08b496f56fc
6
+ metadata.gz: 39e7761252dfc8467cd23fe1f5051c74a0c441b3cc8ff0d509793c8eaf04e7f135792ed34b12b1307a3cf85f593bb6b4f955feed831a3b0b1e156aa2a11a65de
7
+ data.tar.gz: 7a94bd3e934c6255ecaa5a153eaf286aaf34ae49f03b326e4dbf12d03cbe51fca18bf971de3c7c68b399ea82f57671c4cbfc0d060b58e4e893cc0d7799fcad7c
@@ -5,6 +5,7 @@ name: rake
5
5
  on:
6
6
  push:
7
7
  branches: [ master ]
8
+ tags: [ v* ]
8
9
  pull_request:
9
10
 
10
11
  jobs:
@@ -42,3 +43,17 @@ jobs:
42
43
 
43
44
  - name: Run specs
44
45
  run: bundle exec rake
46
+
47
+ notify:
48
+ name: Trigger notify workflow
49
+ needs: rake
50
+ runs-on: ubuntu-latest
51
+ steps:
52
+ - name: Trigger notify workflow
53
+ uses: Sibz/github-status-action@v1
54
+ with:
55
+ authToken: ${{ secrets.GITHUB_TOKEN }}
56
+ context: 'tests-passed-successfully'
57
+ description: 'Tests passed successfully'
58
+ state: 'success'
59
+ sha: ${{ github.event.pull_request.head.sha || github.sha }}
@@ -1,9 +1,7 @@
1
1
  = Metanorma: the standard for standards
2
2
 
3
3
  image:https://img.shields.io/gem/v/metanorma.svg["Gem Version", link="https://rubygems.org/gems/metanorma"]
4
- image:https://github.com/metanorma/metanorma/workflows/ubuntu/badge.svg["Ubuntu Build Status", link="https://github.com/metanorma/metanorma/actions?query=workflow%3Aubuntu"]
5
- image:https://github.com/metanorma/metanorma/workflows/macos/badge.svg["OSX Build Status", link="https://github.com/metanorma/metanorma/actions?query=workflow%3Amacos"]
6
- image:https://github.com/metanorma/metanorma/workflows/windows/badge.svg["Windows Build Status", link="https://github.com/metanorma/metanorma/actions?query=workflow%3Awindows"]
4
+ image:https://github.com/metanorma/metanorma/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/metanorma/actions?workflow=rake"]
7
5
  image:https://codeclimate.com/github/metanorma/metanorma/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma"]
8
6
  image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma.svg["Pull Requests", link="https://github.com/metanorma/metanorma/pulls"]
9
7
  image:https://img.shields.io/github/commits-since/metanorma/metanorma/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma/releases"]
@@ -250,6 +250,7 @@ module Metanorma
250
250
  newbib = bib.replace(@files[docid][:bibdata])
251
251
  newbib.name = "bibitem"
252
252
  newbib["id"] = id
253
+ newbib["hidden"] = "true"
253
254
  newbib&.at(ns("./ext"))&.remove
254
255
  _file, url = targetfile(@files[docid], false)
255
256
  uri_node = Nokogiri::XML::Node.new "uri", newbib
@@ -277,6 +278,9 @@ module Metanorma
277
278
  update_bibitem(b, identifier)
278
279
  update_anchors(b, docxml, docid)
279
280
  end
281
+ docxml.xpath(ns("//references[not(./bibitem[not(@hidden) or @hidden = 'false'])]")).each do |f|
282
+ f["hidden"] = "true"
283
+ end
280
284
  docxml.to_xml
281
285
  end
282
286
 
@@ -15,7 +15,7 @@ module Metanorma
15
15
  attr_accessor :logs
16
16
 
17
17
  def initialize
18
- @logs ||= [:warning, :error]
18
+ @logs ||= [:warning, :error, :fatal]
19
19
  end
20
20
  end
21
21
 
@@ -6,6 +6,10 @@ module Metanorma
6
6
  if log_types.include?(type.to_s)
7
7
  puts(message)
8
8
  end
9
+
10
+ if type == :fatal
11
+ exit(1)
12
+ end
9
13
  end
10
14
  end
11
15
  end
@@ -1,3 +1,3 @@
1
1
  module Metanorma
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -27,6 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.add_runtime_dependency 'htmlentities'
28
28
  spec.add_runtime_dependency 'nokogiri'
29
29
  spec.add_runtime_dependency 'mn2pdf', "~> 1"
30
+ spec.add_runtime_dependency 'pry'
30
31
  # get relaton-cli to avoic circular reference with metanorma-standoc
31
32
  #spec.add_dependency "relaton-cli"
32
33
  #spec.add_dependency "metanorma-standoc", "~> 1.5.3"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-25 00:00:00.000000000 Z
11
+ date: 2020-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rake
71
85
  requirement: !ruby/object:Gem::Requirement