bolognese 0.12 → 0.12.1

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: b569e2bb9f0bf75501740c1f43c0c916c7a85f55a0ec7efa27c9c04b685ed3a5
4
- data.tar.gz: 95d0e9485923922ac0a078c071bd644c1628b05d8a01888c2e81989c7be534ff
3
+ metadata.gz: 04d6d63d212538b5d0797ac44d8fc9e3169d7322cda9e773cb7f655ea93014f3
4
+ data.tar.gz: 524be4c3b60f895ac194dadf60fc069503dbe451f72d12b8c834ff53d7eb0334
5
5
  SHA512:
6
- metadata.gz: e72f93fde195b2659c28c529efc2d856c9df955ff0c56b8aa2a4f91bf0a3943af178a3d133f29d042aab3711764a3eb287e7702a9c6c970fd740d6bdd3bad810
7
- data.tar.gz: 4988a36ff5526f7402a13aee011f48ede46b5e4087917a0410190e2f8f35ca6ce5a28c74ea92dea7734d89212d7caae588f869445d55112338920f3b09e8be5b
6
+ metadata.gz: 23c57853710d6b3d6a80085851fc5892dd73886450096e26eaa9d3ffcebe92435e7e02ba61e2f8d9cbb17990cef368ecb232270358b75b1ca66b2d6999f7309c
7
+ data.tar.gz: a870bc970cb8751c52b31bed2bbc814e60548609720b4234a6b10d31415fa6652b2fc4d97633f9f5a2847c62446bcbb09948db61efaf035418815ed56405e706
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (0.12)
4
+ bolognese (0.12.1)
5
5
  activesupport (>= 4.2.5, < 6)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (~> 4.1)
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "0.12"
2
+ VERSION = "0.12.1"
3
3
  end
@@ -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",
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.12'
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner