relaton-nist 1.11.3 → 1.11.4

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: b6b0ce8787fdc41eb5b334df6e1d8f65c2bbfe6437ab8b36124d917c7549a869
4
- data.tar.gz: d9b3bd1f467450a874ba8f9bc8d98c669a3296a0014c6083b248522bb4f6cd2a
3
+ metadata.gz: bd5360f481616f8a73bdc1f9be82bb5f94bb71a5d3d6c495e301862d7e445c4b
4
+ data.tar.gz: 0563adfa8d462ec73b9546902d426e347c36ef2d286f518dd7dcf25225ad9238
5
5
  SHA512:
6
- metadata.gz: beb5e04d0d431263d209e5172a419b940afe614888fd7a9158c360b7277d61312edf8824fef3989608a543c3bb36bd8612d1e737a07e7349d027aa9578d6c829
7
- data.tar.gz: f46f37e146aedc51b9d91896ba38604af5bb95cc93e2d19c17e4f3894cffe5adac98fd05b176aa6830bed802b30e8163371d38caa25021742dc91fc8b0d11a10
6
+ metadata.gz: ade1d018045194a89b6f9e34e7f78ef4979b33c73a9a1dd6a3cbe65101040bc734c188c4e9e658b59412d2c5071d0ea80c74e05c73dde050d795381f685cd023
7
+ data.tar.gz: cb6339da72a21fb733f5abe3922b2c9e62b1d01214400a872db7244b39a0db52af04233463f0a3093f50c03227cc21a709a86c18b6aff1842340dffee447b75d
@@ -16,7 +16,7 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '3.0', '2.7', '2.6', '2.5' ]
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
@@ -7,6 +7,6 @@ require: rubocop-rails
7
7
  inherit_from:
8
8
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
9
9
  AllCops:
10
- TargetRubyVersion: 2.5
10
+ TargetRubyVersion: 2.6
11
11
  Rails:
12
12
  Enabled: false
@@ -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
- fref = RelatonBib::FormattedRef.new content: rdoi.text
111
- bibitem = RelatonBib::BibliographicItem.new formattedref: fref
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 }
@@ -1,3 +1,3 @@
1
1
  module RelatonNist
2
- VERSION = "1.11.3".freeze
2
+ VERSION = "1.11.4".freeze
3
3
  end
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.5.0")
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.3
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-06 00:00:00.000000000 Z
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.5.0
205
+ version: 2.6.0
206
206
  required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  requirements:
208
208
  - - ">="