bolognese 1.6.2 → 1.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +18 -13
- data/bolognese.gemspec +4 -4
- data/lib/bolognese/datacite_utils.rb +9 -3
- data/lib/bolognese/metadata.rb +6 -8
- data/lib/bolognese/metadata_utils.rb +10 -3
- data/lib/bolognese/readers/bibtex_reader.rb +2 -1
- data/lib/bolognese/readers/citeproc_reader.rb +2 -2
- data/lib/bolognese/readers/codemeta_reader.rb +3 -3
- data/lib/bolognese/readers/crossref_reader.rb +2 -2
- data/lib/bolognese/readers/datacite_reader.rb +3 -3
- data/lib/bolognese/readers/npm_reader.rb +1 -1
- data/lib/bolognese/readers/schema_org_reader.rb +4 -5
- data/lib/bolognese/utils.rb +89 -9
- data/lib/bolognese/version.rb +1 -1
- data/lib/bolognese/writers/bibtex_writer.rb +2 -1
- data/lib/bolognese/writers/codemeta_writer.rb +3 -2
- data/lib/bolognese/writers/jats_writer.rb +2 -2
- data/lib/bolognese/writers/schema_org_writer.rb +1 -1
- data/resources/spdx/licenses.json +5297 -0
- data/spec/datacite_utils_spec.rb +5 -1
- data/spec/fixtures/datacite-example-affiliation.xml +1 -1
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/not_found.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/with_trailing_slash.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/with_trailing_slash_and_to_https.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/to_https.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/with_trailing_slash_and_to_https.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_id.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_not_found.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_url.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_exists.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_id.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_not_found.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/http.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/uri.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/with_trailing_slash.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/software_w/version.yml +52 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding.yml +58 -10
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding_OpenAIRE.yml +65 -28
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_Cyark.yml +98 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_IsSupplementTo.yml +58 -10
- data/spec/readers/bibtex_reader_spec.rb +5 -1
- data/spec/readers/codemeta_reader_spec.rb +21 -1
- data/spec/readers/crossref_reader_spec.rb +21 -5
- data/spec/readers/datacite_json_reader_spec.rb +1 -1
- data/spec/readers/datacite_reader_spec.rb +51 -11
- data/spec/readers/npm_reader_spec.rb +3 -3
- data/spec/readers/schema_org_reader_spec.rb +2 -2
- data/spec/utils_spec.rb +58 -0
- data/spec/writers/bibtex_writer_spec.rb +6 -0
- data/spec/writers/citation_writer_spec.rb +8 -0
- data/spec/writers/citeproc_writer_spec.rb +12 -2
- data/spec/writers/crosscite_writer_spec.rb +5 -1
- data/spec/writers/datacite_json_writer_spec.rb +5 -1
- data/spec/writers/datacite_writer_spec.rb +22 -7
- data/spec/writers/schema_org_writer_spec.rb +29 -3
- metadata +31 -8
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.6.
|
4
|
+
version: 1.6.7
|
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-06-
|
11
|
+
date: 2020-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: maremma
|
@@ -132,14 +132,20 @@ dependencies:
|
|
132
132
|
requirements:
|
133
133
|
- - "~>"
|
134
134
|
- !ruby/object:Gem::Version
|
135
|
-
version: '0
|
135
|
+
version: '1.0'
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 1.0.1
|
136
139
|
type: :runtime
|
137
140
|
prerelease: false
|
138
141
|
version_requirements: !ruby/object:Gem::Requirement
|
139
142
|
requirements:
|
140
143
|
- - "~>"
|
141
144
|
- !ruby/object:Gem::Version
|
142
|
-
version: '0
|
145
|
+
version: '1.0'
|
146
|
+
- - ">="
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: 1.0.1
|
143
149
|
- !ruby/object:Gem::Dependency
|
144
150
|
name: colorize
|
145
151
|
requirement: !ruby/object:Gem::Requirement
|
@@ -268,20 +274,20 @@ dependencies:
|
|
268
274
|
requirements:
|
269
275
|
- - "~>"
|
270
276
|
- !ruby/object:Gem::Version
|
271
|
-
version: '
|
277
|
+
version: '3.1'
|
272
278
|
- - ">="
|
273
279
|
- !ruby/object:Gem::Version
|
274
|
-
version:
|
280
|
+
version: 3.1.4
|
275
281
|
type: :runtime
|
276
282
|
prerelease: false
|
277
283
|
version_requirements: !ruby/object:Gem::Requirement
|
278
284
|
requirements:
|
279
285
|
- - "~>"
|
280
286
|
- !ruby/object:Gem::Version
|
281
|
-
version: '
|
287
|
+
version: '3.1'
|
282
288
|
- - ">="
|
283
289
|
- !ruby/object:Gem::Version
|
284
|
-
version:
|
290
|
+
version: 3.1.4
|
285
291
|
- !ruby/object:Gem::Dependency
|
286
292
|
name: jsonlint
|
287
293
|
requirement: !ruby/object:Gem::Requirement
|
@@ -725,6 +731,7 @@ files:
|
|
725
731
|
- resources/oecd/for-mappings.json
|
726
732
|
- resources/oecd/fos-mappings.json
|
727
733
|
- resources/schema_org/jsonldcontext.json
|
734
|
+
- resources/spdx/licenses.json
|
728
735
|
- resources/xml.xsd
|
729
736
|
- spec/array_spec.rb
|
730
737
|
- spec/author_utils_spec.rb
|
@@ -1033,6 +1040,9 @@ files:
|
|
1033
1040
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/nil.yml
|
1034
1041
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/overlapping_keys.yml
|
1035
1042
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/valid.yml
|
1043
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/not_found.yml
|
1044
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/with_trailing_slash.yml
|
1045
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/with_trailing_slash_and_to_https.yml
|
1036
1046
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/SICI_doi.yml
|
1037
1047
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi.yml
|
1038
1048
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_force_datacite_sandbox.yml
|
@@ -1060,8 +1070,10 @@ files:
|
|
1060
1070
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_empty_array.yml
|
1061
1071
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_hash.yml
|
1062
1072
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_string.yml
|
1073
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/to_https.yml
|
1063
1074
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/uri.yml
|
1064
1075
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/with_trailing_slash.yml
|
1076
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/with_trailing_slash_and_to_https.yml
|
1065
1077
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/array.yml
|
1066
1078
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/array_of_strings.yml
|
1067
1079
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/first.yml
|
@@ -1070,8 +1082,17 @@ files:
|
|
1070
1082
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/string.yml
|
1071
1083
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_only_keep_specific_tags.yml
|
1072
1084
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_remove_a_tags.yml
|
1085
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_id.yml
|
1086
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_not_found.yml
|
1087
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_url.yml
|
1088
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_exists.yml
|
1089
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_id.yml
|
1090
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_not_found.yml
|
1073
1091
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/to_schema_org/with_id.yml
|
1074
1092
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/to_schema_org_identifiers/with_identifiers.yml
|
1093
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/http.yml
|
1094
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/uri.yml
|
1095
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/with_trailing_slash.yml
|
1075
1096
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_doi/doi.yml
|
1076
1097
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/funder_doi.yml
|
1077
1098
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/funder_doi_without_prefix.yml
|
@@ -1108,6 +1129,7 @@ files:
|
|
1108
1129
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Dataset.yml
|
1109
1130
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Journal_article.yml
|
1110
1131
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Missing_author.yml
|
1132
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/software_w/version.yml
|
1111
1133
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting.yml
|
1112
1134
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting_schema_org.yml
|
1113
1135
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/Dataset.yml
|
@@ -1174,6 +1196,7 @@ files:
|
|
1174
1196
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding.yml
|
1175
1197
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding_OpenAIRE.yml
|
1176
1198
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON.yml
|
1199
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_Cyark.yml
|
1177
1200
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_IsSupplementTo.yml
|
1178
1201
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_isReferencedBy.yml
|
1179
1202
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/alternate_identifiers.yml
|