commonmeta-ruby 3.2.7 → 3.2.8
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/Gemfile.lock +7 -7
- data/lib/commonmeta/crossref_utils.rb +5 -1
- data/lib/commonmeta/version.rb +1 -1
- data/spec/writers/crossref_xml_writer_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c4efef118736aa6738cde85e83a7074cfc0746339c6ee4a1c9d7fb464253a8c7
|
|
4
|
+
data.tar.gz: 02665e140aae9c74d6bab0e0d09472992e1342d74784d33153104dba316fe3f9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1beb77ff61c956fb294b7c072151970326d62a2cc9d9cfe6a48ff6d652a24829f8bf832f9442c970ba09e6c589fc0d73ba0cef6e5f1852d30e2205da47a06732
|
|
7
|
+
data.tar.gz: 20608ff7d3a77b9a40c74ab4c5fc0e16377714d56bb60859c00a3c3e1378ea2484943c9a1ad25b062d454896278df81ca75a4426bac626b81cbf4ad23aaf1491
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
commonmeta-ruby (3.2.
|
|
4
|
+
commonmeta-ruby (3.2.8)
|
|
5
5
|
activesupport (>= 4.2.5, < 8.0)
|
|
6
6
|
addressable (~> 2.8.1, < 2.8.2)
|
|
7
7
|
base32-url (>= 0.5.0, < 1)
|
|
@@ -103,7 +103,7 @@ GEM
|
|
|
103
103
|
json-ld-preloaded (3.2.2)
|
|
104
104
|
json-ld (~> 3.2)
|
|
105
105
|
rdf (~> 3.2)
|
|
106
|
-
json_schemer (1.0.
|
|
106
|
+
json_schemer (1.0.3)
|
|
107
107
|
hana (~> 1.3)
|
|
108
108
|
regexp_parser (~> 2.0)
|
|
109
109
|
simpleidn (~> 0.2)
|
|
@@ -138,8 +138,8 @@ GEM
|
|
|
138
138
|
props (1.2.0)
|
|
139
139
|
iniparser (>= 0.1.0)
|
|
140
140
|
public_suffix (4.0.7)
|
|
141
|
-
racc (1.7.
|
|
142
|
-
rack (3.0.
|
|
141
|
+
racc (1.7.1)
|
|
142
|
+
rack (3.0.8)
|
|
143
143
|
rack-test (2.1.0)
|
|
144
144
|
rack (>= 1.3)
|
|
145
145
|
rainbow (3.1.1)
|
|
@@ -169,7 +169,7 @@ GEM
|
|
|
169
169
|
rdf-xsd (3.2.1)
|
|
170
170
|
rdf (~> 3.2)
|
|
171
171
|
rexml (~> 3.2)
|
|
172
|
-
regexp_parser (2.8.
|
|
172
|
+
regexp_parser (2.8.1)
|
|
173
173
|
rexml (3.2.5)
|
|
174
174
|
rspec (3.12.0)
|
|
175
175
|
rspec-core (~> 3.12.0)
|
|
@@ -187,10 +187,10 @@ GEM
|
|
|
187
187
|
rspec-xsd (0.1.0)
|
|
188
188
|
nokogiri (~> 1.6)
|
|
189
189
|
rspec (~> 3)
|
|
190
|
-
rubocop (1.52.
|
|
190
|
+
rubocop (1.52.1)
|
|
191
191
|
json (~> 2.3)
|
|
192
192
|
parallel (~> 1.10)
|
|
193
|
-
parser (>= 3.2.
|
|
193
|
+
parser (>= 3.2.2.3)
|
|
194
194
|
rainbow (>= 2.2.2, < 4.0)
|
|
195
195
|
regexp_parser (>= 1.8, < 3.0)
|
|
196
196
|
rexml (>= 3.2.5, < 4.0)
|
|
@@ -61,6 +61,7 @@ module Commonmeta
|
|
|
61
61
|
insert_crossref_publication_date(xml)
|
|
62
62
|
insert_crossref_abstract(xml)
|
|
63
63
|
insert_crossref_issn(xml)
|
|
64
|
+
insert_publisher_item(xml)
|
|
64
65
|
insert_crossref_access_indicators(xml)
|
|
65
66
|
insert_doi_data(xml)
|
|
66
67
|
insert_citation_list(xml)
|
|
@@ -137,7 +138,7 @@ module Commonmeta
|
|
|
137
138
|
xml.first_page(ref['first_page']) if ref['first_page'].present?
|
|
138
139
|
xml.cYear(ref['cYear']) if ref['cYear'].present?
|
|
139
140
|
xml.article_title(ref['article_title']) if ref['article_title'].present?
|
|
140
|
-
xml.doi(ref['doi']) if ref['doi'].present?
|
|
141
|
+
xml.doi(doi_from_url(ref['doi'])) if ref['doi'].present?
|
|
141
142
|
xml.unstructured_citation(ref['url']) if ref['url'].present?
|
|
142
143
|
end
|
|
143
144
|
end
|
|
@@ -263,6 +264,9 @@ module Commonmeta
|
|
|
263
264
|
attributes = {
|
|
264
265
|
'item_number_type' => alternate_identifier['alternateIdentifierType'] ? alternate_identifier['alternateIdentifierType'].downcase : nil
|
|
265
266
|
}.compact
|
|
267
|
+
|
|
268
|
+
# remove dashes from UUIDs, as item_number can only be 32 characters long
|
|
269
|
+
alternate_identifier['alternateIdentifier'].gsub!('-', '') if alternate_identifier['alternateIdentifierType'] == 'UUID'
|
|
266
270
|
|
|
267
271
|
xml.item_number(alternate_identifier['alternateIdentifier'], attributes)
|
|
268
272
|
end
|
data/lib/commonmeta/version.rb
CHANGED
|
@@ -217,8 +217,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
217
217
|
expect(crossref_xml.dig("titles",
|
|
218
218
|
"title")).to eq("The Research Software Alliance (ReSA)")
|
|
219
219
|
expect(crossref_xml.dig("citation_list", "citation").length).to eq(11)
|
|
220
|
-
expect(crossref_xml.dig("citation_list", "citation").last).to eq("doi"=>"
|
|
221
|
-
expect(crossref_xml.dig('publisher_item', 'item_number')).to eq("__content__"=>"
|
|
220
|
+
expect(crossref_xml.dig("citation_list", "citation").last).to eq("doi"=>"10.5281/zenodo.3699950", "key"=>"ref11")
|
|
221
|
+
expect(crossref_xml.dig('publisher_item', 'item_number')).to eq("__content__"=>"954f81380ecd409087c5cef1297f1470", "item_number_type"=>"uuid")
|
|
222
222
|
end
|
|
223
223
|
|
|
224
224
|
it "json_feed_item from rogue scholar with doi" do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: commonmeta-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.2.
|
|
4
|
+
version: 3.2.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Martin Fenner
|
|
@@ -1419,7 +1419,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1419
1419
|
- !ruby/object:Gem::Version
|
|
1420
1420
|
version: '0'
|
|
1421
1421
|
requirements: []
|
|
1422
|
-
rubygems_version: 3.4.
|
|
1422
|
+
rubygems_version: 3.4.14
|
|
1423
1423
|
signing_key:
|
|
1424
1424
|
specification_version: 4
|
|
1425
1425
|
summary: Ruby client library for conversion of scholarly metadata
|