bolognese 1.9.4 → 1.9.5

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: f8f8cb84bf74f8a75d2469aa5a3e49dd4ba0adbd9b465d60e11bdbbd8252c267
4
- data.tar.gz: 3fc9719de82891ce908fd4af271f05fc1f024442d0a1e6bc88b65db438118ab3
3
+ metadata.gz: b05a742623de63d8886a0537b8c967bddcec647de85d65897153bd1639524a78
4
+ data.tar.gz: adc7f82baf4a99cf8a4c3978a1b9b06278c1284127375d78fccba2c5d120dbb9
5
5
  SHA512:
6
- metadata.gz: 797b852b3dafd982249bb57a91dff364bd2dcc6d2b52cb50494dcc6a5cfec7a2fc714a27eed6cd46dde158c495ca93154a858ca0f1800a3990b3f6708878fcec
7
- data.tar.gz: c19d5e7833401549a98b71a13e9063b52bbdfaaa70ff2165272aff311b2d3df6ae765ae79a4ad62ae45fb259520a3e3b39ada0dbef838cc602972ecdad50305b
6
+ metadata.gz: 13fbe8970222b3de01236c11f5d0b7cb5c8fc639be3b39ece95e60a9eda1d21c25873acfece64b7805c73754a5b2e841306c1c59bda6244d98ce0b297e3b278c
7
+ data.tar.gz: 8a297ae52be86a370b4249f0be999696c70ab039e4d1f4303eb7d25a27541ab37c161864667d233223bbb3aefda967281a428ff6ce99de95e6b3789b445d126e
data/CHANGELOG.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Changelog
2
2
 
3
- ## [Unreleased](https://github.com/datacite/bolognese/tree/HEAD)
3
+ ## [1.9.4](https://github.com/datacite/bolognese/tree/1.9.4) (2021-04-13)
4
4
 
5
- [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.3...HEAD)
5
+ [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.3...1.9.4)
6
6
 
7
7
  **Implemented enhancements:**
8
8
 
@@ -535,6 +535,10 @@
535
535
 
536
536
  - Error when schema.org in put has array value for @type [\#66](https://github.com/datacite/bolognese/issues/66)
537
537
 
538
+ **Merged pull requests:**
539
+
540
+ - Default to `ScholarlyArticle` type for `citation` and `isBasedOn` relationships with datasets [\#64](https://github.com/datacite/bolognese/pull/64) ([chrisgorgo](https://github.com/chrisgorgo))
541
+
538
542
  ## [v.1.2.16](https://github.com/datacite/bolognese/tree/v.1.2.16) (2019-07-07)
539
543
 
540
544
  [Full Changelog](https://github.com/datacite/bolognese/compare/v.1.2.15...v.1.2.16)
@@ -633,7 +637,6 @@
633
637
 
634
638
  **Merged pull requests:**
635
639
 
636
- - Default to `ScholarlyArticle` type for `citation` and `isBasedOn` relationships with datasets [\#64](https://github.com/datacite/bolognese/pull/64) ([chrisgorgo](https://github.com/chrisgorgo))
637
640
  - When authors is a plain string, don't try to parse [\#60](https://github.com/datacite/bolognese/pull/60) ([richardhallett](https://github.com/richardhallett))
638
641
 
639
642
  ## [v.1.1.12](https://github.com/datacite/bolognese/tree/v.1.1.12) (2019-04-15)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (1.9.4)
4
+ bolognese (1.9.5)
5
5
  activesupport (>= 4.2.5)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (>= 5.1.0)
@@ -123,7 +123,7 @@ GEM
123
123
  nokogiri (1.11.2)
124
124
  mini_portile2 (~> 2.5.0)
125
125
  racc (~> 1.4)
126
- oj (3.11.3)
126
+ oj (3.11.5)
127
127
  oj_mimic_json (1.0.1)
128
128
  optimist (3.0.1)
129
129
  postrank-uri (1.0.24)
@@ -203,6 +203,15 @@ module Bolognese
203
203
  "schemeType" => rii["schemeType"]
204
204
  }.compact
205
205
 
206
+ number = ri["number"]
207
+ if number.is_a?(String)
208
+ number = number
209
+ numberType = nil
210
+ else
211
+ number = ri.dig("number", "__content__")
212
+ numberType = ri.dig("number", "numberType")
213
+ end
214
+
206
215
  {
207
216
  "relationType" => ri["relationType"],
208
217
  "relatedItemType" => ri["relatedItemType"],
@@ -212,8 +221,8 @@ module Bolognese
212
221
  "publicationYear" => ri["publicationYear"],
213
222
  "volume" => ri["volume"],
214
223
  "issue" => ri["issue"],
215
- "number" => ri.dig("number", "__content__"),
216
- "numberType" => ri.dig("number", "numberType"),
224
+ "number" => number,
225
+ "numberType" => numberType,
217
226
  "firstPage" => ri["firstPage"],
218
227
  "lastPage" => ri["lastPage"],
219
228
  "publisher" => ri["publisher"],
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "1.9.4"
2
+ VERSION = "1.9.5"
3
3
  end
@@ -153,7 +153,7 @@ describe Bolognese::Metadata, vcr: true do
153
153
  it "missing_comma" do
154
154
  json = IO.read(fixture_path + "datacite_software_missing_comma.json")
155
155
  response = subject.jsonlint(json)
156
- expect(response).to eq(["expected comma, not a string (after doi) at line 4, column 11 [parse.c:364]"])
156
+ expect(response).to eq(["expected comma, not a string (after doi) at line 4, column 11 [parse.c:388]"])
157
157
  end
158
158
 
159
159
  it "overlapping_keys" do
@@ -46,7 +46,7 @@ describe Bolognese::Metadata, vcr: true do
46
46
  input = fixture_path + "datacite_software_missing_comma.json"
47
47
  subject = Bolognese::Metadata.new(input: input, from: "datacite_json", show_errors: true)
48
48
  expect(subject.valid?).to be false
49
- expect(subject.errors).to eq(["expected comma, not a string (after doi) at line 4, column 11 [parse.c:364]"])
49
+ expect(subject.errors).to eq(["expected comma, not a string (after doi) at line 4, column 11 [parse.c:388]"])
50
50
  expect(subject.codemeta).to be_nil
51
51
  end
52
52
 
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.9.4
4
+ version: 1.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-13 00:00:00.000000000 Z
11
+ date: 2021-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: maremma
@@ -1274,7 +1274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1274
1274
  - !ruby/object:Gem::Version
1275
1275
  version: '0'
1276
1276
  requirements: []
1277
- rubygems_version: 3.0.3
1277
+ rubygems_version: 3.0.3.1
1278
1278
  signing_key:
1279
1279
  specification_version: 4
1280
1280
  summary: Ruby client library for conversion of DOI Metadata