relaton-cli 1.9.2 → 1.10.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 +4 -4
- data/.github/workflows/release.yml +45 -0
- data/.rubocop.yml +2 -0
- data/docs/README.adoc +14 -2
- data/lib/relaton/bibcollection.rb +1 -1
- data/lib/relaton/cli/command.rb +1 -1
- data/lib/relaton/cli/relaton_file.rb +4 -4
- data/lib/relaton/cli/version.rb +1 -1
- data/relaton-cli.gemspec +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 253d46095706637189e0d28bb584efc5fb5ac68447fb2e89932f2a4f64a3dfdd
|
|
4
|
+
data.tar.gz: 590f760cd45390bf0b0a23d5b23e6e712f197b81e780762eb523cfd2d9e2401d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d3cca50ccb35ee6f60cf5ebc0aaaec39929c80406a3ad44c068eb15211561f1681797c99ec3b3bfbfbd58d45b79f8e3df88050f5ec1c436e75a49ecce1a17a57
|
|
7
|
+
data.tar.gz: c3a8afe715237accb7e0f5826321820c48d01aa54385ee45c403bc8f197c4349ff432847f3a4f0ff4fd565c7cc285ef586a5d13ca549655a96e10b49ca381df4
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
|
2
|
+
# See https://github.com/metanorma/cimas
|
|
3
|
+
name: release
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
next_version:
|
|
9
|
+
description: |
|
|
10
|
+
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
|
|
11
|
+
required: true
|
|
12
|
+
default: 'skip'
|
|
13
|
+
push:
|
|
14
|
+
tags: [ v* ]
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
release:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v2
|
|
21
|
+
|
|
22
|
+
- uses: ruby/setup-ruby@v1
|
|
23
|
+
with:
|
|
24
|
+
ruby-version: '2.6'
|
|
25
|
+
bundler-cache: true
|
|
26
|
+
|
|
27
|
+
- run: gem install gem-release
|
|
28
|
+
|
|
29
|
+
- run: |
|
|
30
|
+
git config user.name github-actions
|
|
31
|
+
git config user.email github-actions@github.com
|
|
32
|
+
|
|
33
|
+
- if: github.event_name == 'workflow_dispatch' && github.event.inputs.next_version != 'skip'
|
|
34
|
+
run: gem bump --version ${{ github.event.inputs.next_version }} --tag --push
|
|
35
|
+
|
|
36
|
+
- name: publish to rubygems.org
|
|
37
|
+
env:
|
|
38
|
+
RUBYGEMS_API_KEY: ${{secrets.RELATON_CI_RUBYGEMS_API_KEY}}
|
|
39
|
+
run: |
|
|
40
|
+
envsubst << 'EOF' > ~/.gem/credentials
|
|
41
|
+
---
|
|
42
|
+
:rubygems_api_key: ${RUBYGEMS_API_KEY}
|
|
43
|
+
EOF
|
|
44
|
+
chmod 0600 ~/.gem/credentials
|
|
45
|
+
gem release
|
data/.rubocop.yml
CHANGED
data/docs/README.adoc
CHANGED
|
@@ -49,7 +49,7 @@ Fetch the Relaton XML entry corresponding to the document identifier `CODE`.
|
|
|
49
49
|
|
|
50
50
|
* `YEAR` is optional, and specifies the year of publication of the standard.
|
|
51
51
|
* `FORMAT` is optional, and specifies the output format; the recognised values for `FORMAT` are `xml` (default), yaml, `bibtex`.
|
|
52
|
-
* `TYPE` is optional, specifies the standards class library to be used, that the identifier is part of. The recognised values for `TYPE` are `BIPM
|
|
52
|
+
* `TYPE` is optional, specifies the standards class library to be used, that the identifier is part of. The recognised values for `TYPE` are `3GPP, BIPM, BSI, CC, CEN, CIE, CN, ECMA, IANA, IEC, IEEE, IETF, IHO, ISO, ITU, NIST, OGC, OMG, UN, W3C`.
|
|
53
53
|
* `RETRIES` is optional, number of network retries (default 1).
|
|
54
54
|
* `--all-parts` fetch all parts.
|
|
55
55
|
* `--keep-year` undated reference should return actual reference with year.
|
|
@@ -66,11 +66,23 @@ Fetch all the documents from a `DATASET` source and save them to a folder `DIR`
|
|
|
66
66
|
Foloowing datasets are availabe:
|
|
67
67
|
|
|
68
68
|
* `nist-tech-pubs` - https://raw.githubusercontent.com/usnistgov/NIST-Tech-Pubs/nist-pages/xml/allrecords.xml
|
|
69
|
+
* `cie-techstreet` - https://www.techstreet.com/cie/searches/31156444
|
|
70
|
+
* `calconnect-org` - https://standards.calconnect.org/relaton/index.yaml
|
|
71
|
+
* `ogc-naming-authority` - https://raw.githubusercontent.com/opengeospatial/NamingAuthority/master/incubation/bibliography/bibliography.json
|
|
72
|
+
* `ieee-rawbib` - looks for the IEEE dataset in local `./ieee-rawbib` directory. The dataset could be downloaded from https://github.com/ietf-ribose/ieee-rawbib repository
|
|
73
|
+
* `w3c-rdf` - http://www.w3.org/2002/01/tr-automation/tr.rdf
|
|
74
|
+
* `iana-registries` - https://github.com/ietf-ribose/iana-registries
|
|
75
|
+
* `status-smg-3GPP` - ftp://www.3gpp.org/Information/Databases/Spec_Status/
|
|
76
|
+
* `ietf-rfcsubseries` - https://www.rfc-editor.org/rfc-index.xml (`<bcp-entry>`, `<fyi-entry>`, `<std-entry>`)
|
|
77
|
+
* `ietf-internet-drafts` - looks for the Internet-Drafts dataset in local `./bibxml-ids` directory. The dataset could be downloaded using `rsync -avcizxL rsync.ietf.org::bibxml-ids ./bibxml-ids` command.
|
|
78
|
+
* `ietf-rfc-entries` - https://www.rfc-editor.org/rfc-index.xml (`<rfc-entry>`)
|
|
69
79
|
|
|
70
80
|
Options:
|
|
71
81
|
|
|
72
82
|
* `DIR` - floder name to store documents (default `./data`).
|
|
73
|
-
* `FORMAT` - format in which the documents are saved. Possimle formats are: `yaml`, `xml` (default `yaml`).
|
|
83
|
+
* `FORMAT` - format in which the documents are saved. Possimle formats are: `yaml`, `xml`, `bibxml` (default `yaml`).
|
|
84
|
+
|
|
85
|
+
=== relaton extract
|
|
74
86
|
|
|
75
87
|
[source,console]
|
|
76
88
|
----
|
data/lib/relaton/cli/command.rb
CHANGED
|
@@ -144,7 +144,7 @@ module Relaton
|
|
|
144
144
|
|
|
145
145
|
desc "fetch-data SOURCE", "Fetch all the documents from a source"
|
|
146
146
|
option :output, aliases: :o, desc: "Output dir. Default: ./data/"
|
|
147
|
-
option :format, aliases: :f, desc: "Output format (yaml, xml). Default: yaml"
|
|
147
|
+
option :format, aliases: :f, desc: "Output format (yaml, xml, bibxml). Default: yaml"
|
|
148
148
|
|
|
149
149
|
def fetch_data(source)
|
|
150
150
|
DataFetcher.fetch source, options
|
|
@@ -117,8 +117,8 @@ module Relaton
|
|
|
117
117
|
if (bib = xml.at("//bibdata"))
|
|
118
118
|
bib = nokogiri_document(bib.to_xml)
|
|
119
119
|
elsif (rfc = xml.at("//rfc"))
|
|
120
|
-
require "relaton_ietf/
|
|
121
|
-
ietf = RelatonIetf::
|
|
120
|
+
require "relaton_ietf/bibxml_parser"
|
|
121
|
+
ietf = RelatonIetf::BibXMLParser.fetch_rfc rfc
|
|
122
122
|
bib = nokogiri_document ietf.to_xml(bibdata: true)
|
|
123
123
|
else
|
|
124
124
|
next
|
|
@@ -142,8 +142,8 @@ module Relaton
|
|
|
142
142
|
xml_files.flatten.reduce([]) do |mem, xml|
|
|
143
143
|
doc = nokogiri_document(xml[:content])
|
|
144
144
|
if (rfc = doc.at("/rfc"))
|
|
145
|
-
require "relaton_ietf/
|
|
146
|
-
ietf = RelatonIetf::
|
|
145
|
+
require "relaton_ietf/bibxml_parser"
|
|
146
|
+
ietf = RelatonIetf::BibXMLParser.fetch_rfc rfc
|
|
147
147
|
d = nokogiri_document ietf.to_xml(bibdata: true)
|
|
148
148
|
mem << bibdata_instance(d, xml[:file])
|
|
149
149
|
elsif %w[bibitem bibdata].include? doc&.root&.name
|
data/lib/relaton/cli/version.rb
CHANGED
data/relaton-cli.gemspec
CHANGED
|
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
|
|
|
36
36
|
spec.add_development_dependency "webmock"
|
|
37
37
|
|
|
38
38
|
spec.add_runtime_dependency "liquid", "~> 4"
|
|
39
|
-
spec.add_runtime_dependency "relaton", "
|
|
39
|
+
spec.add_runtime_dependency "relaton", "~> 1.10.0"
|
|
40
40
|
spec.add_runtime_dependency "thor"
|
|
41
41
|
spec.add_runtime_dependency "thor-hollaback"
|
|
42
42
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relaton-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.10.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: 2022-01-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: byebug
|
|
@@ -168,16 +168,16 @@ dependencies:
|
|
|
168
168
|
name: relaton
|
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
|
170
170
|
requirements:
|
|
171
|
-
- - "
|
|
171
|
+
- - "~>"
|
|
172
172
|
- !ruby/object:Gem::Version
|
|
173
|
-
version: 1.
|
|
173
|
+
version: 1.10.0
|
|
174
174
|
type: :runtime
|
|
175
175
|
prerelease: false
|
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
|
177
177
|
requirements:
|
|
178
|
-
- - "
|
|
178
|
+
- - "~>"
|
|
179
179
|
- !ruby/object:Gem::Version
|
|
180
|
-
version: 1.
|
|
180
|
+
version: 1.10.0
|
|
181
181
|
- !ruby/object:Gem::Dependency
|
|
182
182
|
name: thor
|
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -217,6 +217,7 @@ extra_rdoc_files:
|
|
|
217
217
|
- LICENSE
|
|
218
218
|
files:
|
|
219
219
|
- ".github/workflows/rake.yml"
|
|
220
|
+
- ".github/workflows/release.yml"
|
|
220
221
|
- ".gitignore"
|
|
221
222
|
- ".hound.yml"
|
|
222
223
|
- ".rspec"
|