uc3-dmp-id 0.0.103 → 0.0.105

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: f8e56bba58989f2a6e008036dc36bc43febb01ef0ac2625c0c87246a710fee52
4
- data.tar.gz: 32d1a18e7aa3f8c23c41c1f5ab0e5d10e291e540c27b487180272abf5906532f
3
+ metadata.gz: 4e989d8d3d5932bb292a7116d479b6ccaf57611741d0af54e6e31a9177a0a5fa
4
+ data.tar.gz: 10bef83307a97389e8cb512fb83a6558259f569c4e69225c023c77553060fca5
5
5
  SHA512:
6
- metadata.gz: 0aa690c41fc7ed0311f219ef6063499822dbe9d0bd7504f9c422aa814438e62dc8cf7d1947b898f4c086e9f71850b533c03fab6235b9e57cf10bb49e5a3d40e4
7
- data.tar.gz: 4ce8052ee0ca147cd008a8610f95eb2dea34e1e33d50ee35f4d4b91d7ad93d8838d54ffa8d1911133d6e79b886ee3261de5bac2df53aa0c30459f5f432cd42b9
6
+ metadata.gz: 0afbd3c9861c4d26d0b9002c28cea9443522e77300ceb24c80d15812725637508312cbcae33bf355c4386fe9aa51b34ccf4f52275a18e910363e7ff46b77b71b
7
+ data.tar.gz: 8c79f4ac8d1ed0f44ee13512d006488b52af89983f5835a70fc80e773f8c92311bd66b286a2abba2a4a963dd3fa1891c2258a03a2574e15ea51bc958c3ae8bbe
@@ -41,10 +41,17 @@ puts "DMPHub PROV: #{latest_version['dmphub_provenance_id']}, DMP BURIED: #{late
41
41
  logger: logger)
42
42
  raise UpdaterError, MSG_DMP_UNABLE_TO_VERSION if version.nil?
43
43
 
44
+ puts "OWNER AFTER VERSION: #{owner}"
45
+ puts version
46
+
47
+
44
48
  # Splice the assertions
45
49
  version = _process_modifications(owner: owner, updater: updater, version: version, mods: mods, note: note,
46
50
  logger: logger)
47
51
 
52
+ puts "AFTER PROCESING MODS:"
53
+ puts version
54
+
48
55
  # Save the changes
49
56
  resp = client.put_item(json: version, logger: logger)
50
57
  raise UpdaterError, MSG_DMP_UNABLE_TO_VERSION if resp.nil?
@@ -103,16 +110,14 @@ puts "DMPHub PROV: #{latest_version['dmphub_provenance_id']}, DMP BURIED: #{late
103
110
  end
104
111
 
105
112
  def _process_modifications(owner:, updater:, version:, mods:, note: nil, logger: nil)
106
-
107
- puts "OWNER: #{owner}, UPDATER #{updater}, Version is Hash? #{version.is_a?(Hash)}, Mods is Hash? #{mods.is_a?(Hash)}"
108
-
109
113
  return version unless mods.is_a?(Hash) && !updater.nil?
110
114
  return mods unless version.is_a?(Hash) && !owner.nil?
111
115
 
112
116
  # Splice together any assertions that may have been made while the user was editing the DMP ID
113
- Asserter.splice(latest_version: version, modified_version: mods, logger: logger) if owner == updater
117
+ return Asserter.splice(latest_version: version, modified_version: mods, logger: logger) if owner == updater
118
+
114
119
  # Attach the incoming changes as an assertion to the DMP ID since the updater is NOT the owner
115
- Asserter.add(updater: provenance['PK'], dmp: version, mods: mods, note: note, logger: logger) if owner != updater
120
+ Asserter.add(updater: provenance['PK'], dmp: version, mods: mods, note: note, logger: logger)
116
121
  end
117
122
 
118
123
  # Once the DMP has been updated, we need to update it's DOI metadata
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.103'
4
+ VERSION = '0.0.105'
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.0.103
4
+ version: 0.0.105
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley