Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .devcontainer/apt-install/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "Apt Install Packages",
"id": "apt-install",
"version": "1.0.0",
"description": "More packages are needed",
"install": {
"script": "install.sh"
}
}
5 changes: 5 additions & 0 deletions .devcontainer/apt-install/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
apt-get update -y
apt-get install -y direnv default-jdk postgresql libpq-dev git zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev
# Adds the direnv setup script to ~/.bashrc file (at the end)
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
28 changes: 28 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ruby
{
"name": "Ruby",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/ruby:1-3-bookworm",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"./apt-install": {}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bundle update --bundler",

// Configure tool-specific properties.
"customizations" : {
"jetbrains" : {
"backend" : "RubyMine"
}
},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
37 changes: 37 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Run any command in this library's bin/ without the bin/ prefix!
PATH_add bin

# Only add things to this file that should be shared with the team.

# **dotenv** (See end of file for .env.local integration)
# .env would override anything in this file, if enabled.
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments.
# Override and customize anything below in your own .env.local
# If you are using dotenv and not direnv,
# copy the following `export` statements to your own .env file.

### General Ruby ###
# Turn off Ruby Warnings about deprecated code
# export RUBYOPT="-W0"

### External Testing Controls
export K_SOUP_COV_DO=true # Means you want code coverage
# Available formats are html, xml, rcov, lcov, json, tty
export K_SOUP_COV_COMMAND_NAME="RSpec Coverage"
export K_SOUP_COV_FORMATTERS="html,tty"
export K_SOUP_COV_MIN_BRANCH=11 # Means you want to enforce X% branch coverage
export K_SOUP_COV_MIN_LINE=61 # Means you want to enforce X% line coverage
export K_SOUP_COV_MIN_HARD=true # Means you want the build to fail if the coverage thresholds are not met
export K_SOUP_COV_MULTI_FORMATTERS=true
export MAX_ROWS=1 # Setting for simplecov-console gem for tty output, limits to the worst N rows of bad coverage

# Internal Debugging Controls
export DEBUG=false # do not allow byebug statements (override in .env.local)

# .env would override anything in this file, if `dotenv` is uncommented below.
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments,
# and that is why we generally want to leave it commented out.
# dotenv

# .env.local will override anything in this file.
dotenv_if_exists .env.local
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 10
ignore:
- dependency-name: "rubocop-lts"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
144 changes: 144 additions & 0 deletions .github/workflows/ancient.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: MRI 2.4, 2.5 (Ancient)

permissions:
contents: read

env:
K_SOUP_COV_DO: false

on:
push:
branches:
- 'main'
tags:
- '!*' # Do not execute on tags
pull_request:
branches:
- '*'
# 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:
test:
name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal_name }}${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
runs-on: ubuntu-22.04
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
strategy:
fail-fast: false
matrix:
include:
# Ruby 2.4
- ruby: "2.4"
appraisal_name: "omniauth-v1.1-r2.4"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"

# Ruby 2.5
- ruby: "2.5"
appraisal_name: "omniauth-v1.2-r2"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"
- ruby: "2.5"
appraisal_name: "omniauth-v1.3-r2"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"
- ruby: "2.5"
appraisal_name: "omniauth-v1.4-r2"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"
- ruby: "2.5"
appraisal_name: "omniauth-v1.5-r2"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"
- ruby: "2.5"
appraisal_name: "omniauth-v1.6-r2"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"
- ruby: "2.5"
appraisal_name: "omniauth-v1.7-r2"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"
- ruby: "2.5"
appraisal_name: "omniauth-v1.8-r2"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"
- ruby: "2.5"
appraisal_name: "omniauth-v1.9-r2"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"
- ruby: "2.5"
appraisal_name: "omniauth-v2.0-r2"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"

steps:
### COUCHDB
- name: Start CouchDB
uses: iamssen/couchdb-github-action@master
if: "endsWith(matrix.exec_cmd, 'couch_potato')"
with:
couchdb-version: "3.4.1"

### MONGODB
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.12.0
if: "endsWith(matrix.exec_cmd, 'mongoid')"
with:
mongodb-version: "8.0"

### SMOKE-TEST
- name: Smoke CouchDB
if: "endsWith(matrix.exec_cmd, 'couch_potato')"
run: |
curl -f http://127.0.0.1:5984/
curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session

- name: Checkout
uses: actions/checkout@v4

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

# Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
# We need to do this first to get appraisal installed.
# NOTE: This does not use the main Gemfile at all.
- name: Install Root Appraisal
run: bundle
- name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal_name }}
run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle
- name: Run ${{ matrix.exec_cmd }} on ${{ matrix.ruby }}@${{ matrix.appraisal_name }}
run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle exec ${{ matrix.exec_cmd }}
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 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: [ main, "*-stable" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main, "*-stable" ]
schedule:
- cron: '35 1 * * 5'

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' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
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.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, 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@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Loading
Loading