Skip to content

Commit

Permalink
Commit dynamoid code
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyshields committed May 17, 2024
1 parent 7b3ad3f commit 6ce91d0
Show file tree
Hide file tree
Showing 187 changed files with 30,921 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dynamoid/.dev/vagrant/minion
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Masterless Minion Configuration File
master: localhost
id: development
file_client: local

# Where your salt state exists
file_roots:
base:
- /vagrant/.dev/vagrant/salt
13 changes: 13 additions & 0 deletions dynamoid/.dev/vagrant/salt/apt/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apt-pkgs:
pkg.latest:
- pkgs:
- daemontools
- git
- openjdk-11-jre-headless
- tmux
- vim

# JAVA_HOME
/home/vagrant/.bashrc:
file.append:
- text: export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
17 changes: 17 additions & 0 deletions dynamoid/.dev/vagrant/salt/dynamodb/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/opt/install/aws/dynamodb.tar.gz:
file.managed:
- source: https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_2019-02-07.tar.gz
- source_hash: sha256=3281b5403d0d397959ce444b86a83b44bc521e8b40077a3c2094fa17c9eb3c43
- makedirs: True

/vagrant/spec/DynamoDBLocal-latest:
file.directory:
- name: /vagrant/spec/DynamoDBLocal-latest
- user: vagrant
- group: vagrant

dynamodb.install:
cmd.wait:
- name: cd /vagrant/spec/DynamoDBLocal-latest && tar xfz /opt/install/aws/dynamodb.tar.gz
- watch:
- file: /opt/install/aws/dynamodb.tar.gz
1 change: 1 addition & 0 deletions dynamoid/.dev/vagrant/salt/rvm/.gemrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gem: --no-ri --no-rdoc
79 changes: 79 additions & 0 deletions dynamoid/.dev/vagrant/salt/rvm/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# https://docs.saltstack.com/en/latest/ref/states/all/salt.states.rvm.html
rvm-deps:
pkg.installed:
- pkgs:
- bash
- coreutils
- gzip
- bzip2
- gawk
- sed
- curl
- git
- subversion
- gnupg2

mri-deps:
pkg.installed:
- pkgs:
- build-essential
- openssl
- libreadline-dev
- curl
- git
- zlib1g
- zlib1g-dev
- libssl-dev
- libyaml-dev
- libsqlite3-0
- libsqlite3-dev
- sqlite3
- libxml2-dev
- libxslt1-dev
- autoconf
- libc6-dev
- libncurses5-dev
- automake
- libtool
- bison
- subversion
- ruby

gpg-trust:
cmd.run:
- cwd: /home/vagrant
- name: gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
- runas: vagrant

ruby-{{ pillar['ruby']['version'] }}:
rvm.installed:
- name: {{ pillar['ruby']['version'] }}
- default: True
- user: vagrant
- require:
- pkg: rvm-deps
- pkg: mri-deps

# Disable Documentation Installation
/home/vagrant/.gemrc:
file.managed:
- user: vagrant
- group: vagrant
- name: /home/vagrant/.gemrc
- source: salt://rvm/.gemrc
- makedirs: True

# Bundler
bundler.install:
gem.installed:
- user: vagrant
- name: bundler
- ruby: ruby-{{ pillar['ruby']['version'] }}
- rdoc: false
- ri: false

bundle:
cmd.run:
- cwd: /vagrant
- name: bundle install
- runas: vagrant
5 changes: 5 additions & 0 deletions dynamoid/.dev/vagrant/salt/top.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
base:
'development':
- apt
- dynamodb
- rvm
13 changes: 13 additions & 0 deletions dynamoid/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

github: [Dynamoid, pboling] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: dynamoid # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: rubygems/dynamoid # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
8 changes: 8 additions & 0 deletions dynamoid/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
time: "04:31"
open-pull-requests-limit: 10
167 changes: 167 additions & 0 deletions dynamoid/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master
# Allow manually triggering the workflow.
workflow_dispatch:

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
runs-on: ubuntu-latest

env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile

# Do not bother building commits with [ci skip] or [skip ci] in the commit message
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"

strategy:
fail-fast: false

matrix:
gemfile:
- rails_4_2
- rails_5_0
- rails_5_1
- rails_5_2
- rails_6_0
- rails_6_1
- rails_7_0
- rails_7_1
rubygems:
- default
bundler:
- default
ruby:
- "2.3"
- "2.4"
- "2.5"
- "2.6"
- jruby
- "2.7"
- "3.0"
- "3.1"
- "3.2"
- "3.3"
exclude:

# Rails 7.1 requires Ruby 2.7 and above
- gemfile: rails_7_1
ruby: "2.3"
- gemfile: rails_7_1
ruby: "2.4"
- gemfile: rails_7_1
ruby: "2.5"
- gemfile: rails_7_1
ruby: "2.6"

# Rails 7.0 requires Ruby 2.7 and above
- gemfile: rails_7_0
ruby: "2.3"
- gemfile: rails_7_0
ruby: "2.4"
- gemfile: rails_7_0
ruby: "2.5"
- gemfile: rails_7_0
ruby: "2.6"

# Rails 6.1 requires Ruby 2.5 and above.
- gemfile: rails_6_1
ruby: "2.3"
- gemfile: rails_6_1
ruby: "2.4"

# Rails 6.0 requires Ruby 2.5 and above.
- gemfile: rails_6_0
ruby: "2.3"
- gemfile: rails_6_0
ruby: "2.4"

# Rails supports Ruby 3.0 since 6.0 only. So skip all the other Rails versions.
- ruby: "3.0"
gemfile: rails_4_2
- ruby: "3.0"
gemfile: rails_5_0
- ruby: "3.0"
gemfile: rails_5_1
- ruby: "3.0"
gemfile: rails_5_2
- ruby: "3.1"
gemfile: rails_4_2
- ruby: "3.1"
gemfile: rails_5_0
- ruby: "3.1"
gemfile: rails_5_1
- ruby: "3.1"
gemfile: rails_5_2
- ruby: "3.2"
gemfile: rails_4_2
- ruby: "3.2"
gemfile: rails_5_0
- ruby: "3.2"
gemfile: rails_5_1
- ruby: "3.2"
gemfile: rails_5_2
- ruby: "3.3"
gemfile: rails_4_2
- ruby: "3.3"
gemfile: rails_5_0
- ruby: "3.3"
gemfile: rails_5_1
- ruby: "3.3"
gemfile: rails_5_2

- ruby: "jruby"
gemfile: rails_4_2
- ruby: "jruby"
gemfile: rails_5_0
- ruby: "jruby"
gemfile: rails_5_1
- ruby: "jruby"
gemfile: rails_5_2

include:
- ruby: "jruby-9.3.9.0"
gemfile: rails_4_2
- ruby: "jruby-9.3.9.0"
gemfile: rails_5_0
- ruby: "jruby-9.3.9.0"
gemfile: rails_5_1
- ruby: "jruby-9.3.9.0"
gemfile: rails_5_2

name: ${{ matrix.gemfile }}, Ruby ${{ matrix.ruby }}

steps:
- uses: actions/checkout@v3

- name: Setup Ruby & Bundle
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: ${{ matrix.rubygems }}
bundler: ${{ matrix.bundler }}
bundler-cache: true

- name: Start dynamodb-local
run: |
docker-compose up -d
- name: Run RSpec tests
run: |
bundle exec rspec
- name: Stop dynamodb-local
run: |
docker-compose down
76 changes: 76 additions & 0 deletions dynamoid/.github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '29 13 * * 1'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'ruby' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
Loading

0 comments on commit 6ce91d0

Please sign in to comment.