uc3-dmp-id 0.0.18 → 0.0.19

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: d066d2f35fda60e96486334123aedbbd7978eea786d379551dd4fef411be8981
4
- data.tar.gz: e72d2a53d14636420066f18b41c8d72729e58b50e81b4d27fe1801522f24b028
3
+ metadata.gz: ba5ea607a46a54a678d88187f9aa1e1afb49b691a7586a01b8f22e1502771865
4
+ data.tar.gz: f24f181d33ae842057fdd2bc95002baa41cdc75040e37ce4904502ecbccf120f
5
5
  SHA512:
6
- metadata.gz: 66a91931568d189eb44d1eee182ac044039f1836b5ed9e63ce3a137208a1bae200f4cdf075a3aa3bfb61570087d48e733db511cfb19e260cd2e3542c19ac7df0
7
- data.tar.gz: 0d50822613d923836b21abd0665bfeee501d122ec920632dd1f7c7f4f5863e24a7a555ff393e2f57c28c646d24be7d2d5bfcaf06cdc1965cd1163c0b61729eba
6
+ metadata.gz: 769b2512b7d4b2d7a18b7a11863b8eb0b0870b3ab5d23301386830bfd9db9e9630f887670dfda30031b541ff968ec7b178248ab5ffe9308b7ec59e81a2321f21
7
+ data.tar.gz: bd200b2ad45a7a202a86ef2eeac50834b19ab4713bd200185f4fc8f663c9668a8d2afacfe3a5c6c54d5bae47efb556b39d9d75ff926abdc6966a42a7de169842
@@ -34,10 +34,6 @@ module Uc3DmpId
34
34
  scan_index_forward: false
35
35
  }
36
36
  client = client.nil? ? Uc3DmpDynamo::Client.new(debug: debug) : client
37
-
38
- puts "VERSION SEARCH:"
39
- puts args
40
-
41
37
  client.query(args: args, debug: debug)
42
38
  end
43
39
 
@@ -83,7 +79,8 @@ puts resp
83
79
  dmp = resp['dmp'].nil? ? JSON.parse({ dmp: resp }.to_json) : resp
84
80
  return nil if dmp['dmp']['PK'].nil?
85
81
 
86
- _append_versions(p_key: dmp['dmp']['PK'], dmp: dmp, client: client, debug: debug)
82
+ dmp = _append_versions(p_key: dmp['dmp']['PK'], dmp: dmp, client: client, debug: debug)
83
+ cleanse_dmp_json(json: dmp)
87
84
  end
88
85
 
89
86
  # Attempt to find the DMP item by the provenance system's identifier
@@ -121,15 +118,10 @@ puts resp
121
118
  def _append_versions(p_key:, dmp:, client: nil, debug: false)
122
119
  return dmp if p_key.nil? || !dmp.is_a?(Hash) || dmp['dmp'].nil?
123
120
 
124
- puts "FETCHING VERSIONS"
125
-
126
121
  results = versions(p_key: p_key, client: client, debug: debug)
127
122
  return dmp unless results.length > 1
128
123
 
129
124
  versions = results.map do |ver|
130
-
131
- puts ver
132
-
133
125
  next if ver['modified'].nil?
134
126
  {
135
127
  timestamp: ver['modified'],
@@ -137,10 +129,6 @@ puts ver
137
129
  }
138
130
  end
139
131
  dmp['dmp']['dmphub_versions'] = JSON.parse(versions.to_json)
140
-
141
- puts "AFTER APPENDING VERSIONS:"
142
- puts dmp
143
-
144
132
  dmp
145
133
  end
146
134
  # rubocop:enable Metrics/AbcSize
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.18'
4
+ VERSION = '0.0.19'
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.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley