Skip to content

Commit 0df8310

Browse files
authored
Merge pull request #13 from ruby-oauth/kettle-dev
2 parents ab8de00 + fba039f commit 0df8310

File tree

152 files changed

+11871
-809
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+11871
-809
lines changed

.env.local.example

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# DO NOT EDIT THIS FILE
3+
#
4+
# COPT THIS FILE TO .env.local
5+
#
6+
# That file is ignored by .gitignore. This file is not.
7+
#
8+
export DEBUG=false # do not allow byebug statements (override in .env.local)
9+
export FLOSS_FUNDING_DEBUG=false # extra logging to help diagnose issues (override in .env.local)
10+
export AUTOGEN_FIXTURE_CLEANUP=false # autogenerated gem fixture cleanup after every RSpec run
11+
export GIT_HOOK_FOOTER_APPEND=false
12+
export GIT_HOOK_FOOTER_APPEND_DEBUG=false
13+
export GIT_HOOK_FOOTER_SENTINEL="⚡️ A message from a fellow meat-based-AI ⚡️"
14+
export GITHUB_TOKEN=<your GH PAT, for the GHA console bin/rake ci:act - DO NOT EVER COMMIT IT>

.envrc

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Run any command in this library's bin/ without the bin/ prefix!
2+
# Prefer exe version over binstub
3+
PATH_add exe
24
PATH_add bin
35

46
# Only add things to this file that should be shared with the team.
@@ -16,18 +18,24 @@ PATH_add bin
1618

1719
### External Testing Controls
1820
export K_SOUP_COV_DO=true # Means you want code coverage
21+
export K_SOUP_COV_COMMAND_NAME="Test Coverage"
1922
# Available formats are html, xml, rcov, lcov, json, tty
20-
export K_SOUP_COV_COMMAND_NAME="RSpec Coverage"
21-
export K_SOUP_COV_FORMATTERS="html,tty"
22-
export K_SOUP_COV_MIN_BRANCH=100 # Means you want to enforce X% branch coverage
23-
export K_SOUP_COV_MIN_LINE=100 # Means you want to enforce X% line coverage
23+
export K_SOUP_COV_FORMATTERS="html,xml,rcov,lcov,json,tty"
24+
export K_SOUP_COV_MIN_BRANCH=78 # Means you want to enforce X% branch coverage
25+
export K_SOUP_COV_MIN_LINE=97 # Means you want to enforce X% line coverage
2426
export K_SOUP_COV_MIN_HARD=true # Means you want the build to fail if the coverage thresholds are not met
2527
export K_SOUP_COV_MULTI_FORMATTERS=true
2628
export K_SOUP_COV_OPEN_BIN= # Means don't try to open coverage results in browser
2729
export MAX_ROWS=1 # Setting for simplecov-console gem for tty output, limits to the worst N rows of bad coverage
30+
export KETTLE_TEST_SILENT=true
2831

2932
# Internal Debugging Controls
3033
export DEBUG=false # do not allow byebug statements (override in .env.local)
34+
export FLOSS_CFG_FUND_DEBUG=false # extra logging to help diagnose issues (override in .env.local)
35+
export FLOSS_CFG_FUND_LOGFILE=tmp/log/debug.log
36+
37+
# Concurrently developing the rubocop-lts suite?
38+
export RUBOCOP_LTS_LOCAL=false
3139

3240
# .env would override anything in this file, if `dotenv` is uncommented below.
3341
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments,

.git-hooks/commit-msg

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env ruby
2+
# vim: set syntax=ruby
3+
4+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
5+
6+
require "rubygems"
7+
require "bundler/setup"
8+
9+
# External gems
10+
require "gitmoji/regex"
11+
12+
full_text = File.read(ARGV[0])
13+
# Is the first character a GitMoji?
14+
gitmoji_index = full_text =~ Gitmoji::Regex::REGEX
15+
if gitmoji_index == 0
16+
exit 0
17+
else
18+
denied = <<EOM
19+
Oh snap, think again...
20+
21+
______ _______ ___ _______ _______ _______ _______ ______ __
22+
| _ | | | | || || || || || | | |
23+
| | || | ___| | || ___|| ||_ _|| ___|| _ || |
24+
| |_||_ | |___ | || |___ | | | | | |___ | | | || |
25+
| __ || ___| ___| || ___|| _| | | | ___|| |_| ||__|
26+
| | | || |___ | || |___ | |_ | | | |___ | | __
27+
|___| |_||_______||_______||_______||_______| |___| |_______||______| |__|
28+
29+
30+
Did you forget to add a relevant gitmoji? (see https://gitmoji.dev/ for tools)
31+
In this project, a Gitmoji must be the first grapheme of the commit message.
32+
What's a grapheme?
33+
A symbol rendered to be visually identifiable as a single character, but which may be composed of multiple Unicode code points)
34+
Must match: #{Gitmoji::Regex::REGEX.to_s}
35+
#{gitmoji_index ? "Found a gitmoji at character index #{gitmoji_index}... not good enough.\n" : ""}
36+
Example: git commit -m "✨ My excellent new feature"
37+
38+
EOM
39+
puts denied
40+
exit 1
41+
end
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
🔖 Prepare release v
2+
🔒️ Checksums for v
3+
4+
# Lines beginning with # are ignored.
5+
# This file is read by .git-hooks/prepare-commit-msg in each project.
6+
# Each line of this file will be matched against the commit subject using `starts_with?`.
7+
# If any `starts_with?` match the project script bin/prepare-commit-msg will run.
8+
# 🔒️ Checksums for v is the standard commit message by stone_checksums.

.git-hooks/footer-template.erb.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
⚡️ A message from a fellow meat-based-AI ⚡️
2+
- [❤️] Finely-crafted open-source tools like <%= @gem_name %> (& many more) are a full-time endeavor.
3+
- [❤️] Though I adore my work, it lacks financial sustainability.
4+
- [❤️] Please, help me continue enhancing your tools by becoming a sponsor:
5+
- [💲] https://liberapay.com/pboling/donate
6+
- [💲] https://github.com/sponsors/pboling
7+
8+
<% if ENV["GIT_HOOK_FOOTER_APPEND_DEBUG"] == "true" %>
9+
@pwd = <%= @pwd %>
10+
@gemspecs = <%= @gemspecs %>
11+
@spec = <%= @spec %>
12+
@gemspec_path = <%= @gemspec_path %>
13+
@gem_name <%= @gem_name %>
14+
@spec_name <%= @spec_name %>
15+
@content <%= @content %>
16+
<% end %>

.git-hooks/prepare-commit-msg

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/sh
2+
3+
# Fail on error and unset variables
4+
set -eu
5+
6+
# Determine project root as the parent directory of this hook script
7+
PROJECT_ROOT="$(CDPATH= cd -- "$(dirname -- "$0")"/.. && pwd)"
8+
9+
# Run the Ruby hook within the direnv context (if available),
10+
# so ENV from .envrc/.env.local at project root is loaded.
11+
# One of the things .envrc needs to do is add $PROJECT_ROOT/bin/ to the path.
12+
# You should have this line at the top of .envrc
13+
# PATH_add bin
14+
# NOTE: this project needs to also add exe as well,
15+
# but other libraries won't generally need to do that.
16+
if command -v direnv >/dev/null 2>&1; then
17+
exec direnv exec "$PROJECT_ROOT" "kettle-commit-msg" "$@"
18+
else
19+
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'."
20+
fi

.github/FUNDING.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ github: [pboling] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g.,
66
issuehunt: pboling # Replace with a single IssueHunt username
77
ko_fi: pboling # Replace with a single Ko-fi username
88
liberapay: pboling # Replace with a single Liberapay username
9-
open_collective: ruby-oauth # Replace with a single Open Collective username
9+
open_collective: ruby-oauth
1010
patreon: galtzo # Replace with a single Patreon username
1111
polar: pboling
1212
thanks_dev: u/gh/pboling
13-
tidelift: rubygems/version_gem # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
13+
tidelift: rubygems/version_gem

.github/dependabot.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ updates:
33
- package-ecosystem: bundler
44
directory: "/"
55
schedule:
6-
interval: daily
7-
time: "04:36"
8-
open-pull-requests-limit: 10
6+
interval: "weekly"
7+
open-pull-requests-limit: 5
98
ignore:
109
- dependency-name: "rubocop-lts"
1110
- package-ecosystem: "github-actions"
1211
directory: "/"
1312
schedule:
14-
interval: "daily"
13+
interval: "weekly"

.github/workflows/ancient.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
name: MRI 2.3, 2.4, 2.5 (EOL)
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches:
69
- 'main'
10+
- '*-stable'
711
tags:
812
- '!*' # Do not execute on tags
913
pull_request:
@@ -20,8 +24,8 @@ concurrency:
2024

2125
jobs:
2226
test:
23-
name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
2427
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
28+
name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
2529
runs-on: ubuntu-22.04
2630
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
2731
env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
@@ -33,23 +37,23 @@ jobs:
3337
# Ruby 2.3
3438
- ruby: "ruby-2.3"
3539
appraisal: "ruby-2-3"
36-
exec_cmd: "rake spec"
40+
exec_cmd: "rake test"
3741
gemfile: "Appraisal.root"
3842
rubygems: "3.3.27"
3943
bundler: "2.3.27"
4044

4145
# Ruby 2.4
4246
- ruby: "ruby-2.4"
4347
appraisal: "ruby-2-4"
44-
exec_cmd: "rake spec"
48+
exec_cmd: "rake test"
4549
gemfile: "Appraisal.root"
4650
rubygems: "3.3.27"
4751
bundler: "2.3.27"
4852

4953
# Ruby 2.5
5054
- ruby: "ruby-2.5"
5155
appraisal: "ruby-2-5"
52-
exec_cmd: "rake spec"
56+
exec_cmd: "rake test"
5357
gemfile: "Appraisal.root"
5458
rubygems: "3.3.27"
5559
bundler: "2.3.27"
@@ -68,7 +72,7 @@ jobs:
6872

6973
# Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
7074
# We need to do this first to get appraisal installed.
71-
# NOTE: This does not use the main Gemfile at all.
75+
# NOTE: This does not use the primary Gemfile at all.
7276
- name: Install Root Appraisal
7377
run: bundle
7478
- name: Appraisal for ${{ matrix.appraisal }}

.github/workflows/auto-assign.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Auto Assign
2+
on:
3+
issues:
4+
types: [opened]
5+
pull_request:
6+
types: [opened]
7+
jobs:
8+
run:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
issues: write
12+
pull-requests: write
13+
steps:
14+
- name: 'Auto-assign issue'
15+
uses: pozil/auto-assign-issue@v2
16+
with:
17+
repo-token: ${{ secrets.GITHUB_TOKEN }}
18+
assignees: pboling
19+
abortIfPreviousAssignees: true
20+
allowSelfAssign: true
21+
numOfAssignee: 1

0 commit comments

Comments
 (0)