bolognese 1.1.1 → 1.1.2

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: 3ff0be2c3f93e115b37c7fb40e472979f997660034fe611caa145f94eda6f00d
4
- data.tar.gz: ec082c7b6ddd9f0f8abf2f5c08897b3ca73a48ad9a391a3e4de570a9556bf2ee
3
+ metadata.gz: 27940cced27604c5cf349c682939611611daf7acc5cd786672483f7f99cffa2d
4
+ data.tar.gz: bdb4a1dc2100975979a63ed70800fd8593c17f24b7c4a347aed4e7c647a8d42e
5
5
  SHA512:
6
- metadata.gz: 23f5743255d698fa71e7297e67335883abe7fd093c7a38b1a25ffe1d26d6462e36034f591cc00fdf3baafd649426393e8d3e25938744da2de91b102c155d37aa
7
- data.tar.gz: ad05fdb0f221944bb4a2dbc0b06fb69e14244b819762585bb293acf06697dba0815bee2eea5c7a77b4606b4ffbdc8e7b8f692f248117f6afedc933779462e4df
6
+ metadata.gz: a5a082bd917f785cc61555de341bebe47adb241cc913be30fe39d596e4c6c03457ca472dceca6367e7a7d9235348a26fdbff579b95a8db55d56a5fcb3f98df4f
7
+ data.tar.gz: 6fb9777ed5f5435a59aec51aa63135b80f735378dfa8c065191d01e70f51c05694eb3ee9798c2c3982d5f9416c04c8948331129ed98025dcdd5c96036f08a1d1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (1.1.1)
4
+ bolognese (1.1.2)
5
5
  activesupport (>= 4.2.5, < 6)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (~> 4.1)
@@ -196,4 +196,4 @@ DEPENDENCIES
196
196
  webmock (~> 3.0, >= 3.0.1)
197
197
 
198
198
  BUNDLED WITH
199
- 1.17.2
199
+ 1.17.3
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
@@ -6,23 +6,17 @@ module Bolognese
6
6
  def csv
7
7
  return nil unless valid?
8
8
 
9
- pages = container.to_h["firstPage"].present? ? [container["firstPage"], container["lastPage"]].join("-") : nil
10
-
11
9
  bib = {
12
10
  doi: doi,
13
11
  url: url,
14
- year: publication_year,
15
12
  registered: get_iso8601_date(date_registered),
16
13
  state: state,
17
14
  resource_type_general: types["resourceTypeGeneral"],
18
- bibtex_type: types["bibtex"].presence || "misc",
15
+ resource_type: types["resourceType"],
19
16
  title: parse_attributes(titles, content: "title", first: true),
20
17
  author: authors_as_string(creators),
21
18
  publisher: publisher,
22
- journal: container && container["title"],
23
- volume: container.to_h["volume"],
24
- issue: container.to_h["issue"],
25
- pages: pages
19
+ publication_year: publication_year
26
20
  }.values
27
21
 
28
22
  CSV.generate { |csv| csv << bib }
@@ -11,15 +11,14 @@ describe Bolognese::Metadata, vcr: true do
11
11
 
12
12
  expect(csv[0]).to eq("10.7554/elife.01567")
13
13
  expect(csv[1]).to eq("https://elifesciences.org/articles/01567")
14
- expect(csv[2]).to eq("2014")
15
- expect(csv[3]).to be_nil
16
- expect(csv[4]).to eq("findable")
17
- expect(csv[5]).to eq("Text")
18
- expect(csv[6]).to eq("article")
19
- expect(csv[7]).to eq("Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth")
20
- expect(csv[8]).to eq("Sankar, Martial and Nieminen, Kaisa and Ragni, Laura and Xenarios, Ioannis and Hardtke, Christian S")
21
- expect(csv[9]).to eq("(:unav)")
22
- expect(csv[10]).to eq("eLife")
14
+ expect(csv[2]).to be_nil
15
+ expect(csv[3]).to eq("findable")
16
+ expect(csv[4]).to eq("Text")
17
+ expect(csv[5]).to eq("JournalArticle")
18
+ expect(csv[6]).to eq("Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth")
19
+ expect(csv[7]).to eq("Sankar, Martial and Nieminen, Kaisa and Ragni, Laura and Xenarios, Ioannis and Hardtke, Christian S")
20
+ expect(csv[8]).to eq("(:unav)")
21
+ expect(csv[9]).to eq("2014")
23
22
  end
24
23
 
25
24
  it "with pages" do
@@ -29,18 +28,14 @@ describe Bolognese::Metadata, vcr: true do
29
28
 
30
29
  expect(csv[0]).to eq("10.1155/2012/291294")
31
30
  expect(csv[1]).to eq("http://www.hindawi.com/journals/pm/2012/291294/")
32
- expect(csv[2]).to eq("2012")
33
- expect(csv[3]).to be_nil
34
- expect(csv[4]).to eq("findable")
35
- expect(csv[5]).to eq("Text")
36
- expect(csv[6]).to eq("article")
37
- expect(csv[7]).to eq("Delineating a Retesting Zone Using Receiver Operating Characteristic Analysis on Serial QuantiFERON Tuberculosis Test Results in US Healthcare Workers")
38
- expect(csv[8]).to eq("Thanassi, Wendy and Noda, Art and Hernandez, Beatriz and Newell, Jeffery and Terpeluk, Paul and Marder, David and Yesavage, Jerome A.")
39
- expect(csv[9]).to eq("(:unav)")
40
- expect(csv[10]).to eq("Pulmonary Medicine")
41
- expect(csv[11]).to eq("2012")
42
- expect(csv[12]).to be_nil
43
- expect(csv[13]).to eq("1-7")
31
+ expect(csv[2]).to be_nil
32
+ expect(csv[3]).to eq("findable")
33
+ expect(csv[4]).to eq("Text")
34
+ expect(csv[5]).to eq("JournalArticle")
35
+ expect(csv[6]).to eq("Delineating a Retesting Zone Using Receiver Operating Characteristic Analysis on Serial QuantiFERON Tuberculosis Test Results in US Healthcare Workers")
36
+ expect(csv[7]).to eq("Thanassi, Wendy and Noda, Art and Hernandez, Beatriz and Newell, Jeffery and Terpeluk, Paul and Marder, David and Yesavage, Jerome A.")
37
+ expect(csv[8]).to eq("(:unav)")
38
+ expect(csv[9]).to eq("2012")
44
39
  end
45
40
 
46
41
  it "text" do
@@ -51,15 +46,13 @@ describe Bolognese::Metadata, vcr: true do
51
46
 
52
47
  expect(csv[0]).to eq("10.17173/pretest8")
53
48
  expect(csv[1]).to eq("http://pretest.gesis.org/Pretest/DoiId/10.17173/pretest8")
54
- expect(csv[2]).to eq("2014")
55
- expect(csv[3]).to eq("2016-06-01")
56
- expect(csv[4]).to eq("findable")
57
- expect(csv[5]).to eq("Text")
58
- expect(csv[6]).to eq("article")
59
- expect(csv[7]).to eq("PIAAC-Longitudinal (PIAAC-L) 2015")
60
- expect(csv[8]).to eq("Lenzner, T. and Neuert, C. and Otto, W. and Landrock, U. and Menold, N.")
61
- expect(csv[9]).to eq("GESIS – Pretest Lab")
62
- expect(csv[10]).to eq("GESIS Projektbericht")
49
+ expect(csv[2]).to eq("2016-06-01")
50
+ expect(csv[3]).to eq("findable")
51
+ expect(csv[4]).to eq("Text")
52
+ expect(csv[5]).to eq("Pretestbericht")
53
+ expect(csv[6]).to eq("PIAAC-Longitudinal (PIAAC-L) 2015")
54
+ expect(csv[7]).to eq("Lenzner, T. and Neuert, C. and Otto, W. and Landrock, U. and Menold, N.")
55
+ expect(csv[9]).to eq("2014")
63
56
  end
64
57
 
65
58
  it "climate data" do
@@ -70,14 +63,14 @@ describe Bolognese::Metadata, vcr: true do
70
63
 
71
64
  expect(csv[0]).to eq("10.5067/altcy-tj122")
72
65
  expect(csv[1]).to eq("http://podaac.jpl.nasa.gov/dataset/MERGED_TP_J1_OSTM_OST_CYCLES_V2")
73
- expect(csv[2]).to eq("2012")
74
- expect(csv[3]).to eq("2014-01-15")
75
- expect(csv[4]).to eq("findable")
76
- expect(csv[5]).to eq("Dataset")
77
- expect(csv[6]).to eq("misc")
78
- expect(csv[7]).to eq("Integrated Multi-Mission Ocean Altimeter Data for Climate Research Version 2")
79
- expect(csv[8]).to eq("{GSFC}")
80
- expect(csv[9]).to eq("NASA Physical Oceanography DAAC")
66
+ expect(csv[2]).to eq("2014-01-15")
67
+ expect(csv[3]).to eq("findable")
68
+ expect(csv[4]).to eq("Dataset")
69
+ expect(csv[5]).to be_nil
70
+ expect(csv[6]).to eq("Integrated Multi-Mission Ocean Altimeter Data for Climate Research Version 2")
71
+ expect(csv[7]).to eq("{GSFC}")
72
+ expect(csv[8]).to eq("NASA Physical Oceanography DAAC")
73
+ expect(csv[9]).to eq("2012")
81
74
  end
82
75
 
83
76
  it "maremma" do
@@ -87,14 +80,14 @@ describe Bolognese::Metadata, vcr: true do
87
80
 
88
81
  expect(csv[0]).to eq("10.5438/qeg0-3gm3")
89
82
  expect(csv[1]).to eq("https://github.com/datacite/maremma")
90
- expect(csv[2]).to eq("2017")
91
- expect(csv[3]).to be_nil
92
- expect(csv[4]).to eq("findable")
93
- expect(csv[5]).to eq("Software")
94
- expect(csv[6]).to eq("misc")
95
- expect(csv[7]).to eq("Maremma: a Ruby library for simplified network calls")
96
- expect(csv[8]).to eq("Fenner, Martin")
97
- expect(csv[9]).to eq("DataCite")
83
+ expect(csv[2]).to be_nil
84
+ expect(csv[3]).to eq("findable")
85
+ expect(csv[4]).to eq("Software")
86
+ expect(csv[5]).to be_nil
87
+ expect(csv[6]).to eq("Maremma: a Ruby library for simplified network calls")
88
+ expect(csv[7]).to eq("Fenner, Martin")
89
+ expect(csv[8]).to eq("DataCite")
90
+ expect(csv[9]).to eq("2017")
98
91
  end
99
92
  end
100
93
  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: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-11 00:00:00.000000000 Z
11
+ date: 2019-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: maremma