uc3-dmp-provenance 0.0.14 → 0.0.16

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: 447ff9f477af2166e1f5cbe01bb241e6b441c300c7003d8f51e202e44ddcafb5
4
- data.tar.gz: 0740ef24b381143e68820c1d29887b5e307b66d4ce6e316e191e0d4ca4453541
3
+ metadata.gz: eec2798b3a9266305e0969dea9c28b61b84b7e253b5523e0afd885cc094e2a4c
4
+ data.tar.gz: b3cc12b6a745fa90c7230a562e1a4adb84b398eb641a8331b60ca6d819a64b96
5
5
  SHA512:
6
- metadata.gz: 6d2dc971ade242f5b93a8ad07b5766c1117f400f21d74166cdc2b7c8f1b9756a26e6f4388d0448303b63fe942b134eabe946f92244d4389d7b62cb652555c691
7
- data.tar.gz: 25fa3320ec8645356df0435d669877165cbb9f2b04dbe017b11caa60737b983eb43a219419e35988a8e1795a036c470994f69be3d86f4b8ae8dafd63fba33f9d
6
+ metadata.gz: 57771cac44979220c1e56b37e10387df26ba9606f60d93fbac59a8a17f7a3bebbe22b3e4c4a3f3f0e7034116ecbdbe1ee15be5b8ea9ddc5a315507fcdb53fc52
7
+ data.tar.gz: 0f044503c02a805f32e4dc8bb2129bca783de6bf45e85c7270b841d322f5732494097dd3988ffb2fe05879c0644250df2eab96a94050ca76b3d8038375ea7ec0
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'aws-sdk-ssm'
4
+
3
5
  require 'uc3-dmp-cognito'
4
6
  require 'uc3-dmp-dynamo'
5
7
 
@@ -37,12 +39,16 @@ module Uc3DmpProvenance
37
39
  key: { PK: Helper.append_pk_prefix(provenance: client_name), SK: Helper::SK_PROVENANCE_PREFIX },
38
40
  logger:
39
41
  )
40
- return nil if resp.nil? || resp.empty? ? nil
42
+ return nil if resp.nil? || resp.empty?
41
43
 
42
44
  # Fetch the list of RORs the provenance may access
43
45
  key = "/uc3/dmp/tool/provenance/#{client_name}/ror_list"
44
- ssm_val = Uc3DmpApiCore::SsmReader.fetch_value(key:, logger:)
45
- return resp if ssm_val.nil?
46
+ begin
47
+ ssm_val = Uc3DmpApiCore::SsmReader.fetch_value(key:, logger:)
48
+ rescue Aws::SSM::Errors::ParameterNotFound
49
+ # If we get an error it is because the key doesn't exist, so just return as is
50
+ return resp
51
+ end
46
52
 
47
53
  resp['ror_list'] = JSON.parse(ssm_val)
48
54
  resp
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpProvenance
4
- VERSION = '0.0.14'
4
+ VERSION = '0.0.16'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-provenance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley