lambda_wrap 0.23.0 → 0.24.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
2
  SHA1:
3
- metadata.gz: 3a8bc3f918af831b762a0eb780177d3f419e6218
4
- data.tar.gz: 59cabf712fa013776b637dbbf4c59935621b89a6
3
+ metadata.gz: 35a8f3c859f76d4cacc31890a758a635b668eaef
4
+ data.tar.gz: 3223b082bb696620d3298b0ef299ac19ae81cd03
5
5
  SHA512:
6
- metadata.gz: f58118a5613343b7861cd8d5bd33ec33384b912b2ec1f7df388c8c824c615d3807c2f572ce5651ea6fa5ce2a663482ef05735af6e2728353fa6d02711940f4a8
7
- data.tar.gz: 8447d46f20b890958baad4f132d016367cc7884a5ef5c7336e3f0a93f39b2790f1f713414e896c81d5a80c5cf30045bdbf4dde5ec2ae4fbfd4e674c902ca6b5f
6
+ metadata.gz: 334c47d3ef85bdd5afd52692ab0dd2069aaac91366ef6d901849800604b056e6e7fd2469d67f966d9a91cb03b7d7ba56d26dac64b92e1e5dd59025b467b8edce
7
+ data.tar.gz: ede201094616312d2ca93c86452548c9117d109960c17be5c05a8742f9606a42bd7a87595efdd98261109b4da3b290f4c46deaedb2fa7fda6f98514ef07723d3
@@ -121,7 +121,6 @@ module LambdaWrap
121
121
  raise 'API ID not provided' unless api_id
122
122
 
123
123
  cmd = "java -jar #{@jarpath} --update #{api_id} --region #{region} #{swagger_file}"
124
- puts 'Executing: ' + cmd
125
124
  raise 'API gateway not created' unless system(cmd)
126
125
  end
127
126
 
@@ -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
- def publish_database(table_name, attribute_definitions, key_schema, read_capacity, write_capacity)
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
- @client.create_table(table_name: table_name, key_schema: ks, attribute_definitions: ad,
69
- provisioned_throughput:
70
- { read_capacity_units: read_capacity, write_capacity_units: write_capacity })
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.23.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-11-04 00:00:00.000000000 Z
13
+ date: 2016-12-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: aws-sdk