uc3-dmp-id 0.0.130 → 0.0.131
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 +4 -4
- data/lib/uc3-dmp-id/creator.rb +1 -1
- data/lib/uc3-dmp-id/helper.rb +4 -1
- data/lib/uc3-dmp-id/updater.rb +1 -1
- data/lib/uc3-dmp-id/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: faf64b4329b7946e25b2ae9a7e65935f9b622dc06be767471a1138953ee05531
|
|
4
|
+
data.tar.gz: defcc30a3fe31912cf98c21b836167cd1fc627827a26cc078ef8df768a2433ca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d1cf66666dd01883ef588aa175cfb608fcb9817d4c24b90cdbee7102eba9eafbc256c4e7d50d89ad348df4b18a805b10f4e78502d9cbdb7758952b5a758be214
|
|
7
|
+
data.tar.gz: 8138d7b2d67f365adfbc959b6d46a9390d122a09150fee3f0da69d8e74ed62a97a3f09dd64567121baf77c4febea00b7674c8d05c9135742d4060958ec3106f7
|
data/lib/uc3-dmp-id/creator.rb
CHANGED
|
@@ -94,7 +94,7 @@ module Uc3DmpId
|
|
|
94
94
|
publisher.publish(source: 'DmpCreator', dmp: json, logger: logger)
|
|
95
95
|
|
|
96
96
|
# Determine if there are any related identifiers that we should try to fetch a citation for
|
|
97
|
-
citable_identifiers = Helper.citable_related_identifiers(
|
|
97
|
+
citable_identifiers = Helper.citable_related_identifiers(dmp: json)
|
|
98
98
|
return true if citable_identifiers.empty?
|
|
99
99
|
|
|
100
100
|
# Process each citation individually because they can be slow to fetch
|
data/lib/uc3-dmp-id/helper.rb
CHANGED
|
@@ -233,7 +233,10 @@ module Uc3DmpId
|
|
|
233
233
|
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
|
234
234
|
|
|
235
235
|
# Extracts the related identifiers that we can fetch a citation for
|
|
236
|
-
def citable_related_identifiers(
|
|
236
|
+
def citable_related_identifiers(dmp:)
|
|
237
|
+
return [] unless dmp.is_a?(Hash)
|
|
238
|
+
|
|
239
|
+
related_identifiers = dmp.fetch('dmproadmap_related_identifiers', [])
|
|
237
240
|
# Ignore the identifier that points to the narrative PDF document and any identifiers that
|
|
238
241
|
# we have already fetched the citation for
|
|
239
242
|
related_identifiers.reject do |id|
|
data/lib/uc3-dmp-id/updater.rb
CHANGED
|
@@ -143,7 +143,7 @@ module Uc3DmpId
|
|
|
143
143
|
publisher.publish(source: 'DmpUpdater', dmp: json, logger: logger)
|
|
144
144
|
|
|
145
145
|
# Determine if there are any related identifiers that we should try to fetch a citation for
|
|
146
|
-
citable_identifiers = Helper.citable_related_identifiers(
|
|
146
|
+
citable_identifiers = Helper.citable_related_identifiers(dmp: json)
|
|
147
147
|
|
|
148
148
|
puts "CITATION BIT:"
|
|
149
149
|
puts citable_identifiers
|
data/lib/uc3-dmp-id/version.rb
CHANGED