appfuel 0.6.6 → 0.6.7

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
  SHA1:
3
- metadata.gz: c62c1dda23c68cc94510cc7d066289d8096ccec4
4
- data.tar.gz: 38778f084abf8373397920e12b2fbe7d90ec1567
3
+ metadata.gz: ac2f75afd34433b3e7950224bc19f53f778da893
4
+ data.tar.gz: 50a8d1d9365b3cfeb9321b67275f1fb498741ef4
5
5
  SHA512:
6
- metadata.gz: a8b4f1093b76c7be1b9c6db79cc0a6ae40fc085c8f99cb2ed78c4eabda6fe6646c9f71ea8627dcf9e8726feac5cdde8d0a2d9098ce53dee5a0b4b427a4ff27a9
7
- data.tar.gz: 7976bd1967ce72901ac38491b4e775c87a15e084b21386b96ea91d626934c1cf6f445b2cc226084e0c1fca4c6d009e42bb43885a94e6d40dfd007e817e9dea0f
6
+ metadata.gz: d8f7582476e05b03f83c88b64e16cbfc0a6706a20ab5f2026e10c82c7e7bd4f9a0eb9c9abb3441d083981ee8b1f24f5b63b676b634a4f79a436774634a6c64a3
7
+ data.tar.gz: 7f4a2f112f545762977dbd40d8b8191b4fc1be8eed96ea9b6de24f863b3c29fdecfefa2169975f5a7070c55133757418adeb39cad38506679f286a4e7b440146
data/CHANGELOG.md CHANGED
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. (Pending ap
5
5
 
6
6
 
7
7
  # Releases
8
+ ## [[0.6.7]](https://github.com/rsb/appfuel/releases/tag/0.6.7) 2017-08-24
9
+ ### Fixed
10
+ - `batch_get` should not return when a block is given
11
+
8
12
  ## [[0.6.6]](https://github.com/rsb/appfuel/releases/tag/0.6.6) 2017-08-23
9
13
  ### Added
10
14
  - `batch_get` to dynamodb nosql adapter
@@ -160,26 +160,18 @@ module Appfuel
160
160
  end
161
161
  end
162
162
 
163
- # build batch keys
164
- # when inputs is an array of one item
165
- # when the inputs is an array of two items
166
- #
167
- # requested_items: {
168
- # "TableName" => {
169
- # keys: [
170
- #
171
- # ]
172
- # }
173
- # }
174
- #
175
- #
163
+ def batch_get_params(ids, opts = {})
164
+ {
165
+ requested_items: {
166
+ table_name => {keys: batch_keys(ids)}
167
+ }
168
+ }
169
+ end
170
+
176
171
  def batch_get(ids, &block)
177
172
  table_key = table_name
178
- result = client.batch_get_item(
179
- request_items: {
180
- table_key => { keys: batch_keys(ids) }
181
- }
182
- )
173
+ params = batch_get_params(ids)
174
+ result = client.batch_get_item(params)
183
175
 
184
176
 
185
177
  unless result.responses.key?(table_key)
@@ -187,7 +179,7 @@ module Appfuel
187
179
  end
188
180
 
189
181
  list = result.responses[table_key]
190
- return list if block_given?
182
+ return list unless block_given?
191
183
 
192
184
  list.each do |item|
193
185
  yield item
@@ -1,3 +1,3 @@
1
1
  module Appfuel
2
- VERSION = "0.6.6"
2
+ VERSION = "0.6.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appfuel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Scott-Buccleuch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-23 00:00:00.000000000 Z
11
+ date: 2017-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord