bolognese 0.12 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/bolognese/utils.rb +1 -1
- data/lib/bolognese/version.rb +1 -1
- data/lib/bolognese/writers/schema_org_writer.rb +2 -2
- data/spec/utils_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04d6d63d212538b5d0797ac44d8fc9e3169d7322cda9e773cb7f655ea93014f3
|
4
|
+
data.tar.gz: 524be4c3b60f895ac194dadf60fc069503dbe451f72d12b8c834ff53d7eb0334
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23c57853710d6b3d6a80085851fc5892dd73886450096e26eaa9d3ffcebe92435e7e02ba61e2f8d9cbb17990cef368ecb232270358b75b1ca66b2d6999f7309c
|
7
|
+
data.tar.gz: a870bc970cb8751c52b31bed2bbc814e60548609720b4234a6b10d31415fa6652b2fc4d97633f9f5a2847c62446bcbb09948db61efaf035418815ed56405e706
|
data/Gemfile.lock
CHANGED
data/lib/bolognese/utils.rb
CHANGED
@@ -528,7 +528,7 @@ module Bolognese
|
|
528
528
|
mapping = { "type" => "@type", "id" => "@id", "title" => "name" }
|
529
529
|
|
530
530
|
element ||= {}
|
531
|
-
element["type"] ||= (type == "Dataset") ? "DataCatalog" : "Periodical"
|
531
|
+
element["type"] ||= (options[:type] == "Dataset") ? "DataCatalog" : "Periodical"
|
532
532
|
element["title"] = options[:container_title]
|
533
533
|
|
534
534
|
map_hash_keys(element: element, mapping: mapping)
|
data/lib/bolognese/version.rb
CHANGED
@@ -26,7 +26,7 @@ module Bolognese
|
|
26
26
|
"pageEnd" => last_page,
|
27
27
|
"spatialCoverage" => spatial_coverage,
|
28
28
|
"sameAs" => to_schema_org(is_identical_to),
|
29
|
-
"isPartOf" => type == "Dataset" ? nil : to_schema_org_container(is_part_of, container_title: container_title),
|
29
|
+
"isPartOf" => type == "Dataset" ? nil : to_schema_org_container(is_part_of, container_title: container_title, type: type),
|
30
30
|
"hasPart" => to_schema_org(has_part),
|
31
31
|
"predecessor_of" => to_schema_org(is_previous_version_of),
|
32
32
|
"successor_of" => to_schema_org(is_new_version_of),
|
@@ -34,7 +34,7 @@ module Bolognese
|
|
34
34
|
"@reverse" => reverse.presence,
|
35
35
|
"contentUrl" => content_url,
|
36
36
|
"schemaVersion" => schema_version,
|
37
|
-
"includedInDataCatalog" => type == "Dataset" ? to_schema_org_container(is_part_of, container_title: container_title) : nil,
|
37
|
+
"includedInDataCatalog" => type == "Dataset" ? to_schema_org_container(is_part_of, container_title: container_title, type: type) : nil,
|
38
38
|
"publisher" => publisher.present? ? { "@type" => "Organization", "name" => publisher } : nil,
|
39
39
|
"funding" => to_schema_org(funding),
|
40
40
|
"provider" => service_provider.present? ? { "@type" => "Organization", "name" => service_provider } : nil
|
data/spec/utils_spec.rb
CHANGED
@@ -239,7 +239,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
239
239
|
it "with alternate_identifier" do
|
240
240
|
identifier = "https://doi.org/10.23725/8na3-9s47"
|
241
241
|
alternate_identifier = [{"type"=>"md5", "name"=>"3b33f6b9338fccab0901b7d317577ea3"}, {"type"=>"minid", "name"=>"ark:/99999/fk41CrU4eszeLUDe"}, {"type"=>"dataguid", "name"=>"dg.4503/c3d66dc9-58da-411c-83c4-dd656aa3c4b7"}]
|
242
|
-
response = subject.to_schema_org_identifier(identifier, alternate_identifier: alternate_identifier)
|
242
|
+
response = subject.to_schema_org_identifier(identifier, alternate_identifier: alternate_identifier, type: "Dataset")
|
243
243
|
expect(response).to eq(["https://doi.org/10.1101/097196",
|
244
244
|
{"@type"=>"PropertyValue",
|
245
245
|
"propertyID"=>"md5",
|