uc3-dmp-id 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-id/helper.rb +4 -4
- data/lib/uc3-dmp-id/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35192e984c146cf3891bc898ed03d3f100338a150a379e61e90da8c978b16050
|
4
|
+
data.tar.gz: 1c75e1a057e8b45fb26b56e6b4569f47dc496bf3d0bd66c00ddebc8d3be85ccd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 564ac8f207a3a156c73d3258f4de65d62e44841569e9f4a3808c88031ff0c5c75429d7922c2ed60a1146731e9c282170c111c3fd8a41524c9f9cb9e4bb608b9a
|
7
|
+
data.tar.gz: 4bb2d583e5863ecc0b299a2f25c3042fc3f2615326a0545e2160e5f668db35dd3e2fe66be5c4ec1e0c630ef02a86dd1f986ea81f401e9c1f60fd6a455bb60980
|
data/lib/uc3-dmp-id/helper.rb
CHANGED
@@ -37,7 +37,7 @@ module Uc3DmpId
|
|
37
37
|
# Append the SK prefix for the object
|
38
38
|
# -------------------------------------------------------------------------------------
|
39
39
|
def append_sk_prefix(s_key:)
|
40
|
-
s_key.is_a?(String) ? "#{SK_DMP_PREFIX}#{
|
40
|
+
s_key.is_a?(String) ? "#{SK_DMP_PREFIX}#{remove_sk_prefix(s_key: s_key)}" : nil
|
41
41
|
end
|
42
42
|
|
43
43
|
# Strip off the SK prefix
|
@@ -79,7 +79,7 @@ module Uc3DmpId
|
|
79
79
|
p_key = param if param.start_with?(dmp_id_base_url) || param.start_with?(base_domain)
|
80
80
|
p_key = CGI.unescape(p_key.nil? ? param : p_key)
|
81
81
|
p_key = format_dmp_id(value: p_key)
|
82
|
-
append_pk_prefix(
|
82
|
+
append_pk_prefix(p_key: p_key)
|
83
83
|
end
|
84
84
|
|
85
85
|
# Append the :PK prefix to the :dmp_id
|
@@ -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(
|
93
|
+
append_pk_prefix(p_key: dmp_id)
|
94
94
|
end
|
95
95
|
|
96
96
|
# Derive the DMP ID by removing the :PK prefix
|
@@ -99,7 +99,7 @@ module Uc3DmpId
|
|
99
99
|
|
100
100
|
{
|
101
101
|
type: 'doi',
|
102
|
-
identifier: format_dmp_id(value: remove_pk_prefix(
|
102
|
+
identifier: format_dmp_id(value: remove_pk_prefix(p_key: p_key), with_protocol: true)
|
103
103
|
}
|
104
104
|
end
|
105
105
|
|
data/lib/uc3-dmp-id/version.rb
CHANGED