bolognese 1.2.1 → 1.2.2
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: 10cdfb9cf4afc028e4788f22729bd2e18c0ad5df8d253dab1c3cb5145aa51007
|
4
|
+
data.tar.gz: f164c0d3792dfcea104409d2b53755e0e8f45088544edfe32ed4be1efd538aa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 586a8e8f637fec130a6d038715a3abb209208ca6d7fbb5f909e87ae87e9003724a0d339b4e0d75fda1c2eda4cdfd677c4faa39b5aeb3c3ea79106c93dbef0760
|
7
|
+
data.tar.gz: 5e1d70854fffe8457714e878b9dd2ae88343aa8472986e04a24ad97b9fdd503093b70d34b3f00b86cf2c9726ac4cc22d67cdfb078602bb50d55475a3d6207821
|
data/Gemfile.lock
CHANGED
@@ -118,7 +118,7 @@ module Bolognese
|
|
118
118
|
"types" => types,
|
119
119
|
"doi" => doi_from_url(doi),
|
120
120
|
"url" => parse_attributes(bibliographic_metadata.dig("doi_data", "resource"), first: true),
|
121
|
-
"titles" =>
|
121
|
+
"titles" => Array.wrap(bibliographic_metadata.dig("titles")),
|
122
122
|
"identifiers" => identifiers,
|
123
123
|
"creators" => crossref_people(bibliographic_metadata, "author"),
|
124
124
|
"contributors" => crossref_people(bibliographic_metadata, "editor"),
|
data/lib/bolognese/version.rb
CHANGED
@@ -0,0 +1,87 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://doi.org/ra/10.4000
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Mozilla/5.0 (compatible; Maremma/4.2.3; 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
|
+
- Thu, 04 Jul 2019 06:26:19 GMT
|
21
|
+
Content-Type:
|
22
|
+
- application/json;charset=UTF-8
|
23
|
+
Content-Length:
|
24
|
+
- '54'
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
Set-Cookie:
|
28
|
+
- __cfduid=d0d9885a541244225eae440118a98cd781562221579; expires=Fri, 03-Jul-20
|
29
|
+
06:26:19 GMT; path=/; domain=.doi.org; HttpOnly
|
30
|
+
Expect-Ct:
|
31
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
32
|
+
Server:
|
33
|
+
- cloudflare
|
34
|
+
Cf-Ray:
|
35
|
+
- 4f0f06e6ed79cd83-CDG
|
36
|
+
body:
|
37
|
+
encoding: ASCII-8BIT
|
38
|
+
string: |-
|
39
|
+
[
|
40
|
+
{
|
41
|
+
"DOI": "10.4000",
|
42
|
+
"RA": "Crossref"
|
43
|
+
}
|
44
|
+
]
|
45
|
+
http_version:
|
46
|
+
recorded_at: Thu, 04 Jul 2019 06:26:19 GMT
|
47
|
+
- request:
|
48
|
+
method: get
|
49
|
+
uri: https://api.crossref.org/works/10.4000/dms.865/transform/application/vnd.crossref.unixsd+xml
|
50
|
+
body:
|
51
|
+
encoding: US-ASCII
|
52
|
+
string: ''
|
53
|
+
headers:
|
54
|
+
User-Agent:
|
55
|
+
- Mozilla/5.0 (compatible; Maremma/4.2.3; mailto:info@datacite.org)
|
56
|
+
Accept:
|
57
|
+
- text/xml
|
58
|
+
response:
|
59
|
+
status:
|
60
|
+
code: 200
|
61
|
+
message: OK
|
62
|
+
headers:
|
63
|
+
Link:
|
64
|
+
- <http://dx.doi.org/10.4000/dms.865>; rel="canonical"
|
65
|
+
Access-Control-Allow-Origin:
|
66
|
+
- "*"
|
67
|
+
Access-Control-Allow-Headers:
|
68
|
+
- X-Requested-With
|
69
|
+
Content-Length:
|
70
|
+
- '5217'
|
71
|
+
Server:
|
72
|
+
- http-kit
|
73
|
+
Date:
|
74
|
+
- Thu, 04 Jul 2019 06:26:19 GMT
|
75
|
+
X-Rate-Limit-Limit:
|
76
|
+
- '50'
|
77
|
+
X-Rate-Limit-Interval:
|
78
|
+
- 1s
|
79
|
+
Connection:
|
80
|
+
- close
|
81
|
+
body:
|
82
|
+
encoding: ASCII-8BIT
|
83
|
+
string: !binary |-
|
84
|
+
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGNyb3NzcmVmX3Jlc3VsdCB4bWxucz0iaHR0cDovL3d3dy5jcm9zc3JlZi5vcmcvcXJzY2hlbWEvMy4wIiB2ZXJzaW9uPSIzLjAiIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhzaTpzY2hlbWFMb2NhdGlvbj0iaHR0cDovL3d3dy5jcm9zc3JlZi5vcmcvcXJzY2hlbWEvMy4wIGh0dHA6Ly93d3cuY3Jvc3NyZWYub3JnL3NjaGVtYXMvY3Jvc3NyZWZfcXVlcnlfb3V0cHV0My4wLnhzZCI+DQogIDxxdWVyeV9yZXN1bHQ+DQogICAgPGhlYWQ+DQogICAgICA8ZG9pX2JhdGNoX2lkPm5vbmU8L2RvaV9iYXRjaF9pZD4NCiAgICA8L2hlYWQ+DQogICAgPGJvZHk+DQogICAgICA8cXVlcnkgc3RhdHVzPSJyZXNvbHZlZCI+DQogICAgICAgIDxkb2kgdHlwZT0iam91cm5hbF9hcnRpY2xlIj4xMC40MDAwL2Rtcy44NjU8L2RvaT4NCiAgICAgICAgPGNybS1pdGVtIG5hbWU9InB1Ymxpc2hlci1uYW1lIiB0eXBlPSJzdHJpbmciPk9wZW5FZGl0aW9uPC9jc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cDovL2RvaS5jcm9zc3JlZi5vcmcvc2NoZW1hcy91bml4cmVmMS4xLnhzZCI+DQogICAgICAgICAgICA8am91cm5hbD4NCiAgICAgICAgICAgICAgPGpvdXJuYWxfbWV0YWRhdGE+DQogICAgICAgICAgICAgICAgPGZ1bGxfdGl0bGU+RGlzdGFuY2VzIGV0IG3DqWRpYXRpb25zIGRlcyBzYXZvaXJzPC9mdWxsX3RpdGxlPg0KICAgICAgICAgICAgICAgIDxhYmJyZXZfdGl0bGU+ZG1zPC9hYmJyZXZfdGl0bGU+DQogICAgICAgICAgICAgICAgPGlzc24gbWVkaWFfdHlwZT0iZWxlY3Ryb25pYyI+MjI2NC03MjI4PC9pc3NuPg0KICAgICAgICAgICAgICAgIDxkb2lfZGF0YT4NCiAgICAgICAgICAgICAgICAgIDxkb2k+MTAuNDAwMC9kbXM8L2RvaT4NCiAgICAgICAgICAgICAgICAgIDxyZXNvdXJjZT5odHRwOi8vZG1zLnJldnVlcy5vcmc8L3Jlc291cmNlPg0KICAgICAgICAgICAgICAgIDwvZG9pX2RhdGE+DQogICAgICAgICAgICAgIDwvam91cm5hbF9tZXRhZGF0YT4NCiAgICAgICAgICAgICAgPGpvdXJuYWxfaXNzdWU+DQogICAgICAgICAgICAgICAgPHB1YmxpY2F0aW9uX2RhdGUgbWVkaWFfdHlwZT0ib25saW5lIj4NCiAgICAgICAgICAgICAgICAgIDxtb250aD4xMjwvbW9udGg+DQogICAgICAgICAgICAgICAgICA8ZGF5PjIzPC9kYXk+DQogICAgICAgICAgICAgICAgICA8eWVhcj4yMDE0PC95ZWFyPg0KICAgICAgICAgICAgICAgIDwvcHVibGljYXRpb25fZGF0ZT4NCiAgICAgICAgICAgICAgICA8am91cm5hbF92b2x1bWU+DQogICAgICAgICAgICAgICAgICA8dm9sdW1lPjI8L3ZvbHVtZT4NCiAgICAgICAgICAgICAgICA8L2pvdXJuYWxfdm9sdW1lPg0KICAgICAgICAgICAgICAgIDxpc3N1ZT44PC9pc3N1ZT4NCiAgICAgICAgICAgICAgICA8ZG9pX2RhdGE+DQogICAgICAgICAgICAgICAgICA8ZG9pPjEwLjQwMDAvZG1zLjg2NDwvZG9pPg0KICAgICAgICAgICAgICAgICAgPHJlc291cmNlPmh0dHA6Ly9kbXMucmV2dWVzLm9yZy84NjQ8L3Jlc291cmNlPg0KICAgICAgICAgICAgICAgIDwvZG9pX2RhdGE+DQogICAgICAgICAgICAgIDwvam91cm5hbF9pc3N1ZT4NCiAgICAgICAgICAgICAgPGpvdXJuYWxfYXJ0aWNsZSBwdWJsaWNhdGlvbl90eXBlPSJmdWxsX3RleHQiPg0KICAgICAgICAgICAgICAgIDx0aXRsZXM+DQogICAgICAgICAgICAgICAgICA8dGl0bGU+RGlzdGFuY2VzLCBhYnNlbmNlLCBwcm94aW1pdMOpcyBldCBwcsOpc2VuY2VzwqA6IGRlcyBjb25jZXB0cyBlbiBkw6lwbGFjZW1lbnQ8L3RpdGxlPg0KICAgICAgICAgICAgICAgIDwvdGl0bGVzPg0KICAgICAgICAgICAgICAgIDx0aXRsZXM+DQogICAgICAgICAgICAgICAgICA8dGl0bGU+RGlzdGFuY2UocyksIHByb3hpbWl0eSBhbmQgcHJlc2VuY2Uocyk6IGV2b2x2aW5nIGNvbmNlcHRzPC90aXRsZT4NCiAgICAgICAgICAgICAgICA8L3RpdGxlcz4NCiAgICAgICAgICAgICAgICA8Y29udHJpYnV0b3JzPg0KICAgICAgICAgICAgICAgICAgPHBlcnNvbl9uYW1lIGNvbnRyaWJ1dG9yX3JvbGU9ImF1dGhvciIgc2VxdWVuY2U9ImZpcnN0Ij4NCiAgICAgICAgICAgICAgICAgICAgPGdpdmVuX25hbWU+RGFuaWVsPC9naXZlbl9uYW1lPg0KICAgICAgICAgICAgICAgICAgICA8c3VybmFtZT5QZXJheWE8L3N1cm5hbWU+DQogICAgICAgICAgICAgICAgICA8L3BlcnNvbl9uYW1lPg0KICAgICAgICAgICAgICAgIDwvY29udHJpYnV0b3JzPg0KICAgICAgICAgICAgICAgIDxwdWJsaWNhdGlvbl9kYXRlIG1lZGlhX3R5cGU9Im9ubGluZSI+DQogICAgICAgICAgICAgICAgICA8bW9udGg+MTI8L21vbnRoPg0KICAgICAgICAgICAgICAgICAgPGRheT4yMzwvZGF5Pg0KICAgICAgICAgICAgICAgICAgPHllYXI+MjAxNDwveWVhcj4NCiAgICAgICAgICAgICAgICA8L3B1YmxpY2F0aW9uX2RhdGU+DQogICAgICAgICAgICAgICAgPGRvaV9kYXRhPg0KICAgICAgICAgICAgICAgICAgPGRvaT4xMC40MDAwL2Rtcy44NjU8L2RvaT4NCiAgICAgICAgICAgICAgICAgIDxyZXNvdXJjZT5odHRwOi8vam91cm5hbHMub3BlbmVkaXRpb24ub3JnL2Rtcy84NjU8L3Jlc291cmNlPg0KICAgICAgICAgICAgICAgIDwvZG9pX2RhdGE+DQogICAgICAgICAgICAgICAgPGNpdGF0aW9uX2xpc3Q+DQogICAgICAgICAgICAgICAgICA8Y2l0YXRpb24ga2V5PSJyZWYwIj4NCiAgICAgICAgICAgICAgICAgICAgPGRvaT4xMC4zMTY2L2RzLjkuMzEzLTMzMDwvZG9pPg0KICAgICAgICAgICAgICAgICAgPC9jaXRhdGlvbj4NCiAgICAgICAgICAgICAgICAgIDxjaXRhdGlvbiBrZXk9InJlZjEiPg0KICAgICAgICAgICAgICAgICAgICA8ZG9pPjEwLjMxNjYvZHMuNC40NjktNDk2PC9kb2k+DQogICAgICAgICAgICAgICAgICA8L2NpdGF0aW9uPg0KICAgICAgICAgICAgICAgICAgPGNpdGF0aW9uIGtleT0icmVmMiI+DQogICAgICAgICAgICAgICAgICAgIDxkb2k+MTAuMzkxNy9wdWYuY2hhcmwuMjAxMC4wMTwvZG9pPg0KICAgICAgICAgICAgICAgICAgPC9jaXRhdGlvbj4NCiAgICAgICAgICAgICAgICAgIDxjaXRhdGlvbiBrZXk9InJlZjMiPg0KICAgICAgICAgICAgICAgICAgICA8ZG9pPjEwLjIxMjM2L0FEQTEyODk4MDwvZG9pPg0KICAgICAgICAgICAgICAgICAgPC9jaXRhdGlvbj4NCiAgICAgICAgICAgICAgICAgIDxjaXRhdGlvbiBrZXk9InJlZjQiPg0KICAgICAgICAgICAgICAgICAgICA8ZG9pPjEwLjExMDkvSElDU1MuMTk5OS43NzI3MDE8L2RvaT4NCiAgICAgICAgICAgICAgICAgIDwvY2l0YXRpb24+DQogICAgICAgICAgICAgICAgICA8Y2l0YXRpb24ga2V5PSJyZWY1Ij4NCiAgICAgICAgICAgICAgICAgICAgPGRvaT4xMC4zNDA2L3JmcC4xOTkzLjEzMDU8L2RvaT4NCiAgICAgICAgICAgICAgICAgIDwvY2l0YXRpb24+DQogICAgICAgICAgICAgICAgICA8Y2l0YXRpb24ga2V5PSJyZWY2Ij4NCiAgICAgICAgICAgICAgICAgICAgPGRvaT4xMC4zMTY2L2RzLjUuMzQxLTM2NjwvZG9pPg0KICAgICAgICAgICAgICAgICAgPC9jaXRhdGlvbj4NCiAgICAgICAgICAgICAgICAgIDxjaXRhdGlvbiBrZXk9InJlZjciPg0KICAgICAgICAgICAgICAgICAgICA8ZG9pPjEwLjMxNjYvZHMuOS41NjUtNTkwPC9kb2k+DQogICAgICAgICAgICAgICAgICA8L2NpdGF0aW9uPg0KICAgICAgICAgICAgICAgICAgPGNpdGF0aW9uIGtleT0icmVmOCI+DQogICAgICAgICAgICAgICAgICAgIDxkb2k+MTAuNDAwMC9kbXMuNzk3PC9kb2k+DQogICAgICAgICAgICAgICAgICA8L2NpdGF0aW9uPg0KICAgICAgICAgICAgICAgICAgPGNpdGF0aW9uIGtleT0icmVmOSI+DQogICAgICAgICAgICAgICAgICAgIDxkb2k+MTAuNDAwMC9xdWVzdGlvbnNkZWNvbW11bmljYXRpb24uNjU5MDwvZG9pPg0KICAgICAgICAgICAgICAgICAgPC9jaXRhdGlvbj4NCiAgICAgICAgICAgICAgICAgIDxjaXRhdGlvbiBrZXk9InJlZjEwIj4NCiAgICAgICAgICAgICAgICAgICAgPGRvaT4xMC40MjY3LzIwNDIvMTQ5ODM8L2RvaT4NCiAgICAgICAgICAgICAgICAgIDwvY2l0YXRpb24+DQogICAgICAgICAgICAgICAgICA8Y2l0YXRpb24ga2V5PSJyZWYxMSI+DQogICAgICAgICAgICAgICAgICAgIDxkb2k+MTAuNDMyNC85NzgwMjAzMDUyOTQ1PC9kb2k+DQogICAgICAgICAgICAgICAgICA8L2NpdGF0aW9uPg0KICAgICAgICAgICAgICAgIDwvY2l0YXRpb25fbGlzdD4NCiAgICAgICAgICAgICAgPC9qb3VybmFsX2FydGljbGU+DQogICAgICAgICAgICA8L2pvdXJuYWw+DQogICAgICAgICAgPC9jcm9zc3JlZj4NCiAgICAgICAgPC9kb2lfcmVjb3JkPg0KICAgICAgPC9xdWVyeT4NCiAgICA8L2JvZHk+DQogIDwvcXVlcnlfcmVzdWx0Pg0KPC9jcm9zc3JlZl9yZXN1bHQ+
|
85
|
+
http_version:
|
86
|
+
recorded_at: Thu, 04 Jul 2019 06:26:20 GMT
|
87
|
+
recorded_with: VCR 3.0.3
|
@@ -210,6 +210,21 @@ describe Bolognese::Metadata, vcr: true do
|
|
210
210
|
expect(subject.agency).to eq("Crossref")
|
211
211
|
end
|
212
212
|
|
213
|
+
it "multiple titles" do
|
214
|
+
input = "https://doi.org/10.4000/dms.865"
|
215
|
+
subject = Bolognese::Metadata.new(input: input)
|
216
|
+
expect(subject.valid?).to be true
|
217
|
+
expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.4000/dms.865", "identifierType"=>"DOI"}])
|
218
|
+
expect(subject.url).to eq("http://journals.openedition.org/dms/865")
|
219
|
+
expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
|
220
|
+
expect(subject.creators).to eq("familyName"=>"Peraya", "givenName"=>"Daniel", "name"=>"Peraya, Daniel", "nameType"=>"Personal")
|
221
|
+
expect(subject.titles).to eq([{"title"=>"Distances, absence, proximités et présences : des concepts en déplacement"}, {"title"=>"Distance(s), proximity and presence(s): evolving concepts"}])
|
222
|
+
expect(subject.dates).to eq([{"date"=>"2014-12-23", "dateType"=>"Issued"}, {"date"=>"2019-02-02T06:53:25Z", "dateType"=>"Updated"}])
|
223
|
+
expect(subject.publication_year).to eq("2014")
|
224
|
+
expect(subject.publisher).to eq("OpenEdition")
|
225
|
+
expect(subject.agency).to eq("Crossref")
|
226
|
+
end
|
227
|
+
|
213
228
|
it "journal article with" do
|
214
229
|
input = "https://doi.org/10.1111/nph.14619"
|
215
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.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
@@ -825,6 +825,7 @@ files:
|
|
825
825
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/date_in_future.yml
|
826
826
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article.yml
|
827
827
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with.yml
|
828
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_titles.yml
|
828
829
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/not_found_error.yml
|
829
830
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/posted_content.yml
|
830
831
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/vor_with_url.yml
|