Skip to content

Commit 047fb4f

Browse files
committed
Initial project skeleton
Ruby gem skeleton for the JSONLT specification with: - lib/jsonlt/ structure with Table stub implementation - Minitest test framework with unit/conformance categories - RuboCop for linting with rubocop-minitest and rubocop-rake - GitHub Actions CI with lint and test matrix (Ruby 3.2-3.4) - Development tooling via uv (codespell, vale, yamllint, prek) - Node.js tooling via pnpm (biome, markdownlint) - Justfile task runner matching workspace conventions
0 parents  commit 047fb4f

34 files changed

+2427
-0
lines changed

.editorconfig

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# https://editorconfig.org
2+
3+
# Top-most EditorConfig file
4+
root = true
5+
6+
# Default settings for all files
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
# Ruby files
14+
[*.rb]
15+
indent_style = space
16+
indent_size = 2
17+
max_line_length = 120
18+
19+
[*.rbs]
20+
indent_style = space
21+
indent_size = 2
22+
23+
# HTML and ERB templates
24+
[*.{html,erb}]
25+
indent_style = space
26+
indent_size = 2
27+
28+
# CSS and preprocessor files
29+
[*.css]
30+
indent_style = space
31+
indent_size = 2
32+
33+
# JavaScript and TypeScript
34+
[*.{js,ts}]
35+
indent_style = space
36+
indent_size = 2
37+
38+
# JSON files
39+
[*.{json,jsonc}]
40+
indent_style = space
41+
indent_size = 2
42+
43+
# YAML files
44+
[*.{yml,yaml}]
45+
indent_style = space
46+
indent_size = 2
47+
48+
# Markdown files
49+
[*.md]
50+
trim_trailing_whitespace = false
51+
max_line_length = off
52+
53+
# Bikeshed files
54+
[*.bs]
55+
trim_trailing_whitespace = false
56+
max_line_length = off
57+
58+
# Justfiles
59+
[Justfile]
60+
indent_style = space
61+
indent_size = 2
62+
63+
# Shell scripts
64+
[*.sh]
65+
indent_style = space
66+
indent_size = 2
67+
68+
# Configuration files
69+
[*.{ini,cfg,conf}]
70+
indent_style = space
71+
indent_size = 2
72+
73+
# XML and SVG files
74+
[*.{xml,svg}]
75+
indent_style = space
76+
indent_size = 2
77+
78+
# Gemspec and Rakefile
79+
[{Gemfile,Rakefile,*.gemspec}]
80+
indent_style = space
81+
indent_size = 2

.github/workflows/ci.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
name: CI
3+
4+
on:
5+
pull_request:
6+
branches: [main]
7+
push:
8+
branches: [main]
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
lint:
20+
name: Lint
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 15
23+
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
27+
28+
- name: Set up Ruby
29+
uses: ruby/setup-ruby@ae195bbe749a7cef685ac729197124a48305c1cb # v1.276.0
30+
with:
31+
ruby-version: "3.2"
32+
bundler-cache: true
33+
34+
- name: Install uv
35+
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
36+
with:
37+
python-version: "3.14"
38+
enable-cache: true
39+
40+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
41+
name: Install pnpm
42+
with:
43+
run_install: true
44+
45+
- name: Install Node.js
46+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
47+
with:
48+
node-version: 24
49+
cache: "pnpm"
50+
51+
- name: Install just
52+
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
53+
54+
- name: Install dependencies
55+
run: just install
56+
57+
- name: Run linters
58+
run: just lint
59+
60+
- name: Lint GitHub Actions workflows
61+
uses: reviewdog/action-actionlint@83e4ed25b168066ad8f62f5afbb29ebd8641d982 # v1.69.1
62+
63+
test:
64+
name: "Test (Ruby ${{ matrix.ruby-version }})"
65+
needs: lint
66+
runs-on: ubuntu-latest
67+
timeout-minutes: 15
68+
strategy:
69+
fail-fast: false
70+
matrix:
71+
ruby-version: ["3.2", "3.3", "3.4"]
72+
73+
steps:
74+
- name: Checkout code
75+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
76+
77+
- name: Set up Ruby
78+
uses: ruby/setup-ruby@ae195bbe749a7cef685ac729197124a48305c1cb # v1.276.0
79+
with:
80+
ruby-version: ${{ matrix.ruby-version }}
81+
bundler-cache: true
82+
83+
- name: Install uv
84+
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
85+
with:
86+
python-version: "3.14"
87+
enable-cache: true
88+
89+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
90+
name: Install pnpm
91+
with:
92+
run_install: true
93+
94+
- name: Install Node.js
95+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
96+
with:
97+
node-version: 24
98+
cache: "pnpm"
99+
100+
- name: Install just
101+
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
102+
103+
- name: Run tests
104+
run: just test-coverage

.gitignore

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Ruby build artifacts
2+
*.gem
3+
*.rbc
4+
/.config
5+
/coverage/
6+
/InstalledFiles
7+
/pkg/
8+
/spec/reports/
9+
/tmp/
10+
11+
# Bundler
12+
/.bundle/
13+
/vendor/bundle/
14+
Gemfile.lock
15+
16+
# RDoc/YARD documentation cache
17+
/.yardoc/
18+
/_yardoc/
19+
/doc/
20+
/rdoc/
21+
22+
# Environment
23+
/.env
24+
/.envrc
25+
.env.*
26+
!.env.example
27+
28+
# Testing
29+
/.rspec_status
30+
/coverage/
31+
32+
# Type checking
33+
/.typeprof.lock
34+
/typeprof.log
35+
36+
# IDE/Editor (commented - prefer global gitignore)
37+
# .idea/
38+
# .vscode/
39+
40+
# Project-specific local files
41+
.internal/
42+
.benchmarks/
43+
.claude/
44+
45+
# Node.js (for markdownlint and biome)
46+
node_modules/
47+
48+
# Python (for dev tools: codespell, vale, yamllint, prek)
49+
.venv/
50+
__pycache__/
51+
52+
# Local configuration
53+
mise.local.toml
54+
tmp/
55+
56+
# Vale styles (synced from packages via `vale sync`)
57+
.vale/
58+
59+
# SBOM files
60+
*.cdx.json

.markdownlint-cli2.jsonc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"config": {
3+
"line-length": false,
4+
"reference-links-images": false,
5+
"link-image-reference-definitions": false,
6+
"first-line-h1": false,
7+
"no-emphasis-as-heading": false,
8+
"no-duplicate-heading": false,
9+
"no-inline-html": false,
10+
"code-block-style": false,
11+
"link-fragments": false,
12+
"list-marker-space": false
13+
},
14+
"customRules": [],
15+
"gitignore": true,
16+
"ignores": [".oaps/**", ".claude/**", "tmp/**"],
17+
"noBanner": true,
18+
"noInlineConfig": true,
19+
"noProgress": true,
20+
"showFound": true
21+
}

.pre-commit-config.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
default_stages: [pre-commit, pre-push]
3+
4+
repos:
5+
- repo: builtin
6+
hooks:
7+
- id: check-case-conflict
8+
- id: check-executables-have-shebangs
9+
- id: check-merge-conflict
10+
- id: check-symlinks
11+
- id: end-of-file-fixer
12+
- id: fix-byte-order-marker
13+
- id: mixed-line-ending
14+
- id: trailing-whitespace
15+
16+
- repo: https://github.com/adrienverge/yamllint
17+
rev: 79a6b2b1392eaf49cdd32ac4f14be1a809bbd8f7 # v1.37.1
18+
hooks:
19+
- id: yamllint
20+
name: Check YAML files with yamllint
21+
entry: yamllint -c .yamllint.yaml --strict
22+
types: [yaml]
23+
exclude: >
24+
(?x) ^.*pnpm-lock\.yaml$
25+
26+
- repo: https://github.com/codespell-project/codespell
27+
rev: 63c8f8312b7559622c0d82815639671ae42132ac # v2.4.1
28+
hooks:
29+
- id: codespell
30+
exclude: (^\.)
31+
32+
- repo: https://github.com/rhysd/actionlint
33+
rev: e7d448ef7507c20fc4c88a95d0c448b848cd6127 # v1.7.8
34+
hooks:
35+
- id: actionlint
36+
37+
- repo: https://github.com/errata-ai/vale
38+
rev: 27593b0e0e7eb8f0c2b7fae0d93fa1cfaabceb2f # v3.13.0
39+
hooks:
40+
- id: vale
41+
42+
- repo: local
43+
hooks:
44+
- id: local-biome-check
45+
name: biome check
46+
entry: pnpm exec biome check --write --files-ignore-unknown=true --no-errors-on-unmatched
47+
language: system
48+
types: [text]
49+
files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?|css|svelte|vue|astro|graphql|gql)$"
50+
51+
- id: local-rubocop
52+
name: rubocop
53+
entry: bundle exec rubocop --autocorrect
54+
language: system
55+
types: [ruby]

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.14

.rubocop.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
plugins:
3+
- rubocop-minitest
4+
- rubocop-rake
5+
6+
AllCops:
7+
TargetRubyVersion: 3.2
8+
NewCops: enable
9+
SuggestExtensions: false
10+
Exclude:
11+
- "vendor/**/*"
12+
- "pkg/**/*"
13+
- "tmp/**/*"
14+
- "node_modules/**/*"
15+
16+
# Style preferences
17+
Style/StringLiterals:
18+
EnforcedStyle: double_quotes
19+
20+
Style/StringLiteralsInInterpolation:
21+
EnforcedStyle: double_quotes
22+
23+
Style/FrozenStringLiteralComment:
24+
Enabled: true
25+
EnforcedStyle: always
26+
27+
Style/Documentation:
28+
Enabled: false
29+
30+
# Layout preferences
31+
Layout/LineLength:
32+
Max: 120
33+
AllowedPatterns:
34+
- "^\\s*#"
35+
- "https?://"
36+
37+
Layout/MultilineMethodCallIndentation:
38+
EnforcedStyle: indented
39+
40+
Layout/ArgumentAlignment:
41+
EnforcedStyle: with_first_argument
42+
43+
# Metrics
44+
Metrics/AbcSize:
45+
Max: 20
46+
47+
Metrics/MethodLength:
48+
Max: 15
49+
50+
Metrics/ClassLength:
51+
Max: 150
52+
53+
Metrics/BlockLength:
54+
Exclude:
55+
- "test/**/*"
56+
- "*.gemspec"
57+
- "Rakefile"
58+
59+
# Naming
60+
Naming/FileName:
61+
Exclude:
62+
- "Gemfile"
63+
- "Rakefile"
64+
65+
# Minitest-specific
66+
Minitest/MultipleAssertions:
67+
Max: 10
68+
69+
# Gemspec
70+
Gemspec/DevelopmentDependencies:
71+
Enabled: false

0 commit comments

Comments
 (0)