Skip to content

Commit e0e299c

Browse files
committed
🎉 token-resolver
0 parents  commit e0e299c

File tree

190 files changed

+18338
-0
lines changed

Some content is hidden

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

190 files changed

+18338
-0
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/
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "Apt Install Packages",
3+
"id": "apt-install",
4+
"version": "1.0.0",
5+
"description": "More packages are needed",
6+
"install": {
7+
"script": "install.sh"
8+
}
9+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
apt-get update -y
3+
4+
# Basic, commonly needed, dependencies of Ruby & JRuby projects
5+
apt-get install -y direnv default-jdk git zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev
6+
7+
# Support for PostgreSQL
8+
# apt-get install -y postgresql libpq-dev
9+
10+
# Adds the direnv setup script to ~/.bashrc file (at the end)
11+
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc

.devcontainer/devcontainer.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
"./apt-install": {}
11+
},
12+
13+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
14+
// "forwardPorts": [],
15+
16+
// Use 'postCreateCommand' to run commands after the container is created.
17+
"postCreateCommand": "bundle update --bundler",
18+
19+
// Configure tool-specific properties.
20+
"customizations" : {
21+
"jetbrains" : {
22+
"backend" : "RubyMine"
23+
}
24+
},
25+
26+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
27+
// "remoteUser": "root"
28+
}

.env.local.example

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# DO NOT EDIT THIS FILE
3+
#
4+
# COPY 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>
28+
29+
# If this gem does not have an open source collective uncomment and set these to false.
30+
# export OPENCOLLECTIVE_HANDLE=false
31+
# export FUNDING_ORG=false

.envrc

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Run any command in this library's bin/ without the bin/ prefix!
2+
3+
# Prefer exe version over binstub
4+
5+
PATH_add exe
6+
PATH_add bin
7+
8+
# Only add things to this file that should be shared with the team.
9+
10+
# **dotenv** (See end of file for .env.local integration)
11+
12+
# .env would override anything in this file, if enabled.
13+
14+
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments.
15+
16+
# Override and customize anything below in your own .env.local
17+
18+
# If you are using dotenv and not direnv,
19+
20+
# copy the following `export` statements to your own .env file.
21+
22+
### General Ruby ###
23+
24+
# Turn off Ruby Warnings about deprecated code
25+
26+
# export RUBYOPT="-W0"
27+
28+
### External Testing Controls
29+
30+
export K_SOUP_COV_DO=true # Means you want code coverage
31+
export K_SOUP_COV_COMMAND_NAME="Test Coverage"
32+
33+
# Available formats are html, xml, rcov, lcov, json, tty
34+
35+
export K_SOUP_COV_FORMATTERS="html,xml,rcov,lcov,json,tty"
36+
export K_SOUP_COV_MIN_BRANCH=76 # Means you want to enforce X% branch coverage
37+
export K_SOUP_COV_MIN_LINE=92 # Means you want to enforce X% line coverage
38+
export K_SOUP_COV_MIN_HARD=true # Means you want the build to fail if the coverage thresholds are not met
39+
export K_SOUP_COV_MULTI_FORMATTERS=true
40+
export K_SOUP_COV_OPEN_BIN= # Means don't try to open coverage results in browser
41+
export MAX_ROWS=1 # Setting for simplecov-console gem for tty output, limits to the worst N rows of bad coverage
42+
export KETTLE_TEST_SILENT=true
43+
export KETTLE_DEV_DEBUG=false
44+
45+
# Internal Debugging Controls
46+
47+
export DEBUG=false # do not allow byebug statements (override in .env.local)
48+
export FLOSS_CFG_FUND_DEBUG=false # extra logging to help diagnose issues (override in .env.local)
49+
export FLOSS_CFG_FUND_LOGFILE=tmp/log/debug.log
50+
51+
# Concurrently developing the rubocop-lts suite?
52+
53+
export RUBOCOP_LTS_LOCAL=false
54+
55+
# If token-resolver does not have an open source collective set these to false.
56+
57+
export OPENCOLLECTIVE_HANDLE=kettle-rb
58+
export FUNDING_ORG=kettle-rb
59+
60+
# .env would override anything in this file, if `dotenv` is uncommented below.
61+
62+
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments,
63+
64+
# and that is why we generally want to leave it commented out.
65+
66+
# dotenv
67+
68+
# .env.local will override anything in this file.
69+
70+
dotenv_if_exists .env.local

.git-hooks/commit-msg

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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}
38+
#{"Found a gitmoji at character index #{gitmoji_index}... not good enough.\n" if gitmoji_index}
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+
failure = <<~EOM
47+
gitmoji-regex gem not found: #{e.class}: #{e.message}.
48+
Skipping gitmoji check and allowing commit to proceed.
49+
Recommendation: add 'gitmoji-regex' to your development dependencies to enable this check.
50+
51+
EOM
52+
warn(failure)
53+
exit(0)
54+
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) require time and effort.
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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
3+
# Fail on error and unset variables
4+
set -eu
5+
6+
# Allow skipping the hook by setting KETTLE_PRECOMMIT_HOOK=false
7+
if [ "${KETTLE_PRECOMMIT_HOOK:-true}" = "false" ]; then
8+
exit 0
9+
fi
10+
11+
# We are not using direnv exec here because mise and direnv can result in conflicting PATH settings:
12+
# See: https://mise.jdx.dev/direnv.html
13+
exec "kettle-commit-msg" "$@"

0 commit comments

Comments
 (0)