bolognese 1.0.24 → 1.0.25

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: 87e3780e4a08a0519b050e35b03aab0dea28606f43ca360a9e6376e3c6b08b03
4
- data.tar.gz: fb2cdcf7bfb694247cf3862745e4993f75d4b690e57cb157460681d855182534
3
+ metadata.gz: 3f6b71c15522bf59aa5f90e125b7199072836e144430ec0ce010cb2b1d62fbbd
4
+ data.tar.gz: 5c0b62d7950d6963eb6684d76d74a4afd7cfe0ea16d33f851e9f8a15584c37e8
5
5
  SHA512:
6
- metadata.gz: 1ff4f19bd7b17d687daf41aea265ec67ea333b64adc4c9c91f36e8f43e608caa2e7c7f83b4fdf39dcbbb550a5c6fac04c9e916f2299de9f73b2014fef7f6ae03
7
- data.tar.gz: 1b9ac57358ab023b9baee076cfdaceae0df9827a1271a5db0b10e7beee54ea9fc61dae8a42141a9182e3f068f2845dbe22bb9ea898a165b61891b8cff72e2bb6
6
+ metadata.gz: 6bd636b4edd528e5a3677789a74da5e2f9c528ba5b8faf93426ce38d5cf66044df048496ae04510fc76b79da9583f30847a50464ce47bf47ddf095635710de23
7
+ data.tar.gz: 52cd082e2076d4218a48ec1718ebcd75708c7c5d9ae7a1992d0c4c9f7a82f381154f2de02a53640af2522b5322cf1c0c1d3f45f72981fb3eb7a473e4f03bc187
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (1.0.24)
4
+ bolognese (1.0.25)
5
5
  activesupport (>= 4.2.5, < 6)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (~> 4.1)
@@ -27,7 +27,7 @@ module Bolognese
27
27
  }
28
28
 
29
29
  def read_bibtex(string: nil, **options)
30
- read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:string, :sandbox))
30
+ read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:doi, :id, :url, :sandbox, :validate))
31
31
 
32
32
  meta = string.present? ? BibTeX.parse(string).first : OpenStruct.new
33
33
 
@@ -31,7 +31,7 @@ module Bolognese
31
31
  return { "errors" => errors } if errors.present?
32
32
  end
33
33
 
34
- read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:string, :sandbox))
34
+ read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:doi, :id, :url, :sandbox, :validate))
35
35
 
36
36
  meta = string.present? ? Maremma.from_json(string) : {}
37
37
 
@@ -18,7 +18,7 @@ module Bolognese
18
18
  return { "errors" => errors } if errors.present?
19
19
  end
20
20
 
21
- read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:string, :sandbox))
21
+ read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:doi, :id, :url, :sandbox, :validate))
22
22
 
23
23
  meta = string.present? ? Maremma.from_json(string) : {}
24
24
  identifier = meta.fetch("identifier", nil)
@@ -20,7 +20,7 @@ module Bolognese
20
20
  end
21
21
 
22
22
  def read_crossref(string: nil, **options)
23
- read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:string, :sandbox))
23
+ read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:doi, :id, :url, :sandbox, :validate))
24
24
 
25
25
  if string.present?
26
26
  m = Maremma.from_xml(string).dig("doi_records", "doi_record") || {}
@@ -7,7 +7,7 @@ module Bolognese
7
7
  errors = jsonlint(string)
8
8
  return { "errors" => errors } if errors.present?
9
9
 
10
- read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:string, :sandbox))
10
+ read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:doi, :id, :url, :sandbox, :validate))
11
11
 
12
12
  meta = string.present? ? Maremma.from_json(string) : {}
13
13
 
@@ -49,7 +49,7 @@ module Bolognese
49
49
  end
50
50
 
51
51
  def read_datacite(string: nil, **options)
52
- read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:string, :sandbox))
52
+ read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:doi, :id, :url, :sandbox, :validate))
53
53
 
54
54
  doc = Nokogiri::XML(string, nil, 'UTF-8', &:noblanks)
55
55
  if read_options.present?
@@ -34,7 +34,7 @@ module Bolognese
34
34
  }
35
35
 
36
36
  def read_ris(string: nil, **options)
37
- read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:string, :sandbox))
37
+ read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:doi, :id, :url, :sandbox, :validate))
38
38
 
39
39
  meta = ris_meta(string: string)
40
40
 
@@ -33,7 +33,7 @@ module Bolognese
33
33
  return { "errors" => errors } if errors.present?
34
34
  end
35
35
 
36
- read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:string, :sandbox))
36
+ read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:doi, :id, :url, :sandbox, :validate))
37
37
 
38
38
  meta = string.present? ? Maremma.from_json(string) : {}
39
39
 
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "1.0.24"
2
+ VERSION = "1.0.25"
3
3
  end
@@ -0,0 +1,88 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.datacite.org/prefixes/10.21956
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma)
12
+ Accept:
13
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ Date:
20
+ - Wed, 28 Nov 2018 15:25:12 GMT
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ Connection:
24
+ - keep-alive
25
+ Status:
26
+ - 200 OK
27
+ X-Anonymous-Consumer:
28
+ - 'true'
29
+ Cache-Control:
30
+ - max-age=0, private, must-revalidate
31
+ Vary:
32
+ - Accept-Encoding, Origin
33
+ X-Request-Id:
34
+ - a66395bf-bae9-43f1-a6ea-a7d771fade74
35
+ Etag:
36
+ - W/"72f4730869440b6fbf7f451cd4ee1c34"
37
+ X-Runtime:
38
+ - '0.020201'
39
+ X-Powered-By:
40
+ - Phusion Passenger 5.3.7
41
+ Server:
42
+ - nginx/1.14.0 + Phusion Passenger 5.3.7
43
+ body:
44
+ encoding: ASCII-8BIT
45
+ string: !binary |-
46
+ eyJkYXRhIjp7ImlkIjoiMTAuMjE5NTYiLCJ0eXBlIjoicHJlZml4ZXMiLCJhdHRyaWJ1dGVzIjp7InJlZ2lzdHJhdGlvbi1hZ2VuY3kiOiJEYXRhQ2l0ZSIsImNyZWF0ZWQiOiIyMDE2LTA1LTMxVDE0OjAyOjMxLjAwMFoiLCJ1cGRhdGVkIjpudWxsfSwicmVsYXRpb25zaGlwcyI6eyJjbGllbnRzIjp7ImRhdGEiOlt7ImlkIjoiYmwuZjEwMDByIiwidHlwZSI6ImNsaWVudHMifV19LCJwcm92aWRlcnMiOnsiZGF0YSI6W3siaWQiOiJibCIsInR5cGUiOiJwcm92aWRlcnMifV19fX0sImluY2x1ZGVkIjpbeyJpZCI6ImJsLmYxMDAwciIsInR5cGUiOiJjbGllbnRzIiwiYXR0cmlidXRlcyI6eyJuYW1lIjoiRmFjdWx0eSBvZiAxMDAwIFJlc2VhcmNoIEx0ZCIsInN5bWJvbCI6IkJMLkYxMDAwUiIsInllYXIiOjIwMTMsImNvbnRhY3QtbmFtZSI6IlJhdmkgS3VtYXJhc2luZ2hlIiwiY29udGFjdC1lbWFpbCI6IlJhdmkuS3VtYXJhc2luZ2hlQEYxMDAwLmNvbSIsImRvbWFpbnMiOiJmMTAwMHJlc2VhcmNoLmNvbSx3ZWxsY29tZW9wZW5yZXNlYXJjaC5vcmcsZ2F0ZXNvcGVucmVzZWFyY2gub3JnLG1uaW9wZW5yZXNlYXJjaC5vcmcsaHJib3BlbnJlc2VhcmNoLm9yZyxhYXNvcGVucmVzZWFyY2gub3JnLCBhbXJjb3BlbnJlc2Vh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3OCIsInR5cGUiOiJwcmVmaXhlcyJ9LHsiaWQiOiIxMC4yNTg3OSIsInR5cGUiOiJwcmVmaXhlcyJ9LHsiaWQiOiIxMC4yNTg1MyIsInR5cGUiOiJwcmVmaXhlcyJ9LHsiaWQiOiIxMC4yNTg1NCIsInR5cGUiOiJwcmVmaXhlcyJ9LHsiaWQiOiIxMC4yNTg1NiIsInR5cGUiOiJwcmVmaXhlcyJ9LHsiaWQiOiIxMC4yNTg1MSIsInR5cGUiOiJwcmVmaXhlcyJ9LHsiaWQiOiIxMC4yNTg1MiIsInR5cGUiOiJwcmVmaXhlcyJ9LHsiaWQiOiIxMC4yNTg1NyIsInR5cGUiOiJwcmVmaXhlcyJ9LHsiaWQiOiIxMC4yNTg1OCIsInR5cGUiOiJwcmVmaXhlcyJ9LHsiaWQiOiIxMC4yNTg1OSIsInR5cGUiOiJwcmVmaXhlcyJ9XX19fV19
47
+ http_version:
48
+ recorded_at: Wed, 28 Nov 2018 15:25:12 GMT
49
+ - request:
50
+ method: get
51
+ uri: https://search.test.datacite.org/api?fl=doi,url,xml,state,allocator_symbol,datacentre_symbol,media,minted,updated&q=doi:10.21956/wellcomeopenres.25947.r17364&wt=json
52
+ body:
53
+ encoding: US-ASCII
54
+ string: ''
55
+ headers:
56
+ User-Agent:
57
+ - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma)
58
+ Accept:
59
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
60
+ response:
61
+ status:
62
+ code: 200
63
+ message: OK
64
+ headers:
65
+ Date:
66
+ - Wed, 28 Nov 2018 15:25:12 GMT
67
+ Content-Type:
68
+ - application/json;charset=UTF-8
69
+ Connection:
70
+ - keep-alive
71
+ Server:
72
+ - nginx/1.10.3 (Ubuntu)
73
+ Access-Control-Allow-Origin:
74
+ - "*"
75
+ Access-Control-Allow-Methods:
76
+ - GET, POST, PUT, DELETE, OPTIONS
77
+ Access-Control-Allow-Headers:
78
+ - DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Authorization
79
+ Access-Control-Expose-Headers:
80
+ - DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Authorization
81
+ body:
82
+ encoding: ASCII-8BIT
83
+ string: '{"responseHeader":{"status":0,"QTime":0},"response":{"numFound":1,"start":0,"docs":[{"datacentre_symbol":"BL.F1000R","url":"https://dev1rw.f1000internal.com/articles/2-195/v1#referee-response-17364","xml":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/Pgo8cmVzb3VyY2UgeG1sbnM9Imh0dHA6Ly9kYXRhY2l0ZS5vcmcvc2NoZW1hL2tlcm5lbC0zIiB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4c2k6c2NoZW1hTG9jYXRpb249Imh0dHA6Ly9kYXRhY2l0ZS5vcmcvc2NoZW1hL2tlcm5lbC0zIGh0dHA6Ly9zY2hlbWEuZGF0YWNpdGUub3JnL21ldGEva2VybmVsLTMvbWV0YWRhdGEueHNkIj4KICA8aWRlbnRpZmllciBpZGVudGlmaWVyVHlwZT0iRE9JIj4xMC4yMTk1Ni9XRUxMQ09NRU9QRU5SRVMuMjU5NDcuUjE3MzY0PC9pZGVudGlmaWVyPgogIDxjcmVhdG9ycz4KICAgIDxjcmVhdG9yPgogICAgICA8Y3JlYXRvck5hbWU+RnJhbjIgTGV2eTwvY3JlYXRvck5hbWU+CiAgICA8L2NyZWF0b3I+CiAgPC9jcmVhdG9ycz4KICA8dGl0bGVzPgogICAgPHRpdGxlPlJlZmVyZWUgcmVwb3J0LiBGb3I6IEZMIFJlZ3Jlc3Npb24gV2VsbGNvbWUgW3ZlcnNpb24gMTsgcmVmZXJlZXM6IHJldHJhY3RlZF08L3RpdGxlPgogIDwvdGl0bGVzPgogIDxwdWJsaXNoZXI+RjEwMDAgUmVzZWFyY2ggTGltaXRlZDwvcHVibGlzaGVyPgogIDxwdWJsaWNhdGlvblllYXI+MjAxODwvcHVibGljYXRpb25ZZWFyPgogIDxyZXNvdXJjZVR5cGUgcmVzb3VyY2VUeXBlR2VuZXJhbD0iVGV4dCIvPgogIDxyZWxhdGVkSWRlbnRpZmllcnM+CiAgICA8cmVsYXRlZElkZW50aWZpZXIgcmVsYXRlZElkZW50aWZpZXJUeXBlPSJET0kiIHJlbGF0aW9uVHlwZT0iUmV2aWV3cyI+MTAuMTI2ODgvd2VsbGNvbWVvcGVucmVzLjI0MzU1LjE8L3JlbGF0ZWRJZGVudGlmaWVyPgogIDwvcmVsYXRlZElkZW50aWZpZXJzPgo8L3Jlc291cmNlPg==","allocator_symbol":"BL","minted":"2018-07-18T16:09:35Z","state":"findable","updated":"2018-11-18T02:01:15Z","doi":"10.21956/WELLCOMEOPENRES.25947.R17364"}]}}
84
+
85
+ '
86
+ http_version:
87
+ recorded_at: Wed, 28 Nov 2018 15:25:12 GMT
88
+ recorded_with: VCR 3.0.3
@@ -707,6 +707,23 @@ describe Bolognese::Metadata, vcr: true do
707
707
  expect(subject.state).to eq("findable")
708
708
  end
709
709
 
710
+ it "DOI in test system schema 3" do
711
+ input = "10.21956/wellcomeopenres.25947.r17364"
712
+ subject = Bolognese::Metadata.new(input: input, doi: input, sandbox: true)
713
+ expect(subject.valid?).to be true
714
+ expect(subject.identifier).to eq("https://handle.test.datacite.org/10.21956/wellcomeopenres.25947.r17364")
715
+ expect(subject.types["schemaOrg"]).to eq("ScholarlyArticle")
716
+ expect(subject.types["resourceTypeGeneral"]).to eq("Text")
717
+ expect(subject.creator).to eq([{"name"=>"Fran2 Levy"}])
718
+ expect(subject.titles).to eq([{"title"=>"Referee report. For: FL Regression Wellcome [version 1; referees: retracted]"}])
719
+ expect(subject.dates).to eq([{"date"=>"2018", "dateType"=>"Issued"}])
720
+ expect(subject.publication_year).to eq("2018")
721
+ expect(subject.publisher).to eq("F1000 Research Limited")
722
+ expect(subject.agency).to eq("DataCite")
723
+ expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
724
+ expect(subject.state).to eq("findable")
725
+ end
726
+
710
727
  it "Referee report in test system" do
711
728
  input = "10.21956/gatesopenres.530.r190"
712
729
  subject = Bolognese::Metadata.new(input: input, sandbox: true)
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: 1.0.24
4
+ version: 1.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
@@ -789,6 +789,7 @@ files:
789
789
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/posted_content.yml
790
790
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/BlogPosting.yml
791
791
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_test_system.yml
792
+ - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_test_system_schema_3.yml
792
793
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_with_related_id_system.yml
793
794
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_not_found.yml
794
795
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Dataset.yml