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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/appfuel/storage/dynamodb/adapter.rb +11 -19
- data/lib/appfuel/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac2f75afd34433b3e7950224bc19f53f778da893
|
4
|
+
data.tar.gz: 50a8d1d9365b3cfeb9321b67275f1fb498741ef4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
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
|
-
|
179
|
-
|
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
|
182
|
+
return list unless block_given?
|
191
183
|
|
192
184
|
list.each do |item|
|
193
185
|
yield item
|
data/lib/appfuel/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|