Skip to content

Commit

Permalink
add step functions template
Browse files Browse the repository at this point in the history
  • Loading branch information
mndeveci committed Nov 7, 2023
1 parent f71a091 commit ee416e3
Show file tree
Hide file tree
Showing 23 changed files with 1,074 additions and 6 deletions.
4 changes: 2 additions & 2 deletions manifest-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@
"useCaseName": "Hello World Example"
},
{
"directory": "ruby2.7/step-func",
"directory": "ruby/step-func",
"displayName": "Step Functions Sample App (Stock Trader)",
"dependencyManager": "bundler",
"appTemplate": "step-functions-sample-app",
Expand All @@ -1202,7 +1202,7 @@
"useCaseName": "Hello World Example"
},
{
"directory": "ruby3.2/step-func",
"directory": "ruby/step-func",
"displayName": "Step Functions Sample App (Stock Trader)",
"dependencyManager": "bundler",
"appTemplate": "step-functions-sample-app",
Expand Down
229 changes: 229 additions & 0 deletions ruby/step-func/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@

# Created by https://www.toptal.com/developers/gitignore/api/osx,linux,python,windows,sam
# Edit at https://www.toptal.com/developers/gitignore?templates=osx,linux,python,windows,sam

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### OSX ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
pytestdebug.log

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
doc/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
#poetry.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
# .env
.env/
.venv/
env/
venv/
ENV/
env.bak/
venv.bak/
pythonenv*

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# operating system-related files
# file properties cache/storage on macOS
*.DS_Store
# thumbnail cache on Windows
Thumbs.db

# profiling data
.prof


### SAM ###
# Ignore build directories for the AWS Serverless Application Model (SAM)
# Info: https://aws.amazon.com/serverless/sam/
# Docs: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-reference.html

**/.aws-sam

### Windows ###
# Windows thumbnail cache files
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/osx,linux,python,windows,sam
Expand Down
22 changes: 22 additions & 0 deletions ruby/step-func/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Cookiecutter Ruby Step Functions Sample App (Stock Trader) for SAM based Serverless App

A cookiecutter template to create a Ruby Step Functions Sample App (Stock Trader) boilerplate using [Serverless Application Model (SAM)](https://github.com/awslabs/serverless-application-model).

This application creates a mock stock trading workflow which runs on a pre-defined schedule. It demonstrates the power of Step Functions to orchestrate Lambda functions and other AWS resources to form complex and robust workflows, coupled with event-driven development using Amazon EventBridge.

## Requirements

* [AWS SAM CLI](https://github.com/awslabs/aws-sam-cli)

## Usage

Generate a boilerplate template in your current project directory using the following syntax:

* **Ruby {{ cookiecutter.options[cookiecutter.runtime].version }}**: `sam init --runtime {{ cookiecutter.runtime }}`

> **NOTE**: ``--name`` allows you to specify a different project folder name (`sam-app` is the default)

# Credits

* This project has been generated with [Cookiecutter](https://github.com/audreyr/cookiecutter)
20 changes: 20 additions & 0 deletions ruby/step-func/cookiecutter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"project_name": "Name of the project",
"runtime": ["ruby2.7", "ruby3.2"],
"architectures": {
"value": [
"x86_64", "arm64"
]
},
"options": {
"ruby2.7": {
"version": "2.7"
},
"ruby3.2": {
"version": "3.2"
}
},
"_copy_without_render": [
".gitignore"
]
}
Loading

0 comments on commit ee416e3

Please sign in to comment.