uc3-dmp-id 0.0.104 → 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: f281a066200306c56a78470094fe5924fab333221e1bcdd4dcaade896d0e02ff
4
- data.tar.gz: fa4b3f82159d32df245267596f3dd9d559f82c4faf07175a712448e2b2d7dd6c
3
+ metadata.gz: 4e989d8d3d5932bb292a7116d479b6ccaf57611741d0af54e6e31a9177a0a5fa
4
+ data.tar.gz: 10bef83307a97389e8cb512fb83a6558259f569c4e69225c023c77553060fca5
5
5
  SHA512:
6
- metadata.gz: a35bccc8f9a1b3a4bd475ba63151c082d5a263594454f0670e5b90800bc525d381e5191054102924c4220303648904d5c11562313360b4638def9b3aea98234e
7
- data.tar.gz: ebbbef1978d20fad47c45bb75f1e242e4d583fc8f3107b7370a187679ce77d8adf2679178399ab85339ba1ec2ca6e7026345dd3ebfae0534343feec270ce9b9f
6
+ metadata.gz: 0afbd3c9861c4d26d0b9002c28cea9443522e77300ceb24c80d15812725637508312cbcae33bf355c4386fe9aa51b34ccf4f52275a18e910363e7ff46b77b71b
7
+ data.tar.gz: 8c79f4ac8d1ed0f44ee13512d006488b52af89983f5835a70fc80e773f8c92311bd66b286a2abba2a4a963dd3fa1891c2258a03a2574e15ea51bc958c3ae8bbe
@@ -49,6 +49,9 @@ puts version
49
49
  version = _process_modifications(owner: owner, updater: updater, version: version, mods: mods, note: note,
50
50
  logger: logger)
51
51
 
52
+ puts "AFTER PROCESING MODS:"
53
+ puts version
54
+
52
55
  # Save the changes
53
56
  resp = client.put_item(json: version, logger: logger)
54
57
  raise UpdaterError, MSG_DMP_UNABLE_TO_VERSION if resp.nil?
@@ -107,21 +110,14 @@ puts version
107
110
  end
108
111
 
109
112
  def _process_modifications(owner:, updater:, version:, mods:, note: nil, logger: nil)
110
-
111
- puts "OWNER: #{owner}, UPDATER #{updater}, Version is Hash? #{version.is_a?(Hash)}, Mods is Hash? #{mods.is_a?(Hash)}"
112
-
113
- puts "Returning version? #{!mods.is_a?(Hash) || updater.nil?}"
114
- puts "Returning mods? #{!version.is_a?(Hash) || owner.nil?}"
115
-
116
113
  return version unless mods.is_a?(Hash) && !updater.nil?
117
114
  return mods unless version.is_a?(Hash) && !owner.nil?
118
115
 
119
- puts "Asserting!"
120
-
121
116
  # Splice together any assertions that may have been made while the user was editing the DMP ID
122
- 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
+
123
119
  # Attach the incoming changes as an assertion to the DMP ID since the updater is NOT the owner
124
- 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)
125
121
  end
126
122
 
127
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.104'
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.104
4
+ version: 0.0.105
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley