relaton-oasis 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_oasis/data_parser_utils.rb +19 -1
- data/lib/relaton_oasis/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: '059c9095e075837ee20e566e3b70ec434bb2626b3cb70c80ff17f87dbe73ad24'
|
|
4
|
+
data.tar.gz: 2189309eeca6c4b9f940e679bfcd3ed16749264568e5bcdaba0cb54b77ed6f71
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa6a9e250ca136861488337970a298cc556961e17bddfca0bbfcd9500924236d284277615f14b1d69b843c70576f93c6c8ff4707c48a526618cbe72388836fc5
|
|
7
|
+
data.tar.gz: 52a747acff05de3ba35fa674f206cdf2f297436a94e302d93fdc4d15b98775b535ed0cc1635116232e49576527c77b2ea44d764449e96d364ba307ef1b823c3d
|
|
@@ -93,7 +93,25 @@ module RelatonOasis
|
|
|
93
93
|
def contact(email)
|
|
94
94
|
return [] unless email
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
addr = email_address(email[:href])
|
|
97
|
+
return [] unless addr
|
|
98
|
+
|
|
99
|
+
[RelatonBib::Contact.new(type: "email", value: addr)]
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def email_address(href)
|
|
103
|
+
if href.start_with?("mailto:")
|
|
104
|
+
href.split(":", 2)[1]
|
|
105
|
+
elsif href.include?("/cdn-cgi/l/email-protection#")
|
|
106
|
+
decode_cfemail(href.split("#", 2)[1])
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Decode Cloudflare email-obfuscation hex string: first byte is the XOR
|
|
111
|
+
# key, each subsequent byte XOR'd with the key yields one ASCII char.
|
|
112
|
+
def decode_cfemail(hex)
|
|
113
|
+
key = hex[0, 2].to_i(16)
|
|
114
|
+
hex[2..].scan(/../).map { |p| (p.to_i(16) ^ key).chr }.join
|
|
97
115
|
end
|
|
98
116
|
|
|
99
117
|
def affiliation(org)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relaton-oasis
|
|
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: 2026-04-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: mechanize
|
|
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
127
127
|
- !ruby/object:Gem::Version
|
|
128
128
|
version: '0'
|
|
129
129
|
requirements: []
|
|
130
|
-
rubygems_version: 3.
|
|
130
|
+
rubygems_version: 3.5.22
|
|
131
131
|
signing_key:
|
|
132
132
|
specification_version: 4
|
|
133
133
|
summary: 'RelatonOasis: retrieve OASIS Standards for bibliographic use using the BibliographicItem
|