Method: Jets::Builders::HandlerGenerator#copy_source_as_handler
- Defined in:
- lib/jets/builders/handler_generator.rb
#copy_source_as_handler(fun) ⇒ Object
app/shared/functions/kevin.py => /tmp/jets/demo/app_root/handlers/shared/functions/kevin.py
112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/jets/builders/handler_generator.rb', line 112 def copy_source_as_handler(fun) source_path = fun.source_file unless source_path attributes = fun.template.values.first function_name = attributes['Properties']['FunctionName'] puts "WARN: missing source file for: '#{function_name}' function".colorize(:yellow) return end dest_path = "#{tmp_code}/#{fun.handler_dest}" FileUtils.mkdir_p(File.dirname(dest_path)) FileUtils.cp(source_path, dest_path) end |