relaton-ieee 1.14.0 → 1.14.2

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: 383e1ae1d3727c63bba4acc5c3cb17a482af4fa1c7131d84f3a9070fadba6386
4
- data.tar.gz: 54a83e78ac737d7f64b88758feed9c21a45689513d64c5080f70b9be85a5054b
3
+ metadata.gz: 9f1bc070e63196f97343ec48b9ab60164066da919793bdbf04b5da6b9df92703
4
+ data.tar.gz: ef8f715a5ee9ef65ed14b014953cd0ee63a05ca44e788010e1bcf334fd7c21b3
5
5
  SHA512:
6
- metadata.gz: c4efd69cb2c0203f0684128bc2bcab763d444493cc42414bf39abfa34c1340891456c15dcbf319db76e576a1bdd3b197181107166994b000fcd7f20f580ebd86
7
- data.tar.gz: 723fac784ac4e943910982e36161e0f3f58f9aa5b8040f2b29758eaa17be227f2c0a452a83c2dd7eaf8ccaa061244d5baf65b910e94c34a34d1efe093b3a5cd3
6
+ metadata.gz: 3506230a3c2c2b223cd7ca85fc2b1c78bfc146b3f31beaa7fafb16786e5a73b77b0fb1dee0469943aeb9159d0d5fda55bfdd3db7c4fa6754eb2bca40ba2914eb
7
+ data.tar.gz: 35d717ac1a6ee6e4e24531bb19106d0efcca3dc0fa9933f43a032d08d67053d93afbb44e6b6df4b7b484e931a5c1a3eb69eead70e9fe3aa2ab081466fc1c9031
@@ -157,12 +157,12 @@ module RelatonIeee
157
157
  def parse_contributor # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
158
158
  doc.xpath("./publicationinfo/publisher").map do |contrib|
159
159
  n = contrib.at("./publishername").text
160
- addr = contrib.xpath("./address").map do |a|
161
- RelatonBib::Address.new(
162
- street: [],
163
- city: a.at("./city")&.text,
164
- country: a.at("./country").text,
165
- )
160
+ addr = contrib.xpath("./address").each_with_object([]) do |adr, ob|
161
+ city = adr.at("./city")
162
+ next unless city
163
+
164
+ ob << RelatonBib::Address.new(street: [], city: city.text,
165
+ country: adr.at("./country").text)
166
166
  end
167
167
  e = create_org n, addr
168
168
  RelatonBib::ContributionInfo.new entity: e, role: [type: "publisher"]
@@ -229,7 +229,7 @@ module RelatonIeee
229
229
  #
230
230
  def parse_status
231
231
  stage = doc.at("./publicationinfo/standard_status").text.downcase
232
- stage.sub!("active", "approved").sub! "inactive", "withdrawn"
232
+ .sub("active", "approved").sub("inactive", "withdrawn")
233
233
  DocumentStatus.new stage: stage
234
234
  end
235
235
 
@@ -1,7 +1,7 @@
1
1
  module RelatonIeee
2
2
  class DocumentStatus < RelatonBib::DocumentStatus
3
3
  class Stage < RelatonBib::DocumentStatus::Stage
4
- STAGES = %w[developing active inactive].freeze
4
+ STAGES = %w[draft approved superseded withdrawn].freeze
5
5
 
6
6
  def initialize(value:, abbreviation: nil)
7
7
  unless STAGES.include?(value.downcase)
@@ -66,8 +66,14 @@ module RelatonIeee
66
66
  end
67
67
  end
68
68
 
69
+ #
70
+ # Rnder as Hash
71
+ #
72
+ # @param embedded [Boolean] emmbedded in other document
73
+ #
69
74
  # @return [Hash]
70
- def to_hash
75
+ #
76
+ def to_hash(embedded: false)
71
77
  hash = super
72
78
  hash["trialuse"] = trialuse unless trialuse.nil?
73
79
  hash
@@ -1,3 +1,3 @@
1
1
  module RelatonIeee
2
- VERSION = "1.14.0".freeze
2
+ VERSION = "1.14.2".freeze
3
3
  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.14.0
4
+ version: 1.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-04 00:00:00.000000000 Z
11
+ date: 2022-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml
@@ -211,7 +211,7 @@ licenses:
211
211
  metadata:
212
212
  homepage_uri: https://github.com/relaton/relaton-ieee
213
213
  source_code_uri: https://github.com/relaton/relaton-ieee
214
- post_install_message:
214
+ post_install_message:
215
215
  rdoc_options: []
216
216
  require_paths:
217
217
  - lib
@@ -226,8 +226,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  - !ruby/object:Gem::Version
227
227
  version: '0'
228
228
  requirements: []
229
- rubygems_version: 3.2.3
230
- signing_key:
229
+ rubygems_version: 3.1.6
230
+ signing_key:
231
231
  specification_version: 4
232
232
  summary: 'RelatonIeee: retrieve IEEE Standards for bibliographic use using the IeeeBibliographicItem
233
233
  model'