uc3-dmp-citation 0.0.4 → 0.0.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51cc64bd3a8575a4fb04a20d82a1fd6386e4b35ce295267c0e565b709600c071
4
- data.tar.gz: 1f9620c4964370b74bf04646531006e38c3a17fe5487bd7a1ec2e8de7231f830
3
+ metadata.gz: 33d3c1379d1dcfe500b123f98bc555913c3f72d76cad5df9d5bd8f6f03a39852
4
+ data.tar.gz: 39b8ac0b6b989c40f52bda21d14e6db32c7b11b6610f8e8a66c33ec48632749c
5
5
  SHA512:
6
- metadata.gz: 565110d35da1f33e2ade33ca48f7a6d4781e2a7b7c3898d48d0fc961cdb0450cf2acf2d759653fafa3d9235a53681032b7b306e2973faeef2203d3496899a595
7
- data.tar.gz: 6f1080006959d2695c0087be1e7a691522087abb1438abaaedab5a822fc2d1a3b45dd42c70e01dbd958bbe48ac8ca61a2dbaec38e06a4c5e726777e63493940c
6
+ metadata.gz: 0f9625b4776712fe7090e0e3d98f274e1289a9322f8ca18a736f220038894ee5846f60fff6cca66c9eca2f715df9bc6ea6c9a1baf24d719d0534586ae03a43b1
7
+ data.tar.gz: 95f3b54d33d563547a49a4a0fb084112ce4122b5e34cd48aeac60dc82d57de79e8ff8380c5e7c04a81b9063a303cb261c5cb4f0334f3cd0ed69b15f16bcebf42
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpCitation
4
- VERSION = '0.0.4'
4
+ VERSION = '0.0.5'
5
5
  end
@@ -21,7 +21,7 @@ module Uc3DmpCitation
21
21
  MSG_UNABLE_TO_UPDATE = 'Unable to update the citations on the DMP ID.'
22
22
 
23
23
  class << self
24
- def fetch_citation(doi:, work_type: DEFAULT_WORK_TYPE, logger: nil)
24
+ def fetch_citation(doi:, work_type: DEFAULT_WORK_TYPE, style: DEFAULT_CITATION_STYLE, logger: nil)
25
25
  uri = _doi_to_uri(doi: doi)
26
26
  return nil if uri.nil? || uri.blank?
27
27
 
@@ -32,7 +32,8 @@ module Uc3DmpCitation
32
32
 
33
33
  bibtex = BibTeX.parse(_cleanse_bibtex(text: resp))
34
34
  work_type = work_type.nil? ? determine_work_type(bibtex: bibtex) : work_type
35
- _bibtex_to_citation(uri: uri, work_type: work_type, bibtex: bibtex)
35
+ style = style.nil? ? DEFAULT_CITATION_STYLE : style
36
+ _bibtex_to_citation(uri: uri, work_type: work_type, style: style, bibtex: bibtex)
36
37
  end
37
38
 
38
39
  private
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.4
4
+ version: 0.0.5
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-08-17 00:00:00.000000000 Z
11
+ date: 2023-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug