Skip to content

Commit 515fc47

Browse files
committed
feat: initial version of NestedObjects
0 parents  commit 515fc47

31 files changed

+1626
-0
lines changed

.commitlintrc.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: Continuous Integration
3+
4+
permissions:
5+
contents: read
6+
7+
on:
8+
pull_request:
9+
branches: [main]
10+
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
name: Ruby ${{ matrix.ruby }} on ${{ matrix.operating-system }}
16+
17+
if: >-
18+
github.event_name == 'workflow_dispatch' ||
19+
(github.event_name == 'pull_request' && !startsWith(github.event.pull_request.head.ref, 'release-please--'))
20+
21+
runs-on: ${{ matrix.operating-system }}
22+
continue-on-error: true
23+
24+
env:
25+
FAIL_ON_LOW_COVERAGE: ${{ matrix.fail_on_low_coverage }}
26+
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
# Build on the minimal and maximal Ruby versions supported
31+
ruby: ["3.1", "3.4"]
32+
operating-system: [ubuntu-latest]
33+
fail_on_low_coverage: ["true"]
34+
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
39+
- name: Initialize Ruby
40+
uses: ruby/setup-ruby@v1
41+
with:
42+
ruby-version: ${{ matrix.ruby }}
43+
bundler-cache: true
44+
45+
- name: Run rake
46+
run: bundle exec rake
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Conventional Commits
3+
4+
permissions:
5+
contents: read
6+
7+
on:
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
commit-lint:
14+
name: Verify Conventional Commits
15+
16+
# Skip this job if this is a release PR
17+
if: >-
18+
github.event_name == 'workflow_dispatch' ||
19+
(github.event_name == 'pull_request' && !startsWith(github.event.pull_request.head.ref, 'release-please--'))
20+
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with: { fetch-depth: 0 }
27+
28+
- name: Check Commit Messages
29+
uses: wagoid/commitlint-github-action@v6
30+
with: { configFile: .commitlintrc.yml }
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Experimental Ruby Builds
3+
4+
permissions:
5+
contents: read
6+
7+
on:
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
name: Ruby ${{ matrix.ruby }} on ${{ matrix.operating-system }}
13+
14+
runs-on: ${{ matrix.operating-system }}
15+
continue-on-error: true
16+
17+
env:
18+
FAIL_ON_LOW_COVERAGE: ${{ matrix.fail_on_low_coverage }}
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
ruby: ["head"]
24+
operating-system: [ubuntu-latest]
25+
fail_on_low_coverage: ["true"]
26+
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Initialize Ruby
32+
uses: ruby/setup-ruby@v1
33+
with:
34+
ruby-version: ${{ matrix.ruby }}
35+
bundler-cache: true
36+
37+
- name: Run rake
38+
run: bundle exec rake

.github/workflows/release.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: Release Gem
3+
description: |
4+
This workflow creates a new release on GitHub and publishes the gem to
5+
RubyGems.org.
6+
7+
The workflow uses the `googleapis/release-please-action` to handle the
8+
release creation process and the `rubygems/release-gem` action to publish
9+
the gem.
10+
11+
on:
12+
push:
13+
branches: ["main"]
14+
15+
workflow_dispatch:
16+
17+
jobs:
18+
release:
19+
runs-on: ubuntu-latest
20+
21+
environment:
22+
name: RubyGems
23+
url: https://rubygems.org/gems/nested_objects
24+
25+
permissions:
26+
contents: write
27+
pull-requests: write
28+
id-token: write
29+
30+
steps:
31+
- name: Checkout project
32+
uses: actions/checkout@v4
33+
34+
- name: Create release
35+
uses: googleapis/release-please-action@v4
36+
id: release
37+
with:
38+
token: ${{ secrets.AUTO_RELEASE_TOKEN }}
39+
config-file: release-please-config.json
40+
manifest-file: .release-please-manifest.json
41+
42+
- name: Setup ruby
43+
uses: ruby/setup-ruby@v1
44+
if: ${{ steps.release.outputs.release_created }}
45+
with:
46+
bundler-cache: true
47+
ruby-version: ruby
48+
49+
- name: Push to RubyGems.org
50+
uses: rubygems/release-gem@v1
51+
if: ${{ steps.release.outputs.release_created }}

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/.bundle/
2+
/.yardoc
3+
/_yardoc/
4+
/coverage/
5+
/doc/
6+
/pkg/
7+
/spec/reports/
8+
/tmp/
9+
10+
# rspec failure tracking
11+
.rspec_status
12+
13+
# Rubocop
14+
rubocop-report.json
15+
16+
/Gemfile.lock
17+
.idea
18+
.irb_history
19+
20+
node_modules
21+
package-lock.json

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no-install commitlint --edit "$1"

.markdownlint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
default: true
3+
4+
# Unordered list indentation
5+
MD007: { indent: 2 }
6+
7+
# Line length
8+
MD013: { line_length: 90, tables: false, code_blocks: false }
9+
10+
# Heading duplication is allowed for non-sibling headings
11+
MD024: { siblings_only: true }
12+
13+
# Do not allow the specified trailing punctuation in a header
14+
MD026: { punctuation: ".,;:" }
15+
16+
# Order list items must have a prefix that increases in numerical order
17+
MD029: { style: "ordered" }
18+
19+
# Lists do not need to be surrounded by blank lines
20+
MD032: false
21+
22+
# Allow raw HTML in Markdown
23+
MD033: false
24+
25+
# Allow emphasis to be used instead of a heading
26+
MD036: false

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.1.15"
3+
}

.rspec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--format documentation
2+
--color
3+
--require spec_helper

0 commit comments

Comments
 (0)