relaton-nist 1.11.3 → 1.11.4
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 -5
- data/.rubocop.yml +1 -1
- data/lib/relaton_nist/data_fetcher.rb +5 -3
- data/lib/relaton_nist/version.rb +1 -1
- data/relaton_nist.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bd5360f481616f8a73bdc1f9be82bb5f94bb71a5d3d6c495e301862d7e445c4b
|
|
4
|
+
data.tar.gz: 0563adfa8d462ec73b9546902d426e347c36ef2d286f518dd7dcf25225ad9238
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ade1d018045194a89b6f9e34e7f78ef4979b33c73a9a1dd6a3cbe65101040bc734c188c4e9e658b59412d2c5071d0ea80c74e05c73dde050d795381f685cd023
|
|
7
|
+
data.tar.gz: cb6339da72a21fb733f5abe3922b2c9e62b1d01214400a872db7244b39a0db52af04233463f0a3093f50c03227cc21a709a86c18b6aff1842340dffee447b75d
|
data/.github/workflows/rake.yml
CHANGED
|
@@ -16,7 +16,7 @@ jobs:
|
|
|
16
16
|
strategy:
|
|
17
17
|
fail-fast: false
|
|
18
18
|
matrix:
|
|
19
|
-
ruby: [ '3.0', '2.7', '2.6'
|
|
19
|
+
ruby: [ '3.0', '2.7', '2.6' ]
|
|
20
20
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
|
21
21
|
experimental: [ false ]
|
|
22
22
|
steps:
|
|
@@ -24,10 +24,6 @@ jobs:
|
|
|
24
24
|
with:
|
|
25
25
|
submodules: true
|
|
26
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
27
|
- uses: ruby/setup-ruby@v1
|
|
32
28
|
with:
|
|
33
29
|
ruby-version: ${{ matrix.ruby }}
|
data/.rubocop.yml
CHANGED
|
@@ -103,12 +103,14 @@ module RelatonNist
|
|
|
103
103
|
|
|
104
104
|
# @param doc [Nokogiri::XML::Element]
|
|
105
105
|
# @return [Array<Hash>]
|
|
106
|
-
def fetch_relation(doc)
|
|
106
|
+
def fetch_relation(doc) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
|
107
107
|
ns = "http://www.crossref.org/relations.xsd"
|
|
108
108
|
doc.xpath("./ns:program/ns:related_item", ns: ns).map do |rel|
|
|
109
109
|
rdoi = rel.at_xpath("ns:intra_work_relation|ns:inter_work_relation", ns: ns)
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
id = rdoi.text.split("/")[1..].join("/").gsub(".", " ")
|
|
111
|
+
fref = RelatonBib::FormattedRef.new content: id
|
|
112
|
+
docid = RelatonBib::DocumentIdentifier.new(type: "NIST", id: id, primary: true)
|
|
113
|
+
bibitem = RelatonBib::BibliographicItem.new formattedref: fref, docid: [docid]
|
|
112
114
|
type = RELATION_TYPES[rdoi["relationship-type"]]
|
|
113
115
|
warn "Relation type #{rdoi['relationship-type']} not found" unless type
|
|
114
116
|
{ type: type, bibitem: bibitem }
|
data/lib/relaton_nist/version.rb
CHANGED
data/relaton_nist.gemspec
CHANGED
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
spec.bindir = "exe"
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
23
23
|
spec.require_paths = ["lib"]
|
|
24
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.
|
|
24
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
|
|
25
25
|
|
|
26
26
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
|
27
27
|
spec.add_development_dependency "pry-byebug"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relaton-nist
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.11.
|
|
4
|
+
version: 1.11.4
|
|
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-05-
|
|
11
|
+
date: 2022-05-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: equivalent-xml
|
|
@@ -202,7 +202,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
202
202
|
requirements:
|
|
203
203
|
- - ">="
|
|
204
204
|
- !ruby/object:Gem::Version
|
|
205
|
-
version: 2.
|
|
205
|
+
version: 2.6.0
|
|
206
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
207
|
requirements:
|
|
208
208
|
- - ">="
|