schema-model 0.7.0 → 0.7.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 274769a5b3652ece9a8c2583a8867310882800377563f7e5e8eb387a219ea4a3
4
- data.tar.gz: f42a01e476eeb0101df7e5fbaa8bb9fde390637016876ed749a1f1f850d0ae0e
3
+ metadata.gz: 53c13ff970f92e81b387ef19cb957afed64e77ec42ff63998a2d73fd2c383849
4
+ data.tar.gz: fe073187e725a642bc9e38a43798d99c5388bfad239e709c6d0d8be1c8cf699a
5
5
  SHA512:
6
- metadata.gz: cef6b96d50da9c84ac9b80afd6c74f6f941668eecea8d7d6dd5260e3e73b0163f7906deb86af4f7bca141efbdccd3fffa2d12d6955fa7986ccc889c89c472194
7
- data.tar.gz: 4372f3250e704cc8569411659663fc946ab3f87b2ea7a6255aca7966dde8dbcff8e2ef8eec50ece7aa3bba5f4ebc01ea352219f79c743db32974663f807e5440
6
+ metadata.gz: 8186811e01c702fd082948daccc4ec5f0aaf67afefe15c0ca4200557e0b7397178eb0dcdb4ad1c44500d7284b8da31d6f607f4ae8f5652b3bff3fd66512cc0cd
7
+ data.tar.gz: 4d8b2fc23e68a4209571ce131b893dfa250ad85cf61f37fae48a47098d1fb4cda6730171c32a3c86dfb406f55cafea10a28ff3b65b8b1e33870801c4cfc39c3d
@@ -3,51 +3,91 @@ name: CI
3
3
  on:
4
4
  push:
5
5
  branches: [master]
6
+ # release-please PRs change only these files. Their runs are triggered by
7
+ # github-actions[bot], which GitHub holds for approval until they expire as
8
+ # failures; release.yml runs this workflow before publishing anyway. A PR is
9
+ # skipped only if every file it changes is listed here.
6
10
  pull_request:
7
- branches: [master]
11
+ paths-ignore:
12
+ - CHANGELOG.md
13
+ - .release-please-manifest.json
14
+ - lib/schema/version.rb
15
+ workflow_call:
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ concurrency:
21
+ group: ci-${{ github.workflow }}-${{ github.ref }}
22
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
8
23
 
9
24
  jobs:
10
25
  lint:
11
26
  name: RuboCop
12
27
  runs-on: ubuntu-latest
13
28
  steps:
14
- - uses: actions/checkout@v4
15
-
16
- - name: Set up Ruby
17
- uses: ruby/setup-ruby@v1
29
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
18
30
  with:
19
- ruby-version: '3.4'
31
+ persist-credentials: false
32
+ - uses: ruby/setup-ruby@14594264cd68ce8a2345dd349bc3d138a4ef85c8 # v1.327.0
33
+ with:
34
+ ruby-version: '4.0'
20
35
  bundler-cache: true
36
+ - run: bundle exec rubocop --format github
21
37
 
22
- - name: Run RuboCop
23
- run: bundle exec rubocop --format github
24
-
38
+ # Runs on the Ruby in .ruby-version, the version Gemfile.lock is resolved against
25
39
  test:
26
- name: Tests (Ruby ${{ matrix.ruby }})
40
+ name: Tests
27
41
  runs-on: ubuntu-latest
28
- strategy:
29
- fail-fast: false
30
- matrix:
31
- ruby: ['3.2', '3.3', '3.4']
32
-
33
42
  steps:
34
- - uses: actions/checkout@v4
35
-
36
- - name: Set up Ruby ${{ matrix.ruby }}
37
- uses: ruby/setup-ruby@v1
43
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
44
+ with:
45
+ persist-credentials: false
46
+ - uses: ruby/setup-ruby@14594264cd68ce8a2345dd349bc3d138a4ef85c8 # v1.327.0
38
47
  with:
39
- ruby-version: ${{ matrix.ruby }}
48
+ # no ruby-version: setup-ruby reads .ruby-version
40
49
  bundler-cache: true
50
+ - run: bundle exec rspec
51
+ # feeds the coverage badge
52
+ - name: Upload coverage report
53
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
54
+ with:
55
+ name: coverage
56
+ path: coverage/
57
+ # .last_run.json (read by the badge job) is a dotfile; upload-artifact skips those by default
58
+ include-hidden-files: true
59
+ retention-days: 14
41
60
 
42
- - name: Run tests
43
- run: bundle exec rspec
44
-
45
- - name: Upload coverage to Codecov
46
- if: matrix.ruby == '3.4'
47
- uses: codecov/codecov-action@v4
61
+ # Publishes coverage.svg and branches.svg to the orphan `badges` branch; the README badges point at them.
62
+ # Skipped when called from release.yml (github.workflow is the caller's name there).
63
+ coverage-badge:
64
+ if: github.workflow == 'CI' && github.event_name == 'push' && github.ref == 'refs/heads/master'
65
+ needs: test
66
+ runs-on: ubuntu-latest
67
+ permissions:
68
+ contents: write
69
+ steps:
70
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
71
+ - uses: ruby/setup-ruby@14594264cd68ce8a2345dd349bc3d138a4ef85c8 # v1.327.0
72
+ with:
73
+ ruby-version: '4.0'
74
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
48
75
  with:
49
- files: coverage/coverage.xml
50
- fail_ci_if_error: false
51
- verbose: true
52
- env:
53
- CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
76
+ name: coverage
77
+ path: coverage/
78
+ - run: |
79
+ ruby script/coverage_badge.rb coverage/.last_run.json "$RUNNER_TEMP/coverage.svg"
80
+ ruby script/coverage_badge.rb coverage/.last_run.json "$RUNNER_TEMP/branches.svg" branch
81
+ - name: Push badge to badges branch
82
+ run: |
83
+ git config user.name 'github-actions[bot]'
84
+ git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
85
+ if git fetch --depth=1 origin badges; then
86
+ git switch badges
87
+ else
88
+ git switch --orphan badges
89
+ fi
90
+ cp "$RUNNER_TEMP/coverage.svg" "$RUNNER_TEMP/branches.svg" .
91
+ git add coverage.svg branches.svg
92
+ git diff --cached --quiet || git commit -m "coverage badge for ${GITHUB_SHA::7}"
93
+ git push origin badges
@@ -0,0 +1,93 @@
1
+ name: Release
2
+
3
+ # release-please keeps a release PR open that bumps lib/schema/version.rb
4
+ # and CHANGELOG.md from conventional commits. Merging it tags the release,
5
+ # creates the GitHub release and publishes the gem to RubyGems.
6
+ # Run it manually (workflow_dispatch) to retry publishing the current version.
7
+ on:
8
+ push:
9
+ branches: [master]
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ concurrency:
16
+ group: release
17
+ cancel-in-progress: false
18
+
19
+ jobs:
20
+ release-please:
21
+ runs-on: ubuntu-latest
22
+ permissions:
23
+ contents: write # release commits, tags and GitHub releases
24
+ issues: write # release labels
25
+ pull-requests: write # the release PR
26
+ outputs:
27
+ release_created: ${{ steps.release.outputs.release_created }}
28
+ tag_name: ${{ steps.release.outputs.tag_name }}
29
+ version: ${{ steps.release.outputs.version }}
30
+ pr_branch: ${{ steps.release.outputs.pr && fromJSON(steps.release.outputs.pr).headBranchName || '' }}
31
+ steps:
32
+ - uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
33
+ id: release
34
+ with:
35
+ config-file: release-please-config.json
36
+ manifest-file: .release-please-manifest.json
37
+
38
+ # The release PR is opened with GITHUB_TOKEN, which doesn't trigger CI on it,
39
+ # so run the suite here before anything is published.
40
+ ci:
41
+ needs: release-please
42
+ if: needs.release-please.outputs.release_created == 'true' || github.event_name == 'workflow_dispatch'
43
+ uses: ./.github/workflows/ci.yml
44
+ # ceiling for the called workflow: its coverage-badge job declares contents: write
45
+ # (skipped when called from here); lint/test still run with ci.yml's top-level contents: read
46
+ permissions:
47
+ contents: write
48
+
49
+ publish:
50
+ needs: [release-please, ci]
51
+ runs-on: ubuntu-latest
52
+ environment:
53
+ name: rubygems
54
+ url: https://rubygems.org/gems/schema-model
55
+ permissions:
56
+ contents: write # attach the gem to the GitHub release
57
+ id-token: write # RubyGems trusted publishing (OIDC)
58
+ steps:
59
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
60
+ with:
61
+ # the new tag on release; the dispatched commit on a manual retry
62
+ ref: ${{ needs.release-please.outputs.tag_name || github.sha }}
63
+ persist-credentials: false
64
+ - uses: ruby/setup-ruby@14594264cd68ce8a2345dd349bc3d138a4ef85c8 # v1.327.0
65
+ with:
66
+ ruby-version: '4.0'
67
+
68
+ - name: Read version
69
+ run: |
70
+ version=$(ruby -e 'puts Gem::Specification.load("schema-model.gemspec").version')
71
+ echo "VERSION=$version" >> "$GITHUB_ENV"
72
+ echo "TAG=v$version" >> "$GITHUB_ENV"
73
+
74
+ - name: Build gem
75
+ run: gem build schema-model.gemspec
76
+
77
+ - uses: rubygems/configure-rubygems-credentials@dc5a8d8553e6ee01fc26761a49e99e733d17954a # v2.1.0
78
+
79
+ # A version that's already on RubyGems is skipped, so a manual retry can finish a
80
+ # partially published release.
81
+ - name: Push gem
82
+ run: |
83
+ if curl -sf "https://rubygems.org/api/v2/rubygems/schema-model/versions/$VERSION.json" > /dev/null; then
84
+ echo "schema-model $VERSION is already published"
85
+ else
86
+ gem push "schema-model-$VERSION.gem"
87
+ fi
88
+
89
+ - name: Attach gem to GitHub release
90
+ env:
91
+ GH_TOKEN: ${{ github.token }}
92
+ run: |
93
+ gh release upload "$TAG" "schema-model-$VERSION.gem" --repo "$GITHUB_REPOSITORY" --clobber
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.7.1"
3
+ }
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.4.2
1
+ ruby-4.0.7
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## [0.7.1](https://github.com/dougyouch/schema/compare/v0.7.0...v0.7.1) (2026-10-04)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **specs:** replace deprecated SimpleCov API calls ([dadae4a](https://github.com/dougyouch/schema/commit/dadae4aa2d0246e964fdb160e1b505187e3fadc6))
9
+ * **specs:** wrap trailing hash literals in braces per Style/HashAsLastArrayItem ([cf8f18a](https://github.com/dougyouch/schema/commit/cf8f18af5b7c472298c7c0cbd7b6176356b476fc))
data/CLAUDE.md CHANGED
@@ -57,6 +57,14 @@ This is a Ruby gem (`schema-model`) for data transformation, validation, and typ
57
57
 
58
58
  **Dynamic Types**: For polymorphic associations, use `type_field` option with `add_type` blocks. Supports `external_type_field`, `type_ignorecase`, and `default_type`.
59
59
 
60
+ ## CI
61
+
62
+ `.github/workflows/ci.yml` runs RuboCop and the specs on the `.ruby-version` Ruby. On pushes to `master`, it publishes `coverage.svg` (line) and `branches.svg` (branch) from `script/coverage_badge.rb` to the orphan `badges` branch for the README badges.
63
+
64
+ ## Releases
65
+
66
+ Releases are automated by release-please (`.github/workflows/release.yml`). Conventional commits on `master` (`fix:` → patch, `feat:` → minor, `!`/`BREAKING CHANGE` → major) update an open release PR that bumps `lib/schema/version.rb` (`Schema::VERSION`, read by the gemspec) and `CHANGELOG.md`. Merging that PR tags `vX.Y.Z`, creates the GitHub release, and publishes the gem to RubyGems. Don't bump the version by hand.
67
+
60
68
  ## Code Commits
61
69
 
62
70
  Format using angular formatting:
@@ -72,3 +80,4 @@ Format using angular formatting:
72
80
  When modifying the codebase, keep documentation in sync:
73
81
  - **ARCHITECTURE.md** - Update when adding/removing classes, changing component relationships, or altering data flow patterns
74
82
  - **README.md** - Update when adding new features, changing public APIs, or modifying usage examples
83
+ - **CHANGELOG.md** - Generated by release-please from commit messages; don't edit by hand except to fix release notes
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source 'http://rubygems.org'
3
+ source 'https://rubygems.org'
4
4
 
5
5
  gem 'inheritance-helper'
6
6
 
@@ -13,5 +13,4 @@ end
13
13
  group :spec do
14
14
  gem 'rspec'
15
15
  gem 'simplecov'
16
- gem 'simplecov-cobertura'
17
16
  end
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  GEM
2
- remote: http://rubygems.org/
2
+ remote: https://rubygems.org/
3
3
  specs:
4
- activemodel (8.1.2)
5
- activesupport (= 8.1.2)
6
- activesupport (8.1.2)
4
+ activemodel (8.1.4)
5
+ activesupport (= 8.1.4)
6
+ activesupport (8.1.4)
7
7
  base64
8
8
  bigdecimal
9
9
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -18,31 +18,30 @@ GEM
18
18
  uri (>= 0.13.1)
19
19
  ast (2.4.3)
20
20
  base64 (0.3.0)
21
- bigdecimal (4.0.1)
22
- concurrent-ruby (1.3.6)
21
+ bigdecimal (4.1.3)
22
+ concurrent-ruby (1.3.8)
23
23
  connection_pool (3.0.2)
24
- csv (3.3.5)
24
+ csv (3.3.6)
25
25
  diff-lcs (1.6.2)
26
- docile (1.4.1)
27
26
  drb (2.2.3)
28
- i18n (1.14.8)
27
+ i18n (1.15.2)
29
28
  concurrent-ruby (~> 1.0)
30
29
  inheritance-helper (0.2.5)
31
- json (2.18.0)
32
- language_server-protocol (3.17.0.5)
30
+ json (3.0.2)
31
+ language_server-protocol (3.17.0.6)
33
32
  lint_roller (1.1.0)
34
33
  logger (1.7.0)
35
- minitest (6.0.1)
34
+ minitest (6.0.6)
35
+ drb (~> 2.0)
36
36
  prism (~> 1.5)
37
- parallel (1.27.0)
38
- parser (3.3.10.1)
37
+ parallel (2.3.0)
38
+ parser (3.3.12.0)
39
39
  ast (~> 2.4.1)
40
40
  racc
41
41
  prism (1.9.0)
42
42
  racc (1.8.1)
43
43
  rainbow (3.1.1)
44
- regexp_parser (2.11.3)
45
- rexml (3.4.4)
44
+ regexp_parser (2.13.1)
46
45
  rspec (3.13.2)
47
46
  rspec-core (~> 3.13.0)
48
47
  rspec-expectations (~> 3.13.0)
@@ -52,45 +51,37 @@ GEM
52
51
  rspec-expectations (3.13.5)
53
52
  diff-lcs (>= 1.2.0, < 2.0)
54
53
  rspec-support (~> 3.13.0)
55
- rspec-mocks (3.13.7)
54
+ rspec-mocks (3.13.8)
56
55
  diff-lcs (>= 1.2.0, < 2.0)
57
56
  rspec-support (~> 3.13.0)
58
57
  rspec-support (3.13.7)
59
- rubocop (1.84.0)
60
- json (~> 2.3)
58
+ rubocop (1.91.0)
59
+ json (>= 2.3)
61
60
  language_server-protocol (~> 3.17.0.2)
62
61
  lint_roller (~> 1.1.0)
63
- parallel (~> 1.10)
62
+ parallel (>= 1.10)
64
63
  parser (>= 3.3.0.2)
65
64
  rainbow (>= 2.2.2, < 4.0)
66
65
  regexp_parser (>= 2.9.3, < 3.0)
67
66
  rubocop-ast (>= 1.49.0, < 2.0)
68
67
  ruby-progressbar (~> 1.7)
69
68
  unicode-display_width (>= 2.4.0, < 4.0)
70
- rubocop-ast (1.49.0)
69
+ rubocop-ast (1.50.0)
71
70
  parser (>= 3.3.7.2)
72
71
  prism (~> 1.7)
73
72
  ruby-progressbar (1.13.0)
74
73
  securerandom (0.4.1)
75
- simplecov (0.22.0)
76
- docile (~> 1.1)
77
- simplecov-html (~> 0.11)
78
- simplecov_json_formatter (~> 0.1)
79
- simplecov-cobertura (3.1.0)
80
- rexml
81
- simplecov (~> 0.19)
82
- simplecov-html (0.13.2)
83
- simplecov_json_formatter (0.1.4)
74
+ simplecov (1.3.2)
84
75
  tzinfo (2.0.6)
85
76
  concurrent-ruby (~> 1.0)
86
- unicode-display_width (3.2.0)
87
- unicode-emoji (~> 4.1)
88
- unicode-emoji (4.2.0)
77
+ unicode-display_width (3.3.0)
78
+ unicode-emoji (~> 4.3)
79
+ unicode-emoji (4.3.0)
89
80
  uri (1.1.1)
90
81
 
91
82
  PLATFORMS
92
- arm64-darwin-24
93
83
  ruby
84
+ x86_64-darwin-24
94
85
 
95
86
  DEPENDENCIES
96
87
  activemodel
@@ -99,7 +90,45 @@ DEPENDENCIES
99
90
  rspec
100
91
  rubocop
101
92
  simplecov
102
- simplecov-cobertura
93
+
94
+ CHECKSUMS
95
+ activemodel (8.1.4) sha256=9a0906c127bd118aa5f06157db12b8f750da83dccee72db2f658547a0ae7a0e8
96
+ activesupport (8.1.4) sha256=891dd3fe43c4fc8391934b237b1189bb1f661c932a84a840043db9d46a4e80df
97
+ ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
98
+ base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
99
+ bigdecimal (4.1.3) sha256=61ebe1e5e559bdc3cc6f2c0ee7f427321fc838f59611c294356eb04d6e21cf66
100
+ concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
101
+ connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
102
+ csv (3.3.6) sha256=aba61e7e507a66f03d45cb1f3c4b6359861c3504038b422962875dce099e4456
103
+ diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
104
+ drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
105
+ i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5
106
+ inheritance-helper (0.2.5) sha256=e318d548d2e201910ab484b2139a11e61f3dfac012c4aba090bcfaa5f9687b85
107
+ json (3.0.2) sha256=8e6d7e7b11384c21230430cef90b71f14849a34a1f4452796670f7c981bd19df
108
+ language_server-protocol (3.17.0.6) sha256=5ef2c0c138f8267e1bc631d3328347d354f96724b0af22f2c79516120443b7f0
109
+ lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
110
+ logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
111
+ minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1
112
+ parallel (2.3.0) sha256=f75a3e904101ce6a1ccb6b8dc800cbafd42166d83330192438dcf29395167a6f
113
+ parser (3.3.12.0) sha256=21a6d7f755d5a24dfbdc6e6b772e4e879a52e7631a88bc5a3a134606052c9828
114
+ prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
115
+ racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
116
+ rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
117
+ regexp_parser (2.13.1) sha256=5aedb6b7c35688f51e86eef17a15374dfd287c83f4ca644b2c5f3ec50a33b44b
118
+ rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
119
+ rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
120
+ rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
121
+ rspec-mocks (3.13.8) sha256=086ad3d3d17533f4237643de0b5c42f04b66348c28bf6b9c2d3f4a3b01af1d47
122
+ rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
123
+ rubocop (1.91.0) sha256=9c82b7bf391c5d7e3798c5b9996e22a1fe3bd7468e351dfdeb96140c058296d0
124
+ rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db
125
+ ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
126
+ securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
127
+ simplecov (1.3.2) sha256=2a22ec1759f1b8db60881a2e038758956fc69ef93ed669be0bde0678de6d0e85
128
+ tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
129
+ unicode-display_width (3.3.0) sha256=4b7aa66a4b11db50f6f7e98411215cd0dd10eaecb665d36eec5bcacb3fa0b613
130
+ unicode-emoji (4.3.0) sha256=11c02fa73290378c066bb0562cd4c87d8e1b706fbbe0059ca12746a4244de8ce
131
+ uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
103
132
 
104
133
  BUNDLED WITH
105
- 2.6.2
134
+ 4.0.20
data/README.md CHANGED
@@ -2,8 +2,9 @@
2
2
 
3
3
  A powerful Ruby gem for data transformation, validation, and type safety. Schema provides a flexible and intuitive way to define data models with support for complex nested structures, dynamic associations, and robust validation.
4
4
 
5
- [![CI](https://github.com/dougyouch/schema/actions/workflows/ci.yml/badge.svg)](https://github.com/dougyouch/schema/actions/workflows/ci.yml)
6
- [![codecov](https://codecov.io/gh/dougyouch/schema/graph/badge.svg)](https://codecov.io/gh/dougyouch/schema)
5
+ [![CI](https://github.com/dougyouch/schema/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/dougyouch/schema/actions/workflows/ci.yml)
6
+ [![Coverage](https://raw.githubusercontent.com/dougyouch/schema/badges/coverage.svg)](https://github.com/dougyouch/schema/actions/workflows/ci.yml)
7
+ [![Branch Coverage](https://raw.githubusercontent.com/dougyouch/schema/badges/branches.svg)](https://github.com/dougyouch/schema/actions/workflows/ci.yml)
7
8
 
8
9
  ## Installation
9
10
 
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schema
4
+ # Gem version, bumped by release-please
5
+ VERSION = '0.7.1'
6
+ end
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3
+ "bootstrap-sha": "de8a6c418c6b662696e48b7af3b2d8ad55fb3b4e",
4
+ "packages": {
5
+ ".": {
6
+ "release-type": "ruby",
7
+ "package-name": "schema-model",
8
+ "version-file": "lib/schema/version.rb",
9
+ "include-component-in-tag": false
10
+ }
11
+ }
12
+ }
data/schema-model.gemspec CHANGED
@@ -1,8 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative 'lib/schema/version'
4
+
3
5
  Gem::Specification.new do |s|
4
6
  s.name = 'schema-model'
5
- s.version = '0.7.0'
7
+ s.version = Schema::VERSION
6
8
  s.licenses = ['MIT']
7
9
  s.summary = 'Data transformation, validation, and type safety for Ruby'
8
10
  s.description = 'A flexible DSL for defining strongly-typed data models with automatic parsing, ' \
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ # Renders a shields-style SVG badge from SimpleCov's .last_run.json.
5
+ # script/coverage_badge.rb coverage/.last_run.json coverage.svg # line coverage
6
+ # script/coverage_badge.rb coverage/.last_run.json branches.svg branch # branch coverage
7
+
8
+ require 'json'
9
+
10
+ input, output, metric = ARGV
11
+ abort "usage: #{$PROGRAM_NAME} <.last_run.json> <out.svg> [line|branch]" unless input && output
12
+
13
+ result = JSON.parse(File.read(input)).fetch('result')
14
+ title = metric == 'branch' ? 'branches' : 'coverage'
15
+ percent = (metric == 'branch' ? result.fetch('branch') : result['line'] || result.fetch('covered_percent')).to_f
16
+ label = "#{percent.floor(1)}%"
17
+
18
+ color =
19
+ if percent >= 95 then '#4c1'
20
+ elsif percent >= 90 then '#97ca00'
21
+ elsif percent >= 80 then '#dfb317'
22
+ elsif percent >= 70 then '#fe7d37'
23
+ else '#e05d44'
24
+ end
25
+
26
+ # ~7px per character at 11px Verdana, plus padding
27
+ left_width = 63
28
+ right_width = (label.length * 7) + 10
29
+ width = left_width + right_width
30
+
31
+ File.write(output, <<~SVG)
32
+ <svg xmlns="http://www.w3.org/2000/svg" width="#{width}" height="20" role="img" aria-label="#{title}: #{label}">
33
+ <title>#{title}: #{label}</title>
34
+ <linearGradient id="s" x2="0" y2="100%">
35
+ <stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
36
+ <stop offset="1" stop-opacity=".1"/>
37
+ </linearGradient>
38
+ <clipPath id="r"><rect width="#{width}" height="20" rx="3" fill="#fff"/></clipPath>
39
+ <g clip-path="url(#r)">
40
+ <rect width="#{left_width}" height="20" fill="#555"/>
41
+ <rect x="#{left_width}" width="#{right_width}" height="20" fill="#{color}"/>
42
+ <rect width="#{width}" height="20" fill="url(#s)"/>
43
+ </g>
44
+ <g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
45
+ <text x="#{left_width / 2}" y="14">#{title}</text>
46
+ <text x="#{left_width + (right_width / 2)}" y="14">#{label}</text>
47
+ </g>
48
+ </svg>
49
+ SVG
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schema-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doug Youch
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-02-01 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: inheritance-helper
@@ -32,11 +32,14 @@ extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - ".github/workflows/ci.yml"
35
+ - ".github/workflows/release.yml"
35
36
  - ".gitignore"
37
+ - ".release-please-manifest.json"
36
38
  - ".rubocop.yml"
37
39
  - ".ruby-gemset"
38
40
  - ".ruby-version"
39
41
  - ARCHITECTURE.md
42
+ - CHANGELOG.md
40
43
  - CLAUDE.md
41
44
  - Gemfile
42
45
  - Gemfile.lock
@@ -63,9 +66,12 @@ files:
63
66
  - lib/schema/parsers/json.rb
64
67
  - lib/schema/parsing_errors.rb
65
68
  - lib/schema/utils.rb
69
+ - lib/schema/version.rb
66
70
  - lib/schema_validator.rb
71
+ - release-please-config.json
67
72
  - schema-model.gemspec
68
73
  - script/console
74
+ - script/coverage_badge.rb
69
75
  homepage: https://github.com/dougyouch/schema
70
76
  licenses:
71
77
  - MIT
@@ -85,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
91
  - !ruby/object:Gem::Version
86
92
  version: '0'
87
93
  requirements: []
88
- rubygems_version: 3.6.2
94
+ rubygems_version: 4.0.20
89
95
  specification_version: 4
90
96
  summary: Data transformation, validation, and type safety for Ruby
91
97
  test_files: []