bolognese 0.9.37 → 0.9.38

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
  SHA1:
3
- metadata.gz: a4c14e423a53deb412218f3c855ee1f593296d98
4
- data.tar.gz: d05e58c1dbcb061bdc4d468f048a02cd238036a5
3
+ metadata.gz: 80ad59a9eaf459f05bae83efd342c5cc721f3e5c
4
+ data.tar.gz: c885491d1dcd4cd1cd3fcb6d3f4f0271f8d2cfef
5
5
  SHA512:
6
- metadata.gz: 24551c9b762c597fc87407e926a510c873d42e6650f83e76e9081d8b43d92e4e06067aa18a8f30aca41bacc39a98fa7fda1b6d4ea1dc5c785aa7c971785c95fe
7
- data.tar.gz: a66e615373cf75d9fee848a017db2966722fb2754b5985bf58f8cf45b43d3be4c243f25d4ac7377ee26d722fc0b682f02fb1ae308c584f6db5a3b74badfbc3ed
6
+ metadata.gz: 9d891ad14ccc2638da17285fedf24158c2ec1eea28f0429c8c385ae67323163e2e66aee5766be2dc3332c0df8fa523c8372053dd0e75388d28c179456b995515
7
+ data.tar.gz: ca06b12617aaede3c471c3f82c6f633847508bf7beaf1d148a7d8c8affcdad4cffd1427b656d6cfaf242c7fd86d786cb9fc3c46c35b9f479fc3a46fbe71c5593
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (0.9.37)
4
+ bolognese (0.9.38)
5
5
  activesupport (>= 4.2.5, < 6)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (~> 4.1)
@@ -106,13 +106,13 @@ GEM
106
106
  link_header (~> 0.0, >= 0.0.8)
107
107
  rdf-aggregate-repo (2.2.0)
108
108
  rdf (~> 2.0)
109
- rdf-rdfa (2.2.2)
109
+ rdf-rdfa (2.2.3)
110
110
  haml (~> 5.0)
111
111
  htmlentities (~> 4.3)
112
112
  rdf (~> 2.2)
113
113
  rdf-aggregate-repo (~> 2.2)
114
114
  rdf-xsd (~> 2.1)
115
- rdf-rdfxml (2.0.0)
115
+ rdf-rdfxml (2.1.0)
116
116
  htmlentities (~> 4.3)
117
117
  rdf (~> 2.0)
118
118
  rdf-rdfa (~> 2.0)
@@ -80,7 +80,7 @@ module Bolognese
80
80
  "type" => type,
81
81
  "additional_type" => meta.fetch("resourceType", {}).fetch("__content__", nil) ||
82
82
  meta.fetch("resourceType", {}).fetch("resourceTypeGeneral", nil),
83
- "citeproc_type" => Bolognese::Utils::DC_TO_CP_TRANSLATIONS[resource_type_general.to_s.dasherize] || "other",
83
+ "citeproc_type" => Bolognese::Utils::DC_TO_CP_TRANSLATIONS[resource_type_general.to_s.dasherize] || "article",
84
84
  "bibtex_type" => Bolognese::Utils::SO_TO_BIB_TRANSLATIONS[type] || "misc",
85
85
  "ris_type" => Bolognese::Utils::DC_TO_RIS_TRANSLATIONS[resource_type_general.to_s.dasherize] || "GEN",
86
86
  "resource_type_general" => resource_type_general,
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "0.9.37"
2
+ VERSION = "0.9.38"
3
3
  end
@@ -0,0 +1,75 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://search.datacite.org/api?fl=doi,xml,allocator_symbol,datacentre_symbol,media,minted,updated&q=doi:10.6084/m9.figshare.4906367.v1&wt=json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Maremma - https://github.com/datacite/maremma
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: OK
18
+ headers:
19
+ Access-Control-Allow-Methods:
20
+ - GET, POST, OPTIONS
21
+ Access-Control-Allow-Origin:
22
+ - "*"
23
+ Content-Type:
24
+ - application/json;charset=UTF-8
25
+ Date:
26
+ - Tue, 25 Jul 2017 16:47:18 GMT
27
+ Server:
28
+ - openresty/1.11.2.2
29
+ Content-Length:
30
+ - '3255'
31
+ Connection:
32
+ - keep-alive
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"responseHeader":{"status":0,"QTime":7},"response":{"numFound":1,"start":0,"docs":[{"datacentre_symbol":"FIGSHARE.ARS","xml":"PHJlc291cmNlIHhtbG5zPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtMyIgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeHNpOnNjaGVtYUxvY2F0aW9uPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtMyBodHRwOi8vc2NoZW1hLmRhdGFjaXRlLm9yZy9tZXRhL2tlcm5lbC0zL21ldGFkYXRhLnhzZCI+PGlkZW50aWZpZXIgaWRlbnRpZmllclR5cGU9IkRPSSI+MTAuNjA4NC9tOS5maWdzaGFyZS40OTA2MzY3LnYxPC9pZGVudGlmaWVyPjxjcmVhdG9ycz48Y3JlYXRvcj48Y3JlYXRvck5hbWU+R3VpbGxhdW1lIENhYmFuYWM8L2NyZWF0b3JOYW1lPjxuYW1lSWRlbnRpZmllciBuYW1lSWRlbnRpZmllclNjaGVtZT0iT1JDSUQiIHNjaGVtZVVSST0iaHR0cDovL29yY2lkLm9yZyI+MDAwMC0wMDAzLTMwNjAtNjI0MTwvbmFtZUlkZW50aWZpZXI+PC9jcmVhdG9yPjwvY3JlYXRvcnM+PHRpdGxlcz48dGl0bGU+U2NpbWFnIGNhdGFsb2d1ZSBvZiBMaWJHZW4gYXMgb2YgSmFudWFyeSAxc3QsIDIwMTQ8L3RpdGxlPjwvdGl0bGVzPjxkZXNjcmlwdGlvbnM+PGRlc2NyaXB0aW9uIGRlc2NyaXB0aW9uVHlwZT0iQWJzdHJhY3QiPlRoaXMgTXlTcWwgZGF0YWJhc2UgZHVtcCBvZiBMaWJHZW4ncyBTY2ltYWcgY2F0YWxvZ3VlIHdhcyBkb3dubG9hZG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minted":"2017-04-28T13:11:46Z","updated":"2017-04-28T13:11:47Z","doi":"10.6084/M9.FIGSHARE.4906367.V1"}]}}
36
+
37
+ '
38
+ http_version:
39
+ recorded_at: Tue, 25 Jul 2017 16:47:16 GMT
40
+ - request:
41
+ method: head
42
+ uri: https://doi.org/10.6084/m9.figshare.4906367.v1
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ''
46
+ headers:
47
+ User-Agent:
48
+ - Maremma - https://github.com/datacite/maremma
49
+ Accept:
50
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
51
+ response:
52
+ status:
53
+ code: 303
54
+ message: See Other
55
+ headers:
56
+ Server:
57
+ - Apache-Coyote/1.1
58
+ Vary:
59
+ - Accept
60
+ Location:
61
+ - https://figshare.com/articles/Scimag_catalogue_of_LibGen_as_of_January_1st_2014/4906367/1
62
+ Expires:
63
+ - Tue, 25 Jul 2017 17:27:53 GMT
64
+ Content-Type:
65
+ - text/html;charset=utf-8
66
+ Content-Length:
67
+ - '263'
68
+ Date:
69
+ - Tue, 25 Jul 2017 16:47:19 GMT
70
+ body:
71
+ encoding: UTF-8
72
+ string: ''
73
+ http_version:
74
+ recorded_at: Tue, 25 Jul 2017 16:47:17 GMT
75
+ recorded_with: VCR 3.0.3
@@ -82,6 +82,15 @@ describe Bolognese::Metadata, vcr: true do
82
82
  expect(json["issued"]).to eq("date-parts" => [[2014, 2, 11]])
83
83
  end
84
84
 
85
+ it "software" do
86
+ input = "https://doi.org/10.6084/m9.figshare.4906367.v1"
87
+ subject = Bolognese::Metadata.new(input: input, from: "datacite")
88
+ json = JSON.parse(subject.citeproc)
89
+ expect(json["type"]).to eq("article")
90
+ expect(json["DOI"]).to eq("10.6084/m9.figshare.4906367.v1")
91
+ expect(json["title"]).to eq("Scimag catalogue of LibGen as of January 1st, 2014")
92
+ end
93
+
85
94
  it "multiple abstracts" do
86
95
  input = "https://doi.org/10.12763/ona1045"
87
96
  subject = Bolognese::Metadata.new(input: input, from: "datacite")
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.9.37
4
+ version: 0.9.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
@@ -737,6 +737,7 @@ files:
737
737
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/journal_article.yml
738
738
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/maremma.yml
739
739
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/multiple_abstracts.yml
740
+ - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software.yml
740
741
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_pages.yml
741
742
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite.yml
742
743
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/datacite_database_attributes.yml