uc3-dmp-id 0.0.82 → 0.0.84

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: b007856ad5a2979b663ac9bca26022d13aa08c854d36db99f6b5073f3d96c914
4
- data.tar.gz: 96b951823afd6c995b824ce8047792a5e90b56fc9f6636a0a33c20ce05101796
3
+ metadata.gz: 7f2e3b8a5707e78a6d60993c8abc1605b5562ec1e2d0979b5d2ae31fff86c410
4
+ data.tar.gz: ac67878bb4ab3ba29733cc45b0f96b047bd81ac55f15a1b5a642648e017f1c50
5
5
  SHA512:
6
- metadata.gz: 25266f1a148076550a27e53813b5ee074e6379505d894715532d6945cfb299ce6aa1002fa1a3fc02490429421db7256e10459bcc791d2115134d56aa18e7988d
7
- data.tar.gz: 54102b178db027bd0e496cdc1ee703e3180d2a1a020a20da113dc919f1479bb15311c50c892198ae8d47a8de5473e5d636d98e6903c28c8c8c12ee548d898a03
6
+ metadata.gz: 11d4c6faf29896ab3f76984bb90acfa00ae399cfcd5f97ac2272d2ef475345ec3453422d67f0cfc6f8c80bc39fb5cc41d1e38ba7c7196da809c21837f9ff2131
7
+ data.tar.gz: 30dba39ba29e5c9518e208cbfd0afec2ac7fbfc81ccb0d6c2868baf679a21ee34a9dd37a57d589230db02f073705a7ddcb28c2ecc52333d9524e9d2aadd4c624
@@ -90,7 +90,7 @@ module Uc3DmpId
90
90
  dmp_id = format_dmp_id(value: json['identifier'].to_s)
91
91
  return nil if dmp_id.nil? || dmp_id == ''
92
92
 
93
- append_pk_prefix(p_key: dmp_id)
93
+ append_pk_prefix(p_key: dmp_id.gsub(%r{https?://}, ''))
94
94
  end
95
95
 
96
96
  # Derive the DMP ID by removing the :PK prefix
@@ -14,11 +14,6 @@ module Uc3DmpId
14
14
 
15
15
  dmp = Helper.parse_json(json: json)
16
16
  p_key = Helper.append_pk_prefix(p_key: p_key)
17
- errs = _updateable?(provenance: provenance, p_key: p_key, json: dmp)
18
-
19
- puts "Updateable? #{errs}"
20
-
21
- raise UpdaterError, errs if errs.is_a?(Array) && errs.any?
22
17
 
23
18
  # Add the DMPHub specific attributes
24
19
  annotated = Helper.annotate_dmp(provenance: provenance, json: dmp['dmp'], p_key: p_key)
@@ -29,6 +24,8 @@ puts annotated
29
24
  # fetch the existing latest version of the DMP ID
30
25
  client = Uc3DmpDynamo::Client.new(debug: debug)
31
26
  existing = Finder.by_pk(p_key: p_key, client: client, debug: debug)
27
+ errs = _updateable?(provenance: provenance, p_key: p_key, json: existing)
28
+ raise UpdaterError, errs if errs.is_a?(Array) && errs.any?
32
29
  # Don't continue if nothing has changed!
33
30
  raise UpdaterError, MSG_NO_CHANGE if Helper.eql?(dmp_a: existing, dmp_b: annotated)
34
31
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.82'
4
+ VERSION = '0.0.84'
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.82
4
+ version: 0.0.84
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley