bolognese 1.8.1 → 1.8.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 376b23604e3b499e8a9940fb4bf94521e7322060bf936691dc27a84d026b70f5
4
- data.tar.gz: b1707251dac68f87403519a282f102e0a81211df59b63210024e2ab05d67a1b8
3
+ metadata.gz: b4e8cb64dc784eb40ede45cbb4198fc5857f87f9dc0a383ae03db0574938b1f2
4
+ data.tar.gz: 7df44b3cba683e7f88b8d92521b98d63c8f3966238001df865611bfbdf014963
5
5
  SHA512:
6
- metadata.gz: 8d2ac04bb2e7c41adc3fea5a8ae829ca8e7e556c117dc135d8096dbb059c8888eab9051948c6a9840f8f8694c3eac85446e67dbae612969fbe11ec594666953b
7
- data.tar.gz: 7421c681bc9182b9dc5b1601b07ceadc4a5069d9d40b7850da8dfaf9c81b4c34b6e3316a11a3f24f9e5dee08d2a2acf139514c826417198b9f3fe69d42ecd255
6
+ metadata.gz: aa21d509e13daffb969f628375010c4ef818d420f0062fd1eddfc00682fa5da0fddb84aafe5205d420f4afcac01d4d218ae148e3d7cef6b52a1a15c77b063268
7
+ data.tar.gz: e5c22dd9cabd7f59d2510de27231f968006a452b5a69a3910423bb83c7b3c99df7913cfdd5f857f6c7e4d20cd9f595a55ededcb9e3b8848232a0fddda9349a3c
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (1.8.1)
4
+ bolognese (1.8.2)
5
5
  activesupport (>= 4.2.5)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (>= 5.1.0)
@@ -58,8 +58,9 @@ GEM
58
58
  csl (~> 1.0)
59
59
  diff-lcs (1.4.4)
60
60
  docile (1.3.2)
61
- ebnf (1.2.0)
61
+ ebnf (2.1.0)
62
62
  rdf (~> 3.1)
63
+ scanf (~> 1.0)
63
64
  sxp (~> 1.1)
64
65
  edtf (3.0.5)
65
66
  activesupport (>= 3.0, < 7.0)
@@ -79,7 +80,7 @@ GEM
79
80
  concurrent-ruby (~> 1.0)
80
81
  hashdiff (1.0.1)
81
82
  htmlentities (4.3.4)
82
- i18n (1.8.3)
83
+ i18n (1.8.5)
83
84
  concurrent-ruby (~> 1.0)
84
85
  iso8601 (0.9.1)
85
86
  json-canonicalization (0.2.0)
@@ -148,8 +149,8 @@ GEM
148
149
  rdf (~> 3.1)
149
150
  rdf-rdfa (~> 3.1)
150
151
  rdf-xsd (~> 3.1)
151
- rdf-turtle (3.1.1)
152
- ebnf (~> 1.2)
152
+ rdf-turtle (3.1.2)
153
+ ebnf (~> 2.0)
153
154
  rdf (~> 3.1, >= 3.1.2)
154
155
  rdf-vocab (3.1.7)
155
156
  rdf (~> 3.1, >= 3.1.2)
@@ -172,6 +173,7 @@ GEM
172
173
  nokogiri (~> 1.6)
173
174
  rspec (~> 3)
174
175
  safe_yaml (1.0.5)
176
+ scanf (1.0.0)
175
177
  simplecov (0.18.5)
176
178
  docile (~> 1.1)
177
179
  simplecov-html (~> 0.11)
@@ -153,7 +153,7 @@ module Bolognese
153
153
  "language" => language,
154
154
  "author" => author,
155
155
  "contributor" => to_citeproc(contributors),
156
- "issued" => get_date(dates, "Issued") ? get_date_parts(get_date(dates, "Issued")) : get_date_parts(publication_year),
156
+ "issued" => get_date(dates, "Issued") ? get_date_parts(get_date(dates, "Issued")) : get_date_parts(publication_year.to_s),
157
157
  "submitted" => Array.wrap(dates).find { |d| d["dateType"] == "Submitted" }.to_h.fetch("__content__", nil),
158
158
  "abstract" => parse_attributes(descriptions, content: "description", first: true),
159
159
  "container-title" => container_title,
@@ -965,6 +965,8 @@ module Bolognese
965
965
  month = iso8601_time[5..6].to_i
966
966
  day = iso8601_time[8..9].to_i
967
967
  { 'date-parts' => [[year, month, day].reject { |part| part == 0 }] }
968
+ rescue TypeError
969
+ nil
968
970
  end
969
971
 
970
972
  def get_date_from_date_parts(date_as_parts)
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "1.8.1"
2
+ VERSION = "1.8.2"
3
3
  end
@@ -0,0 +1,73 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.datacite.org/dois/10.26301/qdpd-2250?include=media,client
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: OK
18
+ headers:
19
+ Date:
20
+ - Fri, 24 Jul 2020 09:45:26 GMT
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ Connection:
24
+ - keep-alive
25
+ Status:
26
+ - 200 OK
27
+ X-Anonymous-Consumer:
28
+ - 'true'
29
+ Cache-Control:
30
+ - max-age=0, private, must-revalidate
31
+ Vary:
32
+ - Accept-Encoding, Origin
33
+ X-Request-Id:
34
+ - 9e991a49-1b31-467e-8398-17c65f21adff
35
+ Etag:
36
+ - W/"f61889405ef061735e59275bdbe3242a"
37
+ X-Runtime:
38
+ - '1.280903'
39
+ X-Powered-By:
40
+ - Phusion Passenger 6.0.6
41
+ Server:
42
+ - nginx/1.14.0 + Phusion Passenger 6.0.6
43
+ body:
44
+ encoding: ASCII-8BIT
45
+ string: '{"data":{"id":"10.26301/qdpd-2250","type":"dois","attributes":{"doi":"10.26301/qdpd-2250","prefix":"10.26301","suffix":"qdpd-2250","identifiers":[],"alternateIdentifiers":[],"creators":[{"name":"USS
46
+ Pampanito","nameType":"Organizational","givenName":null,"familyName":null,"affiliation":[],"nameIdentifiers":[]}],"titles":[{"lang":null,"title":"USS
47
+ Pampanito Submarine","titleType":null}],"publisher":"Open Heritage 3D","container":{},"publicationYear":2020,"subjects":[],"contributors":[],"dates":[],"language":null,"types":{"ris":"DATA","bibtex":"misc","citeproc":"dataset","schemaOrg":"Dataset","resourceType":"3D
48
+ Data","resourceTypeGeneral":"Dataset"},"relatedIdentifiers":[],"sizes":[],"formats":[],"version":null,"rightsList":[],"descriptions":[],"geoLocations":[],"fundingReferences":[],"xml":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHJlc291cmNlIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhtbG5zPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtNCIgeHNpOnNjaGVtYUxvY2F0aW9uPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtNCBodHRwOi8vc2NoZW1hLmRhdGFjaXRlLm9yZy9tZXRhL2tlcm5lbC00L21ldGFkYXRhLnhzZCI+CiAgPGlkZW50aWZpZXIgaWRlbnRpZmllclR5cGU9IkRPSSI+MTAuMjYzMDEvUURQRC0yMjUwPC9pZGVudGlmaWVyPgogIDxjcmVhdG9ycz4KICAgIDxjcmVhdG9yPgogICAgICA8Y3JlYXRvck5hbWUgbmFtZVR5cGU9Ik9yZ2FuaXphdGlvbmFsIj5VU1MgUGFtcGFuaXRvPC9jcmVhdG9yTmFtZT4KICAgIDwvY3JlYXRvcj4KICA8L2NyZWF0b3JzPgogIDx0aXRsZXM+CiAgICA8dGl0bGU+VVNTIFBhbXBhbml0byBTdWJtYXJpbmU8L3RpdGxlPgogIDwvdGl0bGVzPgogIDxwdWJsaXNoZXI+T3BlbiBIZXJpdGFnZSAzRDwvcHVibGlzaGVyPgogIDxwdWJsaWNhdGlvblllYXI+MjAyMDwvcHVibGljYXRpb25ZZWFyPgogIDxyZXNvdXJjZVR5cGUgcmVzb3VyY2VUeXBlR2VuZXJhbD0iRGF0YXNldCI+M0QgRGF0YTwvcmVzb3VyY2VUeXBlPgogIDxzaXplcy8+CiAgPGZvcm1hdHMvPgogIDx2ZXJzaW9uLz4KPC9yZXNvdXJjZT4K","url":"https://openheritage3d.org/project.php?id=qdpd-2250","contentUrl":null,"metadataVersion":1,"schemaVersion":"http://datacite.org/schema/kernel-4","source":"fabricaForm","isActive":true,"state":"findable","reason":null,"viewCount":0,"viewsOverTime":[],"downloadCount":0,"downloadsOverTime":[],"referenceCount":0,"citationCount":0,"citationsOverTime":[],"partCount":0,"partOfCount":0,"versionCount":0,"versionOfCount":0,"created":"2020-01-10T18:51:00.000Z","registered":"2020-01-16T00:17:10.000Z","published":"2020","updated":"2020-07-24T09:41:35.000Z"},"relationships":{"client":{"data":{"id":"cyark.oh","type":"clients"}},"media":{"data":{"id":"10.26301/qdpd-2250","type":"media"}},"references":{"data":[]},"citations":{"data":[]},"parts":{"data":[]},"partOf":{"data":[]},"versions":{"data":[]},"versionOf":{"data":[]}}},"included":[{"id":"cyark.oh","type":"clients","attributes":{"name":"OpenHeritage3D","symbol":"CYARK.OH","year":2019,"contactEmail":"scott.lee@cyark.org","alternateName":"Open
49
+ Heritage 3D","description":"As 3D and reality capture strategies for heritage
50
+ documentation become more widespread and available, there has emerged a growing
51
+ need to assist with guiding and facilitating accessibility to data, while
52
+ maintaining scientific rigor, cultural and ethical sensitivity, discoverability,
53
+ and archival standards. In response to these areas of need, The Open Heritage
54
+ 3D Alliance (OHA) has developed as an advisory group governing the Open Heritage
55
+ 3D initiative. This collaborative advisory group are among some of the earliest
56
+ adopters of 3D heritage documentation technologies, and offer first-hand guidance
57
+ for best practices in data management, sharing, and dissemination approaches
58
+ for 3D cultural heritage projects.\n\nThe founding members of the OHA, consist
59
+ of experts and organizational leaders from CyArk, Historic Environment Scotland,
60
+ and the University of South Florida Libraries, who together have significant
61
+ repositories of legacy and on-going 3D research and documentation projects.
62
+ These groups offer unique insight into not only the best practices for 3D
63
+ data capture and sharing, but also have come together around concerns dealing
64
+ with standards, formats, approach, ethics, and archive commitment. Together,
65
+ the OHA has begun the journey to provide open access to cultural heritage
66
+ 3D data, while maintaining integrity, security, and standards relating to
67
+ discoverable dissemination. Together, the OHA will work to provide democratized
68
+ access to primary heritage 3D data submitted from donors and organizations,
69
+ and will help to facilitate an operation platform, archive, and organization
70
+ of resources into the future","language":["en"],"clientType":"repository","domains":"*","re3data":null,"opendoar":null,"issn":{},"url":"https://openheritage3d.org/","created":"2019-03-26T16:21:19.000Z","updated":"2020-04-27T15:30:01.000Z","isActive":true,"hasPassword":true},"relationships":{"provider":{"data":{"id":"cyark","type":"providers"}},"prefixes":{"data":[{"id":"10.26301","type":"prefixes"}]}}}]}'
71
+ http_version:
72
+ recorded_at: Fri, 24 Jul 2020 09:45:26 GMT
73
+ recorded_with: VCR 3.0.3
@@ -67,6 +67,19 @@ describe Bolognese::Metadata, vcr: true do
67
67
  expect(json["issued"]).to eq("date-parts" => [[2016, 12, 20]])
68
68
  end
69
69
 
70
+ it "Another dataset" do
71
+ input = "10.26301/qdpd-2250"
72
+ subject = Bolognese::Metadata.new(input: input, from: "datacite")
73
+ json = JSON.parse(subject.citeproc)
74
+ expect(json["type"]).to eq("dataset")
75
+ expect(json["id"]).to eq("https://doi.org/10.26301/qdpd-2250")
76
+ expect(json["DOI"]).to eq("10.26301/qdpd-2250")
77
+ expect(json["title"]).to eq("USS Pampanito Submarine")
78
+ expect(json["author"]).to eq([{"literal"=>"USS Pampanito"}])
79
+ expect(json["publisher"]).to eq("Open Heritage 3D")
80
+ expect(json["issued"]).to eq("date-parts"=>[[2020]])
81
+ end
82
+
70
83
  it "journal article" do
71
84
  input = "10.7554/eLife.01567"
72
85
  subject = Bolognese::Metadata.new(input: input, from: "crossref")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolognese
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-17 00:00:00.000000000 Z
11
+ date: 2020-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: maremma
@@ -1117,6 +1117,7 @@ files:
1117
1117
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Missing_author.yml
1118
1118
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/interactive_resource_without_dates.yml
1119
1119
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/software_w/version.yml
1120
+ - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/Another_dataset.yml
1120
1121
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting.yml
1121
1122
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting_schema_org.yml
1122
1123
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/Dataset.yml
@@ -1248,8 +1249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1248
1249
  - !ruby/object:Gem::Version
1249
1250
  version: '0'
1250
1251
  requirements: []
1251
- rubyforge_project:
1252
- rubygems_version: 2.7.7
1252
+ rubygems_version: 3.0.8
1253
1253
  signing_key:
1254
1254
  specification_version: 4
1255
1255
  summary: Ruby client library for conversion of DOI Metadata