relaton-cli 1.10.2 → 1.12.1
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/rake.yml +1 -24
- data/.rubocop.yml +1 -1
- data/Gemfile +0 -3
- data/docs/README.adoc +6 -1
- data/exe/relaton +1 -1
- data/lib/relaton/bibdata.rb +4 -4
- data/lib/relaton/cli/command.rb +1 -1
- data/lib/relaton/cli/data_fetcher.rb +5 -0
- data/lib/relaton/cli/version.rb +1 -1
- data/relaton-cli.gemspec +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8074140a5ba32702090bcbdbfd17d42512851778e987f08334e876774b1c5318
|
4
|
+
data.tar.gz: d8ab90de3ab533e3f57656acf1f5a82c031f9953889725db9a0c07351484d58b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1664fe4f25c48f7880894ce33ce42697e9ac7edb55ee324c17bf704e3ce00d3bc39ea349842aab328b23f1312ebc81860273ce648dce9b5201d28e38c1f15f46
|
7
|
+
data.tar.gz: 2bfbb9f0b8ce7860bfb141b0eafb7f00c618e9459d5dc6e561ac11cac59f44fcaffb294038f556b3b7eb8788024fe634777895007bfc636bf9e3d836d2060b34
|
data/.github/workflows/rake.yml
CHANGED
@@ -10,27 +10,4 @@ on:
|
|
10
10
|
|
11
11
|
jobs:
|
12
12
|
rake:
|
13
|
-
|
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
|
-
# https://github.com/ruby-debug/debase/issues/89#issuecomment-686827382
|
28
|
-
- if: matrix.os == 'macos-latest' && matrix.ruby == '2.5'
|
29
|
-
run: echo BUNDLE_BUILD__DEBASE="--with-cflags=\"-Wno-error=implicit-function-declaration\"" >> $GITHUB_ENV
|
30
|
-
|
31
|
-
- uses: ruby/setup-ruby@v1
|
32
|
-
with:
|
33
|
-
ruby-version: ${{ matrix.ruby }}
|
34
|
-
bundler-cache: true
|
35
|
-
|
36
|
-
- run: bundle exec rake
|
13
|
+
uses: relaton/support/.github/workflows/rake.yml@master
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
data/docs/README.adoc
CHANGED
@@ -71,12 +71,15 @@ Foloowing datasets are availabe:
|
|
71
71
|
* `ogc-naming-authority` - https://raw.githubusercontent.com/opengeospatial/NamingAuthority/master/incubation/bibliography/bibliography.json
|
72
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
73
|
* `w3c-rdf` - http://www.w3.org/2002/01/tr-automation/tr.rdf
|
74
|
+
* `w3c-tr-archive` - looks for the W3C archive dataset in local `./w3c-tr-archive` directory. The dataset could be downloaded from https://github.com/relaton/w3c-tr-archive repository
|
74
75
|
* `iana-registries` - https://github.com/ietf-ribose/iana-registries
|
75
76
|
* `status-smg-3GPP` - ftp://www.3gpp.org/Information/Databases/Spec_Status/
|
76
77
|
* `ietf-rfcsubseries` - https://www.rfc-editor.org/rfc-index.xml (`<bcp-entry>`, `<fyi-entry>`, `<std-entry>`)
|
77
78
|
* `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
79
|
* `ietf-rfc-entries` - https://www.rfc-editor.org/rfc-index.xml (`<rfc-entry>`)
|
79
80
|
* `oasis-open` - https://www.oasis-open.org/standards/
|
81
|
+
* `bipm-data-outcomes` - looks for the BIPM dataset in local `./bipm-data-outcomes` directory. The dataset could be downloaded from https://github.com/metanorma/bipm-data-outcomes repository
|
82
|
+
* `si-brochure` - looks for the SI-Brochure dataset in local `./bipm-si-brocure` directory. The dataset could be downloaded from https://github.com/metanorma/bipm-si-brochure repository
|
80
83
|
|
81
84
|
Options:
|
82
85
|
|
@@ -195,6 +198,7 @@ root:
|
|
195
198
|
docid:
|
196
199
|
type: CC
|
197
200
|
id: CC 36000
|
201
|
+
primary: true
|
198
202
|
type: standard
|
199
203
|
title:
|
200
204
|
type: main
|
@@ -208,6 +212,7 @@ root:
|
|
208
212
|
docid:
|
209
213
|
type: CC
|
210
214
|
id: CC 34000
|
215
|
+
primary: true
|
211
216
|
type: standard
|
212
217
|
title:
|
213
218
|
type: main
|
@@ -421,7 +426,7 @@ $ relaton db fetch_all -e 8 -y 2018
|
|
421
426
|
<fetched>2021-04-01</fetched>
|
422
427
|
<title type="title-main" format="text/plain" language="en" script="Latn">Principles and rules for the structure and drafting of ISO and IEC documents</title>
|
423
428
|
<uri type="obp">https://www.iec.ch/members_experts/refdocs/iec/isoiecdir2%7Bed8.0.RLV%7Den.pdf</uri>
|
424
|
-
<docidentifier type="ISO">ISO/IEC DIR 2 IEC</docidentifier>
|
429
|
+
<docidentifier type="ISO" primary="true">ISO/IEC DIR 2 IEC</docidentifier>
|
425
430
|
<date type="published">
|
426
431
|
<on>2018-05-01</on>
|
427
432
|
</date>
|
data/exe/relaton
CHANGED
data/lib/relaton/bibdata.rb
CHANGED
@@ -44,9 +44,9 @@ module Relaton
|
|
44
44
|
|
45
45
|
def to_xml(opts = {})
|
46
46
|
options = { bibdata: true, date_format: :full }.merge(
|
47
|
-
opts.select { |k, _v| k.is_a? Symbol }
|
47
|
+
opts.select { |k, _v| k.is_a? Symbol },
|
48
48
|
)
|
49
|
-
@bibitem.to_xml
|
49
|
+
@bibitem.to_xml(**options)
|
50
50
|
end
|
51
51
|
|
52
52
|
def to_h
|
@@ -69,13 +69,13 @@ module Relaton
|
|
69
69
|
@bibitem.send meth, *args
|
70
70
|
elsif URL_TYPES.include? meth
|
71
71
|
link = @bibitem.link.detect do |l|
|
72
|
-
l.type == meth.to_s || meth == :uri && l.type.nil?
|
72
|
+
l.type == meth.to_s || (meth == :uri && l.type.nil?)
|
73
73
|
end
|
74
74
|
link&.content&.to_s
|
75
75
|
elsif URL_TYPES.include? meth.match(/^\w+(?==)/).to_s.to_sym
|
76
76
|
/^(?<type>\w+)/ =~ meth
|
77
77
|
link = @bibitem.link.detect do |l|
|
78
|
-
l.type == type || type == "uri" && l.type.nil?
|
78
|
+
l.type == type || (type == "uri" && l.type.nil?)
|
79
79
|
end
|
80
80
|
if link
|
81
81
|
link.content = args[0]
|
data/lib/relaton/cli/command.rb
CHANGED
@@ -3,6 +3,11 @@ module Relaton
|
|
3
3
|
module DataFetcher
|
4
4
|
def fetch(source, options)
|
5
5
|
processor = Relaton::Registry.instance.find_processor_by_dataset source
|
6
|
+
unless processor
|
7
|
+
warn "[relaton-cli] WARNING: no processor found for #{source}"
|
8
|
+
return
|
9
|
+
end
|
10
|
+
|
6
11
|
opts = {}
|
7
12
|
opts[:output] = options[:output] if options[:output]
|
8
13
|
opts[:format] = options[:format] if options[:format]
|
data/lib/relaton/cli/version.rb
CHANGED
data/relaton-cli.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.bindir = "exe"
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
|
-
spec.required_ruby_version = ">= 2.
|
23
|
+
spec.required_ruby_version = ">= 2.6.0"
|
24
24
|
|
25
25
|
spec.add_development_dependency "byebug", "~> 11.0"
|
26
26
|
# spec.add_development_dependency "debase"
|
@@ -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", "~> 1.
|
39
|
+
spec.add_runtime_dependency "relaton", "~> 1.12.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.12.1
|
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-
|
11
|
+
date: 2022-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|
@@ -170,14 +170,14 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 1.
|
173
|
+
version: 1.12.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.12.0
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: thor
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -264,7 +264,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
264
264
|
requirements:
|
265
265
|
- - ">="
|
266
266
|
- !ruby/object:Gem::Version
|
267
|
-
version: 2.
|
267
|
+
version: 2.6.0
|
268
268
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
269
269
|
requirements:
|
270
270
|
- - ">="
|