Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite against json_schemer #7

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
b9dd5e6
📝 CONTRIBUTING.md
pboling Oct 25, 2023
dce4b7c
➖ bundler
pboling Oct 25, 2023
f0b7e17
➕ Switch json-schema => json_schemer
pboling Oct 25, 2023
9d87216
🧑‍💻 .tool-versions for local dev
pboling Oct 25, 2023
369ae6e
🔇 Less verbose test output
pboling Oct 25, 2023
f164ec2
📝 Development Documentation
pboling Oct 25, 2023
19eec71
♻️ json-schema => json_schemer
pboling Oct 25, 2023
7c64493
🔒️ SECURITY.md
pboling Oct 25, 2023
be9d735
🚑️ Fixes OneOf.valid_param
pboling Oct 25, 2023
77d76a7
🔨 bin scripts
pboling Oct 25, 2023
c4ab4f5
✨ Support ipv4 string format
pboling Oct 25, 2023
54aecae
🐛 Fix oneOf generator
pboling Oct 25, 2023
f77ebb5
♻️ Rename and Refactor to use json_schemer
pboling Oct 25, 2023
e1beda2
🔥 Goodbye Travis-CI
pboling Oct 25, 2023
29a5c8a
📝 CODE_OF_CONDUCT.md
pboling Oct 26, 2023
517e749
📝 CHANGELOG.md for v1.0.0
pboling Oct 26, 2023
d0c34c1
➕ kettle-soup-cover
pboling Oct 26, 2023
4a352c0
🔒️ pboling cert expires SEP-2024
pboling Oct 26, 2023
f5cc23d
👷 Github Actions
pboling Oct 26, 2023
a5572da
🔒️ Require cert to build gem
pboling Oct 26, 2023
c785aeb
📌 Minimum Ruby is 2.5.0
pboling Oct 26, 2023
6a0b214
📄 Copyright update
pboling Oct 26, 2023
a9911b5
📝 Gemspec metadata
pboling Oct 26, 2023
9083beb
🔨 More bin scripts
pboling Oct 26, 2023
257aaed
⚡️ Final Gem Structure
pboling Oct 26, 2023
df27912
🔨 Rake tasts
pboling Oct 26, 2023
c4eb1e2
📝 Lineage
pboling Oct 26, 2023
84d993b
📌 Gemfile.lock should be tracked
pboling Oct 26, 2023
fd62f03
📝 Update usage docs
pboling Oct 26, 2023
3e6d6a0
🔨 rake test
pboling Oct 26, 2023
dd8cf55
🔖 Prepare release v1.0.0
pboling Oct 26, 2023
7f8a05b
💚 Install dictionaries-common
pboling Oct 26, 2023
2293313
👷 awalsh128/cache-apt-pkgs-action
pboling Oct 26, 2023
eef1ace
👷 add wamerican words list
pboling Oct 26, 2023
46af234
🐛 Ruby 3.2 compatibility
pboling Oct 26, 2023
3fd5a2a
💡 GH Action awalsh128/cache-apt-pkgs-action may be broken
pboling Oct 26, 2023
9aa3a52
👷 Coverage minimums
pboling Oct 26, 2023
58a29c6
🔖 Prepare release v1.0.0
pboling Oct 26, 2023
6303f19
🔒️ Checksums for v1.0.0
pboling Oct 26, 2023
5a20891
🔥 Remove accidental duplication
pboling Nov 9, 2023
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
11 changes: 11 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# These are supported funding model platforms

github: [pboling] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: galtzo # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: pboling # Replace with a single Ko-fi username
tidelift: rubygems/json_schemer-fuzz # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: pboling # Replace with a single Liberapay username
issuehunt: pboling # Replace with a single IssueHunt username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
time: "04:34"
open-pull-requests-limit: 10
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main, "*-stable" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main, "*-stable" ]
schedule:
- cron: '35 1 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'ruby' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
115 changes: 115 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Code Coverage

env:
K_SOUP_COV_MIN_BRANCH: 62
K_SOUP_COV_MIN_LINE: 87
K_SOUP_COV_MIN_HARD: true

on:
push:
branches:
- 'main'
tags:
- '!*' # Do not execute on tags
pull_request:
branches:
- '*'
# Allow manually triggering the workflow.
workflow_dispatch:

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Specs with Coverage - Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
CI_CODECOV: true
COVER_ALL: true
strategy:
fail-fast: false
matrix:
experimental: [false]
rubygems:
- latest
bundler:
- latest
gemfile:
- coverage
ruby:
- "3.2"

runs-on: ubuntu-latest
steps:
- uses: amancevice/setup-code-climate@v1
name: CodeClimate Install
if: ${{ github.event_name != 'pull_request' }}
with:
cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }}

- name: Checkout
uses: actions/checkout@v3

# - uses: awalsh128/cache-apt-pkgs-action@latest
# with:
# packages: dictionaries-common wamerican
# version: 1.0

- name: Install words
run: sudo apt-get install -y dictionaries-common wamerican

- name: Setup Ruby & Bundle
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: ${{ matrix.rubygems }}
bundler: ${{ matrix.bundler }}
bundler-cache: true

- name: CodeClimate Pre-build Notification
run: cc-test-reporter before-build
if: ${{ github.event_name != 'pull_request' }}
continue-on-error: ${{ matrix.experimental != 'false' }}

- name: Run RSpec tests
run: |
bundle exec rspec

- name: CodeClimate Post-build Notification
run: cc-test-reporter after-build
if: ${{ github.event_name != 'pull_request' }}
continue-on-error: ${{ matrix.experimental != 'false' }}

- name: Code Coverage Summary Report
uses: irongut/[email protected]
if: ${{ github.event_name == 'pull_request' }}
with:
filename: ./coverage/coverage.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '100 100'
continue-on-error: ${{ matrix.experimental != 'false' }}

- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: ${{ github.event_name == 'pull_request' }}
with:
recreate: true
path: code-coverage-results.md
continue-on-error: ${{ matrix.experimental != 'false' }}

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: ${{ matrix.experimental != 'false' }}
75 changes: 75 additions & 0 deletions .github/workflows/current.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Current Ruby Support

env:
K_SOUP_COV_MIN_BRANCH: 62
K_SOUP_COV_MIN_LINE: 87
K_SOUP_COV_MIN_HARD: false

on:
push:
branches:
- 'main'
- '*-maintenance'
- '*-dev'
- '*-stable'
tags:
- '!*' # Do not execute on tags
pull_request:
branches:
- '*'
# Allow manually triggering the workflow.
workflow_dispatch:

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Ruby ${{ matrix.ruby }} ${{matrix.gemfile}} ${{ matrix.name_extra || '' }}
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
strategy:
fail-fast: false
matrix:
experimental: [false]
rubygems:
- latest
bundler:
- latest
gemfile:
- vanilla
ruby:
- "2.7"
- "3.0"
- "3.1"
- "3.2"
exclude:
# Vanilla + 3.2 is effectively run by coverage workflow
- gemfile: vanilla
ruby: "3.2"


runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
steps:
- name: Checkout
uses: actions/checkout@v3
# - uses: awalsh128/cache-apt-pkgs-action@latest
# with:
# packages: dictionaries-common wamerican
# version: 1.0
- name: Install words
run: sudo apt-get install -y dictionaries-common wamerican
- name: Setup Ruby & Bundle
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: ${{ matrix.rubygems }}
bundler: ${{ matrix.bundler }}
bundler-cache: true
- name: Run tests
run: bundle exec rake test
20 changes: 20 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v2
71 changes: 71 additions & 0 deletions .github/workflows/heads.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Ruby HEAD Support

env:
K_SOUP_COV_MIN_BRANCH: 62
K_SOUP_COV_MIN_LINE: 87
K_SOUP_COV_MIN_HARD: false

on:
push:
branches:
- 'main'
- '*-maintenance'
- '*-dev'
- '*-stable'
tags:
- '!*' # Do not execute on tags
pull_request:
branches:
- '*'
# Allow manually triggering the workflow.
workflow_dispatch:

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Ruby ${{ matrix.ruby }} ${{matrix.gemfile}} ${{ matrix.name_extra || '' }}
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
strategy:
fail-fast: false
matrix:
experimental: [true]
rubygems:
- latest
bundler:
- latest
gemfile:
- vanilla
ruby:
- "ruby-head"
# NOTE: jruby-head is still @ Ruby 3.1 compat
- "jruby-head"
# NOTE: truffleruby-head is still @ Ruby 3.1 compat
- "truffleruby-head"

runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
steps:
- name: Checkout
uses: actions/checkout@v3
# - uses: awalsh128/cache-apt-pkgs-action@latest
# with:
# packages: dictionaries-common wamerican
# version: 1.0
- name: Install words
run: sudo apt-get install -y dictionaries-common wamerican
- name: Setup Ruby & Bundle
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: ${{ matrix.rubygems }}
bundler: ${{ matrix.bundler }}
bundler-cache: true
- name: Run tests
run: bundle exec rake test
Loading