-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
285c558
commit 0ca36f7
Showing
73 changed files
with
671 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @GrantBirki |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: bundler | ||
vendor: true | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
day: "monday" | ||
time: "21:00" | ||
groups: | ||
prod-ruby-dependencies: | ||
dependency-type: "production" | ||
patterns: | ||
- "*" | ||
dev-ruby-dependencies: | ||
dependency-type: "development" | ||
patterns: | ||
- "*" | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
groups: | ||
github-actions: | ||
patterns: | ||
- "*" | ||
schedule: | ||
interval: weekly | ||
day: "tuesday" | ||
time: "21:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: acceptance | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
acceptance: | ||
name: acceptance | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ruby/setup-ruby@f26937343756480a8cb3ae1f623b9c8d89ed6984 # [email protected] | ||
with: | ||
bundler-cache: true | ||
|
||
# TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: build | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ruby/setup-ruby@f26937343756480a8cb3ae1f623b9c8d89ed6984 # [email protected] | ||
with: | ||
bundler-cache: true | ||
|
||
- name: bootstrap | ||
run: script/bootstrap | ||
|
||
- name: build | ||
run: | | ||
GEM_NAME=$(ls | grep gemspec | cut -d. -f1) | ||
echo "Attempting to build gem $GEM_NAME..." | ||
gem build $GEM_NAME | ||
if [ $? -eq 0 ]; then | ||
echo "Gem built successfully!" | ||
else | ||
echo "Gem build failed!" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ruby/setup-ruby@f26937343756480a8cb3ae1f623b9c8d89ed6984 # [email protected] | ||
with: | ||
bundler-cache: true | ||
|
||
- name: lint | ||
run: bundle exec rubocop -c .rubocop.yml lib/ spec/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- lib/version.rb | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ruby/setup-ruby@f26937343756480a8cb3ae1f623b9c8d89ed6984 # [email protected] | ||
with: | ||
bundler-cache: true | ||
|
||
- name: bootstrap | ||
run: script/bootstrap | ||
|
||
- name: lint | ||
run: bundle exec rubocop -c .rubocop.yml lib/ spec/ | ||
|
||
- name: test | ||
run: script/test | ||
|
||
- name: set GEM_NAME from gemspec | ||
run: echo "GEM_NAME=$(ls | grep gemspec | cut -d. -f1)" >> $GITHUB_ENV | ||
|
||
# builds the gem and saves the version to GITHUB_ENV | ||
- name: build | ||
run: echo "GEM_VERSION=$(gem build ${{ env.GEM_NAME }}.gemspec 2>&1 | grep Version | cut -d':' -f 2 | tr -d " \t\n\r")" >> $GITHUB_ENV | ||
|
||
- name: publish to GitHub packages | ||
run: | | ||
export OWNER=$( echo ${{ github.repository }} | cut -d "/" -f 1 ) | ||
GEM_HOST_API_KEY=${{ secrets.GITHUB_TOKEN }} gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} ${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem | ||
- name: release | ||
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # [email protected] | ||
with: | ||
artifacts: "${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem" | ||
tag: "v${{ env.GEM_VERSION }}" | ||
generateReleaseNotes: true | ||
|
||
- name: publish to RubyGems | ||
run: | | ||
mkdir -p ~/.gem | ||
echo -e "---\n:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" > ~/.gem/credentials | ||
chmod 0600 ~/.gem/credentials | ||
gem push ${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem | ||
rm ~/.gem/credentials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ruby/setup-ruby@f26937343756480a8cb3ae1f623b9c8d89ed6984 # [email protected] | ||
with: | ||
bundler-cache: true | ||
|
||
- name: bootstrap | ||
run: script/bootstrap | ||
|
||
- name: test | ||
run: script/test -d -k |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.bundle | ||
bin | ||
coverage | ||
logs | ||
tmp | ||
vendor/gems | ||
.idea | ||
.byebug_history | ||
.local/ | ||
.DS_Store | ||
.lesshst | ||
*.pem | ||
*.key | ||
*.crt | ||
*.csr | ||
*.secret | ||
|
||
/.bundle | ||
/vendor/gems | ||
|
||
# Ignore binstubs but do commit the one specific for this code. | ||
bin/* | ||
|
||
# There's a place for local caching of container gems to make local builds faster. | ||
# Keep the .keep file but not the gems themselves | ||
vendor/container-gems/* | ||
!vendor/container-gems/.keep | ||
|
||
# Coverage reports | ||
coverage/* | ||
|
||
.*.swp | ||
|
||
# Ignore JetBrains IDEs | ||
.idea | ||
|
||
issue-db-*.gem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
inherit_gem: | ||
rubocop-github: | ||
- config/default.yml | ||
|
||
AllCops: | ||
NewCops: enable | ||
SuggestExtensions: false | ||
DisplayCopNames: true | ||
TargetRubyVersion: 3.3 | ||
Exclude: | ||
- 'bin/*' | ||
- 'spec/acceptance/fixtures/**/*' | ||
- 'spec/unit/fixtures/**/*' | ||
- 'vendor/**/*' | ||
- '.github/**/*' | ||
|
||
Style/HashSyntax: | ||
Enabled: false | ||
|
||
Metrics/CyclomaticComplexity: | ||
Max: 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
|
||
gemspec | ||
|
||
group :development do | ||
gem "irb", "~> 1.14" | ||
gem "rspec", "~> 3.13" | ||
gem "rubocop", "~> 1.66" | ||
gem "rubocop-github", "~> 0.20" | ||
gem "rubocop-performance", "~> 1.22" | ||
gem "rubocop-rspec", "~> 3.1" | ||
gem "simplecov", "~> 0.22" | ||
gem "simplecov-erb", "~> 1.0" | ||
end |
Oops, something went wrong.