Skip to content
Open
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
10 changes: 8 additions & 2 deletions .devcontainer/apt-install/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/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

# Basic, commonly needed, dependencies of Ruby & JRuby projects
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

# Support for PostgreSQL
apt-get install -y postgresql libpq-dev

# Adds the direnv setup script to ~/.bashrc file (at the end)
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
6 changes: 5 additions & 1 deletion .env.local.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# DO NOT EDIT THIS FILE
#
# COPT THIS FILE TO .env.local
# COPY THIS FILE TO .env.local
#
# That file is ignored by .gitignore. This file is not.
#
Expand All @@ -25,3 +25,7 @@ export GITHUB_TOKEN=<your GH token for GHA status; NEVER COMMIT>
export GITLAB_TOKEN=<your GitLab token for pipeline status; NEVER COMMIT>
# Alternatively:
# export GL_TOKEN=<your GitLab token>

# OmniAuth not have an open source collective.
export OPENCOLLECTIVE_HANDLE=false
export FUNDING_ORG=false
22 changes: 21 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
# 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.

# **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
export K_SOUP_COV_COMMAND_NAME="Test Coverage"

# Available formats are html, xml, rcov, lcov, json, tty

export K_SOUP_COV_FORMATTERS="html,xml,rcov,lcov,json,tty"
export K_SOUP_COV_MIN_BRANCH=80 # Means you want to enforce X% branch coverage
export K_SOUP_COV_MIN_LINE=96 # Means you want to enforce X% line coverage
Expand All @@ -30,20 +42,28 @@ export MAX_ROWS=1 # Setting for simplecov-console gem for tty output, limits to
export KETTLE_TEST_SILENT=true

# Internal Debugging Controls
export INTEGRATION_LOG_LEVEL= # Set to debug for debugging output from integration tests. Set to empty string for normal output.
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

# kettle-dev open collective integration
# omniauth-identity has no open source collective.

export OPENCOLLECTIVE_HANDLE=false
export FUNDING_ORG=false

# .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
56 changes: 31 additions & 25 deletions .git-hooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,39 @@ begin
# Is the first character a GitMoji?
gitmoji_index = full_text =~ Gitmoji::Regex::REGEX
if gitmoji_index == 0
exit 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
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}
#{"Found a gitmoji at character index #{gitmoji_index}... not good enough.\n" if gitmoji_index}
Example: git commit -m "✨ My excellent new feature"
EOM
puts denied
exit 1
exit(1)
end
rescue LoadError => e
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.")
exit 0
failure = <<~EOM
gitmoji-regex gem not found: #{e.class}: #{e.message}.
Skipping gitmoji check and allowing commit to proceed.
Recommendation: add 'gitmoji-regex' to your development dependencies to enable this check.

EOM
warn(failure)
exit(0)
end
2 changes: 1 addition & 1 deletion .git-hooks/footer-template.erb.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
⚡️ A message from a fellow meat-based-AI ⚡️
- [❤️] Finely-crafted open-source tools like <%= @gem_name %> (& many more) are a full-time endeavor.
- [❤️] Finely-crafted open-source tools like <%= @gem_name %> (& many more) require time and effort.
- [❤️] 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
Expand Down
17 changes: 3 additions & 14 deletions .git-hooks/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,6 @@
# 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: If this project ships exe scripts it should also add 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
# We are not using direnv exec here because mise and direnv can result in conflicting PATH settings:
# See: https://mise.jdx.dev/direnv.html
exec "kettle-commit-msg" "$@"
7 changes: 7 additions & 0 deletions .github/workflows/current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ jobs:
matrix:
include:
# Ruby 3.4
- ruby: "ruby"
appraisal: "ar-7-1"
exec_cmd: "rake spec:orm:active_record"
gemfile: "Appraisal.root"
rubygems: latest
bundler: latest

- ruby: "ruby"
appraisal: "ar-7-2"
exec_cmd: "rake spec:orm:active_record"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@ jobs:
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
- name: Run ${{ matrix.appraisal }} checks via ${{ matrix.exec_cmd }}
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
- name: Validate RBS Types
run: bundle exec appraisal ${{ matrix.appraisal }} bin/rbs validate
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,18 @@ Appraisal.*.gemfile.lock

# Sentinels
.floss_funding.*.lock

# Integration test databases and dummies (Phase 1)
spec/dummies/rails/db/*.sqlite3
spec/dummies/rails/db/*.sqlite3-*
spec/dummies/rails/log/
spec/dummies/rails/tmp/

tmp/db/

# Prevent incorrectly named sqlite database files from being tracked
sqlite::memory:*
*::memory::*

# Combustion / Rails internal files
spec/internal/log/
16 changes: 7 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# - template: Security/SAST.gitlab-ci.yml

default:
image: ruby
image: "ruby:${RUBY_VERSION}"

variables:
BUNDLE_INSTALL_FLAGS: "--quiet --jobs=$(nproc) --retry=3"
Expand All @@ -22,8 +22,8 @@ variables:
K_SOUP_COV_DEBUG: true
K_SOUP_COV_DO: true
K_SOUP_COV_HARD: true
K_SOUP_COV_MIN_BRANCH: 100
K_SOUP_COV_MIN_LINE: 100
K_SOUP_COV_MIN_BRANCH: 74
K_SOUP_COV_MIN_LINE: 90
K_SOUP_COV_VERBOSE: true
K_SOUP_COV_FORMATTERS: "tty"
K_SOUP_COV_MULTI_FORMATTERS: true
Expand All @@ -39,7 +39,6 @@ workflow:
- if: '$CI_COMMIT_TAG'

.test_template-current: &test_definition-current
image: ruby:${RUBY_VERSION}
stage: test
script:
# || true so we don't fail here, because it'll probably work even if the gem update fails
Expand Down Expand Up @@ -67,7 +66,6 @@ workflow:
- vendor/ruby

.test_template-legacy: &test_definition-legacy
image: ruby:${RUBY_VERSION}
stage: test
script:
# RUBYGEMS_VERSION because we support EOL Ruby still...
Expand All @@ -87,7 +85,7 @@ workflow:
- bundle exec appraisal ${APPRAISAL} bin/rake --tasks
# Run tests, skipping those that won't work in CI
- >
bundle exec appraisal unlocked_deps \
bundle exec appraisal ${APPRAISAL} \
bin/rspec spec \
--tag \~ci_skip \
--format progress \
Expand All @@ -108,7 +106,7 @@ ruby-current:
ruby-ruby3_1:
variables:
RUBYGEMS_VERSION: "3.6.9"
APPRAISAL: ruby_3_1
APPRAISAL: ruby-3-1
K_SOUP_COV_DO: false
<<: *test_definition-legacy
parallel:
Expand All @@ -118,7 +116,7 @@ ruby-ruby3_1:
ruby-ruby3_0:
variables:
RUBYGEMS_VERSION: "3.5.23"
APPRAISAL: ruby_3_0
APPRAISAL: ruby-3-0
K_SOUP_COV_DO: false
<<: *test_definition-legacy
parallel:
Expand All @@ -128,7 +126,7 @@ ruby-ruby3_0:
ruby-ruby2_7:
variables:
RUBYGEMS_VERSION: "3.4.22"
APPRAISAL: ruby_2_7
APPRAISAL: ruby-2-7
K_SOUP_COV_DO: false
<<: *test_definition-legacy
parallel:
Expand Down
33 changes: 29 additions & 4 deletions .idea/.gitignore
100755 → 100644

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified .idea/GitLink.xml
100755 → 100644
Empty file.
13 changes: 0 additions & 13 deletions .idea/active-tab-highlighter.xml

This file was deleted.

Loading
Loading