relaton-ogc 1.20.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 +4 -4
- data/lib/relaton_ogc/scrapper.rb +17 -5
- data/lib/relaton_ogc/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c5ff2e52f74939f5dd715e54318cc0f7beab1880965868c23b5e43514b62fd4
|
4
|
+
data.tar.gz: 5a190d493b779ae6d0e7fc1ff2e8529ed210901b5006d90db9470f6d26e87626
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '069d2ea46db6d46a067f7949078b7bc1b670f1ab7de046e3ef862c3f17ba60a004a0d60f18266d05ca635f5a34954e415bfa1206e44d7a900d9720279e819580'
|
7
|
+
data.tar.gz: 74726f295ce90b5590f1fb79173d79aa4ff245fb60e39b61e1582bc2aaf50984e95ea58edcd0424dc09fcb5da7e84272a3c77256094b34778067eadce5077513
|
data/lib/relaton_ogc/scrapper.rb
CHANGED
@@ -76,11 +76,23 @@ module RelatonOgc
|
|
76
76
|
# @return [Array>RelatonBib::TypedUri>]
|
77
77
|
def fetch_link(hit)
|
78
78
|
link = []
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
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)
|
data/lib/relaton_ogc/version.rb
CHANGED
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.20.
|
4
|
+
version: 1.20.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:
|
11
|
+
date: 2025-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: '0'
|
114
114
|
requirements: []
|
115
|
-
rubygems_version: 3.
|
115
|
+
rubygems_version: 3.5.22
|
116
116
|
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: 'RelatonOgc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
|