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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c42a04f7ee938c30519383db4bdfc01de103034
4
- data.tar.gz: 66c664a51bb28725f882ad2b9619cce9b4b5822b
3
+ metadata.gz: 5fb5b16d2b039d568861f082c5f3cccad211ba3e
4
+ data.tar.gz: 9498f8271f0c554917aa5bdb60077fc32e892d25
5
5
  SHA512:
6
- metadata.gz: b954a9aef9785857b7a977916fb9f5fb3a50cdbf6172f7876fc091a323717d0b3a6e2c18bf16cbd9c822e4464d6434dcf84c19e2ca951f015b30a53cbdeef853
7
- data.tar.gz: e5c88e4aa692ca48071b7c70df0fb00e6edd20bc6cef45d94b31bf6140e9216afb4c3027fef08c5257019eabbedda447d2e654526f808bc00e26f546c49dd8c6
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
- @table_name ||= DynamoRecord::Config.namespace ? "#{DynamoRecord::Config.namespace}_#{base_class.name.downcase.pluralize}" : base_class.name.downcase.pluralize
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
@@ -1,3 +1,3 @@
1
1
  module DynamoRecord
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/dynamo_record.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'securerandom'
2
2
  require 'active_support'
3
+ require 'active_support/inflector'
3
4
  require 'active_support/concern'
4
5
  require 'active_support/core_ext'
5
6
 
@@ -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":"indexcities","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}}]}'
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
- - 20141231T083113Z
19
+ - 20150101T055839Z
20
20
  Host:
21
21
  - dynamodb.us-east-1.amazonaws.com
22
22
  X-Amz-Content-Sha256:
23
- - c5ded24b57df8f29482ee7457c489a5a5baeca7f0a6560930cf8578822323162
23
+ - f367f93ea8d0dac13defca67311f4b956a18992bd453cadbd9718bb27e92a2f5
24
24
  Authorization:
25
- - AWS4-HMAC-SHA256 Credential=key/20141231/us-east-1/dynamodb/aws4_request,
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=51d5a106760691469c0e2a78a36d27baf4335bf57924c4c06fc4c1ac34400593
27
+ Signature=7a357b3cb933ddd629ea46417ee9467ff7148fcddd0531e29da515129d7093f8
28
28
  Content-Length:
29
- - '488'
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
- - GSSH5TN95AUJK6QF3FPVHQEUG7VV4KQNSO5AEMVJF66Q9ASUAAJG
38
+ - 1Q754MSUVVF6GECIADT5DRIPIVVV4KQNSO5AEMVJF66Q9ASUAAJG
39
39
  X-Amz-Crc32:
40
- - '2558175273'
40
+ - '634016743'
41
41
  Content-Type:
42
42
  - application/x-amz-json-1.0
43
43
  Content-Length:
44
- - '715'
44
+ - '716'
45
45
  Date:
46
- - Wed, 31 Dec 2014 08:31:14 GMT
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.420014674274E9,"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":"indexcities","TableSizeBytes":0,"TableStatus":"CREATING"}}'
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: Wed, 31 Dec 2014 08:31:14 GMT
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":"noindexcities","KeySchema":[{"AttributeName":"id","KeyType":"HASH"}],"ProvisionedThroughput":{"ReadCapacityUnits":20,"WriteCapacityUnits":20}}'
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
- - 20141231T083114Z
19
+ - 20150101T060008Z
20
20
  Host:
21
21
  - dynamodb.us-east-1.amazonaws.com
22
22
  X-Amz-Content-Sha256:
23
- - 84495bafc50679465f581061021cb3866c6769a31efeecd7654dc3d59c33200e
23
+ - 225d46451c9fb8f4aecddfa640ada2ca8495691e578a716b763de9eff1f40463
24
24
  Authorization:
25
- - AWS4-HMAC-SHA256 Credential=key/20141231/us-east-1/dynamodb/aws4_request,
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=04e1bd2d7bc7eae702847b952573d931f52210c30731d8263692bc22e7a3d892
27
+ Signature=c04fc9e73792f7f1f16eb7cee2256dfbd9960ec2657e24bd562309873684dec3
28
28
  Content-Length:
29
- - '224'
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
- - JIEG7NGOH2VFG0SPHNI6V79IA3VV4KQNSO5AEMVJF66Q9ASUAAJG
38
+ - B1670HTESRN0V50E27FLRALVQJVV4KQNSO5AEMVJF66Q9ASUAAJG
39
39
  X-Amz-Crc32:
40
- - '790699342'
40
+ - '3984556825'
41
41
  Content-Type:
42
42
  - application/x-amz-json-1.0
43
43
  Content-Length:
44
- - '366'
44
+ - '368'
45
45
  Date:
46
- - Wed, 31 Dec 2014 08:31:15 GMT
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.420014676573E9,"ItemCount":0,"KeySchema":[{"AttributeName":"id","KeyType":"HASH"}],"ProvisionedThroughput":{"NumberOfDecreasesToday":0,"ReadCapacityUnits":20,"WriteCapacityUnits":20},"TableName":"noindexcities","TableSizeBytes":0,"TableStatus":"CREATING"}}'
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: Wed, 31 Dec 2014 08:31:16 GMT
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
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: 2014-12-31 00:00:00.000000000 Z
11
+ date: 2015-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport