aws-record 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e48846d201d3875b4a5aff0d1238f88c20b3d67
4
- data.tar.gz: e25d28b815549f62dcdbff6d27c057e524395c86
3
+ metadata.gz: c6c46aec6c7a749fe6428fd36e7fa5bc8e205988
4
+ data.tar.gz: 91de72e195aa41c91e5804c6a48e6ba04e4f035b
5
5
  SHA512:
6
- metadata.gz: 893e0a90b1971f5324c20cf3a70ddfa28cc07f35efa46cad7e3eef1d81cb70861bf36752d34fdb8fa438386f12018b044f5190611735a077f4662167991fe5aa
7
- data.tar.gz: 55c4af09bd3c112113197cba16826a58a95d246a274e43f5f8abd9c280a31588709c25cc8c7cfd5d108a65262e0a9ea8f9ed93f0471f0644a1caf11a688a059c
6
+ metadata.gz: 62a8c0327dde967851fc04bf89e42621fe05f59138aab1cdd084b230beb756d7178b18d107145737bbb1984ac08afdbbd87446fca6101a74f17895316e1d68ab
7
+ data.tar.gz: 2c74f91a4fa0f0e233ecc3c8dad80843faada5222bceff1f898c6acd1032131726abf7c3a1fe0c28a17f213e1ccde034df4d33b6461c01a3bc40b188f1d7cf97
@@ -136,13 +136,14 @@ module Aws
136
136
  )
137
137
  if update_tuple
138
138
  uex, exp_attr_names, exp_attr_values = update_tuple
139
- dynamodb_client.update_item(
139
+ request_opts = {
140
140
  table_name: self.class.table_name,
141
141
  key: key_values,
142
142
  update_expression: uex,
143
143
  expression_attribute_names: exp_attr_names,
144
- expression_attribute_values: exp_attr_values
145
- )
144
+ }
145
+ request_opts[:expression_attribute_values] = exp_attr_values unless exp_attr_values.empty?
146
+ dynamodb_client.update_item(request_opts)
146
147
  else
147
148
  dynamodb_client.update_item(
148
149
  table_name: self.class.table_name,
@@ -302,7 +303,7 @@ module Aws
302
303
  uex, exp_attr_names, exp_attr_values = update_tuple
303
304
  request_opts[:update_expression] = uex
304
305
  request_opts[:expression_attribute_names] = exp_attr_names
305
- request_opts[:expression_attribute_values] = exp_attr_values
306
+ request_opts[:expression_attribute_values] = exp_attr_values unless exp_attr_values.empty?
306
307
  end
307
308
  dynamodb_client.update_item(request_opts)
308
309
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  module Aws
15
15
  module Record
16
- VERSION = '1.0.1'
16
+ VERSION = '1.0.2'
17
17
  end
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-record
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-24 00:00:00.000000000 Z
11
+ date: 2016-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-resources