bolognese 0.9.89 → 0.9.91
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 +4 -4
- data/Gemfile.lock +3 -3
- data/lib/bolognese/metadata.rb +8 -8
- data/lib/bolognese/readers/bibtex_reader.rb +1 -1
- data/lib/bolognese/readers/citeproc_reader.rb +2 -2
- data/lib/bolognese/readers/codemeta_reader.rb +2 -2
- data/lib/bolognese/readers/crossref_reader.rb +2 -2
- data/lib/bolognese/readers/datacite_json_reader.rb +2 -2
- data/lib/bolognese/readers/datacite_reader.rb +2 -2
- data/lib/bolognese/readers/ris_reader.rb +1 -1
- data/lib/bolognese/readers/schema_org_reader.rb +2 -2
- data/lib/bolognese/version.rb +1 -1
- data/lib/bolognese/writers/bibtex_writer.rb +1 -1
- data/lib/bolognese/writers/citeproc_writer.rb +2 -2
- data/lib/bolognese/writers/codemeta_writer.rb +2 -2
- data/lib/bolognese/writers/crosscite_writer.rb +2 -2
- data/lib/bolognese/writers/datacite_json_writer.rb +2 -2
- data/lib/bolognese/writers/jats_writer.rb +2 -2
- data/lib/bolognese/writers/ris_writer.rb +1 -1
- data/lib/bolognese/writers/schema_org_writer.rb +2 -2
- data/spec/readers/bibtex_reader_spec.rb +1 -1
- data/spec/readers/citeproc_reader_spec.rb +1 -1
- data/spec/readers/codemeta_reader_spec.rb +4 -4
- data/spec/readers/crossref_reader_spec.rb +9 -9
- data/spec/readers/datacite_reader_spec.rb +5 -5
- data/spec/readers/ris_reader_spec.rb +1 -1
- data/spec/readers/schema_org_reader_spec.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 42571f806fa0ddb4fa5e9fc9bd69acd8ad632cf935e4632521b4a42bc0151a93
|
|
4
|
+
data.tar.gz: f79d228d759b0b9f0ae68755311490e8f80bddcc9b0ad00333317496ae5ef029
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 44eea3f6e8013da74b50dd291c74d8a9add5450f5759adab0ed0e057a007515a36fd4a34f091f4fbb75c105b5103f6deb150a46857d65b74074b1c9fe9024541
|
|
7
|
+
data.tar.gz: 89cc85c5a62e5ad783b805b312b4574ce2aa55c0a41b22d3070130b213a20914105e8e3992cdc202287b4d47028b603f2b77336f27f67ba10505996d0f435072
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
bolognese (0.9.
|
|
4
|
+
bolognese (0.9.91)
|
|
5
5
|
activesupport (>= 4.2.5, < 6)
|
|
6
6
|
benchmark_methods (~> 0.7)
|
|
7
7
|
bibtex-ruby (~> 4.1)
|
|
@@ -47,7 +47,7 @@ GEM
|
|
|
47
47
|
ebnf (1.1.2)
|
|
48
48
|
rdf (>= 2.2, < 4.0)
|
|
49
49
|
sxp (~> 1.0)
|
|
50
|
-
excon (0.
|
|
50
|
+
excon (0.61.0)
|
|
51
51
|
faraday (0.14.0)
|
|
52
52
|
multipart-post (>= 1.2, < 3)
|
|
53
53
|
faraday-encoding (0.0.4)
|
|
@@ -78,7 +78,7 @@ GEM
|
|
|
78
78
|
loofah (2.2.0)
|
|
79
79
|
crass (~> 1.0.2)
|
|
80
80
|
nokogiri (>= 1.5.9)
|
|
81
|
-
maremma (4.0.
|
|
81
|
+
maremma (4.0.5)
|
|
82
82
|
activesupport (>= 4.2.5, < 6)
|
|
83
83
|
addressable (>= 2.3.6)
|
|
84
84
|
builder (~> 3.2, >= 3.2.2)
|
data/lib/bolognese/metadata.rb
CHANGED
|
@@ -65,7 +65,7 @@ module Bolognese
|
|
|
65
65
|
:date_accepted, :date_available, :date_copyrighted, :date_collected,
|
|
66
66
|
:date_submitted, :date_valid, :date_created, :date_modified,
|
|
67
67
|
:date_registered, :date_updated, :provider_id, :client_id, :journal,
|
|
68
|
-
:volume, :issue, :first_page, :last_page, :
|
|
68
|
+
:volume, :issue, :first_page, :last_page, :b_url, :b_version, :keywords, :editor,
|
|
69
69
|
:description, :alternate_name, :language, :content_size, :spatial_coverage,
|
|
70
70
|
:schema_version, :additional_type, :has_part, :same_as,
|
|
71
71
|
:is_previous_version_of, :is_new_version_of, :is_cited_by, :cites,
|
|
@@ -99,7 +99,7 @@ module Bolognese
|
|
|
99
99
|
exit 1
|
|
100
100
|
end
|
|
101
101
|
else
|
|
102
|
-
hsh = { "
|
|
102
|
+
hsh = { "b_url" => options[:b_url],
|
|
103
103
|
"state" => options[:state],
|
|
104
104
|
"date_registered" => options[:date_registered],
|
|
105
105
|
"date_updated" => options[:date_updated],
|
|
@@ -113,7 +113,7 @@ module Bolognese
|
|
|
113
113
|
string = string.force_encoding("UTF-8") if string.present?
|
|
114
114
|
|
|
115
115
|
# generate name for method to call dynamically
|
|
116
|
-
@metadata = @from.present? ? send("read_" + @from, string: string, id: id, sandbox: options[:sandbox], doi: options[:doi],
|
|
116
|
+
@metadata = @from.present? ? send("read_" + @from, string: string, id: id, sandbox: options[:sandbox], doi: options[:doi], b_url: options[:b_url]) : {}
|
|
117
117
|
@raw = string.present? ? string.strip : nil
|
|
118
118
|
|
|
119
119
|
# input specific metadata elements required for DataCite
|
|
@@ -139,7 +139,7 @@ module Bolognese
|
|
|
139
139
|
|
|
140
140
|
@should_passthru = (@from == "datacite") && !regenerate
|
|
141
141
|
|
|
142
|
-
@
|
|
142
|
+
@b_url = hsh.to_h["b_url"].presence
|
|
143
143
|
@state = hsh.to_h["state"].presence
|
|
144
144
|
@date_registered = hsh.to_h["date_registered"].presence
|
|
145
145
|
@date_updated = hsh.to_h["date_updated"].presence
|
|
@@ -197,8 +197,8 @@ module Bolognese
|
|
|
197
197
|
@doi ||= @id.present? ? doi_from_url(@id) : metadata.fetch("doi", nil)
|
|
198
198
|
end
|
|
199
199
|
|
|
200
|
-
def
|
|
201
|
-
@
|
|
200
|
+
def b_url
|
|
201
|
+
@b_url ||= metadata.fetch("b_url", nil)
|
|
202
202
|
end
|
|
203
203
|
|
|
204
204
|
def identifier
|
|
@@ -297,8 +297,8 @@ module Bolognese
|
|
|
297
297
|
@license ||= metadata.fetch("license", nil)
|
|
298
298
|
end
|
|
299
299
|
|
|
300
|
-
def
|
|
301
|
-
@
|
|
300
|
+
def b_version
|
|
301
|
+
@b_version ||= metadata.fetch("b_version", nil)
|
|
302
302
|
end
|
|
303
303
|
|
|
304
304
|
def keywords
|
|
@@ -52,7 +52,7 @@ module Bolognese
|
|
|
52
52
|
"ris_type" => BIB_TO_RIS_TRANSLATIONS[meta.type.to_s] || "GEN",
|
|
53
53
|
"resource_type_general" => Metadata::SO_TO_DC_TRANSLATIONS[type],
|
|
54
54
|
"doi" => doi,
|
|
55
|
-
"
|
|
55
|
+
"b_url" => meta.url.to_s,
|
|
56
56
|
"title" => meta.title.to_s,
|
|
57
57
|
"author" => author,
|
|
58
58
|
"publisher" => meta.publisher.to_s.presence,
|
|
@@ -56,7 +56,7 @@ module Bolognese
|
|
|
56
56
|
"ris_type" => CP_TO_RIS_TRANSLATIONS[type] || "GEN",
|
|
57
57
|
"resource_type_general" => Bolognese::Utils::SO_TO_DC_TRANSLATIONS[type],
|
|
58
58
|
"doi" => doi_from_url(doi),
|
|
59
|
-
"
|
|
59
|
+
"b_url" => normalize_id(meta.fetch("URL", nil)),
|
|
60
60
|
"title" => meta.fetch("title", nil),
|
|
61
61
|
"author" => author,
|
|
62
62
|
"container_title" => container_title,
|
|
@@ -67,7 +67,7 @@ module Bolognese
|
|
|
67
67
|
#{}"pagination" => meta.pages.to_s.presence,
|
|
68
68
|
"description" => meta.fetch("abstract", nil).present? ? { "text" => sanitize(meta.fetch("abstract")) } : nil,
|
|
69
69
|
#{ }"license" => { "id" => meta.field?(:copyright) && meta.copyright.to_s.presence },
|
|
70
|
-
"
|
|
70
|
+
"b_version" => meta.fetch("version", nil),
|
|
71
71
|
"keywords" => meta.fetch("categories", nil),
|
|
72
72
|
"state" => state
|
|
73
73
|
}
|
|
@@ -35,7 +35,7 @@ module Bolognese
|
|
|
35
35
|
"resource_type_general" => Bolognese::Utils::SO_TO_DC_TRANSLATIONS[type],
|
|
36
36
|
"identifier" => identifier,
|
|
37
37
|
"doi" => validate_doi(id),
|
|
38
|
-
"
|
|
38
|
+
"b_url" => normalize_id(meta.fetch("codeRepository", nil)),
|
|
39
39
|
"title" => meta.fetch("title", nil),
|
|
40
40
|
"alternate_name" => meta.fetch("alternateName", nil),
|
|
41
41
|
"author" => author,
|
|
@@ -47,7 +47,7 @@ module Bolognese
|
|
|
47
47
|
"date_modified" => meta.fetch("dateModified", nil),
|
|
48
48
|
"description" => meta.fetch("description", nil).present? ? { "text" => sanitize(meta.fetch("description")) } : nil,
|
|
49
49
|
"license" => { "id" => meta.fetch("license", nil) },
|
|
50
|
-
"
|
|
50
|
+
"b_version" => meta.fetch("version", nil),
|
|
51
51
|
"keywords" => meta.fetch("tags", nil),
|
|
52
52
|
"state" => state
|
|
53
53
|
}
|
|
@@ -144,7 +144,7 @@ module Bolognese
|
|
|
144
144
|
"ris_type" => Bolognese::Utils::CR_TO_RIS_TRANSLATIONS[additional_type] || "JOUR",
|
|
145
145
|
"resource_type_general" => Bolognese::Utils::SO_TO_DC_TRANSLATIONS[type],
|
|
146
146
|
"doi" => doi,
|
|
147
|
-
"
|
|
147
|
+
"b_url" => bibliographic_metadata.dig("doi_data", "resource"),
|
|
148
148
|
"title" => parse_attributes(bibliographic_metadata.dig("titles", "title")),
|
|
149
149
|
"alternate_name" => crossref_alternate_name(bibliographic_metadata),
|
|
150
150
|
"author" => crossref_people(bibliographic_metadata, "author"),
|
|
@@ -162,7 +162,7 @@ module Bolognese
|
|
|
162
162
|
"last_page" => bibliographic_metadata.dig("pages", "last_page"),
|
|
163
163
|
"description" => crossref_description(bibliographic_metadata),
|
|
164
164
|
"license" => crossref_license(program_metadata),
|
|
165
|
-
"
|
|
165
|
+
"b_version" => nil,
|
|
166
166
|
"keywords" => nil,
|
|
167
167
|
"language" => nil,
|
|
168
168
|
"content_size" => nil,
|
|
@@ -19,7 +19,7 @@ module Bolognese
|
|
|
19
19
|
"ris_type" => Bolognese::Utils::SO_TO_RIS_TRANSLATIONS[resource_type_general.to_s.dasherize] || "GEN",
|
|
20
20
|
"resource_type_general" => resource_type_general,
|
|
21
21
|
"doi" => validate_doi(meta.fetch("doi", nil)),
|
|
22
|
-
"
|
|
22
|
+
"b_url" => normalize_id(meta.fetch("url", nil)),
|
|
23
23
|
"title" => meta.fetch("title", nil),
|
|
24
24
|
"alternate_name" => meta.fetch("alternate-identifier", nil),
|
|
25
25
|
"author" => meta.fetch("creator", nil),
|
|
@@ -41,7 +41,7 @@ module Bolognese
|
|
|
41
41
|
"date_modified" => meta.fetch("date-modified", nil),
|
|
42
42
|
"description" => meta.fetch("description", nil),
|
|
43
43
|
"license" => meta.fetch("license", nil),
|
|
44
|
-
"
|
|
44
|
+
"b_version" => meta.fetch("version", nil),
|
|
45
45
|
"keywords" => meta.fetch("subject", nil),
|
|
46
46
|
"language" => meta.fetch("language", nil),
|
|
47
47
|
"content_size" => meta.fetch("size", nil),
|
|
@@ -33,7 +33,7 @@ module Bolognese
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
{ "string" => string,
|
|
36
|
-
"
|
|
36
|
+
"b_url" => attributes.fetch("url", nil),
|
|
37
37
|
"state" => attributes.fetch("state", nil),
|
|
38
38
|
"date_registered" => attributes.fetch("registered", nil),
|
|
39
39
|
"date_updated" => attributes.fetch("updated", nil),
|
|
@@ -127,7 +127,7 @@ module Bolognese
|
|
|
127
127
|
"date_modified" => datacite_date(dates, "Updated"),
|
|
128
128
|
"description" => description,
|
|
129
129
|
"license" => license,
|
|
130
|
-
"
|
|
130
|
+
"b_version" => meta.fetch("version", nil),
|
|
131
131
|
"keywords" => keywords,
|
|
132
132
|
"language" => meta.fetch("language", nil),
|
|
133
133
|
"content_size" => meta.fetch("size", nil),
|
|
@@ -54,7 +54,7 @@ module Bolognese
|
|
|
54
54
|
"ris_type" => ris_type,
|
|
55
55
|
"resource_type_general" => Metadata::SO_TO_DC_TRANSLATIONS[type],
|
|
56
56
|
"doi" => doi,
|
|
57
|
-
"
|
|
57
|
+
"b_url" => meta.fetch("UR", nil),
|
|
58
58
|
"title" => meta.fetch("T1", nil),
|
|
59
59
|
"alternate_name" => meta.fetch("AN", nil),
|
|
60
60
|
"author" => get_authors(author),
|
|
@@ -51,7 +51,7 @@ module Bolognese
|
|
|
51
51
|
"ris_type" => Bolognese::Utils::SO_TO_RIS_TRANSLATIONS[resource_type_general.to_s.dasherize] || "GEN",
|
|
52
52
|
"resource_type_general" => resource_type_general,
|
|
53
53
|
"doi" => validate_doi(id),
|
|
54
|
-
"
|
|
54
|
+
"b_url" => normalize_id(meta.fetch("url", nil)),
|
|
55
55
|
"title" => meta.fetch("name", nil),
|
|
56
56
|
"alternate_name" => meta.fetch("alternateName", nil),
|
|
57
57
|
"author" => author,
|
|
@@ -69,7 +69,7 @@ module Bolognese
|
|
|
69
69
|
"date_modified" => meta.fetch("dateModified", nil),
|
|
70
70
|
"description" => meta.fetch("description", nil).present? ? { "text" => sanitize(meta.fetch("description")) } : nil,
|
|
71
71
|
"license" => { "id" => meta.fetch("license", nil) },
|
|
72
|
-
"
|
|
72
|
+
"b_version" => meta.fetch("version", nil),
|
|
73
73
|
"keywords" => meta.fetch("keywords", nil).to_s.split(", "),
|
|
74
74
|
"state" => state
|
|
75
75
|
}
|
data/lib/bolognese/version.rb
CHANGED
|
@@ -8,7 +8,7 @@ module Bolognese
|
|
|
8
8
|
bibtex_type: bibtex_type.presence || "misc",
|
|
9
9
|
bibtex_key: identifier,
|
|
10
10
|
doi: doi,
|
|
11
|
-
url:
|
|
11
|
+
url: b_url,
|
|
12
12
|
author: authors_as_string(author),
|
|
13
13
|
keywords: Array.wrap(parse_attributes(keywords, content: "text")).join(", "),
|
|
14
14
|
language: language,
|
|
@@ -18,8 +18,8 @@ module Bolognese
|
|
|
18
18
|
"page" => [first_page, last_page].compact.join("-").presence,
|
|
19
19
|
"publisher" => publisher,
|
|
20
20
|
"title" => parse_attributes(title, content: "text", first: true),
|
|
21
|
-
"URL" =>
|
|
22
|
-
"version" =>
|
|
21
|
+
"URL" => b_url,
|
|
22
|
+
"version" => b_version,
|
|
23
23
|
"volume" => volume
|
|
24
24
|
}.compact
|
|
25
25
|
JSON.pretty_generate hsh.presence
|
|
@@ -9,11 +9,11 @@ module Bolognese
|
|
|
9
9
|
"@type" => type,
|
|
10
10
|
"@id" => identifier,
|
|
11
11
|
"identifier" => identifier,
|
|
12
|
-
"codeRepository" =>
|
|
12
|
+
"codeRepository" => b_url,
|
|
13
13
|
"title" => title,
|
|
14
14
|
"agents" => author,
|
|
15
15
|
"description" => description.present? ? description["text"] : nil,
|
|
16
|
-
"version" =>
|
|
16
|
+
"version" => b_version,
|
|
17
17
|
"tags" => keywords.to_s.split(", ").presence,
|
|
18
18
|
"dateCreated" => date_created,
|
|
19
19
|
"datePublished" => date_published,
|
|
@@ -5,7 +5,7 @@ module Bolognese
|
|
|
5
5
|
hsh = {
|
|
6
6
|
"id" => identifier,
|
|
7
7
|
"doi" => doi,
|
|
8
|
-
"url" =>
|
|
8
|
+
"url" => b_url,
|
|
9
9
|
"type" => type,
|
|
10
10
|
"additional_type" => additional_type,
|
|
11
11
|
"citeproc_type" => citeproc_type,
|
|
@@ -32,7 +32,7 @@ module Bolognese
|
|
|
32
32
|
"language" => language,
|
|
33
33
|
"alternate_name" => alternate_name,
|
|
34
34
|
"content_size" => content_size,
|
|
35
|
-
"version" =>
|
|
35
|
+
"version" => b_version,
|
|
36
36
|
"license" => license,
|
|
37
37
|
"description" => description,
|
|
38
38
|
"volume" => volume,
|
|
@@ -5,7 +5,7 @@ module Bolognese
|
|
|
5
5
|
hsh = {
|
|
6
6
|
"id" => identifier,
|
|
7
7
|
"doi" => doi,
|
|
8
|
-
"url" =>
|
|
8
|
+
"url" => b_url,
|
|
9
9
|
"creator" => author,
|
|
10
10
|
"title" => title,
|
|
11
11
|
"publisher" => publisher,
|
|
@@ -32,7 +32,7 @@ module Bolognese
|
|
|
32
32
|
"is_part_of" => is_part_of,
|
|
33
33
|
"has_part" => has_part,
|
|
34
34
|
"size" => content_size,
|
|
35
|
-
"version" =>
|
|
35
|
+
"version" => b_version,
|
|
36
36
|
"rights" => license,
|
|
37
37
|
"description" => description,
|
|
38
38
|
"geo-location" => spatial_coverage,
|
|
@@ -20,7 +20,7 @@ module Bolognese
|
|
|
20
20
|
insert_issue(xml) if issue.present?
|
|
21
21
|
insert_fpage(xml) if first_page.present?
|
|
22
22
|
insert_lpage(xml) if last_page.present?
|
|
23
|
-
insert_version(xml) if
|
|
23
|
+
insert_version(xml) if b_version.present?
|
|
24
24
|
insert_pub_id(xml)
|
|
25
25
|
end
|
|
26
26
|
|
|
@@ -110,7 +110,7 @@ module Bolognese
|
|
|
110
110
|
end
|
|
111
111
|
|
|
112
112
|
def insert_version(xml)
|
|
113
|
-
xml.version(
|
|
113
|
+
xml.version(b_version)
|
|
114
114
|
end
|
|
115
115
|
|
|
116
116
|
def insert_pub_id(xml)
|
|
@@ -8,7 +8,7 @@ module Bolognese
|
|
|
8
8
|
"T2" => container_title,
|
|
9
9
|
"AU" => to_ris(author),
|
|
10
10
|
"DO" => doi,
|
|
11
|
-
"UR" =>
|
|
11
|
+
"UR" => b_url,
|
|
12
12
|
"AB" => parse_attributes(description, content: "text", first: true),
|
|
13
13
|
"KW" => parse_attributes(keywords, content: "text").presence,
|
|
14
14
|
"PY" => publication_year,
|
|
@@ -6,7 +6,7 @@ module Bolognese
|
|
|
6
6
|
"@type" => type,
|
|
7
7
|
"@id" => identifier,
|
|
8
8
|
"identifier" => identifier,
|
|
9
|
-
"url" =>
|
|
9
|
+
"url" => b_url,
|
|
10
10
|
"additionalType" => additional_type,
|
|
11
11
|
"name" => parse_attributes(title, content: "text", first: true),
|
|
12
12
|
"alternateName" => parse_attributes(alternate_name, content: "name", first: true),
|
|
@@ -14,7 +14,7 @@ module Bolognese
|
|
|
14
14
|
"editor" => to_schema_org(editor),
|
|
15
15
|
"description" => parse_attributes(description, content: "text", first: true),
|
|
16
16
|
"license" => Array.wrap(license).map { |l| l["id"] }.compact.unwrap,
|
|
17
|
-
"version" =>
|
|
17
|
+
"version" => b_version,
|
|
18
18
|
"keywords" => Array.wrap(keywords).join(", ").presence,
|
|
19
19
|
"inLanguage" => language,
|
|
20
20
|
"contentSize" => content_size,
|
|
@@ -28,7 +28,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
28
28
|
expect(subject.valid?).to be true
|
|
29
29
|
expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
|
|
30
30
|
expect(subject.type).to eq("ScholarlyArticle")
|
|
31
|
-
expect(subject.
|
|
31
|
+
expect(subject.b_url).to eq("http://elifesciences.org/lookup/doi/10.7554/eLife.01567")
|
|
32
32
|
expect(subject.resource_type_general).to eq("Text")
|
|
33
33
|
expect(subject.author.length).to eq(5)
|
|
34
34
|
expect(subject.author.first).to eq("type"=>"Person", "name"=>"Martial Sankar", "givenName"=>"Martial", "familyName"=>"Sankar")
|
|
@@ -15,7 +15,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
15
15
|
it "BlogPosting" do
|
|
16
16
|
expect(subject.valid?).to be true
|
|
17
17
|
expect(subject.id).to eq("https://doi.org/10.5438/4k3m-nyvg")
|
|
18
|
-
expect(subject.
|
|
18
|
+
expect(subject.b_url).to eq("https://blog.datacite.org/eating-your-own-dog-food")
|
|
19
19
|
expect(subject.type).to eq("BlogPosting")
|
|
20
20
|
expect(subject.resource_type_general).to eq("Text")
|
|
21
21
|
expect(subject.author).to eq("type"=>"Person", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner")
|
|
@@ -17,7 +17,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
17
17
|
it "maremma" do
|
|
18
18
|
expect(subject.valid?).to be true
|
|
19
19
|
expect(subject.id).to eq("https://doi.org/10.5438/qeg0-3gm3")
|
|
20
|
-
expect(subject.
|
|
20
|
+
expect(subject.b_url).to eq("https://github.com/datacite/maremma")
|
|
21
21
|
expect(subject.type).to eq("SoftwareSourceCode")
|
|
22
22
|
expect(subject.author).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner")
|
|
23
23
|
expect(subject.title).to eq("Maremma: a Ruby library for simplified network calls")
|
|
@@ -49,7 +49,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
49
49
|
input = fixture_path + 'codemeta.json'
|
|
50
50
|
subject = Bolognese::Metadata.new(input: input)
|
|
51
51
|
expect(subject.id).to eq("https://doi.org/10.5063/f1m61h5x")
|
|
52
|
-
expect(subject.
|
|
52
|
+
expect(subject.b_url).to eq("https://github.com/DataONEorg/rdataone")
|
|
53
53
|
expect(subject.type).to eq("SoftwareSourceCode")
|
|
54
54
|
expect(subject.author).to eq( [{"type"=>"Person",
|
|
55
55
|
"id"=>"http://orcid.org/0000-0003-0077-4738",
|
|
@@ -65,7 +65,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
65
65
|
expect(subject.title).to eq("R Interface to the DataONE REST API")
|
|
66
66
|
expect(subject.description["text"]).to start_with("Provides read and write access to data and metadata")
|
|
67
67
|
expect(subject.keywords).to eq(["data sharing", "data repository", "DataONE"])
|
|
68
|
-
expect(subject.
|
|
68
|
+
expect(subject.b_version).to eq("2.0.0")
|
|
69
69
|
expect(subject.date_created).to eq("2016-05-27")
|
|
70
70
|
expect(subject.date_published).to eq("2016-05-27")
|
|
71
71
|
expect(subject.date_modified).to eq("2016-05-27")
|
|
@@ -77,7 +77,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
77
77
|
subject = Bolognese::Metadata.new(input: input)
|
|
78
78
|
expect(subject.valid?).to be true
|
|
79
79
|
expect(subject.id).to eq("https://doi.org/10.5438/qeg0-3gm3")
|
|
80
|
-
expect(subject.
|
|
80
|
+
expect(subject.b_url).to eq("https://github.com/datacite/maremma")
|
|
81
81
|
expect(subject.type).to eq("SoftwareSourceCode")
|
|
82
82
|
expect(subject.author).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner")
|
|
83
83
|
expect(subject.title).to eq("Maremma: a Ruby library for simplified network calls")
|
|
@@ -18,7 +18,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
18
18
|
expect(subject.valid?).to be true
|
|
19
19
|
expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
|
|
20
20
|
expect(subject.type).to eq("ScholarlyArticle")
|
|
21
|
-
expect(subject.
|
|
21
|
+
expect(subject.b_url).to eq("https://elifesciences.org/articles/01567")
|
|
22
22
|
expect(subject.additional_type).to eq("JournalArticle")
|
|
23
23
|
expect(subject.resource_type_general).to eq("Text")
|
|
24
24
|
expect(subject.author.length).to eq(5)
|
|
@@ -50,7 +50,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
50
50
|
subject = Bolognese::Metadata.new(input: input)
|
|
51
51
|
expect(subject.valid?).to be true
|
|
52
52
|
expect(subject.id).to eq(input)
|
|
53
|
-
expect(subject.
|
|
53
|
+
expect(subject.b_url).to eq("http://dx.plos.org/10.1371/journal.pone.0000030")
|
|
54
54
|
expect(subject.type).to eq("ScholarlyArticle")
|
|
55
55
|
expect(subject.additional_type).to eq("JournalArticle")
|
|
56
56
|
expect(subject.resource_type_general).to eq("Text")
|
|
@@ -73,7 +73,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
73
73
|
subject = Bolognese::Metadata.new(input: input)
|
|
74
74
|
expect(subject.valid?).to be true
|
|
75
75
|
expect(subject.id).to eq(input)
|
|
76
|
-
expect(subject.
|
|
76
|
+
expect(subject.b_url).to eq("http://biorxiv.org/lookup/doi/10.1101/097196")
|
|
77
77
|
expect(subject.type).to eq("ScholarlyArticle")
|
|
78
78
|
expect(subject.additional_type).to eq("PostedContent")
|
|
79
79
|
expect(subject.resource_type_general).to eq("Text")
|
|
@@ -94,7 +94,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
94
94
|
subject = Bolognese::Metadata.new(input: input)
|
|
95
95
|
expect(subject.valid?).to be true
|
|
96
96
|
expect(subject.id).to eq("https://doi.org/10.1890/0012-9658(2006)87%5B2832:tiopma%5D2.0.co;2")
|
|
97
|
-
expect(subject.
|
|
97
|
+
expect(subject.b_url).to eq("http://doi.wiley.com/10.1890/0012-9658(2006)87[2832:TIOPMA]2.0.CO;2")
|
|
98
98
|
expect(subject.type).to eq("ScholarlyArticle")
|
|
99
99
|
expect(subject.additional_type).to eq("JournalArticle")
|
|
100
100
|
expect(subject.resource_type_general).to eq("Text")
|
|
@@ -115,7 +115,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
115
115
|
subject = Bolognese::Metadata.new(input: input)
|
|
116
116
|
expect(subject.valid?).to be true
|
|
117
117
|
expect(subject.id).to eq("https://doi.org/10.1155/2012/291294")
|
|
118
|
-
expect(subject.
|
|
118
|
+
expect(subject.b_url).to eq("http://www.hindawi.com/journals/pm/2012/291294/")
|
|
119
119
|
expect(subject.type).to eq("ScholarlyArticle")
|
|
120
120
|
expect(subject.additional_type).to eq("JournalArticle")
|
|
121
121
|
expect(subject.resource_type_general).to eq("Text")
|
|
@@ -137,7 +137,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
137
137
|
subject = Bolognese::Metadata.new(input: input)
|
|
138
138
|
expect(subject.valid?).to be true
|
|
139
139
|
expect(subject.id).to eq(input)
|
|
140
|
-
expect(subject.
|
|
140
|
+
expect(subject.b_url).to eq("http://linkinghub.elsevier.com/retrieve/pii/S0014299915002332")
|
|
141
141
|
expect(subject.type).to eq("ScholarlyArticle")
|
|
142
142
|
expect(subject.additional_type).to eq("JournalArticle")
|
|
143
143
|
expect(subject.resource_type_general).to eq("Text")
|
|
@@ -156,7 +156,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
156
156
|
subject = Bolognese::Metadata.new(input: input)
|
|
157
157
|
expect(subject.valid?).to be true
|
|
158
158
|
expect(subject.id).to eq("https://doi.org/10.2210/pdb4hhb/pdb")
|
|
159
|
-
expect(subject.
|
|
159
|
+
expect(subject.b_url).to eq("ftp://ftp.wwpdb.org/pub/pdb/data/structures/divided/pdb/hh/pdb4hhb.ent.gz")
|
|
160
160
|
expect(subject.type).to eq("ScholarlyArticle")
|
|
161
161
|
expect(subject.additional_type).to eq("SaComponent")
|
|
162
162
|
expect(subject.resource_type_general).to eq("Text")
|
|
@@ -176,7 +176,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
176
176
|
subject = Bolognese::Metadata.new(input: input)
|
|
177
177
|
expect(subject.valid?).to be true
|
|
178
178
|
expect(subject.id).to eq("https://doi.org/10.1007/978-3-662-46370-3_13")
|
|
179
|
-
expect(subject.
|
|
179
|
+
expect(subject.b_url).to eq("http://link.springer.com/10.1007/978-3-662-46370-3_13")
|
|
180
180
|
expect(subject.type).to eq("Chapter")
|
|
181
181
|
expect(subject.additional_type).to eq("BookChapter")
|
|
182
182
|
expect(subject.resource_type_general).to eq("Text")
|
|
@@ -194,7 +194,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
194
194
|
subject = Bolognese::Metadata.new(input: input)
|
|
195
195
|
expect(subject.valid?).to be true
|
|
196
196
|
expect(subject.id).to eq(input)
|
|
197
|
-
expect(subject.
|
|
197
|
+
expect(subject.b_url).to eq("http://doi.wiley.com/10.1111/nph.14619")
|
|
198
198
|
expect(subject.type).to eq("ScholarlyArticle")
|
|
199
199
|
expect(subject.additional_type).to eq("JournalArticle")
|
|
200
200
|
expect(subject.resource_type_general).to eq("Text")
|
|
@@ -17,7 +17,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
17
17
|
it "Dataset" do
|
|
18
18
|
expect(subject.valid?).to be true
|
|
19
19
|
expect(subject.id).to eq("https://doi.org/10.5061/dryad.8515")
|
|
20
|
-
expect(subject.
|
|
20
|
+
expect(subject.b_url).to eq("http://datadryad.org/resource/doi:10.5061/dryad.8515")
|
|
21
21
|
expect(subject.type).to eq("Dataset")
|
|
22
22
|
expect(subject.additional_type).to eq("DataPackage")
|
|
23
23
|
expect(subject.resource_type_general).to eq("Dataset")
|
|
@@ -313,7 +313,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
313
313
|
"givenName"=>"Henk",
|
|
314
314
|
"familyName"=>"Eskes"}])
|
|
315
315
|
expect(subject.title).to eq("Multi-Sensor Reanalysis (MSR) of total ozone, version 2")
|
|
316
|
-
expect(subject.
|
|
316
|
+
expect(subject.b_version).to eq("2")
|
|
317
317
|
expect(subject.date_published).to eq("2015")
|
|
318
318
|
expect(subject.publisher).to eq("Royal Netherlands Meteorological Institute (KNMI)")
|
|
319
319
|
expect(subject.service_provider).to eq("DataCite")
|
|
@@ -378,7 +378,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
378
378
|
expect(subject.valid?).to be true
|
|
379
379
|
expect(subject.id).to eq("https://doi.org/10.5061/8515")
|
|
380
380
|
expect(subject.doi).to eq("10.5061/8515")
|
|
381
|
-
expect(subject.
|
|
381
|
+
expect(subject.b_url).to eq("http://datadryad.org/resource/doi:10.5061/dryad.8515")
|
|
382
382
|
expect(subject.type).to eq("Dataset")
|
|
383
383
|
end
|
|
384
384
|
|
|
@@ -387,7 +387,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
387
387
|
expect(subject.valid?).to be true
|
|
388
388
|
expect(subject.id).to eq("https://doi.org/10.5061/dryad.8515")
|
|
389
389
|
expect(subject.doi).to eq("10.5061/dryad.8515")
|
|
390
|
-
expect(subject.
|
|
390
|
+
expect(subject.b_url).to eq("http://datadryad.org/resource/doi:10.5061/dryad.8515")
|
|
391
391
|
expect(subject.type).to eq("Dataset")
|
|
392
392
|
expect(subject.title).to eq("A new malaria agent in African hominids.")
|
|
393
393
|
end
|
|
@@ -397,7 +397,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
397
397
|
expect(subject.valid?).to be true
|
|
398
398
|
expect(subject.id).to eq("https://doi.org/10.5061/dryad.8515")
|
|
399
399
|
expect(subject.doi).to eq("10.5061/dryad.8515")
|
|
400
|
-
expect(subject.
|
|
400
|
+
expect(subject.b_url).to eq("http://datadryad.org/resource/doi:10.5061/dryad.8515")
|
|
401
401
|
expect(subject.type).to eq("Dataset")
|
|
402
402
|
expect(subject.title).to eq("Data from: A new malaria agent in African hominids.")
|
|
403
403
|
expect(subject.state).to eq("registered")
|
|
@@ -28,7 +28,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
28
28
|
expect(subject.valid?).to be true
|
|
29
29
|
expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
|
|
30
30
|
expect(subject.type).to eq("ScholarlyArticle")
|
|
31
|
-
expect(subject.
|
|
31
|
+
expect(subject.b_url).to eq("http://elifesciences.org/lookup/doi/10.7554/eLife.01567")
|
|
32
32
|
expect(subject.resource_type_general).to eq("Text")
|
|
33
33
|
expect(subject.author.length).to eq(5)
|
|
34
34
|
expect(subject.author.first).to eq("type"=>"Person",
|
|
@@ -18,7 +18,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
18
18
|
it "BlogPosting" do
|
|
19
19
|
expect(subject.valid?).to be true
|
|
20
20
|
expect(subject.id).to eq("https://doi.org/10.5438/4k3m-nyvg")
|
|
21
|
-
expect(subject.
|
|
21
|
+
expect(subject.b_url).to eq("https://blog.datacite.org/eating-your-own-dog-food")
|
|
22
22
|
expect(subject.type).to eq("BlogPosting")
|
|
23
23
|
expect(subject.author).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0003-1419-2405", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner")
|
|
24
24
|
expect(subject.title).to eq("Eating your own Dog Food")
|
|
@@ -38,7 +38,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
38
38
|
expect(subject.valid?).to be true
|
|
39
39
|
expect(subject.id).to eq("https://doi.org/10.5438/0000-00ss")
|
|
40
40
|
expect(subject.doi).to eq("10.5438/0000-00ss")
|
|
41
|
-
expect(subject.
|
|
41
|
+
expect(subject.b_url).to eq("https://blog.datacite.org/eating-your-own-dog-food")
|
|
42
42
|
expect(subject.type).to eq("BlogPosting")
|
|
43
43
|
end
|
|
44
44
|
|
|
@@ -57,7 +57,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
57
57
|
subject = Bolognese::Metadata.new(input: input)
|
|
58
58
|
|
|
59
59
|
expect(subject.id).to eq("https://doi.org/10.5438/4k3m-nyvg")
|
|
60
|
-
expect(subject.
|
|
60
|
+
expect(subject.b_url).to eq("https://blog.datacite.org/eating-your-own-dog-food")
|
|
61
61
|
expect(subject.type).to eq("BlogPosting")
|
|
62
62
|
expect(subject.author).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-1419-2405", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner")
|
|
63
63
|
expect(subject.title).to eq("Eating your own Dog Food")
|
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: 0.9.
|
|
4
|
+
version: 0.9.91
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Martin Fenner
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-03-
|
|
11
|
+
date: 2018-03-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: maremma
|