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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b3ca3eccd4443fafe0bf8e1de30d2a1fe545c1dafd4669341777954b616cf6a
4
- data.tar.gz: 8a44cfa0bbd402b7f20a416178a2d7e8d32c52b1f5d4fac9e2af0b4d5b5ddc63
3
+ metadata.gz: 2fcdba6dc1e42019bc664159cf1e2cfa4e89658a5f05b3370d3e4172e8e6a4e3
4
+ data.tar.gz: 9a0046dc12b25523263f85669173db965011fe2fd97086cbd20b27419b674b62
5
5
  SHA512:
6
- metadata.gz: 3dbba27e4b3401a2537150bb59e317c212fe9cc24f95069d08710edb0a783277364fbb3b15409f5df94d992e15c2aeb48fb5dc2979c87d917c3dbaf450c89281
7
- data.tar.gz: 832be3a84f034edfd88571cc84d176505b43f2e6dcc6c774d94b9448ec57187a73501d6269b6f8eaea388daccdd8c130fb360b1943daa90d5e6bf3ff9c2e40a8
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpDynamo
4
- VERSION = '0.0.14'
4
+ VERSION = '0.0.16'
5
5
  end
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.14
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-06 00:00:00.000000000 Z
11
+ date: 2023-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json