bolognese 0.13.2 → 0.13.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d80546e87d2832b4408b869a0b9dbe8cd6fd47b718fa96cb4680187e37266361
4
- data.tar.gz: 5266faafe16fd6750af63857bc6029232e7a0ff45dba74114283bbdd45c536fc
3
+ metadata.gz: c6a7c798a8ea465ed7c94ffb395c4f44c6728430e408a2690367afb78610552e
4
+ data.tar.gz: 3d2e408ca2cbfa8ea3fb183f52b462a8fcf4ebc6c50752467f6ef7251cb31f7c
5
5
  SHA512:
6
- metadata.gz: 1f427e13c17577fbc48d309c1dfc37916cd4e8f8567c3b7da97074fad49631e88463e4e007c8c915db51de09e24359db7930a1e5d3604a550d2bfde5eb6d7715
7
- data.tar.gz: bc0b392d86d63786ffd1e175440ad866b6ca1eb68cf313feb290f2f7b48721357fdf84c52929b0e3d544c93cce7f39c96954deeae140ad7ad4b7c71532425572
6
+ metadata.gz: a6c3b485dba221c416990278b66a83b5e50b6fed6dd597808fa1524e43a961b87f94c6b2c0c8f4ee46e13615bdb96c5263b9040d4d0f7c713c58e34ff064857f
7
+ data.tar.gz: 58f43340d776f40d80f66d68b67b2400e1186b9a8d869bbe9dd5d4d69cc8a87863ec43440ef6a7ce5eb560332791d5a88006d8ae5be605fed0e24f68918c7168
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (0.13.2)
4
+ bolognese (0.13.3)
5
5
  activesupport (>= 4.2.5, < 6)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (~> 4.1)
@@ -356,16 +356,16 @@ module Bolognese
356
356
  "crossref"
357
357
  elsif options[:ext] == ".xml" && Nokogiri::XML(string, nil, 'UTF-8', &:noblanks).collect_namespaces.find { |k, v| v.start_with?("http://datacite.org/schema/kernel") }
358
358
  "datacite"
359
+ elsif options[:ext] == ".json" && Maremma.from_json(string).to_h.dig("@context").to_s.start_with?("http://schema.org", "https://schema.org")
360
+ "schema_org"
361
+ elsif options[:ext] == ".json" && Maremma.from_json(string).to_h.dig("@context") == ("https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld")
362
+ "codemeta"
359
363
  elsif options[:ext] == ".json" && Maremma.from_json(string).to_h.dig("ris_type")
360
364
  "crosscite"
361
365
  elsif options[:ext] == ".json" && Maremma.from_json(string).to_h.dig("schemaVersion").to_s.start_with?("http://datacite.org/schema/kernel")
362
366
  "datacite_json"
363
367
  elsif options[:ext] == ".json" && Maremma.from_json(string).to_h.dig("issued", "date-parts").present?
364
368
  "citeproc"
365
- elsif options[:ext] == ".json" && Maremma.from_json(string).to_h.dig("@context").to_s.start_with?("http://schema.org", "https://schema.org")
366
- "schema_org"
367
- elsif options[:ext] == ".json" && Maremma.from_json(string).to_h.dig("@context") == ("https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld")
368
- "codemeta"
369
369
  end
370
370
  end
371
371
 
@@ -376,14 +376,14 @@ module Bolognese
376
376
  "datacite"
377
377
  elsif Maremma.from_json(string).to_h.dig("ris_type").present?
378
378
  "crosscite"
379
- elsif Maremma.from_json(string).to_h.dig("schemaVersion").to_s.start_with?("http://datacite.org/schema/kernel")
380
- "datacite_json"
381
- elsif Maremma.from_json(string).to_h.dig("issued", "date-parts").present?
382
- "citeproc"
383
379
  elsif Maremma.from_json(string).to_h.dig("@context").to_s.start_with?("http://schema.org", "https://schema.org")
384
380
  "schema_org"
385
381
  elsif Maremma.from_json(string).to_h.dig("@context") == ("https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld")
386
382
  "codemeta"
383
+ elsif Maremma.from_json(string).to_h.dig("schemaVersion").to_s.start_with?("http://datacite.org/schema/kernel")
384
+ "datacite_json"
385
+ elsif Maremma.from_json(string).to_h.dig("issued", "date-parts").present?
386
+ "citeproc"
387
387
  elsif string.start_with?("TY - ")
388
388
  "ris"
389
389
  elsif BibTeX.parse(string).first
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "0.13.2"
2
+ VERSION = "0.13.3"
3
3
  end
@@ -56,7 +56,7 @@ describe Bolognese::CLI do
56
56
  end
57
57
 
58
58
  it "schema_org" do
59
- string = IO.read(fixture_path + 'schema_org.json').strip
59
+ string = IO.read(fixture_path + 'schema_org_topmed.json').strip
60
60
  expect(subject.find_from_format_by_string(string)).to eq("schema_org")
61
61
  end
62
62
 
@@ -131,7 +131,7 @@ describe Bolognese::Metadata, vcr: true do
131
131
 
132
132
  it "GTEx dataset" do
133
133
  input = fixture_path + 'schema_org_gtex.json'
134
- subject = Bolognese::Metadata.new(input: input, from: 'schema_org')
134
+ subject = Bolognese::Metadata.new(input: input)
135
135
 
136
136
  expect(subject.valid?).to be true
137
137
  expect(subject.identifier).to eq("https://doi.org/10.25491/d50j-3083")
@@ -172,7 +172,7 @@ describe Bolognese::Metadata, vcr: true do
172
172
 
173
173
  it "TOPMed dataset" do
174
174
  input = fixture_path + 'schema_org_topmed.json'
175
- subject = Bolognese::Metadata.new(input: input, from: 'schema_org')
175
+ subject = Bolognese::Metadata.new(input: input)
176
176
 
177
177
  expect(subject.valid?).to be true
178
178
  expect(subject.identifier).to eq("https://doi.org/10.23725/8na3-9s47")
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.13.2
4
+ version: 0.13.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner