uc3-dmp-dynamo 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 +4 -4
- data/lib/uc3-dmp-dynamo/client.rb +3 -3
- data/lib/uc3-dmp-dynamo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fcdba6dc1e42019bc664159cf1e2cfa4e89658a5f05b3370d3e4172e8e6a4e3
|
4
|
+
data.tar.gz: 9a0046dc12b25523263f85669173db965011fe2fd97086cbd20b27419b674b62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b3e34ecf69e21e83a3a19affd699f4e2a27c0bf9a32ff5b39fb854b97f1b15c72a90e1874fad2f4b8ce9f7c948135114217ef05153e35bff61529d5db7bc236
|
7
|
+
data.tar.gz: 4a87b60f7eb9d4df527ffb9097d187199281b4043bfcdb758993f764686e75556ed355985a37a1feb3e7006c92f34cb801dc5ba0898579e93436664f3e83ca8c
|
@@ -21,10 +21,10 @@ module Uc3DmpDynamo
|
|
21
21
|
end
|
22
22
|
|
23
23
|
# Quick get_item that only returns the PK to validate that the item exists
|
24
|
-
def pk_exists?(key:)
|
24
|
+
def pk_exists?(key:, logger: nil)
|
25
25
|
return nil unless key.is_a?(Hash) && !key['PK'].nil?
|
26
26
|
|
27
|
-
resp = client.get_item(table_name: @table, key: key, projection_expression: 'PK')
|
27
|
+
resp = client.get_item(table_name: @table, key: key, projection_expression: 'PK', logger: logger)
|
28
28
|
resp.item.is_a?(Hash) && resp.item['PK'] == key['PK']
|
29
29
|
end
|
30
30
|
|
@@ -37,7 +37,7 @@ module Uc3DmpDynamo
|
|
37
37
|
{ table_name: @table,
|
38
38
|
key: key,
|
39
39
|
consistent_read: false,
|
40
|
-
return_consumed_capacity: debug ? 'TOTAL' : 'NONE' }
|
40
|
+
return_consumed_capacity: logger&.level == 'debug' ? 'TOTAL' : 'NONE' }
|
41
41
|
)
|
42
42
|
|
43
43
|
logger.debug(message: "#{SOURCE} fetched DMP ID: #{key}") if logger.respond_to?(:debug)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uc3-dmp-dynamo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Riley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|