lambda_wrap 0.23.0 → 0.24.0
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 +4 -4
- data/lib/lambda_wrap/api_gateway_manager.rb +0 -1
- data/lib/lambda_wrap/dynamo_db_manager.rb +18 -4
- 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: 35a8f3c859f76d4cacc31890a758a635b668eaef
|
4
|
+
data.tar.gz: 3223b082bb696620d3298b0ef299ac19ae81cd03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 334c47d3ef85bdd5afd52692ab0dd2069aaac91366ef6d901849800604b056e6e7fd2469d67f966d9a91cb03b7d7ba56d26dac64b92e1e5dd59025b467b8edce
|
7
|
+
data.tar.gz: ede201094616312d2ca93c86452548c9117d109960c17be5c05a8742f9606a42bd7a87595efdd98261109b4da3b290f4c46deaedb2fa7fda6f98514ef07723d3
|
@@ -37,7 +37,12 @@ module LambdaWrap
|
|
37
37
|
# [key_schema] The dynamoDB key definitions to be used when the table is created.
|
38
38
|
# [read_capacity] The read capacity to configure for the dynamoDB table.
|
39
39
|
# [write_capacity] The write capacity to configure for the dynamoDB table.
|
40
|
-
|
40
|
+
# [local_secondary_indexes] The local secondary indexes to be created.
|
41
|
+
# [global_secondary_indexes] The global secondary indexes to be created.
|
42
|
+
def publish_database(
|
43
|
+
table_name, attribute_definitions, key_schema, read_capacity, write_capacity, local_secondary_indexes = nil,
|
44
|
+
global_secondary_indexes = nil
|
45
|
+
)
|
41
46
|
has_updates = false
|
42
47
|
|
43
48
|
# figure out whether the table exists
|
@@ -65,9 +70,18 @@ module LambdaWrap
|
|
65
70
|
puts "Creating table #{table_name}."
|
66
71
|
ad = attribute_definitions || [{ attribute_name: 'Id', attribute_type: 'S' }]
|
67
72
|
ks = key_schema || [{ attribute_name: 'Id', key_type: 'HASH' }]
|
68
|
-
|
69
|
-
|
70
|
-
|
73
|
+
|
74
|
+
params = {
|
75
|
+
table_name: table_name, key_schema: ks, attribute_definitions: ad,
|
76
|
+
provisioned_throughput: {
|
77
|
+
read_capacity_units: read_capacity, write_capacity_units: write_capacity
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
params[:local_secondary_indexes] = local_secondary_indexes if local_secondary_indexes != nil
|
82
|
+
params[:global_secondary_indexes] = global_secondary_indexes if global_secondary_indexes != nil
|
83
|
+
|
84
|
+
@client.create_table(params)
|
71
85
|
has_updates = true
|
72
86
|
end
|
73
87
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lambda_wrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Thurner
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-12-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: aws-sdk
|