uc3-dmp-citation 0.0.14 → 0.0.16

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: 1ffc848695d0ce4cafb3b8d027cae76c0f3d5d4fbdf86c01c31b454cc779f483
4
- data.tar.gz: dba6531f2ac67babdb582029de08c2646db41a36f2de79e239645c63dfb3a40d
3
+ metadata.gz: d8f6ce6b1e876be86359025dc20ed5f0cb61ce24414c3976f6cfe6cf1ea64a48
4
+ data.tar.gz: 8db13b8bed6167b3c888945d59ec0e23a2a47668001f867082b453f859ad1c60
5
5
  SHA512:
6
- metadata.gz: 146960b63d2dcbc2f946d758b938e24e4d5901c8442af200cbf8a7f81a30b43d0c089e57bd236aa635b2d2c2ee877b46cf36f66673e26837d218b6a4550a0489
7
- data.tar.gz: 00f5e9d324a2dd8a5eb97a8a06c33a01e5be6edc2fc2a27988beafcc9b7f774d2631768c871da693b2d10eb528fb7866d4187453b1f2f04b47718303bd6a8f10
6
+ metadata.gz: deba715a7e4a87f9499d0a5e37357ddda9992b50f5037efbd344b5fc3dcacd7ab3ca2b8a49fd4ff0c8e5d0f5f82d261b3ecc903d8f8f1aff622e9ad05f818806
7
+ data.tar.gz: c9acc90c6ea97c091fc4595bc004e18148075d6c3b3d8193e5f4c942434a76dfe8d728cf26c75940234dc4aa0e0010d9bcf91ccd56a2365d0e3efc6bed7fc90e
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpCitation
4
- VERSION = '0.0.14'
4
+ VERSION = '0.0.16'
5
5
  end
@@ -28,8 +28,13 @@ module Uc3DmpCitation
28
28
  return nil if uri.nil? || uri.blank?
29
29
 
30
30
  headers = { Accept: 'application/x-bibtex' }
31
- logger.debug(message: "Fetching BibTeX from: #{uri}") if logger.respond_to?(:debug)
32
- resp = Uc3DmpExternalApi::Client.call(url: uri, method: :get, additional_headers: headers, logger:)
31
+ logger&.debug(message: "Fetching BibTeX from: #{uri}")
32
+ begin
33
+ resp = Uc3DmpExternalApi::Client.call(url: uri, method: :get, additional_headers: headers, logger:)
34
+ rescue Uc3DmpExternalApi::ExternalApiError => e
35
+ logger&.warn(message: "Failure fetching citation for #{uri} - #{e.message}")
36
+ return nil
37
+ end
33
38
  return nil if resp.nil? || resp.to_s.strip.empty?
34
39
 
35
40
  bibtex_to_citation(uri: uri, bibtex_as_string: resp)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-citation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-29 00:00:00.000000000 Z
11
+ date: 2024-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  requirements: []
99
- rubygems_version: 3.4.22
99
+ rubygems_version: 3.5.13
100
100
  signing_key:
101
101
  specification_version: 4
102
102
  summary: DMPTool gem that provides support for fetching BibTex for a DOI and converting