Skip to content

Commit 895ffc6

Browse files
authored
Merge pull request #2 from ruby-oauth/kettle-dev
2 parents d536b89 + 854a53d commit 895ffc6

File tree

177 files changed

+5570
-1043
lines changed

Some content is hidden

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

177 files changed

+5570
-1043
lines changed

.aiignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# An .aiignore file follows the same syntax as a .gitignore file.
2+
# .gitignore documentation: https://git-scm.com/docs/gitignore
3+
4+
# you can ignore files
5+
.DS_Store
6+
*.log
7+
*.tmp
8+
9+
# or folders
10+
.devcontainer/
11+
.qlty/
12+
.yardoc/
13+
dist/
14+
build/
15+
out/
16+
coverage/
17+
docs/
18+
pkg/
19+
results/

.devcontainer/devcontainer.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/ruby
3+
{
4+
"name": "Ruby",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/ruby:1-3-bookworm",
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
// "features": {},
10+
11+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
12+
// "forwardPorts": [],
13+
14+
// Use 'postCreateCommand' to run commands after the container is created.
15+
// "postCreateCommand": "ruby --version",
16+
17+
// Configure tool-specific properties.
18+
"customizations" : {
19+
"jetbrains" : {
20+
"backend" : "RubyMine"
21+
}
22+
},
23+
24+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
25+
// "remoteUser": "root"
26+
}

.env.local.example

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
15+
# Tokens used by ci:act and CI helpers for reading workflow/pipeline status via APIs
16+
# GitHub (either GITHUB_TOKEN or GH_TOKEN will be used; fine-grained recommended)
17+
# - Scope/permissions: For fine-grained tokens, grant repository access (Read) and Actions: Read
18+
# - For classic tokens, public repos need no scopes; private repos typically require repo
19+
export GITHUB_TOKEN=<your GH token for GHA status; NEVER COMMIT>
20+
# Alternatively:
21+
# export GH_TOKEN=<your GH token>
22+
23+
# GitLab (either GITLAB_TOKEN or GL_TOKEN will be used)
24+
# - Scope: read_api is sufficient to read pipelines
25+
export GITLAB_TOKEN=<your GitLab token for pipeline status; NEVER COMMIT>
26+
# Alternatively:
27+
# export GL_TOKEN=<your GitLab token>

.envrc

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Run any command in this library's bin/ without the bin/ prefix!
2+
# Prefer exe version over binstub
3+
PATH_add exe
4+
PATH_add bin
5+
6+
# Only add things to this file that should be shared with the team.
7+
8+
# **dotenv** (See end of file for .env.local integration)
9+
# .env would override anything in this file, if enabled.
10+
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments.
11+
# Override and customize anything below in your own .env.local
12+
# If you are using dotenv and not direnv,
13+
# copy the following `export` statements to your own .env file.
14+
15+
### General Ruby ###
16+
# Turn off Ruby Warnings about deprecated code
17+
# export RUBYOPT="-W0"
18+
19+
### External Testing Controls
20+
export K_SOUP_COV_DO=true # Means you want code coverage
21+
export K_SOUP_COV_COMMAND_NAME="Test Coverage"
22+
# Available formats are html, xml, rcov, lcov, json, tty
23+
export K_SOUP_COV_FORMATTERS="html,xml,rcov,lcov,json,tty"
24+
export K_SOUP_COV_MIN_BRANCH=80 # Means you want to enforce X% branch coverage
25+
export K_SOUP_COV_MIN_LINE=96 # Means you want to enforce X% line coverage
26+
export K_SOUP_COV_MIN_HARD=true # Means you want the build to fail if the coverage thresholds are not met
27+
export K_SOUP_COV_MULTI_FORMATTERS=true
28+
export K_SOUP_COV_OPEN_BIN= # Means don't try to open coverage results in browser
29+
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
31+
32+
# Internal Debugging Controls
33+
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
39+
40+
# .env would override anything in this file, if `dotenv` is uncommented below.
41+
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments,
42+
# and that is why we generally want to leave it commented out.
43+
# dotenv
44+
45+
# .env.local will override anything in this file.
46+
dotenv_if_exists .env.local

.git-hooks/commit-msg

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env ruby
2+
# vim: set syntax=ruby
3+
4+
# Do not rely on Bundler; allow running outside a Bundler context
5+
begin
6+
require "rubygems"
7+
rescue LoadError
8+
# continue
9+
end
10+
11+
begin
12+
# External gems
13+
require "gitmoji/regex"
14+
15+
full_text = File.read(ARGV[0])
16+
# Is the first character a GitMoji?
17+
gitmoji_index = full_text =~ Gitmoji::Regex::REGEX
18+
if gitmoji_index == 0
19+
exit 0
20+
else
21+
denied = <<EOM
22+
Oh snap, think again...
23+
24+
______ _______ ___ _______ _______ _______ _______ ______ __
25+
| _ | | | | || || || || || | | |
26+
| | || | ___| | || ___|| ||_ _|| ___|| _ || |
27+
| |_||_ | |___ | || |___ | | | | | |___ | | | || |
28+
| __ || ___| ___| || ___|| _| | | | ___|| |_| ||__|
29+
| | | || |___ | || |___ | |_ | | | |___ | | __
30+
|___| |_||_______||_______||_______||_______| |___| |_______||______| |__|
31+
32+
33+
Did you forget to add a relevant gitmoji? (see https://gitmoji.dev/ for tools)
34+
In this project, a Gitmoji must be the first grapheme of the commit message.
35+
What's a grapheme?
36+
A symbol rendered to be visually identifiable as a single character, but which may be composed of multiple Unicode code points)
37+
Must match: #{Gitmoji::Regex::REGEX.to_s}
38+
#{gitmoji_index ? "Found a gitmoji at character index #{gitmoji_index}... not good enough.\n" : ""}
39+
Example: git commit -m "✨ My excellent new feature"
40+
41+
EOM
42+
puts denied
43+
exit 1
44+
end
45+
rescue LoadError => e
46+
warn("gitmoji-regex gem not found: #{e.class}: #{e.message}.\n\tSkipping gitmoji check and allowing commit to proceed.\n\tRecommendation: add 'gitmoji-regex' to your development dependencies to enable this check.")
47+
exit 0
48+
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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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: If this project ships exe scripts it should also add that.
15+
if command -v direnv >/dev/null 2>&1; then
16+
exec direnv exec "$PROJECT_ROOT" "kettle-commit-msg" "$@"
17+
else
18+
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'."
19+
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/oauth-tty # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
13+
tidelift: rubygems/oauth-tty

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: bundler
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
open-pull-requests-limit: 5
8+
ignore:
9+
- dependency-name: "rubocop-lts"
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
schedule:
13+
interval: "weekly"

0 commit comments

Comments
 (0)