Skip to content

Commit af83665

Browse files
committed
🎉 Initial Commit
0 parents  commit af83665

63 files changed

Lines changed: 2263 additions & 0 deletions

Some content is hidden

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

.envrc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Run any command in this library's bin/ without the bin/ prefix!
2+
PATH_add bin
3+
4+
# Only add things to this file that should be shared with the team.
5+
6+
# **dotenv** (See end of file for .env.local integration)
7+
# .env would override anything in this file, if enabled.
8+
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments.
9+
# Override and customize anything below in your own .env.local
10+
# If you are using dotenv and not direnv,
11+
# copy the following `export` statements to your own .env file.
12+
13+
### General Ruby ###
14+
# Turn off Ruby Warnings about deprecated code
15+
# export RUBYOPT="-W0"
16+
17+
### External Testing Controls
18+
export K_SOUP_COV_DO=true # Means you want code coverage
19+
# Available formats are html, xml, rcov, lcov, json, tty
20+
export K_SOUP_COV_COMMAND_NAME="MiniTest Coverage"
21+
export K_SOUP_COV_FORMATTERS="html,tty"
22+
export K_SOUP_COV_MIN_BRANCH=21 # Means you want to enforce X% branch coverage
23+
export K_SOUP_COV_MIN_LINE=46 # Means you want to enforce X% line coverage
24+
export K_SOUP_COV_MIN_HARD=true # Means you want the build to fail if the coverage thresholds are not met
25+
export K_SOUP_COV_MULTI_FORMATTERS=true
26+
export MAX_ROWS=1 # Setting for simplecov-console gem for tty output, limits to the worst N rows of bad coverage
27+
28+
# Internal Debugging Controls
29+
export DEBUG=false # do not allow byebug statements (override in .env.local)
30+
31+
# .env would override anything in this file, if `dotenv` is uncommented below.
32+
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments,
33+
# and that is why we generally want to leave it commented out.
34+
# dotenv
35+
36+
# .env.local will override anything in this file.
37+
dotenv_if_exists .env.local

.github/FUNDING.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These are supported funding model platforms
2+
3+
buy_me_a_coffee: pboling
4+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
5+
github: [pboling] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
6+
issuehunt: pboling # Replace with a single IssueHunt username
7+
ko_fi: pboling # Replace with a single Ko-fi username
8+
liberapay: pboling # Replace with a single Liberapay username
9+
open_collective: # Replace with a single Open Collective username
10+
patreon: galtzo # Replace with a single Patreon username
11+
polar: pboling
12+
thanks_dev: gh/pboling
13+
tidelift: rubygems/activesupport-logging # Replace with a single Tidelift platform-name/package-name e.g., npm/babel

.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: "daily"
7+
open-pull-requests-limit: 10
8+
ignore:
9+
- dependency-name: "rubocop-lts"
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
schedule:
13+
interval: "daily"

.github/workflows/ancient.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Ancient (EOL) Rubies
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
tags:
8+
- '!*' # Do not execute on tags
9+
pull_request:
10+
branches:
11+
- '*'
12+
# Allow manually triggering the workflow.
13+
workflow_dispatch:
14+
15+
# Cancels all previous workflow runs for the same branch that have not yet completed.
16+
concurrency:
17+
# The concurrency group contains the workflow name and the branch name.
18+
group: "${{ github.workflow }}-${{ github.ref }}"
19+
cancel-in-progress: true
20+
21+
jobs:
22+
test:
23+
name: Specs - Ruby ${{ matrix.ruby }}${{ matrix.name_extra || '' }}
24+
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
25+
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
26+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
gemfile:
31+
# Skips the gemspec, to avoid the modern development tools which can't be installed on ancient Rubies.
32+
- ancient
33+
ruby:
34+
- "2.7"
35+
runs-on: ubuntu-22.04
36+
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v4
40+
- name: Setup Ruby & RubyGems
41+
uses: ruby/setup-ruby@v1
42+
with:
43+
rubygems: "3.4.22"
44+
ruby-version: "${{ matrix.ruby }}"
45+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
46+
- name: Run tests
47+
run: bundle exec rake test

.github/workflows/coverage.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Ruby - Coverage
2+
3+
env:
4+
K_SOUP_COV_MIN_BRANCH: 21
5+
K_SOUP_COV_MIN_LINE: 46
6+
K_SOUP_COV_MIN_HARD: true
7+
K_SOUP_COV_DO: true
8+
K_SOUP_COV_COMMAND_NAME: "RSpec Coverage"
9+
10+
on:
11+
push:
12+
branches:
13+
- 'main'
14+
tags:
15+
- '!*' # Do not execute on tags
16+
pull_request:
17+
branches:
18+
- '*'
19+
# Allow manually triggering the workflow.
20+
workflow_dispatch:
21+
22+
permissions:
23+
contents: read
24+
25+
# Cancels all previous workflow runs for the same branch that have not yet completed.
26+
concurrency:
27+
# The concurrency group contains the workflow name and the branch name.
28+
group: "${{ github.workflow }}-${{ github.ref }}"
29+
cancel-in-progress: true
30+
31+
jobs:
32+
test:
33+
name: Specs with Coverage - Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
34+
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
35+
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
36+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
37+
runs-on: ubuntu-latest
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
experimental: [false]
42+
rubygems:
43+
- latest
44+
bundler:
45+
- latest
46+
gemfile:
47+
- coverage
48+
ruby:
49+
- '3.1'
50+
51+
steps:
52+
- uses: amancevice/setup-code-climate@v2
53+
name: CodeClimate Install
54+
if: ${{ github.event_name != 'pull_request' }}
55+
with:
56+
cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }}
57+
58+
- name: Checkout
59+
uses: actions/checkout@v4
60+
61+
- name: Setup Ruby & RubyGems
62+
uses: ruby/setup-ruby@v1
63+
with:
64+
ruby-version: "${{ matrix.ruby }}"
65+
rubygems: "${{ matrix.rubygems }}"
66+
bundler: "${{ matrix.bundler }}"
67+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
68+
69+
- name: CodeClimate Pre-build Notification
70+
run: cc-test-reporter before-build
71+
if: ${{ github.event_name != 'pull_request' }}
72+
continue-on-error: ${{ matrix.experimental != 'false' }}
73+
74+
- name: Run RSpec tests
75+
run: bundle exec rake test
76+
77+
- name: CodeClimate Post-build Notification
78+
run: cc-test-reporter after-build
79+
if: ${{ github.event_name != 'pull_request' }}
80+
continue-on-error: ${{ matrix.experimental != 'false' }}
81+
82+
- name: Code Coverage Summary Report
83+
uses: irongut/CodeCoverageSummary@v1.3.0
84+
if: ${{ github.event_name == 'pull_request' }}
85+
with:
86+
filename: ./coverage/coverage.xml
87+
badge: true
88+
fail_below_min: true
89+
format: markdown
90+
hide_branch_rate: false
91+
hide_complexity: true
92+
indicators: true
93+
output: both
94+
thresholds: '55 23'
95+
continue-on-error: ${{ matrix.experimental != 'false' }}
96+
97+
- name: Add Coverage PR Comment
98+
uses: marocchino/sticky-pull-request-comment@v2
99+
if: ${{ github.event_name == 'pull_request' }}
100+
with:
101+
recreate: true
102+
path: code-coverage-results.md
103+
continue-on-error: ${{ matrix.experimental != 'false' }}
104+
105+
- name: Coveralls
106+
uses: coverallsapp/github-action@master
107+
with:
108+
github-token: ${{ secrets.GITHUB_TOKEN }}
109+
continue-on-error: ${{ matrix.experimental != 'false' }}

.github/workflows/heads.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Ruby Heads Matrix
2+
3+
env:
4+
K_SOUP_COV_DO: false
5+
6+
on:
7+
push:
8+
branches:
9+
- 'main'
10+
tags:
11+
- '!*' # Do not execute on tags
12+
pull_request:
13+
branches:
14+
- '*'
15+
# Allow manually triggering the workflow.
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
21+
# Cancels all previous workflow runs for the same branch that have not yet completed.
22+
concurrency:
23+
# The concurrency group contains the workflow name and the branch name.
24+
group: "${{ github.workflow }}-${{ github.ref }}"
25+
cancel-in-progress: true
26+
27+
jobs:
28+
test:
29+
name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
30+
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
31+
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
32+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
33+
runs-on: ubuntu-latest
34+
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
35+
strategy:
36+
fail-fast: true
37+
matrix:
38+
rubygems:
39+
- latest
40+
bundler:
41+
- latest
42+
gemfile:
43+
- vanilla
44+
ruby:
45+
- head
46+
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v4
50+
51+
- name: Setup Ruby & RubyGems
52+
uses: ruby/setup-ruby@v1
53+
with:
54+
ruby-version: "${{ matrix.ruby }}"
55+
rubygems: "${{ matrix.rubygems }}"
56+
bundler: "${{ matrix.bundler }}"
57+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
58+
59+
- name: Run tests
60+
run: bundle exec rake test

.github/workflows/style.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Ruby - Style
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
tags:
8+
- '!*' # Do not execute on tags
9+
pull_request:
10+
branches:
11+
- '*'
12+
13+
jobs:
14+
rubocop:
15+
name: RuboCop
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
rubygems:
20+
- latest
21+
bundler:
22+
- latest
23+
gemfile:
24+
- style
25+
ruby:
26+
- "3.2"
27+
runs-on: ubuntu-latest
28+
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
29+
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
30+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
- name: Setup Ruby & RubyGems
35+
uses: ruby/setup-ruby@v1
36+
with:
37+
ruby-version: ${{ matrix.ruby }}
38+
rubygems: ${{ matrix.rubygems }}
39+
bundler: ${{ matrix.bundler }}
40+
bundler-cache: true
41+
- name: Run RuboCop
42+
run: bundle exec rake rubocop_gradual:check

.github/workflows/supported.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Supported Ruby Matrix
2+
3+
env:
4+
K_SOUP_COV_DO: false
5+
6+
on:
7+
push:
8+
branches:
9+
- 'main'
10+
tags:
11+
- '!*' # Do not execute on tags
12+
pull_request:
13+
branches:
14+
- '*'
15+
# Allow manually triggering the workflow.
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
21+
# Cancels all previous workflow runs for the same branch that have not yet completed.
22+
concurrency:
23+
# The concurrency group contains the workflow name and the branch name.
24+
group: "${{ github.workflow }}-${{ github.ref }}"
25+
cancel-in-progress: true
26+
27+
jobs:
28+
test:
29+
name: Specs - Ruby ${{ matrix.ruby }}${{ matrix.name_extra || '' }}
30+
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
31+
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
32+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
33+
runs-on: ubuntu-latest
34+
strategy:
35+
matrix:
36+
include:
37+
- ruby: "3.3"
38+
rubygems: latest
39+
bundler: latest
40+
gemfile: vanilla
41+
- ruby: "3.2"
42+
rubygems: latest
43+
bundler: latest
44+
gemfile: vanilla
45+
#- Ruby 3.1 tests are run by coverage.yml
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v4
49+
- name: Setup Ruby & RubyGems
50+
uses: ruby/setup-ruby@v1
51+
with:
52+
ruby-version: "${{ matrix.ruby }}"
53+
rubygems: "${{ matrix.rubygems }}"
54+
bundler: "${{ matrix.bundler }}"
55+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
56+
- name: Run tests
57+
run: bundle exec rake test

0 commit comments

Comments
 (0)