uc3-dmp-dynamo 0.0.6 → 0.0.8

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: b0b0c89e4e576fc8416abb7a2b1f8d131bc5b75107c387a81d7f60e416ef0887
4
- data.tar.gz: 3a278bf8304c366ee9ec4768e174b5918d4958c008d8106e58166dfac9a30892
3
+ metadata.gz: ee2c663d3ea38fa977b1da431a056b6978efb1ec45c6c2449ff549a961bb08e3
4
+ data.tar.gz: b6b94f7caea0f1967a215b4dd8284fefa45ea6c906d3c0cb597247d217aeae53
5
5
  SHA512:
6
- metadata.gz: 84fc086e335afb9eed5c8acf57987658bd2580baf2dfa8bcb3edd44d0bdb0d38e0e8d68800e0ec3530706039894984af6bac882548389fa4c8139d915330081d
7
- data.tar.gz: 1e1a9900aadbd51119408dfdfa0de0d66b0eb1cf588de109222587c7e63581f8bca87b9c6e5c1cb2b9c184c11d6316d7bb4ae6a661b550c03b81f2a790aeac18
6
+ metadata.gz: 7e0c5b2af7500be27fc66ea6a15f3296d3c116ac025a58e668be7d7687248c4fcf174f11705ac3faa6d338594f48f563e7cfef93cf1feb8851bbb34f279c4d7a
7
+ data.tar.gz: e8fa984ec6a3e325b517634dd7b771a31a03b7a11df3394f6fa47effecbaf8fc0fc23783f67b391934c7c9d969450ebe84a181f70d7f9eefff998d682964a767
@@ -79,7 +79,10 @@ module Uc3DmpDynamo
79
79
  puts "QUERY RESULT:"
80
80
  puts resp.items.first.inspect
81
81
 
82
- resp.items.any? ? resp.items.map(&:item) : []
82
+ return [] unless resp.items.any?
83
+ return resp.items if resp.items.first.is_a?(Hash)
84
+
85
+ resp.items.first.respond_to?(:item) ? resp.items.map(&:item) : resp.items
83
86
  rescue Aws::Errors::ServiceError => e
84
87
  raise ClientError, format(MSG_DYNAMO_ERROR, msg: e.message, trace: e.backtrace)
85
88
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpDynamo
4
- VERSION = '0.0.6'
4
+ VERSION = '0.0.8'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-dynamo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley