lib/modulator/stack/uploader.rb
def upload_lambda_files
    puts '- bundling dependencies'
    Bundler.with_clean_env do
      Dir.chdir(app_path) do
        `bundle install`
        `bundle install --deployment --without development`
      end
    end
    FileUtils.remove_dir(app_path.join("vendor/bundle/ruby/#{GEM_PATH_RUBY_VERSION}/cache")) # remove cache dir
    upload_app_layer(sub_dirs: '', add_layer_to_stack: false) # reuse layer upload
    FileUtils.remove_dir(app_path.join('.bundle'))
    FileUtils.remove_dir(app_path.join('vendor'))
  end
# bundle gems and upload all for simple lambda apps
bundle gems and upload all for simple lambda apps
bundle gems and upload all for simple lambda apps
def upload_lambda_files
    puts '- bundling dependencies'
    Bundler.with_clean_env do
      Dir.chdir(app_path) do
        `bundle install`
        `bundle install --deployment --without development`
      end
    end
    FileUtils.remove_dir(app_path.join("vendor/bundle/ruby/#{GEM_PATH_RUBY_VERSION}/cache")) 
    upload_app_layer(sub_dirs: '', add_layer_to_stack: false) 
    FileUtils.remove_dir(app_path.join('.bundle'))
    FileUtils.remove_dir(app_path.join('vendor'))
  end
def upload_lambda_files puts '- bundling dependencies' Bundler . with_clean_env do Dir . chdir ( app_path ) do ` bundle install ` ` bundle install --deployment --without development ` end end FileUtils . remove_dir ( app_path . join ( "vendor/bundle/ruby/#{GEM_PATH_RUBY_VERSION}/cache" ) ) upload_app_layer ( sub_dirs : '' , add_layer_to_stack : false ) FileUtils . remove_dir ( app_path . join ( '.bundle' ) ) FileUtils . remove_dir ( app_path . join ( 'vendor' ) ) end
bundle gems and upload all for simple lambda apps
bundle gems and upload all for simple lambda apps
# remove cache dir # reuse layer upload