yard_example_runner 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.commitlintrc.yml +38 -0
- data/.github/workflows/continuous-integration.yml +47 -0
- data/.github/workflows/enforce_conventional_commits.yml +27 -0
- data/.github/workflows/release.yml +52 -0
- data/.gitignore +28 -0
- data/.husky/commit-msg +1 -0
- data/.markdownlint.yml +25 -0
- data/.release-please-config.json +35 -0
- data/.release-please-manifest.json +3 -0
- data/.rubocop.yml +27 -0
- data/AI_POLICY.md +26 -0
- data/CHANGELOG.md +21 -0
- data/CODE_OF_CONDUCT.md +25 -0
- data/CONTRIBUTING.md +237 -0
- data/GOVERNANCE.md +103 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +23 -0
- data/MAINTAINERS.md +16 -0
- data/README.md +516 -0
- data/Rakefile +59 -0
- data/bin/setup +13 -0
- data/lib/yard/cli/run_examples.rb +297 -0
- data/lib/yard_example_runner/example/comparison.rb +250 -0
- data/lib/yard_example_runner/example/constant_sandbox.rb +123 -0
- data/lib/yard_example_runner/example/evaluator.rb +145 -0
- data/lib/yard_example_runner/example.rb +360 -0
- data/lib/yard_example_runner/expectation.rb +23 -0
- data/lib/yard_example_runner/rake.rb +92 -0
- data/lib/yard_example_runner/version.rb +7 -0
- data/lib/yard_example_runner.rb +134 -0
- data/package.json +12 -0
- data/rake_tasks/cucumber.rake +9 -0
- data/rake_tasks/gem_tasks.rake +12 -0
- data/rake_tasks/markdownlint.rake +6 -0
- data/rake_tasks/rubocop.rake +5 -0
- data/rake_tasks/yard.rake +39 -0
- data/yard_example_runner.gemspec +43 -0
- metadata +251 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 345b261e6c081cd9351aff0a274c6ee9c3aa696b401aa48f2b883690cc1689ae
|
|
4
|
+
data.tar.gz: 23bf543b020fc4c496e514190457d1a3b7218f83cdc8a998224e8e1cb6cf04cc
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: b07b1f30ac4d668eb04450401c9b1941eaa6518c70e04740c6c77a9116f134447e29cc0fe0ed11647d1919f70914f9f7d30fbdcae9433f84319f8b3f644f0366
|
|
7
|
+
data.tar.gz: 39d63edeb4611dbb07ac89b3d5dacb2e4b09e6e9176cf8533bbcb7c63831fe688fed9c99177da561a1a12e29e3586617a3ff55fa1b61cbd63d940d6579dbc868
|
data/.commitlintrc.yml
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
extends: '@commitlint/config-conventional'
|
|
3
|
+
|
|
4
|
+
rules:
|
|
5
|
+
# See: https://commitlint.js.org/reference/rules.html
|
|
6
|
+
#
|
|
7
|
+
# Rules are made up by a name and a configuration array. The configuration
|
|
8
|
+
# array contains:
|
|
9
|
+
#
|
|
10
|
+
# * Severity [0..2]: 0 disable rule, 1 warning if violated, or 2 error if
|
|
11
|
+
# violated
|
|
12
|
+
# * Applicability [always|never]: never inverts the rule
|
|
13
|
+
# * Value: value to use for this rule (if applicable)
|
|
14
|
+
#
|
|
15
|
+
# Run `npx commitlint --print-config` to see the current setting for all
|
|
16
|
+
# rules.
|
|
17
|
+
#
|
|
18
|
+
header-max-length: [2, always, 100] # Header can not exceed 100 chars
|
|
19
|
+
|
|
20
|
+
type-case: [2, always, lower-case] # Type must be lower case
|
|
21
|
+
type-empty: [2, never] # Type must not be empty
|
|
22
|
+
|
|
23
|
+
# Supported conventional commit types
|
|
24
|
+
type-enum: [2, always, [build, ci, chore, docs, feat, fix, perf, refactor, revert, style, test]]
|
|
25
|
+
|
|
26
|
+
scope-case: [2, always, lower-case] # Scope must be lower case
|
|
27
|
+
|
|
28
|
+
# Error if subject is one of these cases (encourages lower-case)
|
|
29
|
+
subject-case: [2, never, [sentence-case, start-case, pascal-case, upper-case]]
|
|
30
|
+
subject-empty: [2, never] # Subject must not be empty
|
|
31
|
+
subject-full-stop: [2, never, "."] # Subject must not end with a period
|
|
32
|
+
|
|
33
|
+
body-leading-blank: [2, always] # Body must have a blank line before it
|
|
34
|
+
body-max-line-length: [2, always, 100] # Body lines can not exceed 100 chars
|
|
35
|
+
|
|
36
|
+
footer-leading-blank: [2, always] # Footer must have a blank line before it
|
|
37
|
+
footer-max-line-length: [2, always, 100] # Footer lines can not exceed 100 chars
|
|
38
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Continuous Integration
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
name: Ruby ${{ matrix.ruby }} on ${{ matrix.operating-system }}
|
|
11
|
+
|
|
12
|
+
# Skip this job if triggered by a release PR
|
|
13
|
+
if: >-
|
|
14
|
+
github.event_name == 'workflow_dispatch' ||
|
|
15
|
+
(github.event_name == 'pull_request' && !startsWith(github.event.pull_request.head.ref, 'release-please--'))
|
|
16
|
+
|
|
17
|
+
runs-on: ${{ matrix.operating-system }}
|
|
18
|
+
continue-on-error: ${{ matrix.experimental == 'Yes' }}
|
|
19
|
+
|
|
20
|
+
strategy:
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix:
|
|
23
|
+
# Only tested on non-EOL Ruby versions
|
|
24
|
+
ruby: ["3.3", "3.4", "4.0"]
|
|
25
|
+
operating-system: [ubuntu-latest]
|
|
26
|
+
experimental: [No]
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
- name: Checkout Code
|
|
30
|
+
uses: actions/checkout@v6
|
|
31
|
+
|
|
32
|
+
- name: Setup Ruby
|
|
33
|
+
uses: ruby/setup-ruby@v1
|
|
34
|
+
with:
|
|
35
|
+
ruby-version: ${{ matrix.ruby }}
|
|
36
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
|
37
|
+
|
|
38
|
+
- name: Setup Node
|
|
39
|
+
uses: actions/setup-node@v6
|
|
40
|
+
with:
|
|
41
|
+
node-version: 'lts/*'
|
|
42
|
+
|
|
43
|
+
- name: Install Node dependencies
|
|
44
|
+
run: npm ci || npm install
|
|
45
|
+
|
|
46
|
+
- name: Run Build
|
|
47
|
+
run: bundle exec rake default
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Conventional Commits
|
|
3
|
+
|
|
4
|
+
permissions:
|
|
5
|
+
contents: read
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
pull_request:
|
|
9
|
+
branches: ["main"]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
commit-lint:
|
|
13
|
+
name: Verify Conventional Commits
|
|
14
|
+
|
|
15
|
+
# Skip this job if this is a release PR
|
|
16
|
+
if: (github.event_name == 'pull_request' && !startsWith(github.event.pull_request.head.ref, 'release-please--'))
|
|
17
|
+
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout
|
|
22
|
+
uses: actions/checkout@v6
|
|
23
|
+
with: { fetch-depth: 0 }
|
|
24
|
+
|
|
25
|
+
- name: Check Commit Messages
|
|
26
|
+
uses: wagoid/commitlint-github-action@v6
|
|
27
|
+
with: { configFile: .commitlintrc.yml }
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Release Gem
|
|
3
|
+
|
|
4
|
+
description: |
|
|
5
|
+
This workflow creates a new release on GitHub and publishes the gem to
|
|
6
|
+
RubyGems.org.
|
|
7
|
+
|
|
8
|
+
The workflow uses the `googleapis/release-please-action` to handle the
|
|
9
|
+
release creation process and the `rubygems/release-gem` action to publish
|
|
10
|
+
the gem to rubygems.org
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
push:
|
|
14
|
+
branches: ["main"]
|
|
15
|
+
|
|
16
|
+
workflow_dispatch:
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
release:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
|
|
22
|
+
environment:
|
|
23
|
+
name: RubyGems
|
|
24
|
+
url: https://rubygems.org/gems/yard_example_runner
|
|
25
|
+
|
|
26
|
+
permissions:
|
|
27
|
+
contents: write
|
|
28
|
+
pull-requests: write
|
|
29
|
+
id-token: write
|
|
30
|
+
|
|
31
|
+
steps:
|
|
32
|
+
- name: Checkout project
|
|
33
|
+
uses: actions/checkout@v4
|
|
34
|
+
|
|
35
|
+
- name: Create release
|
|
36
|
+
uses: googleapis/release-please-action@v4
|
|
37
|
+
id: release
|
|
38
|
+
with:
|
|
39
|
+
token: ${{ secrets.AUTO_RELEASE_TOKEN }}
|
|
40
|
+
config-file: .release-please-config.json
|
|
41
|
+
manifest-file: .release-please-manifest.json
|
|
42
|
+
|
|
43
|
+
- name: Setup ruby
|
|
44
|
+
uses: ruby/setup-ruby@v1
|
|
45
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
46
|
+
with:
|
|
47
|
+
bundler-cache: true
|
|
48
|
+
ruby-version: ruby
|
|
49
|
+
|
|
50
|
+
- name: Push to RubyGems.org
|
|
51
|
+
uses: rubygems/release-gem@v1
|
|
52
|
+
if: ${{ steps.release.outputs.release_created }}
|
data/.gitignore
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
_yardoc
|
|
3
|
+
.bundle
|
|
4
|
+
.config
|
|
5
|
+
.DS_Store
|
|
6
|
+
.rspec_status
|
|
7
|
+
.yardoc
|
|
8
|
+
.yardoc
|
|
9
|
+
*.gem
|
|
10
|
+
*.kpf
|
|
11
|
+
*.rbc
|
|
12
|
+
*.sw?
|
|
13
|
+
coverage
|
|
14
|
+
doc
|
|
15
|
+
doc/
|
|
16
|
+
Gemfile.lock
|
|
17
|
+
InstalledFiles
|
|
18
|
+
lib/bundler/man
|
|
19
|
+
node_modules
|
|
20
|
+
package-lock.json
|
|
21
|
+
pkg
|
|
22
|
+
rdoc
|
|
23
|
+
rdoc
|
|
24
|
+
rubocop-report.json
|
|
25
|
+
spec/reports
|
|
26
|
+
test/tmp
|
|
27
|
+
test/version_tmp
|
|
28
|
+
tmp
|
data/.husky/commit-msg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
npx --no-install commitlint --edit "$1"
|
data/.markdownlint.yml
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
default: true
|
|
2
|
+
|
|
3
|
+
# Unordered list indentation
|
|
4
|
+
MD007: { indent: 2 }
|
|
5
|
+
|
|
6
|
+
# Line length
|
|
7
|
+
MD013: { line_length: 90, tables: false, code_blocks: false }
|
|
8
|
+
|
|
9
|
+
# Heading duplication is allowed for non-sibling headings
|
|
10
|
+
MD024: { siblings_only: true }
|
|
11
|
+
|
|
12
|
+
# Do not allow the specified trailing punctuation in a header
|
|
13
|
+
MD026: { punctuation: '.,;:' }
|
|
14
|
+
|
|
15
|
+
# Order list items must have a prefix that increases in numerical order
|
|
16
|
+
MD029: { style: 'ordered' }
|
|
17
|
+
|
|
18
|
+
# Lists do not need to be surrounded by blank lines
|
|
19
|
+
MD032: false
|
|
20
|
+
|
|
21
|
+
# Allow raw HTML in Markdown
|
|
22
|
+
MD033: false
|
|
23
|
+
|
|
24
|
+
# Allow emphasis to be used instead of a heading
|
|
25
|
+
MD036: false
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"packages": {
|
|
3
|
+
".": {
|
|
4
|
+
"release-type": "ruby",
|
|
5
|
+
"package-name": "yard_example_runner",
|
|
6
|
+
"changelog-path": "CHANGELOG.md",
|
|
7
|
+
"version-file": "lib/yard_example_runner/version.rb",
|
|
8
|
+
"bump-minor-pre-major": true,
|
|
9
|
+
"bump-patch-for-minor-pre-major": true,
|
|
10
|
+
"draft": false,
|
|
11
|
+
"versioning-strategy": "default",
|
|
12
|
+
"include-component-in-tag": false,
|
|
13
|
+
"pull-request-title-pattern": "chore: release v${version}",
|
|
14
|
+
"changelog-sections": [
|
|
15
|
+
{ "type": "feat", "section": "Features", "hidden": false },
|
|
16
|
+
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
|
|
17
|
+
{ "type": "build", "section": "Other Changes", "hidden": false },
|
|
18
|
+
{ "type": "chore", "section": "Other Changes", "hidden": false },
|
|
19
|
+
{ "type": "ci", "section": "Other Changes", "hidden": false },
|
|
20
|
+
{ "type": "docs", "section": "Other Changes", "hidden": false },
|
|
21
|
+
{ "type": "perf", "section": "Other Changes", "hidden": false },
|
|
22
|
+
{ "type": "refactor", "section": "Other Changes", "hidden": false },
|
|
23
|
+
{ "type": "revert", "section": "Other Changes", "hidden": false },
|
|
24
|
+
{ "type": "style", "section": "Other Changes", "hidden": false },
|
|
25
|
+
{ "type": "test", "section": "Other Changes", "hidden": false }
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"plugins": [
|
|
30
|
+
{
|
|
31
|
+
"type": "sentence-case"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
|
35
|
+
}
|
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
inherit_gem:
|
|
2
|
+
main_branch_shared_rubocop_config: config/rubocop.yml
|
|
3
|
+
|
|
4
|
+
inherit_mode:
|
|
5
|
+
merge:
|
|
6
|
+
- Exclude
|
|
7
|
+
|
|
8
|
+
Naming/FileName:
|
|
9
|
+
Exclude:
|
|
10
|
+
- 'lib/yard_example_runner.rb'
|
|
11
|
+
|
|
12
|
+
Style/DocumentDynamicEvalDefinition:
|
|
13
|
+
Exclude:
|
|
14
|
+
- 'lib/yard_example_runner/example.rb'
|
|
15
|
+
- 'lib/yard_example_runner/example/evaluator.rb'
|
|
16
|
+
|
|
17
|
+
# Allow test data to have long lines
|
|
18
|
+
Layout/LineLength:
|
|
19
|
+
Exclude:
|
|
20
|
+
- "*.gemspec"
|
|
21
|
+
|
|
22
|
+
Metrics/BlockLength:
|
|
23
|
+
Exclude:
|
|
24
|
+
- "*.gemspec"
|
|
25
|
+
|
|
26
|
+
AllCops:
|
|
27
|
+
TargetRubyVersion: 3.3
|
data/AI_POLICY.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
# @markup markdown
|
|
3
|
+
# @title AI Policy
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
# AI Policy
|
|
7
|
+
|
|
8
|
+
AI-assisted contributions are welcome.
|
|
9
|
+
|
|
10
|
+
This policy applies to code, documentation, issue content, and pull request text.
|
|
11
|
+
|
|
12
|
+
Reviewing and maintaining code requires human insight. While AI tools can be helpful
|
|
13
|
+
assistants, they are no substitute for human judgment and creativity.
|
|
14
|
+
|
|
15
|
+
We value the unique perspectives and critical thinking that our contributors bring.
|
|
16
|
+
If you use AI tools to assist your work:
|
|
17
|
+
|
|
18
|
+
1. **You are responsible**: You must review and understand every line of code or text
|
|
19
|
+
you submit.
|
|
20
|
+
2. **Focus on quality**: Ensure that AI-generated content meets our standards for
|
|
21
|
+
correctness, readability, and security, and respects all licensing requirements.
|
|
22
|
+
3. **Be transparent**: We encourage you to disclose when substantial portions of your
|
|
23
|
+
contribution were AI-generated.
|
|
24
|
+
|
|
25
|
+
Ultimately, the quality of this project depends on *your* expertise. Use tools
|
|
26
|
+
wisely, but lead with your own intelligence.
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
# @markup markdown
|
|
3
|
+
# @title Change Log
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
# Changelog
|
|
7
|
+
|
|
8
|
+
## [0.1.0](https://github.com/main-branch/yard_example_runner/compare/v0.0.0...v0.1.0) (2026-02-26)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### ⚠ BREAKING CHANGES
|
|
12
|
+
|
|
13
|
+
* initial implementation of yard_example_runner
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* Initial implementation of yard_example_runner ([d17d08c](https://github.com/main-branch/yard_example_runner/commit/d17d08cdd39bf533780dfe569953de3d72dd5327))
|
|
18
|
+
|
|
19
|
+
## [Unreleased]
|
|
20
|
+
|
|
21
|
+
- No changes yet.
|
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
# @markup markdown
|
|
3
|
+
# @title Code of Conduct
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
# Code of Conduct
|
|
7
|
+
|
|
8
|
+
This project has adopted the [Ruby Community Code of
|
|
9
|
+
Conduct](https://www.ruby-lang.org/en/conduct/).
|
|
10
|
+
|
|
11
|
+
This document provides community guidelines for a safe, respectful, productive, and
|
|
12
|
+
collaborative place for anyone willing to contribute to the Ruby
|
|
13
|
+
community. It applies to all collaborative spaces, including community communications
|
|
14
|
+
channels (such as mailing lists, submitted patches, commit comments, etc.).
|
|
15
|
+
|
|
16
|
+
- Participants must be tolerant of opposing views.
|
|
17
|
+
- Participants must ensure that their language and actions are free of personal
|
|
18
|
+
attacks and disparaging personal remarks.
|
|
19
|
+
- When interpreting the words and actions of others, participants should always
|
|
20
|
+
assume good intentions.
|
|
21
|
+
- Behavior that can reasonably be considered harassment will not be tolerated.
|
|
22
|
+
|
|
23
|
+
Report violations to the maintainers by [opening an
|
|
24
|
+
issue](https://github.com/main-branch/yard_example_runner/issues/new) or contacting a
|
|
25
|
+
[maintainer](MAINTAINERS.md) privately.
|
data/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
# @markup markdown
|
|
3
|
+
# @title How To Contribute
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
# Contributing to this project
|
|
7
|
+
|
|
8
|
+
- [Summary](#summary)
|
|
9
|
+
- [How to contribute](#how-to-contribute)
|
|
10
|
+
- [How to report an issue or request a feature](#how-to-report-an-issue-or-request-a-feature)
|
|
11
|
+
- [How to submit a code or documentation change](#how-to-submit-a-code-or-documentation-change)
|
|
12
|
+
- [Commit message guidelines](#commit-message-guidelines)
|
|
13
|
+
- [What does this mean for contributors?](#what-does-this-mean-for-contributors)
|
|
14
|
+
- [What to know about Conventional Commits](#what-to-know-about-conventional-commits)
|
|
15
|
+
- [Create a pull request](#create-a-pull-request)
|
|
16
|
+
- [Get your pull request reviewed](#get-your-pull-request-reviewed)
|
|
17
|
+
- [Branch strategy](#branch-strategy)
|
|
18
|
+
- [AI-assisted contributions](#ai-assisted-contributions)
|
|
19
|
+
- [Coding standards](#coding-standards)
|
|
20
|
+
- [Tests](#tests)
|
|
21
|
+
- [RuboCop](#rubocop)
|
|
22
|
+
- [Markdownlint](#markdownlint)
|
|
23
|
+
- [Licensing](#licensing)
|
|
24
|
+
|
|
25
|
+
## Summary
|
|
26
|
+
|
|
27
|
+
This document provides guidelines for contributing to this project. These guidelines
|
|
28
|
+
do not cover every situation; use your best judgment when contributing.
|
|
29
|
+
|
|
30
|
+
If you have suggestions for improving these guidelines, please propose changes via a
|
|
31
|
+
pull request.
|
|
32
|
+
|
|
33
|
+
Please also review and adhere to our [Code of Conduct](CODE_OF_CONDUCT.md) when
|
|
34
|
+
participating in the project. Governance and maintainer expectations are described in
|
|
35
|
+
[GOVERNANCE.md](GOVERNANCE.md).
|
|
36
|
+
|
|
37
|
+
## How to contribute
|
|
38
|
+
|
|
39
|
+
You can contribute in the following ways:
|
|
40
|
+
|
|
41
|
+
1. [Report an issue or request a
|
|
42
|
+
feature](#how-to-report-an-issue-or-request-a-feature)
|
|
43
|
+
2. [Submit a code or documentation
|
|
44
|
+
change](#how-to-submit-a-code-or-documentation-change)
|
|
45
|
+
|
|
46
|
+
## How to report an issue or request a feature
|
|
47
|
+
|
|
48
|
+
`yard_example_runner` uses [GitHub
|
|
49
|
+
Issues](https://docs.github.com/issues/tracking-your-work-with-issues/about-issues)
|
|
50
|
+
for issue tracking and feature requests.
|
|
51
|
+
|
|
52
|
+
To report an issue or request a feature, please [create a `yard_example_runner`
|
|
53
|
+
GitHub issue](https://github.com/main-branch/yard_example_runner/issues/new). Fill in
|
|
54
|
+
the template as thoroughly as possible to describe the issue or feature request.
|
|
55
|
+
|
|
56
|
+
## How to submit a code or documentation change
|
|
57
|
+
|
|
58
|
+
There is a three-step process for submitting code or documentation changes:
|
|
59
|
+
|
|
60
|
+
1. Commit your changes to a fork of this repository using [Conventional
|
|
61
|
+
Commits](#commit-message-guidelines)
|
|
62
|
+
2. [Create a pull request](#create-a-pull-request)
|
|
63
|
+
3. [Get your pull request reviewed](#get-your-pull-request-reviewed)
|
|
64
|
+
|
|
65
|
+
### Commit message guidelines
|
|
66
|
+
|
|
67
|
+
The `yard_example_runner` project has adopted the [Conventional Commits
|
|
68
|
+
standard](https://www.conventionalcommits.org/en/v1.0.0/) for all commit messages.
|
|
69
|
+
|
|
70
|
+
This structured approach to commit messages allows us to:
|
|
71
|
+
|
|
72
|
+
- **Automate versioning and releases:** Tools can now automatically determine the
|
|
73
|
+
semantic version bump (patch, minor, major) based on the types of commits merged.
|
|
74
|
+
- **Generate accurate changelogs:** We can automatically create and update a
|
|
75
|
+
`CHANGELOG.md` file, providing a clear history of changes for users and
|
|
76
|
+
contributors.
|
|
77
|
+
- **Improve commit history readability:** A standardized format makes it easier for
|
|
78
|
+
everyone to understand the nature of changes at a glance.
|
|
79
|
+
|
|
80
|
+
#### What does this mean for contributors?
|
|
81
|
+
|
|
82
|
+
All commits to this repository **MUST** adhere to the [Conventional Commits
|
|
83
|
+
standard](https://www.conventionalcommits.org/en/v1.0.0/). Commits not adhering to
|
|
84
|
+
this standard will cause the CI build to fail. PRs will not be merged if they include
|
|
85
|
+
non-conventional commits.
|
|
86
|
+
|
|
87
|
+
A git `commit-msg` hook can be installed to validate conventional commit messages by
|
|
88
|
+
running `bin/setup` in the project root.
|
|
89
|
+
|
|
90
|
+
#### What to know about Conventional Commits
|
|
91
|
+
|
|
92
|
+
The simplest conventional commit is in the form `type: description` where `type`
|
|
93
|
+
indicates the type of change and `description` is your usual commit message (with
|
|
94
|
+
some limitations).
|
|
95
|
+
|
|
96
|
+
- Common types include: `feat`, `fix`, `docs`, `test`, `refactor`, and `chore`. See
|
|
97
|
+
the full list of supported types in [.commitlintrc.yml](.commitlintrc.yml).
|
|
98
|
+
- The description must (1) not start with an upper case letter, (2) be no more than
|
|
99
|
+
100 characters, and (3) not end with punctuation.
|
|
100
|
+
|
|
101
|
+
Examples of valid commits:
|
|
102
|
+
|
|
103
|
+
- `feat: add support for asserting raised exceptions in examples`
|
|
104
|
+
- `fix: exception thrown when example output contains special characters`
|
|
105
|
+
- `docs: add shared context examples to README`
|
|
106
|
+
|
|
107
|
+
Commits that include breaking changes must include an exclamation mark before the
|
|
108
|
+
colon:
|
|
109
|
+
|
|
110
|
+
- `feat!: renamed YardExampleRunner::Runner to YardExampleRunner::ExampleRunner`
|
|
111
|
+
|
|
112
|
+
The commit messages will drive how the version is incremented for each release:
|
|
113
|
+
|
|
114
|
+
- a release containing a **breaking change** will do a **major** version increment
|
|
115
|
+
- a release containing a **new feature** will do a **minor** increment
|
|
116
|
+
- a release containing **neither a breaking change nor a new feature** will do a
|
|
117
|
+
**patch** version increment
|
|
118
|
+
|
|
119
|
+
The full conventional commit format is:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
<type>[optional scope][!]: <description>
|
|
123
|
+
|
|
124
|
+
[optional body]
|
|
125
|
+
|
|
126
|
+
[optional footer(s)]
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
- `optional body` may include multiple lines of descriptive text limited to 100 chars
|
|
130
|
+
each
|
|
131
|
+
- `optional footers` typically use `BREAKING CHANGE: <description>` where description
|
|
132
|
+
should describe the nature of the backward incompatibility.
|
|
133
|
+
|
|
134
|
+
Use of the `BREAKING CHANGE:` footer flags a backward incompatible change even if it
|
|
135
|
+
is not flagged with an exclamation mark after the `type`. Other footers are allowed
|
|
136
|
+
but not acted upon.
|
|
137
|
+
|
|
138
|
+
See [the Conventional Commits
|
|
139
|
+
specification](https://www.conventionalcommits.org/en/v1.0.0/) for more details.
|
|
140
|
+
|
|
141
|
+
### Create a pull request
|
|
142
|
+
|
|
143
|
+
If you are not familiar with GitHub Pull Requests, please refer to [this
|
|
144
|
+
article](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).
|
|
145
|
+
|
|
146
|
+
Follow the instructions in the pull request template.
|
|
147
|
+
|
|
148
|
+
### Get your pull request reviewed
|
|
149
|
+
|
|
150
|
+
Code review takes place in a GitHub pull request using the [GitHub pull request
|
|
151
|
+
review
|
|
152
|
+
feature](https://docs.github.com/pull-requests/collaborating-with-pull-requests/getting-started/helping-others-review-your-changes).
|
|
153
|
+
|
|
154
|
+
Once your pull request is ready for review, request a review from at least one
|
|
155
|
+
[maintainer](MAINTAINERS.md) and any other contributors you deem necessary.
|
|
156
|
+
|
|
157
|
+
During the review process, you may need to make additional commits. Before merging,
|
|
158
|
+
your branch must be up to date with `main` and merge cleanly. Keep history focused
|
|
159
|
+
and easy to review.
|
|
160
|
+
|
|
161
|
+
At least one approval from a project maintainer is required before your pull request
|
|
162
|
+
can be merged. The maintainer is responsible for ensuring that the pull request meets
|
|
163
|
+
[the project's coding standards](#coding-standards).
|
|
164
|
+
|
|
165
|
+
## Branch strategy
|
|
166
|
+
|
|
167
|
+
Development happens on feature branches in a fork of this repository. Changes are
|
|
168
|
+
merged into `main` of this repository via pull requests. **Never commit directly to
|
|
169
|
+
`main` of this repository.** This ensures proper code review, CI validation, and
|
|
170
|
+
maintains a clean commit history.
|
|
171
|
+
|
|
172
|
+
## AI-assisted contributions
|
|
173
|
+
|
|
174
|
+
AI-assisted contributions are welcome. Please review and apply our [AI
|
|
175
|
+
Policy](AI_POLICY.md) before submitting changes. You are responsible for
|
|
176
|
+
understanding and verifying any AI-assisted work included in PRs and ensuring it
|
|
177
|
+
meets our standards for quality, security, and licensing.
|
|
178
|
+
|
|
179
|
+
## Coding standards
|
|
180
|
+
|
|
181
|
+
To ensure high-quality contributions, all pull requests must meet the following
|
|
182
|
+
requirements:
|
|
183
|
+
|
|
184
|
+
### Tests
|
|
185
|
+
|
|
186
|
+
- All changes must be accompanied by new or modified tests.
|
|
187
|
+
- The entire test suite must pass when `bundle exec rake` is run from the project's
|
|
188
|
+
local working copy.
|
|
189
|
+
|
|
190
|
+
This project uses [Cucumber](https://cucumber.io/) with
|
|
191
|
+
[Aruba](https://github.com/cucumber/aruba) for system-level tests. Tests live in the
|
|
192
|
+
`features/` directory.
|
|
193
|
+
|
|
194
|
+
To run the tests:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
bundle exec rake cucumber
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
New and updated public-facing features should be documented in the project's
|
|
201
|
+
[README.md](README.md).
|
|
202
|
+
|
|
203
|
+
### RuboCop
|
|
204
|
+
|
|
205
|
+
All Ruby code must pass [RuboCop](https://rubocop.org/) static analysis. Violations
|
|
206
|
+
will cause the CI build to fail. PRs will not be merged if they include RuboCop
|
|
207
|
+
offenses.
|
|
208
|
+
|
|
209
|
+
To run RuboCop:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
bundle exec rake rubocop
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Markdownlint
|
|
216
|
+
|
|
217
|
+
All Markdown files must pass [markdownlint](https://github.com/DavidAnson/markdownlint)
|
|
218
|
+
analysis. Violations will cause the CI build to fail. PRs will not be merged if they
|
|
219
|
+
include markdownlint offenses.
|
|
220
|
+
|
|
221
|
+
To run markdownlint:
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
bundle exec rake markdownlint
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
All coding standards checks are run together with the default `rake` command:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
bundle exec rake
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## Licensing
|
|
234
|
+
|
|
235
|
+
`yard_example_runner` uses [the MIT
|
|
236
|
+
license](https://choosealicense.com/licenses/mit/) as declared in the
|
|
237
|
+
[LICENSE](LICENSE.txt) file.
|