bolognese 1.9.9 → 1.9.13

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.
@@ -1482,6 +1482,47 @@ describe Bolognese::Metadata, vcr: true do
1482
1482
  )
1483
1483
  end
1484
1484
 
1485
+
1486
+ it "Schema 4.4 related items from string minus relatedIdentifier" do
1487
+ input = fixture_path + "datacite-example-relateditems.xml"
1488
+
1489
+ # Remove relatedItemIdentifier from raw input
1490
+ @doc = File.open(input) { |f| Nokogiri::XML(f) }
1491
+ @doc.xpath("//xmlns:relatedItemIdentifier").each {|x| x.remove}
1492
+
1493
+ subject = Bolognese::Metadata.new(input: @doc.to_s)
1494
+ expect(subject.valid?).to be true
1495
+
1496
+ expect(subject.related_items.last).to eq(
1497
+ {
1498
+ "relatedItemType"=>"Journal",
1499
+ "relationType"=>"IsPublishedIn",
1500
+ "creators" =>
1501
+ [
1502
+ {"nameType"=>"Personal", "name"=>"Smith, John", "givenName"=>"John", "familyName"=>"Smith"}
1503
+ ],
1504
+ "titles"=>
1505
+ [
1506
+ {"title"=>"Understanding the fictional John Smith"},
1507
+ {"title"=>"A detailed look", "titleType"=>"Subtitle"}
1508
+ ],
1509
+ "volume"=>"776",
1510
+ "issue"=>"1",
1511
+ "number"=>"1",
1512
+ "numberType"=>"Chapter",
1513
+ "firstPage"=>"50",
1514
+ "lastPage"=>"60",
1515
+ "publisher"=>"Example Inc",
1516
+ "publicationYear"=>"1776",
1517
+ "edition"=>"1",
1518
+ "contributors"=>
1519
+ [
1520
+ {"name"=>"Hallett, Richard", "givenName"=>"Richard", "familyName"=>"Hallett", "contributorType"=>"ProjectLeader"}
1521
+ ]
1522
+ }
1523
+ )
1524
+ end
1525
+
1485
1526
  it "Schema 4.4 dissertation from string" do
1486
1527
  input = fixture_path + "datacite-example-dissertation-v4.4.xml"
1487
1528
  subject = Bolognese::Metadata.new(input: input)
data/spec/utils_spec.rb CHANGED
@@ -64,6 +64,18 @@ describe Bolognese::Metadata, vcr: true do
64
64
  expect(response).to eq("0000-0002-1394-3097")
65
65
  end
66
66
 
67
+ it "validate_orcid sandbox" do
68
+ orcid = "http://sandbox.orcid.org/0000-0002-2590-225X"
69
+ response = subject.validate_orcid(orcid)
70
+ expect(response).to eq("0000-0002-2590-225X")
71
+ end
72
+
73
+ it "validate_orcid sandbox https" do
74
+ orcid = "https://sandbox.orcid.org/0000-0002-2590-225X"
75
+ response = subject.validate_orcid(orcid)
76
+ expect(response).to eq("0000-0002-2590-225X")
77
+ end
78
+
67
79
  it "validate_orcid wrong id" do
68
80
  orcid = "0000-0002-1394-309"
69
81
  response = subject.validate_orcid(orcid)
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.9
4
+ version: 1.9.13
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-06-09 00:00:00.000000000 Z
11
+ date: 2022-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: maremma
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 1.11.2
53
+ version: 1.12.0
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.11.2
60
+ version: 1.12.0
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: loofah
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -561,6 +561,7 @@ extra_rdoc_files:
561
561
  files:
562
562
  - ".github/workflows/build.yml"
563
563
  - ".github/workflows/changelog.yml"
564
+ - ".github/workflows/pull-request.yml"
564
565
  - ".github/workflows/release.yml"
565
566
  - ".gitignore"
566
567
  - ".rubocop.yml"
@@ -738,6 +739,7 @@ files:
738
739
  - resources/kernel-4/include/datacite-titleType-v4.xsd
739
740
  - resources/kernel-4/include/xml.xsd
740
741
  - resources/kernel-4/metadata.xsd
742
+ - resources/oecd/dfg-mappings.json
741
743
  - resources/oecd/for-mappings.json
742
744
  - resources/oecd/fos-mappings.json
743
745
  - resources/schema_org/jsonldcontext.json