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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95035851d92d8fcf3dde0d86b107498f9fdedd264e7e4a2f5a0c0dda39950886
4
- data.tar.gz: 139556f3126d5e2597595e99b44fdb1dabd6d9effc9c677d3bdafa8dfffbdb44
3
+ metadata.gz: e8e8316247f2be44ddfde98f0b9351e40f70f0de71c524dbb117ee9415f52ea1
4
+ data.tar.gz: 0ded6c180e4c9c4d2d0c13d0cd01a7846d9689d47475707cfcb25bc1e9e733ee
5
5
  SHA512:
6
- metadata.gz: abe71d4fff57e2741ef021260d77a6468c155084152ae9656196ec02808e4fb109cb0b8fa141b6c2e6df1f8903da80bea4ac32abb1d0b03cf4333cb182b3c37c
7
- data.tar.gz: 0aaf15811dc21e3799fd505b13c4aa6c47f99b0bdc29807c939317f9690402a28f66398537e7a8517239e9b34b18da4e9396308fbf139408c7f2594ff88a2f7c
6
+ metadata.gz: d4de59d1674875f67e77f8fc827c70e7d08d2716a2b279595184c65ce4b455a7b6b7412734b7d7dba1551f655c5985945948c83a6cec1756ea014684c8bdeb21
7
+ data.tar.gz: aae4733933c3f855a0dde064805bc17cd490406058b67f82a93d789bcc9178a594bc034dcfeae414e971e1098c1c53f57a4c383fcc23ed99cc5611fdd98607c6
@@ -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
- zip_options = ''
275
- full_path = "#{@component_dir}/lambdas/#{lambda_config['code']}"
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.1531716185
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-16 00:00:00.000000000 Z
12
+ date: 2018-07-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline