uc3-dmp-id 0.0.91 → 0.0.93

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: 8fc2f1105b9026517773a3df7165cf35d1e346f35abe5e1250390328ebdb8dcc
4
- data.tar.gz: 6ebf56cfed68d53f67e1b272c0f9eec2db1fe027d773388ddc9705e277435e1f
3
+ metadata.gz: effd6e9f621b4a0a2ff038e01a9db04f39284eebe520c18df70b6a224984e030
4
+ data.tar.gz: be8087477ee5ae03e4c82b24cecf4f8b92b5fb4fa090520277738b0538d3324c
5
5
  SHA512:
6
- metadata.gz: 6754ec2264db1e2b993c5cf5289a13b48c888587a5c2df2f5ad64521ffeba1b13c71916e5feea230bf0fc75dab3c79a47e75fe92101c885afa572529866834a2
7
- data.tar.gz: aac5e6524c66cee7f18cfe9f4fe90d44cdfbdedc530c1a7318140929bf5ad59f07645a3d9b016fef54d133ee1f7ac17937479c5edf74164781cde3dba52047ed
6
+ metadata.gz: 31d8ab61ec9adef5daba45bb25d26bfbb5559b5ac468bc3b05231e814e24e0670d84644040006ab723049f7c7b469e13a4ac53a9fd34c88ba8473232b0beb93e
7
+ data.tar.gz: 1c2b1e95f0f01ca0ef7e641338eac0ab18e59b1137980dd912cb8b7321d7311a0dfa4f7458d796d73040e73ba91768399f19f9320be2a7da4b8941026337783e
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.91'
4
+ VERSION = '0.0.93'
5
5
  end
@@ -32,18 +32,19 @@ module Uc3DmpId
32
32
  # - Splicing in the current changes onto the existing `VERSION#latest` item
33
33
  # - Returning the spliced `VERSION#latest` back to this method
34
34
  def new_version(provenance:, p_key:, client: nil, dmp:, latest_version: {}, logger: nil)
35
+
36
+ puts "Provenance: #{provenance}, PK: #{p_key}"
37
+ puts dmp
38
+
35
39
  return nil unless p_key.is_a?(String) && !p_key.strip.empty? && _versionable?(dmp: dmp)
36
40
 
37
- client = Uc3DmpDynamo::Client.new(logger: logger) if client.nil?
41
+ client = Uc3DmpDynamo::Client.new if client.nil?
38
42
  latest_version = Finder.by_p_key(client: client, p_key: p_key) unless latest_version.is_a?(Hash) &&
39
43
  !latest_version['PK'].nil?
40
44
 
41
- # Only continue if there was an existing record and its the latest version
42
- return nil unless latest['SK'] != Helper::DMP_LATEST_VERSION
43
-
44
- owner = latest['dmphub_provenance_id']
45
+ owner = latest_version['dmphub_provenance_id']
45
46
  updater = provenance['PK']
46
- prior = _generate_version(client: client, latest_version: latest, owner: owner, updater: updater)
47
+ prior = _generate_version(client: client, latest_version: latest_version, owner: owner, updater: updater)
47
48
  return nil if prior.nil?
48
49
 
49
50
  args = { owner: owner, updater: updater, base: prior, mods: dmp, logger: logger }
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.91
4
+ version: 0.0.93
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley