bolognese 0.6.5 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/bolognese/author_utils.rb +2 -2
- data/lib/bolognese/crossref.rb +6 -4
- data/lib/bolognese/datacite.rb +18 -5
- data/lib/bolognese/metadata.rb +6 -3
- data/lib/bolognese/schema_org.rb +7 -3
- data/lib/bolognese/utils.rb +11 -2
- data/lib/bolognese/version.rb +1 -1
- data/spec/crossref_spec.rb +1 -1
- data/spec/datacite_spec.rb +26 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Datacite/get_metadata/is_identical_to.yml +176 -0
- data/spec/utils_spec.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cf9b774c122a31d80d29bac90783498458f5aff
|
4
|
+
data.tar.gz: 970db12ff440f5907609eaabbac07676b06fe1e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14b38895e972a549842ec6a1f7388f4f2bd5dff742860689d189a15702843ef3babb1b6b9ff181faabd626391f2e41abf8825aff596c67b8aa9bc422dcde547d
|
7
|
+
data.tar.gz: 639783c23011fc7567b9c8397bf214d0dcc89604660297cc77da29fd9a899f17bffd7bd8f142b50ee4c24804246b201f5278fc5bd4f9d2938262038d239f8b28
|
data/Gemfile.lock
CHANGED
@@ -7,7 +7,7 @@ module Bolognese
|
|
7
7
|
orcid = get_name_identifier(author)
|
8
8
|
author = author.fetch("creatorName", nil)
|
9
9
|
|
10
|
-
return { "
|
10
|
+
return { "name" => "" } if author.to_s.strip.blank?
|
11
11
|
|
12
12
|
author = cleanup_author(author)
|
13
13
|
names = Namae.parse(author)
|
@@ -15,7 +15,7 @@ module Bolognese
|
|
15
15
|
if names.blank? || !is_personal_name?(author)
|
16
16
|
{ "@type" => "Agent",
|
17
17
|
"@id" => orcid,
|
18
|
-
"
|
18
|
+
"name" => author }.compact
|
19
19
|
else
|
20
20
|
name = names.first
|
21
21
|
|
data/lib/bolognese/crossref.rb
CHANGED
@@ -171,21 +171,23 @@ module Bolognese
|
|
171
171
|
|
172
172
|
def people(contributor_role)
|
173
173
|
person = bibliographic_metadata.dig("contributors", "person_name")
|
174
|
-
Array.wrap(person).select { |a| a["contributor_role"] == contributor_role }.map do |a|
|
174
|
+
a = Array.wrap(person).select { |a| a["contributor_role"] == contributor_role }.map do |a|
|
175
175
|
{ "@type" => "Person",
|
176
176
|
"@id" => parse_attributes(a["ORCID"]),
|
177
177
|
"givenName" => a["given_name"],
|
178
178
|
"familyName" => a["surname"] }.compact
|
179
|
-
end
|
179
|
+
end
|
180
|
+
array_unwrap(a)
|
180
181
|
end
|
181
182
|
|
182
183
|
def funder
|
183
184
|
fundref = Array.wrap(program_metadata).find { |a| a["name"] == "fundref" } || {}
|
184
|
-
Array.wrap(fundref.fetch("assertion", [])).select { |a| a["name"] == "fundgroup" }.map do |f|
|
185
|
+
a = Array.wrap(fundref.fetch("assertion", [])).select { |a| a["name"] == "fundgroup" }.map do |f|
|
185
186
|
{ "@type" => "Organization",
|
186
187
|
"@id" => normalize_id(f.dig("assertion", "assertion", "__content__")),
|
187
188
|
"name" => f.dig("assertion", "__content__").strip }.compact
|
188
|
-
end
|
189
|
+
end
|
190
|
+
array_unwrap(a)
|
189
191
|
end
|
190
192
|
|
191
193
|
def date_published
|
data/lib/bolognese/datacite.rb
CHANGED
@@ -109,13 +109,13 @@ module Bolognese
|
|
109
109
|
def author
|
110
110
|
authors = metadata.dig("creators", "creator")
|
111
111
|
authors = [authors] if authors.is_a?(Hash)
|
112
|
-
get_authors(authors)
|
112
|
+
array_unwrap(get_authors(authors))
|
113
113
|
end
|
114
114
|
|
115
115
|
def editor
|
116
116
|
editors = Array.wrap(metadata.dig("contributors", "contributor"))
|
117
117
|
.select { |r| r["contributorType"] == "Editor" }
|
118
|
-
get_authors(editors)
|
118
|
+
array_unwrap(get_authors(editors))
|
119
119
|
end
|
120
120
|
|
121
121
|
def funder
|
@@ -186,20 +186,33 @@ module Bolognese
|
|
186
186
|
end
|
187
187
|
|
188
188
|
def related_identifiers(relation_type)
|
189
|
-
Array(metadata.dig("relatedIdentifiers", "relatedIdentifier"))
|
189
|
+
a = Array.wrap(metadata.dig("relatedIdentifiers", "relatedIdentifier"))
|
190
190
|
.select { |r| relation_type.split(" ").include?(r["relationType"]) && %w(DOI URL).include?(r["relatedIdentifierType"]) }
|
191
191
|
.map do |work|
|
192
192
|
{ "@type" => "CreativeWork",
|
193
193
|
"@id" => normalize_id(work["__content__"]) }
|
194
194
|
end
|
195
|
+
array_unwrap(a)
|
196
|
+
end
|
197
|
+
|
198
|
+
def same_as
|
199
|
+
related_identifiers("IsIdenticalTo")
|
195
200
|
end
|
196
201
|
|
197
202
|
def is_part_of
|
198
|
-
related_identifiers("IsPartOf")
|
203
|
+
related_identifiers("IsPartOf")
|
199
204
|
end
|
200
205
|
|
201
206
|
def has_part
|
202
|
-
related_identifiers("HasPart")
|
207
|
+
related_identifiers("HasPart")
|
208
|
+
end
|
209
|
+
|
210
|
+
def predecessor_of
|
211
|
+
related_identifiers("IsPreviousVersionOf")
|
212
|
+
end
|
213
|
+
|
214
|
+
def successor_of
|
215
|
+
related_identifiers("IsNewVersionOf")
|
203
216
|
end
|
204
217
|
|
205
218
|
def citation
|
data/lib/bolognese/metadata.rb
CHANGED
@@ -16,7 +16,7 @@ module Bolognese
|
|
16
16
|
:additional_type, :alternate_name, :url, :version, :keywords, :editor,
|
17
17
|
:page_start, :page_end, :date_modified, :language, :spatial_coverage,
|
18
18
|
:content_size, :funder, :journal, :bibtex_type, :date_created, :has_part,
|
19
|
-
:publisher, :contributor, :schema_version
|
19
|
+
:publisher, :contributor, :schema_version, :same_as, :predecessor_of, :successor_of
|
20
20
|
|
21
21
|
alias_method :datacite, :as_datacite
|
22
22
|
|
@@ -29,8 +29,8 @@ module Bolognese
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def author_string
|
32
|
-
author.map { |a| [a["familyName"], a["givenName"]].join(", ") }
|
33
|
-
|
32
|
+
Array.wrap(author).map { |a| [a["familyName"], a["givenName"]].join(", ") }
|
33
|
+
.join(" and ").presence
|
34
34
|
end
|
35
35
|
|
36
36
|
def publisher_string
|
@@ -59,8 +59,11 @@ module Bolognese
|
|
59
59
|
"pageStart" => page_start,
|
60
60
|
"pageEnd" => page_end,
|
61
61
|
"spatialCoverage" => spatial_coverage,
|
62
|
+
"sameAs" => same_as,
|
62
63
|
"isPartOf" => is_part_of,
|
63
64
|
"hasPart" => has_part,
|
65
|
+
"predecessor_of" => predecessor_of,
|
66
|
+
"successor_of" => successor_of,
|
64
67
|
"citation" => citation,
|
65
68
|
"schemaVersion" => schema_version,
|
66
69
|
"publisher" => publisher,
|
data/lib/bolognese/schema_org.rb
CHANGED
@@ -100,16 +100,20 @@ module Bolognese
|
|
100
100
|
normalize_ids(metadata.fetch(relation_type, nil))
|
101
101
|
end
|
102
102
|
|
103
|
+
def same_as
|
104
|
+
related_identifiers("isIdenticalTo")
|
105
|
+
end
|
106
|
+
|
103
107
|
def is_part_of
|
104
|
-
related_identifiers("isPartOf")
|
108
|
+
related_identifiers("isPartOf")
|
105
109
|
end
|
106
110
|
|
107
111
|
def has_part
|
108
|
-
related_identifiers("hasPart")
|
112
|
+
related_identifiers("hasPart")
|
109
113
|
end
|
110
114
|
|
111
115
|
def citation
|
112
|
-
related_identifiers("citation")
|
116
|
+
related_identifiers("citation")
|
113
117
|
end
|
114
118
|
|
115
119
|
def publisher
|
data/lib/bolognese/utils.rb
CHANGED
@@ -75,12 +75,20 @@ module Bolognese
|
|
75
75
|
element.fetch(content, nil)
|
76
76
|
elsif element.is_a?(Array)
|
77
77
|
a = element.map { |e| e.fetch(content, nil) }.uniq
|
78
|
-
a
|
78
|
+
array_unwrap(a)
|
79
79
|
else
|
80
80
|
nil
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
+
def array_unwrap(element)
|
85
|
+
case element.length
|
86
|
+
when 0 then nil
|
87
|
+
when 1 then element.first
|
88
|
+
else element
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
84
92
|
def normalize_id(id)
|
85
93
|
return nil unless id.present?
|
86
94
|
|
@@ -96,7 +104,8 @@ module Bolognese
|
|
96
104
|
end
|
97
105
|
|
98
106
|
def normalize_ids(list)
|
99
|
-
Array.wrap(list).map { |url| url.merge("@id" => normalize_id(url["@id"])) }
|
107
|
+
a = Array.wrap(list).map { |url| url.merge("@id" => normalize_id(url["@id"])) }
|
108
|
+
array_unwrap(a)
|
100
109
|
end
|
101
110
|
end
|
102
111
|
end
|
data/lib/bolognese/version.rb
CHANGED
data/spec/crossref_spec.rb
CHANGED
@@ -50,7 +50,7 @@ describe Bolognese::Crossref, vcr: true do
|
|
50
50
|
{"@type"=>"Person", "givenName"=>"Michael", "familyName"=>"Breitenbach"},
|
51
51
|
{"@type"=>"Person", "givenName"=>"Hans", "familyName"=>"Lehrach"},
|
52
52
|
{"@type"=>"Person", "givenName"=>"Sylvia", "familyName"=>"Krobitsch"}])
|
53
|
-
expect(subject.editor).to eq(
|
53
|
+
expect(subject.editor).to eq("@type"=>"Person", "givenName"=>"Guilhem", "familyName"=>"Janbon")
|
54
54
|
expect(subject.name).to eq("Triose Phosphate Isomerase Deficiency Is Caused by Altered Dimerization–Not Catalytic Inactivity–of the Mutant Enzymes")
|
55
55
|
expect(subject.license).to eq("http://creativecommons.org/licenses/by/4.0/")
|
56
56
|
expect(subject.date_published).to eq("2006-12-20")
|
data/spec/datacite_spec.rb
CHANGED
@@ -25,7 +25,7 @@ describe Bolognese::Datacite, vcr: true do
|
|
25
25
|
expect(subject.date_published).to eq("2011")
|
26
26
|
expect(subject.has_part).to eq([{"@type"=>"CreativeWork", "@id"=>"https://doi.org/10.5061/dryad.8515/1"},
|
27
27
|
{"@type"=>"CreativeWork", "@id"=>"https://doi.org/10.5061/dryad.8515/2"}])
|
28
|
-
expect(subject.citation).to eq(
|
28
|
+
expect(subject.citation).to eq("@type"=>"CreativeWork", "@id"=>"https://doi.org/10.1371/journal.ppat.1000446")
|
29
29
|
expect(subject.publisher).to eq("@type"=>"Organization", "name"=>"Dryad Digital Repository")
|
30
30
|
expect(subject.provider).to eq("@type"=>"Organization", "name"=>"DataCite")
|
31
31
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
|
@@ -38,7 +38,7 @@ describe Bolognese::Datacite, vcr: true do
|
|
38
38
|
expect(subject.type).to eq("ScholarlyArticle")
|
39
39
|
expect(subject.additional_type).to eq("BlogPosting")
|
40
40
|
expect(subject.resource_type_general).to eq("Text")
|
41
|
-
expect(subject.author).to eq(
|
41
|
+
expect(subject.author).to eq("@type"=>"Person", "@id"=>"http://orcid.org/0000-0003-1419-2405", "givenName"=>"Martin", "familyName"=>"Fenner")
|
42
42
|
expect(subject.name).to eq("Eating your own Dog Food")
|
43
43
|
expect(subject.alternate_name).to eq("MS-49-3632-5083")
|
44
44
|
expect(subject.description).to start_with("Eating your own dog food")
|
@@ -59,7 +59,7 @@ describe Bolognese::Datacite, vcr: true do
|
|
59
59
|
expect(subject.type).to eq("ScholarlyArticle")
|
60
60
|
expect(subject.additional_type).to eq("ConferencePaper")
|
61
61
|
expect(subject.resource_type_general).to eq("Text")
|
62
|
-
expect(subject.author).to eq(
|
62
|
+
expect(subject.author).to eq("@type"=>"Person", "givenName"=>"Nathaniel", "familyName"=>"Johnston")
|
63
63
|
expect(subject.name).to eq("The Minimum Size of Qubit Unextendible Product Bases")
|
64
64
|
expect(subject.description).to start_with("We investigate the problem of constructing unextendible product bases in the qubit case")
|
65
65
|
expect(subject.date_published).to eq("2013")
|
@@ -75,16 +75,36 @@ describe Bolognese::Datacite, vcr: true do
|
|
75
75
|
expect(subject.type).to eq("SoftwareSourceCode")
|
76
76
|
expect(subject.additional_type).to eq("Software")
|
77
77
|
expect(subject.resource_type_general).to eq("Software")
|
78
|
-
expect(subject.author).to eq(
|
78
|
+
expect(subject.author).to eq("@type"=>"Agent", "name"=>"Kristian Garza")
|
79
79
|
expect(subject.name).to eq("Analysis Tools for Crossover Experiment of UI using Choice Architecture")
|
80
80
|
expect(subject.description).to start_with("<p> </p>\n\n<p>This tools are used to analyse the data produced by the Crosssover Experiment")
|
81
81
|
expect(subject.license).to eq(["info:eu-repo/semantics/openAccess", "https://creativecommons.org/licenses/by-nc-sa/4.0/"])
|
82
82
|
expect(subject.date_published).to eq("2016-03-27")
|
83
|
+
expect(subject.citation).to eq("@type"=>"CreativeWork", "@id"=>"https://github.com/kjgarza/frame_experiment_analysis/tree/v1.0")
|
83
84
|
expect(subject.publisher).to eq("@type"=>"Organization", "name"=>"Zenodo")
|
84
85
|
expect(subject.provider).to eq("@type"=>"Organization", "name"=>"DataCite")
|
85
86
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
|
86
87
|
end
|
87
88
|
|
89
|
+
it "is identical to" do
|
90
|
+
id = "10.6084/M9.FIGSHARE.4234751.V1"
|
91
|
+
subject = Bolognese::Datacite.new(id: id)
|
92
|
+
expect(subject.id).to eq("https://doi.org/10.6084/m9.figshare.4234751.v1")
|
93
|
+
expect(subject.type).to eq("Dataset")
|
94
|
+
expect(subject.additional_type).to eq("Dataset")
|
95
|
+
expect(subject.resource_type_general).to eq("Dataset")
|
96
|
+
expect(subject.author.count).to eq(11)
|
97
|
+
expect(subject.author.first).to eq("@type"=>"Agent", "@id"=>"http://orcid.org/0000-0002-2410-9671", "name"=>"Alexander Junge")
|
98
|
+
expect(subject.name).to eq("RAIN v1")
|
99
|
+
expect(subject.description).to start_with("<div><b>RAIN: RNA–protein Association and Interaction Networks")
|
100
|
+
expect(subject.license).to eq("https://creativecommons.org/licenses/by/4.0/")
|
101
|
+
expect(subject.date_published).to eq("2016")
|
102
|
+
expect(subject.same_as).to eq("@type"=>"CreativeWork", "@id"=>"https://doi.org/10.6084/m9.figshare.4234751")
|
103
|
+
expect(subject.publisher).to eq("@type"=>"Organization", "name"=>"Figshare")
|
104
|
+
expect(subject.provider).to eq("@type"=>"Organization", "name"=>"DataCite")
|
105
|
+
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
|
106
|
+
end
|
107
|
+
|
88
108
|
it "funding schema version 3" do
|
89
109
|
id = "https://doi.org/10.5281/ZENODO.1239"
|
90
110
|
subject = Bolognese::Datacite.new(id: id)
|
@@ -153,7 +173,7 @@ describe Bolognese::Datacite, vcr: true do
|
|
153
173
|
expect(subject.date_published).to eq("2011")
|
154
174
|
expect(subject.has_part).to eq([{"@type"=>"CreativeWork", "@id"=>"https://doi.org/10.5061/dryad.8515/1"},
|
155
175
|
{"@type"=>"CreativeWork", "@id"=>"https://doi.org/10.5061/dryad.8515/2"}])
|
156
|
-
expect(subject.citation).to eq(
|
176
|
+
expect(subject.citation).to eq("@type"=>"CreativeWork", "@id"=>"https://doi.org/10.1371/journal.ppat.1000446")
|
157
177
|
expect(subject.provider).to eq("@type"=>"Organization", "name"=>"DataCite")
|
158
178
|
end
|
159
179
|
|
@@ -187,7 +207,7 @@ describe Bolognese::Datacite, vcr: true do
|
|
187
207
|
expect(subject.date_published).to eq("2011")
|
188
208
|
expect(subject.has_part).to eq([{"@type"=>"CreativeWork", "@id"=>"https://doi.org/10.5061/dryad.8515/1"},
|
189
209
|
{"@type"=>"CreativeWork", "@id"=>"https://doi.org/10.5061/dryad.8515/2"}])
|
190
|
-
expect(subject.citation).to eq(
|
210
|
+
expect(subject.citation).to eq("@type"=>"CreativeWork", "@id"=>"https://doi.org/10.1371/journal.ppat.1000446")
|
191
211
|
expect(subject.publisher).to eq("@type"=>"Organization", "name"=>"Dryad Digital Repository")
|
192
212
|
expect(subject.provider).to eq("@type"=>"Organization", "name"=>"DataCite")
|
193
213
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
@@ -0,0 +1,176 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://doi.org/10.6084/m9.figshare.4234751.v1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Maremma - https://github.com/datacite/maremma
|
12
|
+
Accept:
|
13
|
+
- application/vnd.datacite.datacite+xml
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 303
|
17
|
+
message: ''
|
18
|
+
headers:
|
19
|
+
Server:
|
20
|
+
- Apache-Coyote/1.1
|
21
|
+
Vary:
|
22
|
+
- Accept
|
23
|
+
Location:
|
24
|
+
- http://data.datacite.org/10.6084%2Fm9.figshare.4234751.v1
|
25
|
+
Expires:
|
26
|
+
- Thu, 23 Feb 2017 08:31:06 GMT
|
27
|
+
Content-Type:
|
28
|
+
- text/html;charset=utf-8
|
29
|
+
Content-Length:
|
30
|
+
- '199'
|
31
|
+
Date:
|
32
|
+
- Thu, 23 Feb 2017 07:48:39 GMT
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: |-
|
36
|
+
<html><head><title>Handle Redirect</title></head>
|
37
|
+
<body><a href="http://data.datacite.org/10.6084%2Fm9.figshare.4234751.v1">http://data.datacite.org/10.6084%2Fm9.figshare.4234751.v1</a></body></html>
|
38
|
+
http_version:
|
39
|
+
recorded_at: Thu, 23 Feb 2017 07:48:39 GMT
|
40
|
+
- request:
|
41
|
+
method: get
|
42
|
+
uri: http://data.datacite.org/10.6084%2Fm9.figshare.4234751.v1
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ''
|
46
|
+
headers:
|
47
|
+
User-Agent:
|
48
|
+
- Maremma - https://github.com/datacite/maremma
|
49
|
+
Accept:
|
50
|
+
- application/vnd.datacite.datacite+xml
|
51
|
+
response:
|
52
|
+
status:
|
53
|
+
code: 301
|
54
|
+
message: ''
|
55
|
+
headers:
|
56
|
+
Server:
|
57
|
+
- openresty/1.11.2.2
|
58
|
+
Date:
|
59
|
+
- Thu, 23 Feb 2017 07:48:39 GMT
|
60
|
+
Content-Type:
|
61
|
+
- text/html
|
62
|
+
Content-Length:
|
63
|
+
- '191'
|
64
|
+
Connection:
|
65
|
+
- keep-alive
|
66
|
+
Location:
|
67
|
+
- https://data.datacite.org/10.6084%2Fm9.figshare.4234751.v1
|
68
|
+
body:
|
69
|
+
encoding: UTF-8
|
70
|
+
string: "<html>\r\n<head><title>301 Moved Permanently</title></head>\r\n<body
|
71
|
+
bgcolor=\"white\">\r\n<center><h1>301 Moved Permanently</h1></center>\r\n<hr><center>openresty/1.11.2.2</center>\r\n</body>\r\n</html>\r\n"
|
72
|
+
http_version:
|
73
|
+
recorded_at: Thu, 23 Feb 2017 07:48:39 GMT
|
74
|
+
- request:
|
75
|
+
method: get
|
76
|
+
uri: https://data.datacite.org/10.6084%2Fm9.figshare.4234751.v1
|
77
|
+
body:
|
78
|
+
encoding: US-ASCII
|
79
|
+
string: ''
|
80
|
+
headers:
|
81
|
+
User-Agent:
|
82
|
+
- Maremma - https://github.com/datacite/maremma
|
83
|
+
Accept:
|
84
|
+
- application/vnd.datacite.datacite+xml
|
85
|
+
response:
|
86
|
+
status:
|
87
|
+
code: 200
|
88
|
+
message: ''
|
89
|
+
headers:
|
90
|
+
Server:
|
91
|
+
- openresty/1.11.2.2
|
92
|
+
Date:
|
93
|
+
- Thu, 23 Feb 2017 07:48:40 GMT
|
94
|
+
Content-Type:
|
95
|
+
- application/vnd.datacite.datacite+xml
|
96
|
+
Content-Length:
|
97
|
+
- '2704'
|
98
|
+
Connection:
|
99
|
+
- keep-alive
|
100
|
+
Cache-Control:
|
101
|
+
- no-transform, max-age=3600
|
102
|
+
Last-Modified:
|
103
|
+
- Wed, 16 Nov 2016 10:49:12 GMT
|
104
|
+
Vary:
|
105
|
+
- Accept
|
106
|
+
Access-Control-Allow-Origin:
|
107
|
+
- "*"
|
108
|
+
Access-Control-Allow-Methods:
|
109
|
+
- GET, POST, OPTI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lzdD48L3Jlc291
|
173
|
+
cmNlPg==
|
174
|
+
http_version:
|
175
|
+
recorded_at: Thu, 23 Feb 2017 07:48:40 GMT
|
176
|
+
recorded_with: VCR 3.0.3
|
data/spec/utils_spec.rb
CHANGED
@@ -75,7 +75,7 @@ describe Bolognese::Crossref, vcr: true do
|
|
75
75
|
it "url" do
|
76
76
|
ids = [{"@type"=>"CreativeWork", "@id"=>"https://blog.datacite.org/eating-your-own-dog-food/"}]
|
77
77
|
response = subject.normalize_ids(ids)
|
78
|
-
expect(response).to eq(
|
78
|
+
expect(response).to eq("@type"=>"CreativeWork", "@id"=>"https://blog.datacite.org/eating-your-own-dog-food")
|
79
79
|
end
|
80
80
|
end
|
81
81
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bolognese
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
@@ -420,6 +420,7 @@ files:
|
|
420
420
|
- spec/fixtures/vcr_cassettes/Bolognese_Datacite/get_metadata/Funding_schema_version_3.yml
|
421
421
|
- spec/fixtures/vcr_cassettes/Bolognese_Datacite/get_metadata/Funding_schema_version_4.yml
|
422
422
|
- spec/fixtures/vcr_cassettes/Bolognese_Datacite/get_metadata/Schema_org_JSON.yml
|
423
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Datacite/get_metadata/is_identical_to.yml
|
423
424
|
- spec/fixtures/vcr_cassettes/Bolognese_Datacite/get_metadata/multiple_licenses.yml
|
424
425
|
- spec/fixtures/vcr_cassettes/Bolognese_Datacite/get_metadata_as_bibtex/BlogPosting.yml
|
425
426
|
- spec/fixtures/vcr_cassettes/Bolognese_Datacite/get_metadata_as_bibtex/Dataset.yml
|