Sha256: b0d218a904ed1be39d305ba5f4cb7e6ed1af3a03f622ebe2bfc9dbf0f0f0f5bb

Contents?: true

Size: 818 Bytes

Versions: 3

Compression:

Stored size: 818 Bytes

Contents

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

say '==> Running Lamby API Gateway (REST 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/rest.rb
lamby-2.2.1 lib/lamby/templates/rest.rb
lamby-2.2.0 lib/lamby/templates/rest.rb