relaton-w3c 1.17.2 → 1.17.3

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: 0c049f93ae145723942e0c78b7cfe44f563ff8fc7d4c7ff596da113986cf5dea
4
- data.tar.gz: 794c23599a51e449c95b7110d79934d96d85f6431f7ca86936da2bf31ade5487
3
+ metadata.gz: 92ac34807391750d9463126ff7ab329b0cd2241833830cd4e1c0e57a3073cf4e
4
+ data.tar.gz: a0b1d443d33423b452752b688085a448b10b3628f85b471f51d2f2dfe340bfca
5
5
  SHA512:
6
- metadata.gz: a111966a8e83f72b6ee30ff59544b61c589225be59d9b93ea81eb6835c3fd873b35e5be60aa041ade3e6070b048a110e44d530cd1bd450a5b45c0585e31531b9
7
- data.tar.gz: be31d8f9e366557fb23c0882022149653242f50d58b3b72a47680f2de7b903a96aab6c46222adcdcf152918537ef01bed2404535132fc9b798d7b01fba6334e2
6
+ metadata.gz: 7bfdd491580c856fe3e0c03a13480fed332b0afb839f7caa2be448c1426c9d7a45189f4b69d1612f75196aa9bc080943442c754ff39d6ffd3a58ef4985d04b30
7
+ data.tar.gz: 06b590f68b22b3058f93b41db8889fcdd1989bb6d0791051baa12fb52148c937928b92d8f6e9743ddd70b2a3a4ecef3f57167a8042b972625e2df59dee00ac76
@@ -393,7 +393,11 @@ module RelatonW3c
393
393
  # @return [Array<RelatonBib::ContributionInfo>] contributor
394
394
  #
395
395
  def parse_contrib # rubocop:disable Metrics/MethodLength
396
- return [] unless @sol.respond_to?(:link)
396
+ publisher = RelatonBib::Organization.new(
397
+ name: "World Wide Web Consortium", abbreviation: "W3C", url: "https://www.w3.org/"
398
+ )
399
+ contribs = [RelatonBib::ContributionInfo.new(entity: publisher, role: [type: "publisher"])]
400
+ return contribs unless @sol.respond_to?(:link)
397
401
 
398
402
  sse = SPARQL.parse(%(
399
403
  PREFIX : <http://www.w3.org/2001/02pd/rec54#>
@@ -403,14 +407,18 @@ module RelatonW3c
403
407
  <#{@sol.link.to_s.strip}> :editor/contact:fullName ?full_name
404
408
  }
405
409
  ))
406
- @rdf.query(sse).order_by(:full_name).map do |ed|
407
- cn = RelatonBib::LocalizedString.new(ed.full_name.to_s, "en", "Latn")
408
- n = RelatonBib::FullName.new completename: cn
409
- p = RelatonBib::Person.new name: n
410
- RelatonBib::ContributionInfo.new entity: p, role: [type: "editor"]
410
+ @rdf.query(sse).order_by(:full_name).each_with_object(contribs) do |ed, obj|
411
+ obj << create_editor(ed.full_name.to_s)
411
412
  end
412
413
  end
413
414
 
415
+ def create_editor(name)
416
+ cn = RelatonBib::LocalizedString.new(name, "en", "Latn")
417
+ n = RelatonBib::FullName.new completename: cn
418
+ p = RelatonBib::Person.new name: n
419
+ RelatonBib::ContributionInfo.new(entity: p, role: [type: "editor"])
420
+ end
421
+
414
422
  #
415
423
  # Parse editorialgroup
416
424
  #
@@ -1,3 +1,3 @@
1
1
  module RelatonW3c
2
- VERSION = "1.17.2".freeze
2
+ VERSION = "1.17.3".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-w3c
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.2
4
+ version: 1.17.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-09 00:00:00.000000000 Z
11
+ date: 2023-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: linkeddata