bolognese 0.13.3 → 0.13.4
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 +1 -1
- data/lib/bolognese/readers/schema_org_reader.rb +1 -5
- data/lib/bolognese/version.rb +1 -1
- data/spec/fixtures/schema_org_list.json +12628 -0
- data/spec/readers/schema_org_reader_spec.rb +19 -0
- metadata +3 -2
@@ -189,5 +189,24 @@ describe Bolognese::Metadata, vcr: true do
|
|
189
189
|
expect(subject.references).to eq("id"=>"https://doi.org/10.23725/2g4s-qv04", "type"=>"Dataset")
|
190
190
|
expect(subject.funding).to eq("id"=>"https://doi.org/10.13039/100000050", "name"=>"National Heart, Lung, and Blood Institute (NHLBI)", "type"=>"Organization")
|
191
191
|
end
|
192
|
+
|
193
|
+
it "schema_org list" do
|
194
|
+
data = IO.read(fixture_path + 'schema_org_list.json').strip
|
195
|
+
input = JSON.parse(data).first.to_json
|
196
|
+
subject = Bolognese::Metadata.new(input: input)
|
197
|
+
expect(subject.valid?).to be true
|
198
|
+
expect(subject.identifier).to eq("https://doi.org/10.23725/7jg3-v803")
|
199
|
+
expect(subject.alternate_identifier).to eq([{"name"=>"ark:/99999/fk4E1n6n1YHKxPk", "type"=>"minid"}, {"name"=>"dg.4503/01b048d0-e128-4cb0-94e9-b2d2cab7563d", "type"=>"dataguid"}, {"name"=>"f9e72bdf25bf4b4f0e581d9218fec2eb", "type"=>"md5"}])
|
200
|
+
expect(subject.b_url).to eq("https://ors.datacite.org/doi:/10.23725/7jg3-v803")
|
201
|
+
expect(subject.content_url).to eq(["s3://cgp-commons-public/topmed_open_access/44a8837b-4456-5709-b56b-54e23000f13a/NWD100953.recab.cram","gs://topmed-irc-share/public/NWD100953.recab.cram","dos://dos.commons.ucsc-cgp.org/01b048d0-e128-4cb0-94e9-b2d2cab7563d?version=2018-05-26T133719.491772Z"])
|
202
|
+
expect(subject.type).to eq("Dataset")
|
203
|
+
expect(subject.additional_type).to eq("CRAM file")
|
204
|
+
expect(subject.author).to eq("name"=>"TOPMed", "type"=>"Organization")
|
205
|
+
expect(subject.title).to eq("NWD100953.recab.cram")
|
206
|
+
expect(subject.keywords).to eq(["topmed", "whole genome sequencing"])
|
207
|
+
expect(subject.date_published).to eq("2017-11-30")
|
208
|
+
expect(subject.publisher).to eq("TOPMed")
|
209
|
+
expect(subject.funding).to eq("id"=>"https://doi.org/10.13039/100000050", "name"=>"National Heart, Lung, and Blood Institute (NHLBI)", "type"=>"Organization")
|
210
|
+
end
|
192
211
|
end
|
193
212
|
end
|
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.13.
|
4
|
+
version: 0.13.4
|
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-08-
|
11
|
+
date: 2018-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: maremma
|
@@ -611,6 +611,7 @@ files:
|
|
611
611
|
- spec/fixtures/pure.ris
|
612
612
|
- spec/fixtures/schema_org.json
|
613
613
|
- spec/fixtures/schema_org_gtex.json
|
614
|
+
- spec/fixtures/schema_org_list.json
|
614
615
|
- spec/fixtures/schema_org_topmed.json
|
615
616
|
- spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/default.yml
|
616
617
|
- spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_bibtex.yml
|