bolognese 0.10.3 → 0.10.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc0b25824fcc0ef740e3a84cee8d5a811481135b183f442f41b7706f29e25623
4
- data.tar.gz: 7acdaf20087b71eaa8d49cc9649e3b701066a22c7c250801d55fcfb979d76d3a
3
+ metadata.gz: ad8115101749edcedd85e5a248e283cb565eabff1c76d012fba220fa6a983379
4
+ data.tar.gz: 5cb6916c751cb51d6ee57dd0f69c2585e54c80535f07e88354bbe4480e15f9e4
5
5
  SHA512:
6
- metadata.gz: d2c0634ea207320e387174a52ea368a066263a06c1e48a838489477d6ae58b87c308c19f864c4768c036bcce606ee017b0ca8ba97a8c1d224bda861bdf82b740
7
- data.tar.gz: 6082d4c5f232e1650a0a3b885624aad4476a0ae6033f710f96a4c0e64c03aee010089ab8752a2d99fd309f201eb56a3876a666903a6aa2e7e7c85210b8f38b00
6
+ metadata.gz: 7a8191fd5cbd52430eba641d34dbedda291ae298fa6cfde0f351e9c936465e9c1f2f96b6723bd5ec453af797a351cec0a895a054bfc0d4b2118ad0e6a045b351
7
+ data.tar.gz: 7866c72e1010408128706e5ea388aa9458cfb5fe586be6ce2155747d5e477bb42be9b855d5448bb7ac9e4fa75dcb881e740bbf27b15c04f11eb709e215febb8d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (0.10.3)
4
+ bolognese (0.10.4)
5
5
  activesupport (>= 4.2.5, < 6)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (~> 4.1)
@@ -76,7 +76,7 @@ module Bolognese
76
76
  end
77
77
 
78
78
  def exists?
79
- meta.fetch("state", "not_found") != "not_found"
79
+ (@state || meta.fetch("state", "not_found")) != "not_found"
80
80
  end
81
81
 
82
82
  def valid?
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "0.10.3"
2
+ VERSION = "0.10.4"
3
3
  end
@@ -228,6 +228,24 @@ describe Bolognese::Metadata, vcr: true do
228
228
  expect(datacite.dig("descriptions", "description")).to eq("descriptionType"=>"Abstract", "__content__"=>"This is an abstract.")
229
229
  end
230
230
 
231
+ it "required metadata no input" do
232
+ input = nil
233
+ subject = Bolognese::Metadata.new(input: input, from: "datacite", doi: "10.4124/05f6c379-dd68-4cdb-880d-33d3e9576d52/1")
234
+ subject.author = [{"creatorName"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner"}]
235
+ subject.title = "Data from: Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth"
236
+ subject.publisher = "Dryad"
237
+ subject.resource_type_general = "Dataset"
238
+ subject.additional_type = "DataPackage"
239
+ subject.date_published = "2011"
240
+ subject.state = "findable"
241
+ expect(subject.exists?).to be true
242
+ datacite = Maremma.from_xml(subject.datacite).fetch("resource", {})
243
+ expect(datacite.dig("identifier", "__content__")).to eq("10.4124/05f6c379-dd68-4cdb-880d-33d3e9576d52/1")
244
+ expect(datacite.dig("resourceType", "resourceTypeGeneral")).to eq("Dataset")
245
+ expect(datacite.dig("titles", "title")).to eq("Data from: Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth")
246
+
247
+ end
248
+
231
249
  it "change license" do
232
250
  input = "10.7554/eLife.01567"
233
251
  subject = Bolognese::Metadata.new(input: input, from: "crossref")
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.10.3
4
+ version: 0.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner