relaton-ogc 1.19.0 → 1.20.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc4ca5d3f9963b89c24ec0df1ed12f25bb0cd21a4043b42c66662f0d92e6175c
4
- data.tar.gz: 27be8f74cf94edd9f7d09f6169ae257062da3959d5cb4812900fdca8b1f0fe01
3
+ metadata.gz: 2c5ff2e52f74939f5dd715e54318cc0f7beab1880965868c23b5e43514b62fd4
4
+ data.tar.gz: 5a190d493b779ae6d0e7fc1ff2e8529ed210901b5006d90db9470f6d26e87626
5
5
  SHA512:
6
- metadata.gz: 8c1208348abc147a46322ffa45c4a83facfeefa4fa31b290f04f19dd8ea1ceda0f802f7d385da2cb031bc3cac5f276fff6b44d917611a79bb4368b8bd1ceecf4
7
- data.tar.gz: 4c55a4906cf60d09908db0c953cd8f429967f6dec3935489daaffd74558873da32f8df590497aa9ac4184c92a14d03f61d99c8c0f59fe55af23dddb1b3402c3f
6
+ metadata.gz: '069d2ea46db6d46a067f7949078b7bc1b670f1ab7de046e3ef862c3f17ba60a004a0d60f18266d05ca635f5a34954e415bfa1206e44d7a900d9720279e819580'
7
+ data.tar.gz: 74726f295ce90b5590f1fb79173d79aa4ff245fb60e39b61e1582bc2aaf50984e95ea58edcd0424dc09fcb5da7e84272a3c77256094b34778067eadce5077513
@@ -7,7 +7,7 @@ module RelatonOgc
7
7
 
8
8
  # @param ret [Hash]
9
9
  def editorialgroup_hash_to_bib(ret)
10
- eg = ret[:editorialgroup]
10
+ eg = ret.dig(:ext, :editorialgroup) || ret[:editorialgroup] #@TODO: remove ret[:editorialgroup] after all gem will be updated
11
11
  return unless eg
12
12
 
13
13
  ret[:editorialgroup] = EditorialGroup.new(
@@ -76,11 +76,23 @@ module RelatonOgc
76
76
  # @return [Array>RelatonBib::TypedUri>]
77
77
  def fetch_link(hit)
78
78
  link = []
79
- link << RelatonBib::TypedUri.new(type: "src", content: hit["URI"]) if hit["URI"]
80
- return link unless hit["URL"]
81
-
82
- type = hit["URL"].end_with?("pdf") ? "pdf" : "obp"
83
- link << RelatonBib::TypedUri.new(type: type, content: hit["URL"])
79
+ uri = hit["URI"].to_s.strip
80
+ link << RelatonBib::TypedUri.new(type: "src", content: uri) unless uri.empty?
81
+ return link unless hit["URL"] && !hit["URL"].strip.empty?
82
+
83
+ if ext = hit["URL"].match(/(?<=\.)(?<ext>pdf|html|doc)$/)
84
+ type = ext[:ext]
85
+ else
86
+ case hit["URL"]
87
+ when /portal\.(ogc|opengeospatial)\.org/, /usgif\.org/
88
+ type = "pdf"
89
+ when /www\.(w3|geopackage)\.org/, /docs\.ogc\.org/
90
+ type = "html"
91
+ else
92
+ type = "html"
93
+ end
94
+ end
95
+ link << RelatonBib::TypedUri.new(type: type, content: hit["URL"].strip)
84
96
  end
85
97
 
86
98
  def fetch_doctype(type)
@@ -1,3 +1,3 @@
1
1
  module RelatonOgc
2
- VERSION = "1.19.0".freeze
2
+ VERSION = "1.20.1".freeze
3
3
  end
data/relaton_ogc.gemspec CHANGED
@@ -27,5 +27,5 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.add_dependency "faraday", "~> 2.7.0"
29
29
  spec.add_dependency "relaton-index", "~> 0.2.0"
30
- spec.add_dependency "relaton-iso-bib", "~> 1.19.0"
30
+ spec.add_dependency "relaton-iso-bib", "~> 1.20.0"
31
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-ogc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.0
4
+ version: 1.20.1
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: 2024-07-04 00:00:00.000000000 Z
11
+ date: 2025-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.19.0
47
+ version: 1.20.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.19.0
54
+ version: 1.20.0
55
55
  description: 'RelatonOgc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
56
56
  model'
57
57
  email:
@@ -97,7 +97,7 @@ homepage: https://github.com/relaton/relaton-ogc
97
97
  licenses:
98
98
  - BSD-2-Clause
99
99
  metadata: {}
100
- post_install_message:
100
+ post_install_message:
101
101
  rdoc_options: []
102
102
  require_paths:
103
103
  - lib
@@ -112,8 +112,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
114
  requirements: []
115
- rubygems_version: 3.3.27
116
- signing_key:
115
+ rubygems_version: 3.5.22
116
+ signing_key:
117
117
  specification_version: 4
118
118
  summary: 'RelatonOgc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
119
119
  model'