uc3-dmp-citation 0.0.11 → 0.0.13

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: 959d10f2241c9adfff6e38f5fcf034f3d5727a3a732d116f7a3c938dd8c96722
4
- data.tar.gz: 4cf39e5d77478dee2da06beac941363ee596fc45d4867d93546c31ecc8ad38e4
3
+ metadata.gz: bb61482fd32f0f622a954eaef6b2b8abc82a10f460b3f9c3af05eabfc30a077d
4
+ data.tar.gz: 32532cbb14ca2d0af66c133cf5889bc9b33866f8dabf229a45b6f9889aba7450
5
5
  SHA512:
6
- metadata.gz: b0e9c9dbeffb14babd6dba3c2a9f09d079c03c6c924c8fa4e357910ab2b52fd64986cf44b6cd527b2548a9dc472ee594728adbdeb1c681389081668d1d291989
7
- data.tar.gz: 8370c919ef06c53a39f8c1774981e9f3e0a8730dff3af6596362d60130bc71dc31b0f3f9bf761f246f6199443772d6e73250a1d1d090af3acc1698c31c5ac175
6
+ metadata.gz: 82e46c9ad5b3d69feeca4a3af0c0f5846faf5aafe0c9529c68b8a8ea07b7834d21b1663bb739c6e44aae85a85ca2ed7658bf4b68721cdc356bbf6bc80523d60e
7
+ data.tar.gz: 5aed7f2e3d412b18cb9e2c81b2006bbab176da2d5a8c9ee0d6a72af1d3dc71264e618de435e6d431fd669fc06a4c7685f9e82d80f53bd4afa142965c34e8bd5a
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpCitation
4
- VERSION = '0.0.11'
4
+ VERSION = '0.0.13'
5
5
  end
@@ -32,7 +32,7 @@ module Uc3DmpCitation
32
32
  resp = Uc3DmpExternalApi::Client.call(url: uri, method: :get, additional_headers: headers, logger:)
33
33
  return nil if resp.nil? || resp.to_s.strip.empty?
34
34
 
35
- bibtex_to_citation(bibtex_as_string: resp)
35
+ bibtex_to_citation(uri: uri, bibtex_as_string: resp)
36
36
  end
37
37
  # rubocop:enable Metrics/AbcSize
38
38
 
@@ -58,11 +58,10 @@ module Uc3DmpCitation
58
58
 
59
59
  # If no :work_type was specified we can try to derive it from the BibTeX metadata
60
60
  def _determine_work_type(bibtex:)
61
- return '' if bibtex.nil? || bibtex.data.nil? || bibtex.data.first.nil?
61
+ return '' if bibtex.nil? || bibtex.data.nil? || bibtex.data.first.nil? ||
62
+ !bibtex.data.first.respond_to?(:journal)
62
63
 
63
- return 'article' unless bibtex.data.first.respond_to?(:journal) || bibtex.data.first.journal.nil?
64
-
65
- ''
64
+ 'article'
66
65
  end
67
66
 
68
67
  def _cleanse_bibtex(text:)
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.11
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-01 00:00:00.000000000 Z
11
+ date: 2024-01-29 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.10
99
+ rubygems_version: 3.4.22
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