bolognese 1.8.8 → 1.8.9
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4e322dfced96f2bfe6b19295c8da7a841305d7187e53b6318349efc22e07455
|
4
|
+
data.tar.gz: f37fc1533d5be911b87de1e25d19cc9c1cb6bbfaeef18cf05f41b66401a6ed87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac8fffc66a1babe967ed5aa4a82d594346a8df2233267b8638c0a1c0b8ae366b668bef192edc835bdb4d840e5bd9b859c9b6d2ca61cfc97c6c9df59db819a187
|
7
|
+
data.tar.gz: 3006b731e51da24c94f105bb7562d0af9107b88d611937b8d8762981dc3b5bc34376c9fbb24f877deb1a902efc64a758ba9c4f6fe5924c963c97cb1378d7bd63
|
data/Gemfile.lock
CHANGED
@@ -86,7 +86,9 @@ module Bolognese
|
|
86
86
|
bibliographic_metadata = meta.dig("crossref", "report_paper", "report_paper_metadata").to_h
|
87
87
|
resource_type = "report"
|
88
88
|
when "peer_review"
|
89
|
-
bibliographic_metadata = meta.dig("crossref", "peer_review")
|
89
|
+
bibliographic_metadata = meta.dig("crossref", "peer_review")
|
90
|
+
when "dissertation"
|
91
|
+
bibliographic_metadata = meta.dig("crossref", "dissertation")
|
90
92
|
end
|
91
93
|
|
92
94
|
resource_type = (resource_type || model).to_s.underscore.camelcase.presence
|
@@ -236,7 +238,7 @@ module Bolognese
|
|
236
238
|
end
|
237
239
|
|
238
240
|
def crossref_people(bibliographic_metadata, contributor_role)
|
239
|
-
person = bibliographic_metadata.dig("contributors", "person_name")
|
241
|
+
person = bibliographic_metadata.dig("contributors", "person_name") || bibliographic_metadata.dig("person_name")
|
240
242
|
organization = Array.wrap(bibliographic_metadata.dig("contributors", "organization"))
|
241
243
|
person = [{ "name" => ":(unav)", "contributor_role"=>"author" }] if contributor_role == "author" && Array.wrap(person).select { |a| a["contributor_role"] == "author" }.blank? && Array.wrap(organization).select { |a| a["contributor_role"] == "author" }.blank?
|
242
244
|
|
data/lib/bolognese/version.rb
CHANGED
@@ -0,0 +1,122 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://doi.org/ra/10.14264
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Mozilla/5.0 (compatible; Maremma/4.7.1; mailto:info@datacite.org)
|
12
|
+
Accept:
|
13
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: ''
|
18
|
+
headers:
|
19
|
+
Date:
|
20
|
+
- Sat, 22 Aug 2020 09:37:48 GMT
|
21
|
+
Content-Type:
|
22
|
+
- application/json;charset=UTF-8
|
23
|
+
Connection:
|
24
|
+
- keep-alive
|
25
|
+
Set-Cookie:
|
26
|
+
- __cfduid=dd2a5efda710f4da2c27722ecdb7d162d1598089068; expires=Mon, 21-Sep-20
|
27
|
+
09:37:48 GMT; path=/; domain=.doi.org; HttpOnly; SameSite=Lax; Secure
|
28
|
+
Cf-Cache-Status:
|
29
|
+
- DYNAMIC
|
30
|
+
Cf-Request-Id:
|
31
|
+
- 04b72118d7000064a35e821200000001
|
32
|
+
Expect-Ct:
|
33
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
34
|
+
Strict-Transport-Security:
|
35
|
+
- max-age=31536000; includeSubDomains; preload
|
36
|
+
Server:
|
37
|
+
- cloudflare
|
38
|
+
Cf-Ray:
|
39
|
+
- 5c6b9e07ba4164a3-FRA
|
40
|
+
body:
|
41
|
+
encoding: ASCII-8BIT
|
42
|
+
string: |-
|
43
|
+
[
|
44
|
+
{
|
45
|
+
"DOI": "10.14264",
|
46
|
+
"RA": "Crossref"
|
47
|
+
}
|
48
|
+
]
|
49
|
+
http_version:
|
50
|
+
recorded_at: Sat, 22 Aug 2020 09:37:48 GMT
|
51
|
+
- request:
|
52
|
+
method: get
|
53
|
+
uri: https://api.crossref.org/works/10.14264/uql.2020.791/transform/application/vnd.crossref.unixsd+xml
|
54
|
+
body:
|
55
|
+
encoding: US-ASCII
|
56
|
+
string: ''
|
57
|
+
headers:
|
58
|
+
User-Agent:
|
59
|
+
- Mozilla/5.0 (compatible; Maremma/4.7.1; mailto:info@datacite.org)
|
60
|
+
Accept:
|
61
|
+
- text/xml
|
62
|
+
response:
|
63
|
+
status:
|
64
|
+
code: 200
|
65
|
+
message: OK
|
66
|
+
headers:
|
67
|
+
Link:
|
68
|
+
- <http://dx.doi.org/10.14264/uql.2020.791>; rel="canonical", <http://orcid.org/0000-0003-3086-4443>;
|
69
|
+
title="Patricia Maree Collingwood"; rel="author"
|
70
|
+
Access-Control-Allow-Origin:
|
71
|
+
- "*"
|
72
|
+
Access-Control-Allow-Headers:
|
73
|
+
- X-Requested-With
|
74
|
+
Content-Length:
|
75
|
+
- '2769'
|
76
|
+
Server:
|
77
|
+
- http-kit
|
78
|
+
Date:
|
79
|
+
- Sat, 22 Aug 2020 09:37:49 GMT
|
80
|
+
X-Rate-Limit-Limit:
|
81
|
+
- '50'
|
82
|
+
X-Rate-Limit-Interval:
|
83
|
+
- 1s
|
84
|
+
Connection:
|
85
|
+
- close
|
86
|
+
body:
|
87
|
+
encoding: ASCII-8BIT
|
88
|
+
string: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<crossref_result xmlns=\"http://www.crossref.org/qrschema/3.0\"
|
89
|
+
version=\"3.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.crossref.org/qrschema/3.0
|
90
|
+
http://www.crossref.org/schemas/crossref_query_output3.0.xsd\">\r\n <query_result>\r\n
|
91
|
+
\ <head>\r\n <doi_batch_id>none</doi_batch_id>\r\n </head>\r\n <body>\r\n
|
92
|
+
\ <query status=\"resolved\">\r\n <doi type=\"dissertation\">10.14264/uql.2020.791</doi>\r\n
|
93
|
+
\ <crm-item name=\"publisher-name\" type=\"string\">University of Queensland
|
94
|
+
Library</crm-item>\r\n <crm-item name=\"prefix-name\" type=\"string\">University
|
95
|
+
of Queensland Library</crm-item>\r\n <crm-item name=\"member-id\" type=\"number\">5387</crm-item>\r\n
|
96
|
+
\ <crm-item name=\"citation-id\" type=\"number\">116937436</crm-item>\r\n
|
97
|
+
\ <crm-item name=\"book-id\" type=\"number\">1346666</crm-item>\r\n
|
98
|
+
\ <crm-item name=\"deposit-timestamp\" type=\"number\">1591592933</crm-item>\r\n
|
99
|
+
\ <crm-item name=\"owner-prefix\" type=\"string\">10.14264</crm-item>\r\n
|
100
|
+
\ <crm-item name=\"last-update\" type=\"date\">2020-06-08T05:08:59Z</crm-item>\r\n
|
101
|
+
\ <crm-item name=\"created\" type=\"date\">2020-06-08T05:08:58Z</crm-item>\r\n
|
102
|
+
\ <crm-item name=\"citedby-count\" type=\"number\">0</crm-item>\r\n
|
103
|
+
\ <doi_record>\r\n <crossref xmlns=\"http://www.crossref.org/xschema/1.1\"
|
104
|
+
xsi:schemaLocation=\"http://www.crossref.org/xschema/1.1 http://doi.crossref.org/schemas/unixref1.1.xsd\">\r\n
|
105
|
+
\ <dissertation>\r\n <person_name sequence=\"first\"
|
106
|
+
contributor_role=\"author\">\r\n <given_name>Patricia Maree</given_name>\r\n
|
107
|
+
\ <surname>Collingwood</surname>\r\n <ORCID authenticated=\"true\">https://orcid.org/0000-0003-3086-4443</ORCID>\r\n
|
108
|
+
\ </person_name>\r\n <titles>\r\n <title>School
|
109
|
+
truancy and financial independence during emerging adulthood: a longitudinal
|
110
|
+
analysis of receipt of and reliance on cash transfers</title>\r\n </titles>\r\n
|
111
|
+
\ <approval_date>\r\n <month>05</month>\r\n <day>25</day>\r\n
|
112
|
+
\ <year>2020</year>\r\n </approval_date>\r\n <institution>\r\n
|
113
|
+
\ <institution_name>The University of Queensland</institution_name>\r\n
|
114
|
+
\ <institution_department>School of Social Science</institution_department>\r\n
|
115
|
+
\ </institution>\r\n <degree>PhD Thesis</degree>\r\n
|
116
|
+
\ <doi_data>\r\n <doi>10.14264/uql.2020.791</doi>\r\n
|
117
|
+
\ <resource>http://espace.library.uq.edu.au/view/UQ:23a1e74</resource>\r\n
|
118
|
+
\ </doi_data>\r\n </dissertation>\r\n </crossref>\r\n
|
119
|
+
\ </doi_record>\r\n </query>\r\n </body>\r\n </query_result>\r\n</crossref_result>"
|
120
|
+
http_version:
|
121
|
+
recorded_at: Sat, 22 Aug 2020 09:37:49 GMT
|
122
|
+
recorded_with: VCR 3.0.3
|
@@ -201,6 +201,30 @@ describe Bolognese::Metadata, vcr: true do
|
|
201
201
|
expect(subject.agency).to eq("crossref")
|
202
202
|
end
|
203
203
|
|
204
|
+
it "dissertation" do
|
205
|
+
input = "https://doi.org/10.14264/uql.2020.791"
|
206
|
+
subject = Bolognese::Metadata.new(input: input)
|
207
|
+
expect(subject.valid?).to be true
|
208
|
+
expect(subject.url).to eq("http://espace.library.uq.edu.au/view/UQ:23a1e74")
|
209
|
+
expect(subject.types).to eq("bibtex"=>"phdthesis", "citeproc"=>"thesis", "resourceType"=>"Dissertation", "resourceTypeGeneral"=>"Text", "ris"=>"THES", "schemaOrg"=>"Thesis")
|
210
|
+
expect(subject.creators).to eq([{"familyName"=>"Collingwood",
|
211
|
+
"givenName"=>"Patricia Maree",
|
212
|
+
"name"=>"Collingwood, Patricia Maree",
|
213
|
+
"nameIdentifiers"=>
|
214
|
+
[{"nameIdentifier"=>"https://orcid.org/0000-0003-3086-4443",
|
215
|
+
"nameIdentifierScheme"=>"ORCID",
|
216
|
+
"schemeUri"=>"https://orcid.org"}],
|
217
|
+
"nameType"=>"Personal"}])
|
218
|
+
expect(subject.titles).to eq([{"title"=>"School truancy and financial independence during emerging adulthood: a longitudinal analysis of receipt of and reliance on cash transfers"}])
|
219
|
+
expect(subject.id).to eq("https://doi.org/10.14264/uql.2020.791")
|
220
|
+
expect(subject.identifiers).to be_empty
|
221
|
+
expect(subject.descriptions).to be_empty
|
222
|
+
expect(subject.dates).to include({"date"=>"2020-06-08", "dateType"=>"Issued"})
|
223
|
+
expect(subject.publication_year).to eq("2020")
|
224
|
+
expect(subject.publisher).to eq("University of Queensland Library")
|
225
|
+
expect(subject.agency).to eq("crossref")
|
226
|
+
end
|
227
|
+
|
204
228
|
it "DOI with SICI DOI" do
|
205
229
|
input = "https://doi.org/10.1890/0012-9658(2006)87[2832:tiopma]2.0.co;2"
|
206
230
|
subject = Bolognese::Metadata.new(input: input)
|
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: 1.8.
|
4
|
+
version: 1.8.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
@@ -907,6 +907,7 @@ files:
|
|
907
907
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset.yml
|
908
908
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset_usda.yml
|
909
909
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/date_in_future.yml
|
910
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dissertation.yml
|
910
911
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/empty_given_name.yml
|
911
912
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/invalid_date.yml
|
912
913
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article.yml
|