relaton-ieee 1.10.0 → 1.10.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: 1b9712be210c320461271c9271cea901d24b5c5988beea4708ac074e42c02814
4
- data.tar.gz: b4438ca4aa0097d8fafe1e87884ddda1fd44b92eb3ad3661064f7078974d414f
3
+ metadata.gz: 22f50c0f1e9e83d204ee448b8d107f47d6cf4d7679958c924a7bdd90f95926e0
4
+ data.tar.gz: a9d6a839d5d32583e16ad6e19e712165e920d6fda2d7f0fb62c80dee037e1aa7
5
5
  SHA512:
6
- metadata.gz: fc3595268bd4b0f45c10041e2ff17feb2e1bd56b327f527f9602aef84a8082141433ed0b1048cb7cf104250da9dcc734ce04250437ea6b0104e3e862f64c4d67
7
- data.tar.gz: f110efe4119d5721df536ef066c146dae9bc75ca6205af2171cdd310e8d5c9a336960fcde6f71e4391ca2ba300c2c53c403716d563c4848d6ae9c258152b250c
6
+ metadata.gz: 2673c4dc352e3a3bdd1ee47aa5898d1eedb0eb3b363622f029caf4a34482c1fe681281f57481652a03b07af5b9daa611e25c4ee180f8bd43db6ea4eee14bdf8a
7
+ data.tar.gz: 62e9c7bf873f1f7942ca1acd0cbe2cb83a8c1928f1881269045d154b820f44cc19c03830afc30fd10bc6987c30944414c496bc0b9258602add729c74c0d8fdeb
data/grammars/biblio.rng CHANGED
@@ -209,9 +209,6 @@
209
209
  <zeroOrMore>
210
210
  <ref name="contact"/>
211
211
  </zeroOrMore>
212
- <zeroOrMore>
213
- <ref name="uri"/>
214
- </zeroOrMore>
215
212
  </element>
216
213
  </define>
217
214
  <define name="fullname">
@@ -828,6 +825,11 @@
828
825
  <optional>
829
826
  <attribute name="scope"/>
830
827
  </optional>
828
+ <optional>
829
+ <attribute name="primary">
830
+ <data type="boolean"/>
831
+ </attribute>
832
+ </optional>
831
833
  <text/>
832
834
  </element>
833
835
  </define>
@@ -114,7 +114,7 @@ module RelatonIeee
114
114
  # @return [Array<RelatonBib::DocumentIdentifier>]
115
115
  #
116
116
  def parse_docid
117
- ids = [{ id: pubid.to_s, type: "IEEE" }]
117
+ ids = [{ id: pubid.to_s, type: "IEEE", primary: true }]
118
118
  isbn = doc.at("./publicationinfo/isbn")
119
119
  ids << { id: isbn.text, type: "ISBN" } if isbn
120
120
  doi = doc.at("./volume/article/articleinfo/articledoi")
@@ -21,10 +21,7 @@ module RelatonIeee
21
21
  resp = Faraday.post url, { action: "ieee_cloudsearch", q: query }
22
22
  json = JSON.parse resp.body
23
23
  html = Nokogiri::HTML json["html"]
24
- # @array = json["results"]["hits"]["hit"].reduce([]) do |s, hit|
25
24
  @array = html.xpath("//h4/a").reduce([]) do |s, hit|
26
- # fields = hit["fields"]
27
- # ref = html.at("//h4/a[@href='#{fields['doc_id_l']}']").text.strip
28
25
  ref = hit.text.strip
29
26
  /^(?:\w+\s)?(?<code2>[A-Z\d.]+)(?:-(?<year>\d{4}))?/ =~ ref
30
27
  next s unless code2 && code1 =~ %r{^#{code2}}
@@ -38,7 +38,7 @@ module RelatonIeee
38
38
  # @param ref [String]
39
39
  # @return [Array<RelatonBib::DocumentIdentifier>]
40
40
  def fetch_docid(ref)
41
- [RelatonBib::DocumentIdentifier.new(id: ref, type: "IEEE")]
41
+ [RelatonBib::DocumentIdentifier.new(id: ref, type: "IEEE", primary: true)]
42
42
  end
43
43
 
44
44
  # @param url [String]
@@ -1,3 +1,3 @@
1
1
  module RelatonIeee
2
- VERSION = "1.10.0".freeze
2
+ VERSION = "1.10.1".freeze
3
3
  end
data/relaton_ieee.gemspec CHANGED
@@ -38,6 +38,6 @@ Gem::Specification.new do |spec|
38
38
  spec.add_development_dependency "webmock"
39
39
 
40
40
  spec.add_dependency "faraday", "~> 1.1"
41
- spec.add_dependency "relaton-bib", "~> 1.10.0"
41
+ spec.add_dependency "relaton-bib", "~> 1.10.1"
42
42
  spec.add_dependency "rubyzip", "~> 2.3.0"
43
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-ieee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.10.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-01-30 00:00:00.000000000 Z
11
+ date: 2022-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.10.0
103
+ version: 1.10.1
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.10.0
110
+ version: 1.10.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rubyzip
113
113
  requirement: !ruby/object:Gem::Requirement