dynamini 2.6.6 → 2.6.8

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: 5f49e721fd627858b268479539065b3f62ded837
4
- data.tar.gz: 296511c0cf83bb00155e21cd78e6a5c05da93ec0
3
+ metadata.gz: fdfc84fe329dae011f69a61ac1af6b0c22f7a009
4
+ data.tar.gz: 85dae7d4ed4e50e863c6717e6beff8ae5bc84ff7
5
5
  SHA512:
6
- metadata.gz: 6785712ac96112bf8e78cc551a6dc1b378968ee90d1e4fd4cd2d0294c0290d9b26b777deb50e45143801eb4567263628f5cc37676fb932dcc7e1231e8a7da2e1
7
- data.tar.gz: 8fd0a91480de7a1a3a815c22db84cf2a783e2aefb68a8f47da958bf9e8d76c9d8399dfec093735f1494eec8212a0b6308899d46eab99b45be7b099849952dcc4
6
+ metadata.gz: dfc9700d794a7c660bdf1090a9774326945bbc7a6f74e5fcb8658c9b453c53578207f0d8116f63c2f5fe62ade2d0e98efcc0a294dca31b81ec588a48a0cf7530
7
+ data.tar.gz: d62dad577c5100725d13fe9658a13c0784dda7d24d0717e422b01d83d206b06aeba0fa24a09a7859f1b7d6970f82fb879f26a05d15c29ef26c15954174f57c38
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dynamini (2.6.6)
4
+ dynamini (2.6.8)
5
5
  activemodel (>= 3, < 5.0)
6
6
  aws-sdk (~> 2)
7
7
 
@@ -17,12 +17,12 @@ GEM
17
17
  minitest (~> 5.1)
18
18
  thread_safe (~> 0.3, >= 0.3.4)
19
19
  tzinfo (~> 1.1)
20
- aws-sdk (2.6.1)
21
- aws-sdk-resources (= 2.6.1)
22
- aws-sdk-core (2.6.1)
20
+ aws-sdk (2.6.6)
21
+ aws-sdk-resources (= 2.6.6)
22
+ aws-sdk-core (2.6.6)
23
23
  jmespath (~> 1.0)
24
- aws-sdk-resources (2.6.1)
25
- aws-sdk-core (= 2.6.1)
24
+ aws-sdk-resources (2.6.6)
25
+ aws-sdk-core (= 2.6.6)
26
26
  builder (3.2.2)
27
27
  coderay (1.1.0)
28
28
  diff-lcs (1.2.5)
data/dynamini.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'dynamini'
3
- s.version = '2.6.6'
3
+ s.version = '2.6.8'
4
4
  s.summary = 'DynamoDB interface'
5
5
  s.description = 'Lightweight DynamoDB interface gem designed as
6
6
  a drop-in replacement for ActiveRecord.
@@ -73,6 +73,8 @@ module Dynamini
73
73
 
74
74
  args[:request_items].each do |table_name, get_request|
75
75
  responses[table_name] = []
76
+ ids = get_request[:keys].flat_map(&:values)
77
+ raise 'Aws::DynamoDB::Errors::ValidationException: Provided list of item keys contains duplicates' if ids.length != ids.uniq.length
76
78
  get_request[:keys].each do |key_hash|
77
79
  item = get_table(table_name)[key_hash.values.first]
78
80
  responses[table_name] << item unless item.nil?
@@ -75,9 +75,14 @@ describe Dynamini::BatchOperations do
75
75
  end
76
76
 
77
77
  context 'when requesting over 100 items' do
78
- let(:ids) { Array.new(50, 'foo') + Array.new(51, '4321')}
78
+ let(:ids) do
79
+ i =* (1..101)
80
+ i.map(&:to_s)
81
+ end
82
+
79
83
  before do
80
- Dynamini::Base.create(id: '4321')
84
+ i =* (1..51)
85
+ i.each { |id| Dynamini::Base.create(id: id.to_s) }
81
86
  end
82
87
 
83
88
  it 'should call dynamo once for each 100 items' do
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.6.6
4
+ version: 2.6.8
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: 2016-10-05 00:00:00.000000000 Z
18
+ date: 2016-10-12 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: activemodel
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  version: '0'
186
186
  requirements: []
187
187
  rubyforge_project:
188
- rubygems_version: 2.5.1
188
+ rubygems_version: 2.6.4
189
189
  signing_key:
190
190
  specification_version: 4
191
191
  summary: DynamoDB interface