uc3-dmp-id 0.1.73 → 0.1.75

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: 30470f9547ebdbc1a5e8928be0fad068d5c3f1b485d78a4b12fc76eae53cfe67
4
- data.tar.gz: 19a4aed6a4f3c3cd8ac29b2b8a719b4a0829d22c0b4a1cf1320640ad5868bbb7
3
+ metadata.gz: 18cc7a2a74f91898c76cb8686c511023bc31dd2147d92bd172ae7a00a2dd72b3
4
+ data.tar.gz: ab9b8e2009e384fc1b20a99ea92dc92ddabc1779c9c6d02ed369d171724766cb
5
5
  SHA512:
6
- metadata.gz: 3e7cee4b2f06b160c1a350a6d47aba1fcd0402800e6ed8a9a884dc1a6a8b6cedb7d8dacc3186c6cf51ad7e39eeff9d80e85f161c7e0662dd159457a94257d33c
7
- data.tar.gz: 5c6d819af9a1be470da73fa98df34412a44f5f203260a5287d5c5131bc4e25478836047e5c421f19d736717495b980d88dacf13241d2e06824ae36bb9cc913fe
6
+ metadata.gz: d989d0ea6f7e7cb0486f9b7982a40f4085dc4056576c7f4bb0225b5d37f1fb9175fc57f3628a3d1e1cd2cf342305fb79791681798657c58f0be6bccc61bee5aa
7
+ data.tar.gz: 71379ba74f63add7f9443b0a85b30cb64664e5602499cabd91f27512a5b0567bb88f83e9890efd42e8b6914267457aabfb177ee616eb3925939991c147e1fe4d
@@ -141,12 +141,12 @@ module Uc3DmpId
141
141
 
142
142
  logger.debug(message: 'Modifications before merge.', details: mods) if logger.respond_to?(:debug)
143
143
  keys_to_retain = version.keys.select do |key|
144
- (key.start_with?('dmphub_') && !%w[dmphub_modifications dmphub_versions].include?(key)) ||
145
- key.start_with?('PK') || key.start_with?('dmproadmap_related_identifiers')
146
- end
147
- keys_to_retain.each do |key|
148
- mods[key] = version[key]
144
+ key.start_with?('dmphub_') &&
145
+ !%w[dmphub_modifications dmphub_versions].include?(key)
149
146
  end
147
+ keys_to_retain.each { |key| mods[key] = version[key] }
148
+
149
+ mods['PK'] = version['PK']
150
150
  mods['SK'] = Helper::DMP_LATEST_VERSION
151
151
  logger.debug(message: 'Modifications after merge.', details: mods) if logger.respond_to?(:debug)
152
152
  mods
@@ -242,7 +242,7 @@ module Uc3DmpId
242
242
  descriptor: related['descriptor'],
243
243
  citation: related['citation']
244
244
  }.to_json
245
- elsif exists
245
+ elsif related['status'] != 'approved' && existing.any?
246
246
  # otherwise remove it
247
247
  json['dmproadmap_related_identifiers'] = json['dmproadmap_related_identifiers'].reject { |ri| ri == existing.first }
248
248
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.1.73'
4
+ VERSION = '0.1.75'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.73
4
+ version: 0.1.75
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley