Sha256: b7d69757979abf412c01d2322d77b30e5574d2c46df68ee632eceabb2949c513

Contents?: true

Size: 818 Bytes

Versions: 3

Compression:

Stored size: 818 Bytes

Contents

$LAMBY_INSTALLER_NAME = 'http'
load 'lamby/templates/shared.rb'

say '==> Running Lamby API Gateway (HTTP API) installer...'

say 'Copying files...'
copy_file tpl_file('app.rb'), app_file('app.rb')
copy_file tpl_file('template.yaml'), app_file('template.yaml')
gsub_file app_file('template.yaml'), /APPNAMEHERE/, appname

say 'Adding to .gitignore...'
FileUtils.touch app_file('.gitignore')
append_to_file app_file('.gitignore'), <<~GITIGNORE
  # Lamby
  /.aws-sam
GITIGNORE

say 'Creating ./bin files for build and deploy...'
copy_file tpl_file('build'), app_file('bin/build')
chmod app_file('bin/build'), 0755
copy_file tpl_file('deploy'), app_file('bin/deploy')
chmod app_file('bin/deploy'), 0755
gsub_file app_file('bin/deploy'), /APPNAMEHERE/, appname.downcase

say 'Welcome to AWS Lambda and Rails 🎉', :green

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lamby-2.2.2 lib/lamby/templates/http.rb
lamby-2.2.1 lib/lamby/templates/http.rb
lamby-2.2.0 lib/lamby/templates/http.rb