Sha256: 7f3f0846038f10c51d0b03535525c13a9e48f9ecfe1ab4732bc23d023a738c3a

Contents?: true

Size: 1.22 KB

Versions: 11

Compression:

Stored size: 1.22 KB

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
copy_file tpl_file('Dockerfile'), app_file('Dockerfile')
copy_file tpl_file('Dockerfile-build'), app_file('Dockerfile-build')
copy_file tpl_file('docker-compose.yml'), app_file('docker-compose.yml')

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

say 'Creating ./bin files for build and deploy...'
copy_file tpl_file('_build'), app_file('bin/_build')
gsub_file app_file('bin/_build'), /APPNAMEHERE/, appname.downcase
chmod app_file('bin/_build'), 0755
copy_file tpl_file('deploy'), app_file('bin/deploy')
chmod app_file('bin/deploy'), 0755
copy_file tpl_file('_deploy'), app_file('bin/_deploy')
gsub_file app_file('bin/_deploy'), /APPNAMEHERE/, appname.downcase
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

11 entries across 11 versions & 1 rubygems

Version Path
lamby-2.8.0 lib/lamby/templates/http.rb
lamby-2.7.1 lib/lamby/templates/http.rb
lamby-2.7.0 lib/lamby/templates/http.rb
lamby-2.6.3 lib/lamby/templates/http.rb
lamby-2.6.2 lib/lamby/templates/http.rb
lamby-2.6.1 lib/lamby/templates/http.rb
lamby-2.6.0 lib/lamby/templates/http.rb
lamby-2.5.3 lib/lamby/templates/http.rb
lamby-2.5.2 lib/lamby/templates/http.rb
lamby-2.5.1 lib/lamby/templates/http.rb
lamby-2.5.0 lib/lamby/templates/http.rb