Project

shawarma

0.0
No commit activity in last 3 years
No release in over 3 years
A convenience gem for building and deploying Ruby to AWS Lambda
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.8
~> 10.0

Runtime

~> 2.2.30
 Project Readme

Shawarma

Gem Version Build Status

Shawarma is a convenience gem for producing Ruby applications that can run on the Amazon Web Services (AWS) Lambda platform. It relies on AWS Lambda's native support for Java and the availability of JRuby. The AWS Lambda environment is a fairly restrictive one, so this is not meant to be a general purpose way to get existing code onto the platform. Instead, this gem embraces a specific pattern for developing and deploying Ruby code to AWS Lambda.

Installation

Add this line to your application's Gemfile:

gem 'shawarma'

And then execute:

$ bundle

Or install it yourself as:

$ gem install shawarma

Usage

The key to what Shawarma provides is a pattern of how to right Ruby classes that can be easily adapted to run on AWS Lambda. The key is that Shawarma is intended to provide the development framework/pattern and a deployment mechanism that can be used either as an end-to-end solution, or as a packager that is integrated into your own deployment toolchain.

The goal is that if you write a class like the one below, Shawarma will be able to package and deploy that class for execution on AWS Lambda:

class HelloLambda
  include Shawarma::Function

  def perform
    logger.log "received : #{request.name}"
    "Hello, #{request.name}"
  end
end

TODO: Explain how this works, restrictions, etc.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bin/console for an interactive prompt that will allow you to experiment. Run bundle exec shawarma to use the code located in this directory, ignoring other installed copies of this gem.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release to create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/shawarma/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request