dynamo_record 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dynamo_record/persistence.rb +2 -1
- data/lib/dynamo_record/version.rb +1 -1
- data/lib/dynamo_record.rb +1 -0
- data/spec/fixtures/vcr_cassettes/DynamoRecord_Persistence/_create_table/with_index/creates_table.yml +12 -12
- data/spec/fixtures/vcr_cassettes/DynamoRecord_Persistence/_create_table/without_index/creates_table.yml +12 -12
- 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: 5fb5b16d2b039d568861f082c5f3cccad211ba3e
|
4
|
+
data.tar.gz: 9498f8271f0c554917aa5bdb60077fc32e892d25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15246feea0321586603ef895e65db34cb0fb236a4a1cebd711b22b7cdc39c76403cc39af15636c1e752965531cbbc2175efe2785bd0070965906fa5611aec6f9
|
7
|
+
data.tar.gz: 35efad701ad1db27793e3927c2d7b9144a9ab64d1c68d822cb5328bf79732b4be37443b8cb640714c851b7b3a938e406252dd7d4cf8ab4cdf01e74e81aa5d91a
|
@@ -4,7 +4,8 @@ module DynamoRecord
|
|
4
4
|
|
5
5
|
module ClassMethods
|
6
6
|
def table_name
|
7
|
-
|
7
|
+
name = ActiveSupport::Inflector.tableize(base_class.name)
|
8
|
+
@table_name ||= DynamoRecord::Config.namespace ? "#{DynamoRecord::Config.namespace}_#{name}" : name
|
8
9
|
end
|
9
10
|
|
10
11
|
def client
|
data/lib/dynamo_record.rb
CHANGED
data/spec/fixtures/vcr_cassettes/DynamoRecord_Persistence/_create_table/with_index/creates_table.yml
CHANGED
@@ -5,7 +5,7 @@ http_interactions:
|
|
5
5
|
uri: https://dynamodb.us-east-1.amazonaws.com/
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"AttributeDefinitions":[{"AttributeName":"id","AttributeType":"S"},{"AttributeName":"name","AttributeType":"S"}],"TableName":"
|
8
|
+
string: '{"AttributeDefinitions":[{"AttributeName":"id","AttributeType":"S"},{"AttributeName":"name","AttributeType":"S"}],"TableName":"index_cities","KeySchema":[{"AttributeName":"id","KeyType":"HASH"}],"ProvisionedThroughput":{"ReadCapacityUnits":20,"WriteCapacityUnits":20},"GlobalSecondaryIndexes":[{"IndexName":"name-index","KeySchema":[{"AttributeName":"name","KeyType":"HASH"}],"Projection":{"ProjectionType":"ALL"},"ProvisionedThroughput":{"ReadCapacityUnits":20,"WriteCapacityUnits":20}}]}'
|
9
9
|
headers:
|
10
10
|
Content-Type:
|
11
11
|
- application/x-amz-json-1.0
|
@@ -16,17 +16,17 @@ http_interactions:
|
|
16
16
|
X-Amz-Target:
|
17
17
|
- DynamoDB_20120810.CreateTable
|
18
18
|
X-Amz-Date:
|
19
|
-
-
|
19
|
+
- 20150101T055839Z
|
20
20
|
Host:
|
21
21
|
- dynamodb.us-east-1.amazonaws.com
|
22
22
|
X-Amz-Content-Sha256:
|
23
|
-
-
|
23
|
+
- f367f93ea8d0dac13defca67311f4b956a18992bd453cadbd9718bb27e92a2f5
|
24
24
|
Authorization:
|
25
|
-
- AWS4-HMAC-SHA256 Credential=key/
|
25
|
+
- AWS4-HMAC-SHA256 Credential=key/20150101/us-east-1/dynamodb/aws4_request,
|
26
26
|
SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date;x-amz-target,
|
27
|
-
Signature=
|
27
|
+
Signature=7a357b3cb933ddd629ea46417ee9467ff7148fcddd0531e29da515129d7093f8
|
28
28
|
Content-Length:
|
29
|
-
- '
|
29
|
+
- '489'
|
30
30
|
Accept:
|
31
31
|
- "*/*"
|
32
32
|
response:
|
@@ -35,18 +35,18 @@ http_interactions:
|
|
35
35
|
message: OK
|
36
36
|
headers:
|
37
37
|
X-Amzn-Requestid:
|
38
|
-
-
|
38
|
+
- 1Q754MSUVVF6GECIADT5DRIPIVVV4KQNSO5AEMVJF66Q9ASUAAJG
|
39
39
|
X-Amz-Crc32:
|
40
|
-
- '
|
40
|
+
- '634016743'
|
41
41
|
Content-Type:
|
42
42
|
- application/x-amz-json-1.0
|
43
43
|
Content-Length:
|
44
|
-
- '
|
44
|
+
- '716'
|
45
45
|
Date:
|
46
|
-
-
|
46
|
+
- Thu, 01 Jan 2015 05:58:40 GMT
|
47
47
|
body:
|
48
48
|
encoding: UTF-8
|
49
|
-
string: '{"TableDescription":{"AttributeDefinitions":[{"AttributeName":"id","AttributeType":"S"},{"AttributeName":"name","AttributeType":"S"}],"CreationDateTime":1.
|
49
|
+
string: '{"TableDescription":{"AttributeDefinitions":[{"AttributeName":"id","AttributeType":"S"},{"AttributeName":"name","AttributeType":"S"}],"CreationDateTime":1.420091921193E9,"GlobalSecondaryIndexes":[{"IndexName":"name-index","IndexSizeBytes":0,"IndexStatus":"CREATING","ItemCount":0,"KeySchema":[{"AttributeName":"name","KeyType":"HASH"}],"Projection":{"ProjectionType":"ALL"},"ProvisionedThroughput":{"NumberOfDecreasesToday":0,"ReadCapacityUnits":20,"WriteCapacityUnits":20}}],"ItemCount":0,"KeySchema":[{"AttributeName":"id","KeyType":"HASH"}],"ProvisionedThroughput":{"NumberOfDecreasesToday":0,"ReadCapacityUnits":20,"WriteCapacityUnits":20},"TableName":"index_cities","TableSizeBytes":0,"TableStatus":"CREATING"}}'
|
50
50
|
http_version:
|
51
|
-
recorded_at:
|
51
|
+
recorded_at: Thu, 01 Jan 2015 05:58:41 GMT
|
52
52
|
recorded_with: VCR 2.9.3
|
@@ -5,7 +5,7 @@ http_interactions:
|
|
5
5
|
uri: https://dynamodb.us-east-1.amazonaws.com/
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"AttributeDefinitions":[{"AttributeName":"id","AttributeType":"S"}],"TableName":"
|
8
|
+
string: '{"AttributeDefinitions":[{"AttributeName":"id","AttributeType":"S"}],"TableName":"no_index_cities","KeySchema":[{"AttributeName":"id","KeyType":"HASH"}],"ProvisionedThroughput":{"ReadCapacityUnits":20,"WriteCapacityUnits":20}}'
|
9
9
|
headers:
|
10
10
|
Content-Type:
|
11
11
|
- application/x-amz-json-1.0
|
@@ -16,17 +16,17 @@ http_interactions:
|
|
16
16
|
X-Amz-Target:
|
17
17
|
- DynamoDB_20120810.CreateTable
|
18
18
|
X-Amz-Date:
|
19
|
-
-
|
19
|
+
- 20150101T060008Z
|
20
20
|
Host:
|
21
21
|
- dynamodb.us-east-1.amazonaws.com
|
22
22
|
X-Amz-Content-Sha256:
|
23
|
-
-
|
23
|
+
- 225d46451c9fb8f4aecddfa640ada2ca8495691e578a716b763de9eff1f40463
|
24
24
|
Authorization:
|
25
|
-
- AWS4-HMAC-SHA256 Credential=key/
|
25
|
+
- AWS4-HMAC-SHA256 Credential=key/20150101/us-east-1/dynamodb/aws4_request,
|
26
26
|
SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date;x-amz-target,
|
27
|
-
Signature=
|
27
|
+
Signature=c04fc9e73792f7f1f16eb7cee2256dfbd9960ec2657e24bd562309873684dec3
|
28
28
|
Content-Length:
|
29
|
-
- '
|
29
|
+
- '226'
|
30
30
|
Accept:
|
31
31
|
- "*/*"
|
32
32
|
response:
|
@@ -35,18 +35,18 @@ http_interactions:
|
|
35
35
|
message: OK
|
36
36
|
headers:
|
37
37
|
X-Amzn-Requestid:
|
38
|
-
-
|
38
|
+
- B1670HTESRN0V50E27FLRALVQJVV4KQNSO5AEMVJF66Q9ASUAAJG
|
39
39
|
X-Amz-Crc32:
|
40
|
-
- '
|
40
|
+
- '3984556825'
|
41
41
|
Content-Type:
|
42
42
|
- application/x-amz-json-1.0
|
43
43
|
Content-Length:
|
44
|
-
- '
|
44
|
+
- '368'
|
45
45
|
Date:
|
46
|
-
-
|
46
|
+
- Thu, 01 Jan 2015 06:00:09 GMT
|
47
47
|
body:
|
48
48
|
encoding: UTF-8
|
49
|
-
string: '{"TableDescription":{"AttributeDefinitions":[{"AttributeName":"id","AttributeType":"S"}],"CreationDateTime":1.
|
49
|
+
string: '{"TableDescription":{"AttributeDefinitions":[{"AttributeName":"id","AttributeType":"S"}],"CreationDateTime":1.420092009548E9,"ItemCount":0,"KeySchema":[{"AttributeName":"id","KeyType":"HASH"}],"ProvisionedThroughput":{"NumberOfDecreasesToday":0,"ReadCapacityUnits":20,"WriteCapacityUnits":20},"TableName":"no_index_cities","TableSizeBytes":0,"TableStatus":"CREATING"}}'
|
50
50
|
http_version:
|
51
|
-
recorded_at:
|
51
|
+
recorded_at: Thu, 01 Jan 2015 06:00:09 GMT
|
52
52
|
recorded_with: VCR 2.9.3
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamo_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nguyen Vu Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|