dynamini 2.12.3 → 3.0.0

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
- SHA1:
3
- metadata.gz: 64d5c75ec0d58bf5f50ed320dfbbe10a255d051d
4
- data.tar.gz: 3da5fdfd2a11ea2a16be31a704667847defa025a
2
+ SHA256:
3
+ metadata.gz: 626d28ac5a026adff25f306cbada792f8c1b877b05e6e60b3ff30e59b880ad80
4
+ data.tar.gz: c0512bf1f1eaf74b8ddc5e9e873c3298a5c35283f65ef3511b62a7acb0681f3f
5
5
  SHA512:
6
- metadata.gz: 92e8327fdd80e05f6cf364da201f585cd4b06744cc9b92ddc987d3dc55d5e234104e146d40e730e3954291a6b197043db1547b4c2bfe7ea5c191967e468bf6a5
7
- data.tar.gz: f2ab1310bea3cc6ee8da4b0bdee4824919bf8593d8115a1309a302c16327d7c01d1843328b0b3f939a45fc79d4f29c8644f1ccbdc5313144e87d61d2f293846e
6
+ metadata.gz: 8dc37de2e68965db05763113e12f37479bc49a46e69d5a622f1233808c9f4eefc581fddf829e0a3a48b7066b0e307605cd97c58c9006f13a5a77ac46ee06484f
7
+ data.tar.gz: f133768f1da96b5766bcd366da5c80f1ab69230bdb42ddf3e17dfd4d343ca01cb7db96779a0f54b92d50d994ce6e5280d20f9c3562abcaa1f6f1f4487b947fe5
@@ -1,32 +1,34 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dynamini (2.12.2)
5
- activemodel (>= 3, < 5.0)
6
- aws-sdk (~> 2)
4
+ dynamini (3.0.0)
5
+ activemodel (>= 3)
6
+ aws-sdk-dynamodb (~> 1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activemodel (4.2.10)
12
- activesupport (= 4.2.10)
13
- builder (~> 3.1)
14
- activesupport (4.2.10)
15
- i18n (~> 0.7)
11
+ activemodel (5.2.3)
12
+ activesupport (= 5.2.3)
13
+ activesupport (5.2.3)
14
+ concurrent-ruby (~> 1.0, >= 1.0.2)
15
+ i18n (>= 0.7, < 2)
16
16
  minitest (~> 5.1)
17
- thread_safe (~> 0.3, >= 0.3.4)
18
17
  tzinfo (~> 1.1)
19
- aws-sdk (2.10.131)
20
- aws-sdk-resources (= 2.10.131)
21
- aws-sdk-core (2.10.131)
22
- aws-sigv4 (~> 1.0)
18
+ aws-eventstream (1.0.2)
19
+ aws-partitions (1.148.0)
20
+ aws-sdk-core (3.48.3)
21
+ aws-eventstream (~> 1.0, >= 1.0.2)
22
+ aws-partitions (~> 1.0)
23
+ aws-sigv4 (~> 1.1)
23
24
  jmespath (~> 1.0)
24
- aws-sdk-resources (2.10.131)
25
- aws-sdk-core (= 2.10.131)
26
- aws-sigv4 (1.0.2)
27
- builder (3.2.3)
25
+ aws-sdk-dynamodb (1.25.0)
26
+ aws-sdk-core (~> 3, >= 3.48.2)
27
+ aws-sigv4 (~> 1.1)
28
+ aws-sigv4 (1.1.0)
29
+ aws-eventstream (~> 1.0, >= 1.0.2)
28
30
  coderay (1.1.0)
29
- concurrent-ruby (1.0.5)
31
+ concurrent-ruby (1.1.5)
30
32
  diff-lcs (1.2.5)
31
33
  ffi (1.9.10)
32
34
  formatador (0.2.5)
@@ -50,9 +52,9 @@ GEM
50
52
  guard-shell (0.7.1)
51
53
  guard (>= 2.0.0)
52
54
  guard-compat (~> 1.0)
53
- i18n (0.9.5)
55
+ i18n (1.6.0)
54
56
  concurrent-ruby (~> 1.0)
55
- jmespath (1.3.1)
57
+ jmespath (1.4.0)
56
58
  listen (3.0.3)
57
59
  rb-fsevent (>= 0.9.3)
58
60
  rb-inotify (>= 0.9)
@@ -103,4 +105,4 @@ DEPENDENCIES
103
105
  rspec (~> 3)
104
106
 
105
107
  BUNDLED WITH
106
- 1.16.1
108
+ 1.17.1
data/README.md CHANGED
@@ -323,10 +323,12 @@ config.after(:each) {
323
323
  Vehicle.client.reset
324
324
  }
325
325
  ```
326
+ Each of your Dynamini subclasses uses a separate sandboxed TestClient, which can cause some unexpected behavior when testing polymorphic classes that are meant to share the same production table.
326
327
 
327
328
  ## Things to remember
328
329
  * Since DynamoDB is schemaless, Dynamini is designed to allow your instance to respond to any method call that looks like an attribute name, even if you've never referenced it before. For instance, model.i_bet_this_will_raise_an_error will return nil.
329
330
  * Similarly, you can write any arbitrarily-named attribute to your instance without defining its name or properties beforehand.
331
+ * Dynamini will attempt to split very large item updates into multiple save operations. However, if a single attribute is not enumerable and is itself larger than AWS's size limit, the update will be rejected.
330
332
  * If you change the primary key value on an instance of your model, then resave it, you'll have two records in your database.
331
333
  * If you have a model with a foreign key attribute that points to your Dynamini model, you can use Rails' :belongs_to association helper normally. (If you use non-numeric strings for your Dynamini hash key, remember to change your foreign key columns on related ActiveRecord tables to be string type.)
332
334
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'dynamini'
3
- s.version = '2.12.3'
3
+ s.version = '3.0.0'
4
4
  s.summary = 'DynamoDB interface'
5
5
  s.description = 'Lightweight DynamoDB interface gem designed as
6
6
  a drop-in replacement for ActiveRecord.
@@ -17,8 +17,8 @@ Gem::Specification.new do |s|
17
17
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
18
18
  s.require_paths = ['lib']
19
19
 
20
- s.add_dependency('activemodel', ['>= 3', '< 5.0'])
21
- s.add_dependency('aws-sdk', '~> 2')
20
+ s.add_dependency('activemodel', '>= 3')
21
+ s.add_dependency('aws-sdk-dynamodb', '~> 1')
22
22
 
23
23
  s.add_development_dependency 'rspec', '~> 3'
24
24
  s.add_development_dependency 'pry', '~> 0'
@@ -82,7 +82,7 @@ module Dynamini
82
82
  client.scan({
83
83
  consistent_read: options[:consistent_read],
84
84
  exclusive_start_key: start_key,
85
- secondary_index_name: options[:index_name],
85
+ index_name: options[:index_name],
86
86
  limit: options[:limit],
87
87
  segment: options[:segment],
88
88
  total_segments: options[:total_segments],
@@ -155,7 +155,7 @@ describe Dynamini::BatchOperations do
155
155
  it 'passes the request to the client in the correct shape and returns the correct shape' do
156
156
  expect(subject.client).to receive(:scan).with(
157
157
  consistent_read: false,
158
- secondary_index_name: 'foo_index',
158
+ index_name: 'foo_index',
159
159
  limit: 100,
160
160
  segment: 1,
161
161
  total_segments: 2,
@@ -177,7 +177,7 @@ describe Dynamini::BatchOperations do
177
177
  it 'passes the request to the client in the correct shape and returns the correct shape' do
178
178
  expect(subject.client).to receive(:scan).with(
179
179
  consistent_read: false,
180
- secondary_index_name: 'foo_index',
180
+ index_name: 'foo_index',
181
181
  exclusive_start_key: { 'foo_attr' => 'abc' },
182
182
  limit: 100,
183
183
  segment: 1,
@@ -199,7 +199,7 @@ describe Dynamini::BatchOperations do
199
199
  it 'passes the request to the client in the correct shape and returns the correct shape' do
200
200
  expect(subject.client).to receive(:scan).with(
201
201
  consistent_read: false,
202
- secondary_index_name: 'foo_index',
202
+ index_name: 'foo_index',
203
203
  exclusive_start_key: { 'foo_attr' => 'abc' },
204
204
  limit: 100,
205
205
  segment: 1,
@@ -1,7 +1,7 @@
1
1
  require 'bundler/setup'
2
2
  Bundler.setup
3
3
 
4
- require 'aws-sdk'
4
+ require 'aws-sdk-dynamodb'
5
5
  require 'pry'
6
6
  require 'fuubar'
7
7
  require 'dynamini'
@@ -12,4 +12,4 @@ RSpec.configure do |config|
12
12
  config.filter_run :focus => true
13
13
  config.run_all_when_everything_filtered = true
14
14
  config.after(:each) { Dynamini::Base.client.reset }
15
- end
15
+ end
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.12.3
4
+ version: 3.0.0
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: 2018-07-25 00:00:00.000000000 Z
18
+ date: 2019-04-02 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: activemodel
@@ -24,9 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3'
27
- - - "<"
28
- - !ruby/object:Gem::Version
29
- version: '5.0'
30
27
  type: :runtime
31
28
  prerelease: false
32
29
  version_requirements: !ruby/object:Gem::Requirement
@@ -34,23 +31,20 @@ dependencies:
34
31
  - - ">="
35
32
  - !ruby/object:Gem::Version
36
33
  version: '3'
37
- - - "<"
38
- - !ruby/object:Gem::Version
39
- version: '5.0'
40
34
  - !ruby/object:Gem::Dependency
41
- name: aws-sdk
35
+ name: aws-sdk-dynamodb
42
36
  requirement: !ruby/object:Gem::Requirement
43
37
  requirements:
44
38
  - - "~>"
45
39
  - !ruby/object:Gem::Version
46
- version: '2'
40
+ version: '1'
47
41
  type: :runtime
48
42
  prerelease: false
49
43
  version_requirements: !ruby/object:Gem::Requirement
50
44
  requirements:
51
45
  - - "~>"
52
46
  - !ruby/object:Gem::Version
53
- version: '2'
47
+ version: '1'
54
48
  - !ruby/object:Gem::Dependency
55
49
  name: rspec
56
50
  requirement: !ruby/object:Gem::Requirement
@@ -186,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
180
  version: '0'
187
181
  requirements: []
188
182
  rubyforge_project:
189
- rubygems_version: 2.5.1
183
+ rubygems_version: 2.7.6
190
184
  signing_key:
191
185
  specification_version: 4
192
186
  summary: DynamoDB interface