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
13 changes: 9 additions & 4 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Run any command in this library's bin/ without the bin/ prefix!
# Prefer exe version over binstub
PATH_add exe
PATH_add bin

# Only add things to this file that should be shared with the team.
Expand All @@ -16,18 +18,21 @@ PATH_add bin

### External Testing Controls
export K_SOUP_COV_DO=true # Means you want code coverage
export K_SOUP_COV_COMMAND_NAME="Test 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=100 # Means you want to enforce X% branch coverage
export K_SOUP_COV_MIN_LINE=100 # Means you want to enforce X% line coverage
export K_SOUP_COV_FORMATTERS="html,xml,rcov,lcov,json,tty"
export K_SOUP_COV_MIN_BRANCH=78 # Means you want to enforce X% branch coverage
export K_SOUP_COV_MIN_LINE=97 # 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 K_SOUP_COV_OPEN_BIN= # Means don't try to open coverage results in browser
export MAX_ROWS=1 # Setting for simplecov-console gem for tty output, limits to the worst N rows of bad coverage
export KETTLE_TEST_SILENT=true

# Internal Debugging Controls
export DEBUG=false # do not allow byebug statements (override in .env.local)
export FLOSS_CFG_FUND_DEBUG=false # extra logging to help diagnose issues (override in .env.local)
export FLOSS_CFG_FUND_LOGFILE=tmp/log/debug.log

# Concurrently developing the rubocop-lts suite?
export RUBOCOP_LTS_LOCAL=false
Expand Down
41 changes: 41 additions & 0 deletions .git-hooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env ruby
# vim: set syntax=ruby

ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

require "rubygems"
require "bundler/setup"

# External gems
require "gitmoji/regex"

full_text = File.read(ARGV[0])
# Is the first character a GitMoji?
gitmoji_index = full_text =~ Gitmoji::Regex::REGEX
if gitmoji_index == 0
exit 0
else
denied = <<EOM
Oh snap, think again...

______ _______ ___ _______ _______ _______ _______ ______ __
| _ | | | | || || || || || | | |
| | || | ___| | || ___|| ||_ _|| ___|| _ || |
| |_||_ | |___ | || |___ | | | | | |___ | | | || |
| __ || ___| ___| || ___|| _| | | | ___|| |_| ||__|
| | | || |___ | || |___ | |_ | | | |___ | | __
|___| |_||_______||_______||_______||_______| |___| |_______||______| |__|


Did you forget to add a relevant gitmoji? (see https://gitmoji.dev/ for tools)
In this project, a Gitmoji must be the first grapheme of the commit message.
What's a grapheme?
A symbol rendered to be visually identifiable as a single character, but which may be composed of multiple Unicode code points)
Must match: #{Gitmoji::Regex::REGEX.to_s}
#{gitmoji_index ? "Found a gitmoji at character index #{gitmoji_index}... not good enough.\n" : ""}
Example: git commit -m "✨ My excellent new feature"

EOM
puts denied
exit 1
end
8 changes: 8 additions & 0 deletions .git-hooks/commit-subjects-goalie.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
🔖 Prepare release v
🔒️ Checksums for v

# Lines beginning with # are ignored.
# This file is read by .git-hooks/prepare-commit-msg in each project.
# Each line of this file will be matched against the commit subject using `starts_with?`.
# If any `starts_with?` match the project script bin/prepare-commit-msg will run.
# 🔒️ Checksums for v is the standard commit message by stone_checksums.
16 changes: 16 additions & 0 deletions .git-hooks/footer-template.erb.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
⚡️ A message from a fellow meat-based-AI ⚡️
- [❤️] Finely-crafted open-source tools like <%= @gem_name %> (& many more) are a full-time endeavor.
- [❤️] Though I adore my work, it lacks financial sustainability.
- [❤️] Please, help me continue enhancing your tools by becoming a sponsor:
- [💲] https://liberapay.com/pboling/donate
- [💲] https://github.com/sponsors/pboling

<% if ENV["GIT_HOOK_FOOTER_APPEND_DEBUG"] == "true" %>
@pwd = <%= @pwd %>
@gemspecs = <%= @gemspecs %>
@spec = <%= @spec %>
@gemspec_path = <%= @gemspec_path %>
@gem_name <%= @gem_name %>
@spec_name <%= @spec_name %>
@content <%= @content %>
<% end %>
20 changes: 20 additions & 0 deletions .git-hooks/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

# Fail on error and unset variables
set -eu

# Determine project root as the parent directory of this hook script
PROJECT_ROOT="$(CDPATH= cd -- "$(dirname -- "$0")"/.. && pwd)"

# Run the Ruby hook within the direnv context (if available),
# so ENV from .envrc/.env.local at project root is loaded.
# One of the things .envrc needs to do is add $PROJECT_ROOT/bin/ to the path.
# You should have this line at the top of .envrc
# PATH_add bin
# NOTE: this project needs to also add exe as well,
# but other libraries won't generally need to do that.
if command -v direnv >/dev/null 2>&1; then
exec direnv exec "$PROJECT_ROOT" "kettle-commit-msg" "$@"
else
raise "direnv not found. Local development of this project ($PROJECT_ROOT) with tools from the kettle-dev gem may not work properly. Please run 'brew install direnv'."
fi
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ github: [pboling] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g.,
issuehunt: pboling # Replace with a single IssueHunt username
ko_fi: pboling # Replace with a single Ko-fi username
liberapay: pboling # Replace with a single Liberapay username
open_collective: ruby-oauth # Replace with a single Open Collective username
open_collective: ruby-oauth
patreon: galtzo # Replace with a single Patreon username
polar: pboling
thanks_dev: u/gh/pboling
tidelift: rubygems/oauth2 # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
tidelift: rubygems/oauth2
7 changes: 3 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
time: "04:28"
open-pull-requests-limit: 10
interval: "weekly"
open-pull-requests-limit: 5
ignore:
- dependency-name: "rubocop-lts"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
11 changes: 10 additions & 1 deletion .github/workflows/ancient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ concurrency:

jobs:
test:
name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
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
Expand All @@ -34,6 +34,15 @@ jobs:
fail-fast: false
matrix:
include:
# Ruby 2.3 is tested heavily by caboose.yml
# # Ruby 2.3
# - ruby: "ruby-2.3"
# appraisal: "ruby-2-3"
# exec_cmd: "rake test"
# gemfile: "Appraisal.root"
# rubygems: "3.3.27"
# bundler: "2.3.27"

# Ruby 2.4
- ruby: "ruby-2.4"
appraisal: "ruby-2-4"
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Auto Assign
on:
issues:
types: [opened]
pull_request:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: 'Auto-assign issue'
uses: pozil/auto-assign-issue@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
assignees: pboling
abortIfPreviousAssignees: true
allowSelfAssign: true
numOfAssignee: 1
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ main, "*-stable" ]
branches: [ main, '*-stable' ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main, "*-stable" ]
branches: [ main, '*-stable' ]
schedule:
- cron: '35 1 * * 5'

Expand Down
27 changes: 14 additions & 13 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
K_SOUP_COV_MIN_BRANCH: 100
K_SOUP_COV_MIN_LINE: 100
K_SOUP_COV_MIN_HARD: true
K_SOUP_COV_FORMATTERS: "html,xml,rcov,lcov,tty"
K_SOUP_COV_FORMATTERS: "xml,rcov,lcov,tty"
K_SOUP_COV_DO: true
K_SOUP_COV_MULTI_FORMATTERS: true
K_SOUP_COV_COMMAND_NAME: "Test Coverage"
Expand All @@ -35,8 +35,8 @@ concurrency:

jobs:
coverage:
name: Code Coverage on ${{ matrix.ruby }}@current
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
name: Code Coverage on ${{ matrix.ruby }}@current
runs-on: ubuntu-latest
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
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:

# 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.
# NOTE: This does not use the primary Gemfile at all.
- name: Install Root Appraisal
run: bundle
- name: Appraisal for ${{ matrix.appraisal }}
Expand All @@ -85,21 +85,22 @@ jobs:

- name: Upload coverage to QLTY
if: ${{ !env.ACT }}
uses: qltysh/qlty-action/coverage@v2
uses: qltysh/qlty-action/coverage@main
with:
token: ${{secrets.QLTY_COVERAGE_TOKEN}}
files: coverage/.resultset.json
continue-on-error: ${{ matrix.experimental != 'false' }}

# # Build will fail here if coverage upload fails
# # which will hopefully be noticed for the lack of code coverage comments
# - name: Upload coverage to CodeCov
# uses: codecov/codecov-action@v5
# with:
# use_oidc: true
# fail_ci_if_error: true # optional (default = false)
# files: coverage/lcov.info,coverage/coverage.xml
# verbose: true # optional (default = false)
# Build will fail here if coverage upload fails
# which will hopefully be noticed for the lack of code coverage comments
- name: Upload coverage to CodeCov
if: ${{ !env.ACT }}
uses: codecov/codecov-action@v5
with:
use_oidc: true
fail_ci_if_error: false # optional (default = false)
files: coverage/lcov.info,coverage/coverage.xml
verbose: true # optional (default = false)

# Then PR comments
- name: Code Coverage Summary Report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ concurrency:

jobs:
test:
name: Specs ${{ matrix.ruby }}@${{ matrix.appraisal }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
name: Specs ${{ matrix.ruby }}@${{ matrix.appraisal }}
runs-on: ubuntu-latest
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
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/discord-notifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Discord Notify

on:
check_run:
types: [completed]
discussion:
types: [ created ]
discussion_comment:
types: [ created ]
fork:
gollum:
issues:
types: [ opened ]
issue_comment:
types: [ created ]
pull_request:
types: [ opened, reopened, closed ]
release:
types: [ published ]
watch:
types: [ started ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
notify:
if: false
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Actions Status Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
status: ${{ job.status }}
username: GitHub Actions
2 changes: 1 addition & 1 deletion .github/workflows/heads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ concurrency:

jobs:
test:
name: Specs ${{ matrix.ruby }}@${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
name: Specs ${{ matrix.ruby }}@${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
runs-on: ubuntu-latest
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
Expand Down
18 changes: 1 addition & 17 deletions .github/workflows/jruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,15 @@ concurrency:

jobs:
test:
name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
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:
matrix:
include:
# jruby-9.2 (targets Ruby 2.5 compatibility)
- ruby: "jruby-9.2"
appraisal: "ruby-2-5"
exec_cmd: "rake test"
gemfile: "Appraisal.root"
rubygems: default
bundler: default

# jruby-9.3 (targets Ruby 2.6 compatibility)
- ruby: "jruby-9.3"
appraisal: "ruby-2-6"
exec_cmd: "rake test"
gemfile: "Appraisal.root"
rubygems: default
bundler: default

# jruby-9.4 (targets Ruby 3.1 compatibility)
- ruby: "jruby-9.4"
appraisal: "ruby-3-1"
Expand Down
Loading
Loading