Skip to content

Commit 14e2c0a

Browse files
authored
Merge pull request #6 from ruby-openid/main
2 parents 92a9607 + c6ab1eb commit 14e2c0a

Some content is hidden

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

70 files changed

+2274
-610
lines changed

.envrc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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=86 # Means you want to enforce X% branch coverage
23+
export K_SOUP_COV_MIN_LINE=97 # 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+
export REQUIRE_BENCH=false # set to true in .env.local to turn on require_bench
31+
32+
# .env would override anything in this file, if `dotenv` is uncommented below.
33+
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments,
34+
# and that is why we generally want to leave it commented out.
35+
# dotenv
36+
37+
# .env.local will override anything in this file.
38+
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: u/gh/pboling
13+
tidelift: rubygems/rack-openid2 # 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/coverage.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Ruby - Coverage
2+
3+
env:
4+
K_SOUP_COV_MIN_BRANCH: 86
5+
K_SOUP_COV_MIN_LINE: 97
6+
K_SOUP_COV_MIN_HARD: true
7+
K_SOUP_COV_DO: true
8+
K_SOUP_COV_COMMAND_NAME: "MiniTest 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+
matrix:
40+
rubygems:
41+
- latest
42+
bundler:
43+
- latest
44+
gemfile:
45+
- coverage
46+
ruby:
47+
- '3.1'
48+
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v4
52+
53+
- name: Setup Ruby & RubyGems
54+
uses: ruby/setup-ruby@v1
55+
with:
56+
ruby-version: "${{ matrix.ruby }}"
57+
rubygems: "${{ matrix.rubygems }}"
58+
bundler: "${{ matrix.bundler }}"
59+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
60+
61+
- name: Run tests
62+
run: bundle exec rake test
63+
64+
- name: Code Coverage Summary Report
65+
uses: irongut/[email protected]
66+
if: ${{ github.event_name == 'pull_request' }}
67+
with:
68+
filename: ./coverage/coverage.xml
69+
badge: true
70+
fail_below_min: true
71+
format: markdown
72+
hide_branch_rate: false
73+
hide_complexity: true
74+
indicators: true
75+
output: both
76+
thresholds: '97 86'
77+
continue-on-error: ${{ matrix.experimental != 'false' }}
78+
79+
- name: Add Coverage PR Comment
80+
uses: marocchino/sticky-pull-request-comment@v2
81+
if: ${{ github.event_name == 'pull_request' }}
82+
with:
83+
recreate: true
84+
path: code-coverage-results.md
85+
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

.github/workflows/unsupported.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Unsupported (EOL) 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+
# Cancels all previous workflow runs for the same branch that have not yet completed.
19+
concurrency:
20+
# The concurrency group contains the workflow name and the branch name.
21+
group: "${{ github.workflow }}-${{ github.ref }}"
22+
cancel-in-progress: true
23+
24+
jobs:
25+
test:
26+
name: Specs - Ruby ${{ matrix.ruby }}${{ matrix.name_extra || '' }}
27+
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
28+
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
29+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
include:
34+
- ruby: "3.0"
35+
rubygems: "3.3.27"
36+
bundler: none
37+
gemfile: vanilla
38+
- ruby: "2.7"
39+
rubygems: "3.3.27"
40+
bundler: none
41+
gemfile: vanilla
42+
runs-on: ubuntu-20.04
43+
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v4
47+
- name: Setup Ruby & RubyGems
48+
uses: ruby/setup-ruby@v1
49+
with:
50+
ruby-version: "${{ matrix.ruby }}"
51+
rubygems: "${{ matrix.rubygems }}"
52+
bundler: "${{ matrix.bundler }}"
53+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
54+
- name: Run tests
55+
run: bundle exec rake test

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/doc/
2+
.env.local
3+
.yardoc/
4+
coverage/
5+
pkg/
6+
.bundle/
7+
.byebug_history

.rubocop.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
inherit_gem:
2+
rubocop-lts: config/rubygem.yml
3+
4+
require:
5+
- rubocop-minitest
6+
7+
Style/EmptyElse:
8+
Enabled: false

0 commit comments

Comments
 (0)