cfhighlander 0.4.0.alpha.1531716185 → 0.4.0.alpha.1531788388
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cfndsl_ext/lambda_helper.rb +3 -0
- data/lib/cfhighlander.compiler.rb +15 -4
- data/lib/cfhighlander.model.component.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8e8316247f2be44ddfde98f0b9351e40f70f0de71c524dbb117ee9415f52ea1
|
4
|
+
data.tar.gz: 0ded6c180e4c9c4d2d0c13d0cd01a7846d9689d47475707cfcb25bc1e9e733ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4de59d1674875f67e77f8fc827c70e7d08d2716a2b279595184c65ce4b455a7b6b7412734b7d7dba1551f655c5985945948c83a6cec1756ea014684c8bdeb21
|
7
|
+
data.tar.gz: aae4733933c3f855a0dde064805bc17cd490406058b67f82a93d789bcc9178a594bc034dcfeae414e971e1098c1c53f57a4c383fcc23ed99cc5611fdd98607c6
|
data/cfndsl_ext/lambda_helper.rb
CHANGED
@@ -61,6 +61,9 @@ def render_lambda_functions(cfndsl, lambdas, lambda_metadata, distribution)
|
|
61
61
|
FunctionName(Ref(name))
|
62
62
|
Action('lambda:InvokeFunction')
|
63
63
|
Principal(source['principal'])
|
64
|
+
if source.key? 'source_arn'
|
65
|
+
SourceArn source['source_arn']
|
66
|
+
end
|
64
67
|
end
|
65
68
|
i += 1
|
66
69
|
end
|
@@ -271,14 +271,25 @@ module Cfhighlander
|
|
271
271
|
end
|
272
272
|
else
|
273
273
|
# zip local code
|
274
|
-
|
275
|
-
|
274
|
+
component = @component
|
275
|
+
component_dir = component.template.template_location
|
276
|
+
full_path = "#{component_dir}/lambdas/#{lambda_config['code']}"
|
277
|
+
|
278
|
+
until (File.exist? full_path or component_dir.nil?)
|
279
|
+
parent_exists = (not component.extended_component.nil?)
|
280
|
+
component = component.extended_component if parent_exists
|
281
|
+
component_dir = component.template.template_location if parent_exists
|
282
|
+
full_path = "#{component_dir}/lambdas/#{lambda_config['code']}" if parent_exists
|
283
|
+
component_dir = nil unless parent_exists
|
284
|
+
end
|
285
|
+
if component_dir.nil?
|
286
|
+
STDERR.puts "ERROR: Could not find source code directory for lambda function #{name} in component #{@component.name}"
|
287
|
+
exit -9
|
288
|
+
end
|
276
289
|
|
277
290
|
# lambda source can be either path to file or directory within that file
|
278
291
|
# optionally, lambda source code
|
279
292
|
lambda_source_dir = File.dirname(full_path)
|
280
|
-
lambda_source_file = File.basename(full_path)
|
281
|
-
lambda_source_file = '.' if Pathname.new(full_path).directory?
|
282
293
|
lambda_source_dir = full_path if Pathname.new(full_path).directory?
|
283
294
|
|
284
295
|
# executing package command can generate files. We DO NOT want this file in source directory,
|
@@ -174,7 +174,7 @@ module Cfhighlander
|
|
174
174
|
if not @parent_template.nil?
|
175
175
|
extended_component = @factory.loadComponentFromTemplate(@parent_template)
|
176
176
|
extended_component.is_parent_component = true
|
177
|
-
extended_component.load()
|
177
|
+
extended_component.load(@config)
|
178
178
|
|
179
179
|
@config = extended_component.config.extend(@config)
|
180
180
|
@mappings = extended_component.mappings.extend(@mappings)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfhighlander
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.0.alpha.
|
4
|
+
version: 0.4.0.alpha.1531788388
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikola Tosic
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-07-
|
12
|
+
date: 2018-07-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: highline
|