sumomo 0.8.1 → 0.8.2

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: b697bb92beda3ff58f8c91b086b5ee111e5a8e3d
4
- data.tar.gz: 7dc99637fb60756dbe02b06bcbcd1784ca75eefb
3
+ metadata.gz: bf070c5bc35c015e9261e284545ff96808650232
4
+ data.tar.gz: 35f26a5e4ccda0698320ce9e3b711ea81f8eadc0
5
5
  SHA512:
6
- metadata.gz: 8b219359222421263e7d239005cf296cfc2843542868efd108678023e36ae4a07b47f45ca1e5f27a2293333c6f3bbefd71ab13d0aea1299c63be3378e4ce5f23
7
- data.tar.gz: 3ed862487717d29ae36e7465ff58698388cf2111dfe52cd6aa27ce679d2a0fed4d6b2765bd32e4d199235e2a901e5763005d84ae003dc7e7950dcdc15872a398
6
+ metadata.gz: 897ca7e5600dbaaafd5036756d39c27c877c1350bb8d252efc7a1b85506f18a0599c0e14591609d5a990f9e1a3bd0e33fdc7a415e79863a6d49ac1fd01d4caad
7
+ data.tar.gz: c57c879584690161552ac1d408929e920aa66ab8a355d8846765e845bd2f1698a30ba1a5117bceece388a10057ce46ae6e68a94fb0ed6843a19dac6b98410b05
@@ -1,7 +1,7 @@
1
1
 
2
2
  module Sumomo
3
3
  module Stack
4
- def make_cdn_from_dir(domain:, cert:nil, dns:nil, name:nil, dir:, low_ttl: [])
4
+ def make_cdn_from_dir(domain:, cert:nil, dns:nil, name:nil, dir:, low_ttl: [], lambda_assocs:{})
5
5
 
6
6
  bucket_name = @bucket_name
7
7
 
@@ -84,6 +84,12 @@ module Sumomo
84
84
  QueryString "false"
85
85
  Cookies { Forward "none" }
86
86
  }
87
+
88
+ LambdaFunctionAssociations (lambda_assocs.map do |event_type,arns|
89
+ arns.map do |arn|
90
+ {EventType: event_type, LambdaFunctionARN: arn}
91
+ end.to_a
92
+ end.flatten)
87
93
  end
88
94
 
89
95
  Logging do
@@ -25,7 +25,7 @@ module Sumomo
25
25
  description: "Lambda Function in #{@bucket_name}",
26
26
  function_key: "cloudformation/lambda/function_#{name}",
27
27
  handler: "index.handler",
28
- runtime: "nodejs4.3",
28
+ runtime: "nodejs8.10",
29
29
  memory_size: 128,
30
30
  timeout: 30,
31
31
  with_statements: [])
@@ -131,7 +131,7 @@ module Sumomo
131
131
  "Version" => "2012-10-17",
132
132
  "Statement" => [{
133
133
  "Effect" => "Allow",
134
- "Principal" => {"Service" => ["lambda.amazonaws.com"]},
134
+ "Principal" => {"Service" => ["edgelambda.amazonaws.com", "lambda.amazonaws.com"]},
135
135
  "Action" => ["sts:AssumeRole"]
136
136
  }]
137
137
  }
@@ -1,3 +1,3 @@
1
1
  module Sumomo
2
- VERSION = "0.8.1"
2
+ VERSION = "0.8.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sumomo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Siaw
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-12 00:00:00.000000000 Z
11
+ date: 2018-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler