Skip to content

Commit fc83dfd

Browse files
authored
Merge pull request #669 from ruby-oauth/kettle-dev-v1.1.9
2 parents 1499ef7 + 6c16e3d commit fc83dfd

Some content is hidden

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

76 files changed

+610
-952
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/

.env.local.example

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,17 @@ export AUTOGEN_FIXTURE_CLEANUP=false # autogenerated gem fixture cleanup after e
1111
export GIT_HOOK_FOOTER_APPEND=false
1212
export GIT_HOOK_FOOTER_APPEND_DEBUG=false
1313
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>
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>

.git-hooks/commit-msg

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
#!/usr/bin/env ruby
22
# vim: set syntax=ruby
33

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"
4+
# Do not rely on Bundler; allow running outside a Bundler context
5+
begin
6+
require "rubygems"
7+
rescue LoadError
8+
# continue
9+
end
1110

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
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
1922
Oh snap, think again...
2023
2124
______ _______ ___ _______ _______ _______ _______ ______ __
@@ -36,6 +39,10 @@ Must match: #{Gitmoji::Regex::REGEX.to_s}
3639
Example: git commit -m "✨ My excellent new feature"
3740
3841
EOM
39-
puts denied
40-
exit 1
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
4148
end

.git-hooks/prepare-commit-msg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ PROJECT_ROOT="$(CDPATH= cd -- "$(dirname -- "$0")"/.. && pwd)"
1111
# One of the things .envrc needs to do is add $PROJECT_ROOT/bin/ to the path.
1212
# You should have this line at the top of .envrc
1313
# 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.
14+
# NOTE: If this project ships exe scripts it should also add that.
1615
if command -v direnv >/dev/null 2>&1; then
1716
exec direnv exec "$PROJECT_ROOT" "kettle-commit-msg" "$@"
1817
else

.github/workflows/current.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ jobs:
6565

6666
steps:
6767
- name: Checkout
68+
if: ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
6869
uses: actions/checkout@v5
6970

7071
- name: Setup Ruby & RubyGems
72+
if: ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
7173
uses: ruby/setup-ruby@v1
7274
with:
7375
ruby-version: ${{ matrix.ruby }}
@@ -79,8 +81,11 @@ jobs:
7981
# We need to do this first to get appraisal installed.
8082
# NOTE: This does not use the primary Gemfile at all.
8183
- name: Install Root Appraisal
84+
if: ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
8285
run: bundle
8386
- name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}
87+
if: ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
8488
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
8589
- name: Tests for ${{ matrix.ruby }}@${{ matrix.appraisal }} via ${{ matrix.exec_cmd }}
90+
if: ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
8691
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}

.github/workflows/current-runtime-heads.yml renamed to .github/workflows/dep-heads.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,19 @@ concurrency:
2929

3030
jobs:
3131
test:
32-
name: Specs ${{ matrix.ruby }}@${{ matrix.appraisal }}
3332
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
33+
name: Specs ${{ matrix.ruby }}@${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
3434
runs-on: ubuntu-latest
3535
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
3636
env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
3737
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
3838
strategy:
39+
fail-fast: true
3940
matrix:
4041
include:
4142
# Ruby 3.4
4243
- ruby: "ruby"
43-
appraisal: "current-runtime-heads"
44+
appraisal: "dep-heads"
4445
exec_cmd: "rake test"
4546
gemfile: "Appraisal.root"
4647
rubygems: latest
@@ -50,25 +51,27 @@ jobs:
5051
# (according to documentation: targets Ruby 3.3 compatibility)
5152
# (according to runtime: targets Ruby 3.2 compatibility)
5253
- ruby: "truffleruby"
53-
appraisal: "current-runtime-heads"
54+
appraisal: "dep-heads"
5455
exec_cmd: "rake test"
5556
gemfile: "Appraisal.root"
5657
rubygems: default
5758
bundler: default
5859

5960
# jruby-10.0 (targets Ruby 3.4 compatibility)
6061
- ruby: "jruby"
61-
appraisal: "current-runtime-heads"
62+
appraisal: "dep-heads"
6263
exec_cmd: "rake test"
6364
gemfile: "Appraisal.root"
6465
rubygems: default
6566
bundler: default
6667

6768
steps:
6869
- name: Checkout
70+
if: ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
6971
uses: actions/checkout@v5
7072

7173
- name: Setup Ruby & RubyGems
74+
if: ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
7275
uses: ruby/setup-ruby@v1
7376
with:
7477
ruby-version: ${{ matrix.ruby }}
@@ -79,9 +82,24 @@ jobs:
7982
# Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
8083
# We need to do this first to get appraisal installed.
8184
# NOTE: This does not use the primary Gemfile at all.
82-
- name: Install Root Appraisal
85+
- name: "Install Root Appraisal"
86+
if: ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
8387
run: bundle
84-
- name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}
88+
89+
- name: "[Attempt 1] Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}"
90+
if: ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
91+
id: bundleAttempt1
92+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
93+
# Continue to the next step on failure
94+
continue-on-error: true
95+
96+
# Effectively an automatic retry of the previous step.
97+
- name: "[Attempt 2] Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}"
98+
# If bundleAttempt1 failed, try again here; Otherwise skip.
99+
if: ${{ steps.bundleAttempt1.outcome == 'failure' && !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
100+
id: bundleAttempt2
85101
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
102+
86103
- name: Tests for ${{ matrix.ruby }}@${{ matrix.appraisal }} via ${{ matrix.exec_cmd }}
104+
if: ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
87105
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}

.github/workflows/heads.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@ jobs:
6464

6565
steps:
6666
- name: Checkout
67+
if: ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
6768
uses: actions/checkout@v5
6869

6970
- name: Setup Ruby & RubyGems
71+
if: ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
7072
uses: ruby/setup-ruby@v1
7173
with:
7274
ruby-version: ${{ matrix.ruby }}
@@ -78,20 +80,23 @@ jobs:
7880
# We need to do this first to get appraisal installed.
7981
# NOTE: This does not use the primary Gemfile at all.
8082
- name: "Install Root Appraisal"
83+
if: ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
8184
run: bundle
8285

8386
- name: "[Attempt 1] Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}"
87+
if: ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
8488
id: bundleAttempt1
8589
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
8690
# Continue to the next step on failure
8791
continue-on-error: true
8892

8993
# Effectively an automatic retry of the previous step.
9094
- name: "[Attempt 2] Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}"
91-
id: bundleAttempt2
9295
# If bundleAttempt1 failed, try again here; Otherwise skip.
93-
if: steps.bundleAttempt1.outcome == 'failure'
96+
if: ${{ steps.bundleAttempt1.outcome == 'failure' && !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
97+
id: bundleAttempt2
9498
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
9599

96100
- name: Tests for ${{ matrix.ruby }}@${{ matrix.appraisal }} via ${{ matrix.exec_cmd }}
101+
if: ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
97102
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}

.github/workflows/jruby.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ jobs:
4646

4747
steps:
4848
- name: Checkout
49+
if: ${{ !env.ACT }}
4950
uses: actions/checkout@v5
5051

5152
- name: Setup Ruby & RubyGems
53+
if: ${{ !env.ACT }}
5254
uses: ruby/setup-ruby@v1
5355
with:
5456
ruby-version: ${{ matrix.ruby }}
@@ -60,8 +62,11 @@ jobs:
6062
# We need to do this first to get appraisal installed.
6163
# NOTE: This does not use the primary Gemfile at all.
6264
- name: Install Root Appraisal
65+
if: ${{ !env.ACT }}
6366
run: bundle
6467
- name: Appraisal for ${{ matrix.appraisal }}
68+
if: ${{ !env.ACT }}
6569
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
6670
- name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }}
71+
if: ${{ !env.ACT }}
6772
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Appraisal.*.gemfile.lock
1616
/coverage/
1717
/spec/reports/
1818
/results/
19+
.output.txt
1920

2021
# Documentation
2122
/.yardoc/

0 commit comments

Comments
 (0)