dynamini 2.9.4 → 2.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/dynamini.gemspec +1 -1
- data/lib/dynamini/test_client.rb +3 -3
- data/spec/dynamini/batch_operations_spec.rb +6 -0
- 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: 9f7c910987e834399c78a7c26cf2524d00eb6729
|
4
|
+
data.tar.gz: 74298b30b3f7994a64ee6d54b0d6d15709eaabd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2aa48e095d7f04867863d9e33571f90e57e8bde41daa5c6c36ddfd6b9428c814187fbb39111b7eca4cfaa0f8c5cc591aaecdd425d6100e4a043a5ee601bda1a6
|
7
|
+
data.tar.gz: 76fcae444b9633607b5abb142afd5bf2fd2182edc42390a5be61b6fb1adb8d8bc10519c01da1c8b84148563bc10fd8da74bab70786981f8c19571398a51e42f8
|
data/Gemfile.lock
CHANGED
data/dynamini.gemspec
CHANGED
data/lib/dynamini/test_client.rb
CHANGED
@@ -103,7 +103,7 @@ module Dynamini
|
|
103
103
|
|
104
104
|
def index_of_start_key(args, records)
|
105
105
|
if args[:exclusive_start_key]
|
106
|
-
sec_index = secondary_index[args[:secondary_index_name]]
|
106
|
+
sec_index = secondary_index && secondary_index[args[:secondary_index_name]]
|
107
107
|
start_index = records.index do |r|
|
108
108
|
if sec_index
|
109
109
|
r[get_secondary_hash_key(sec_index)] == args[:exclusive_start_key].values[0]
|
@@ -111,7 +111,7 @@ module Dynamini
|
|
111
111
|
r[hash_key_attr] == args[:exclusive_start_key].values[0]
|
112
112
|
end
|
113
113
|
end
|
114
|
-
start_index ||
|
114
|
+
start_index || 0
|
115
115
|
else
|
116
116
|
0
|
117
117
|
end
|
@@ -123,7 +123,7 @@ module Dynamini
|
|
123
123
|
end
|
124
124
|
|
125
125
|
def get_last_evaluated_key(secondary_index_name, items, records)
|
126
|
-
if items.last != records.last
|
126
|
+
if records.length > 0 && items.last != records.last
|
127
127
|
index = secondary_index[secondary_index_name]
|
128
128
|
if index
|
129
129
|
{ get_secondary_hash_key(index).to_s => items.last[get_secondary_hash_key(index)] }
|
@@ -218,6 +218,12 @@ describe Dynamini::BatchOperations do
|
|
218
218
|
end
|
219
219
|
end
|
220
220
|
end
|
221
|
+
|
222
|
+
context 'with a model with no secondary indices but with a start key' do
|
223
|
+
it 'behaves' do
|
224
|
+
expect{ Dynamini::Base.scan(start_key: '123') }.to_not raise_error
|
225
|
+
end
|
226
|
+
end
|
221
227
|
end
|
222
228
|
end
|
223
229
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamini
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Ward
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2017-09-
|
18
|
+
date: 2017-09-14 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: activemodel
|