Skip to content

Commit bb30cfd

Browse files
committed
Merge branch 'feature/validations'
2 parents 109b807 + b92480e commit bb30cfd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+87064
-73938
lines changed

.rubocop.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
inherit_gem:
2-
rubocop-espago: rubocop.yml
2+
rubocop-espago: sorbet.yml
33

44
AllCops:
55
TargetRubyVersion: 3.1
@@ -14,3 +14,21 @@ Style/TrailingCommaInArguments:
1414

1515
Naming/BlockForwarding:
1616
Enabled: false
17+
18+
Sorbet/ForbidTSig:
19+
Enabled: false
20+
21+
Sorbet/RedundantExtendTSig:
22+
Enabled: false
23+
24+
Sorbet/ForbidMixesInClassMethods:
25+
Enabled: false
26+
27+
Sorbet/ForbidTUnsafe:
28+
Enabled: false
29+
30+
Sorbet/ForbidTHelpers:
31+
Enabled: false
32+
33+
Style/DocumentDynamicEvalDefinition:
34+
Enabled: false

CHANGELOG.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,96 +5,104 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [0.3.0] - 2024-09-24
8+
## [0.4.0] - 2025-10-14
99

1010
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.3.0...v0.2.1)
1111

12+
### Changes
13+
- Add `Shale::Builder::NestedValidations`
14+
- Add `Shale::Builder#alias_attribute`
15+
16+
## [0.3.0] - 2025-09-24
17+
18+
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.2.1...v0.3.0)
19+
1220
### Changes
1321
- Add support for `BigDecimal`
1422

1523
## [0.2.1] - 2024-07-16
1624

17-
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.2.1...v0.2.0)
25+
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.2.0...v0.2.1)
1826

1927
### Changes
2028
- Add additional sorbet type documentation
2129

2230
## [0.2.0] - 2024-06-11
2331

24-
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.2.0...v0.1.9)
32+
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.9...v0.2.0)
2533

2634
### Changes
2735
- Add support for `return_type` and `setter_type` in custom primitive shale types
2836
- Add a more thorough description of sorbet and tapioca support in the README
2937

3038
## [0.1.9] - 2024-06-03
3139

32-
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.9...v0.1.8)
40+
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.8...v0.1.9)
3341

3442
### Changes
3543
- Fix the signature of `new` class method
3644

3745
## [0.1.8] - 2024-05-15
3846

39-
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.8...v0.1.7)
47+
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.7...v0.1.8)
4048

4149
### Changes
4250
- Sort attribute names in the tapioca compiler
4351

4452
## [0.1.7] - 2024-05-13
4553

46-
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.7...v0.1.6)
54+
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.6...v0.1.7)
4755

4856
### Changes
4957
- Drop support for Ruby 3.0
5058
- Add support for Ruby 3.3
5159

5260
## [0.1.6] - 2024-05-13
5361

54-
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.6...v0.1.5)
62+
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.5...v0.1.6)
5563

5664
### Changes
5765
- Add support for doc strings in the tapioca compiler
5866

5967
## [0.1.5] - 2024-05-13
6068

61-
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.5...v0.1.4)
69+
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.4...v0.1.5)
6270

6371
### Changes
6472
- Fix a bug in the tapioca compiler
6573

6674
## [0.1.4] - 2024-05-13
6775

68-
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.4...v0.1.3)
76+
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.3...v0.1.4)
6977

7078
### Changes
7179
- Add a tapioca compiler for shale and shale builder
7280

7381
## [0.1.3] - 2023-11-23
7482

75-
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.3...v0.1.2)
83+
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.2...v0.1.3)
7684

7785
### Changes
7886
- Change shale version dependency from `< 1.0` to `< 2.0`
7987

8088
## [0.1.2] - 2023-10-11
8189

82-
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.2...v0.1.1)
90+
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.1...v0.1.2)
8391

8492
### Changes
8593
- Add support for collections
8694
- Drop support for Ruby 2.7
8795

8896
## [0.1.1] - 2023-02-22
8997

90-
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.1...v0.1.0)
98+
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.0...v0.1.1)
9199

92100
### Changes
93101
- Add support for inheritance
94102

95103
## [0.1.0] - 2023-02-21
96104

97-
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.1.0...v0.0.0)
105+
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.0.0...v0.1.0)
98106

99107
### Changes
100108
- Initial release

Gemfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ source 'https://rubygems.org'
55
# Specify your gem's dependencies in diggable.gemspec
66
gemspec
77

8+
gem 'activemodel', '~> 8.0' # validations
89
gem 'base64', '~> 0.3' # Base64
910
gem 'byebug', '~> 11.1' # debugger
1011
gem 'minitest', '~> 5.0' # test framework
1112
gem 'mutex_m', '~> 0.3' # Mutexes
1213
gem 'racc', '~> 1.8' # parser
1314
gem 'rake', '~> 13.0' # automation tasks
14-
gem 'rubocop-espago', '~> 1.0' # ruby linter
15+
gem 'rubocop', '~> 1.81' # ruby linter
16+
gem 'rubocop-espago', '~> 1.2' # Espago rubocop config
17+
gem 'rubocop-sorbet', '~> 0.11' # sorbet rubocop config
1518
gem 'shoulda-context', '~> 2.0' # more pleasant test syntax
1619
gem 'sorbet', '>= 0.5' # static typechecker
1720
gem 'tapioca', '> 0.13' # RBI generator for sorbet

Gemfile.lock

Lines changed: 83 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,121 @@
11
PATH
22
remote: .
33
specs:
4-
shale-builder (0.3.0)
4+
shale-builder (0.4.0)
55
booleans (>= 0.1)
66
shale (< 2.0)
77
sorbet-runtime (> 0.5)
88

99
GEM
1010
remote: https://rubygems.org/
1111
specs:
12-
ast (2.4.2)
12+
activemodel (8.0.3)
13+
activesupport (= 8.0.3)
14+
activesupport (8.0.3)
15+
base64
16+
benchmark (>= 0.3)
17+
bigdecimal
18+
concurrent-ruby (~> 1.0, >= 1.3.1)
19+
connection_pool (>= 2.2.5)
20+
drb
21+
i18n (>= 1.6, < 2)
22+
logger (>= 1.4.2)
23+
minitest (>= 5.1)
24+
securerandom (>= 0.3)
25+
tzinfo (~> 2.0, >= 2.0.5)
26+
uri (>= 0.13.1)
27+
ast (2.4.3)
1328
base64 (0.3.0)
29+
benchmark (0.4.1)
1430
bigdecimal (3.2.3)
1531
booleans (0.1.1)
1632
byebug (11.1.3)
17-
erubi (1.12.0)
18-
json (2.6.3)
33+
concurrent-ruby (1.3.5)
34+
connection_pool (2.5.4)
35+
drb (2.2.3)
36+
erubi (1.13.1)
37+
i18n (1.14.7)
38+
concurrent-ruby (~> 1.0)
39+
json (2.15.1)
40+
language_server-protocol (3.17.0.5)
41+
lint_roller (1.1.0)
42+
logger (1.7.0)
1943
minitest (5.17.0)
2044
mutex_m (0.3.0)
2145
netrc (0.11.0)
22-
parallel (1.22.1)
23-
parser (3.2.1.0)
46+
parallel (1.27.0)
47+
parser (3.3.9.0)
2448
ast (~> 2.4.1)
25-
prism (0.29.0)
49+
racc
50+
prism (1.5.2)
2651
racc (1.8.1)
2752
rainbow (3.1.1)
2853
rake (13.0.6)
29-
rbi (0.1.13)
30-
prism (>= 0.18.0, < 1.0.0)
31-
sorbet-runtime (>= 0.5.9204)
32-
regexp_parser (2.7.0)
33-
rexml (3.2.5)
34-
rubocop (1.45.1)
54+
rbi (0.3.7)
55+
prism (~> 1.0)
56+
rbs (>= 3.4.4)
57+
rbs (3.9.5)
58+
logger
59+
regexp_parser (2.11.3)
60+
rubocop (1.81.1)
3561
json (~> 2.3)
62+
language_server-protocol (~> 3.17.0.2)
63+
lint_roller (~> 1.1.0)
3664
parallel (~> 1.10)
37-
parser (>= 3.2.0.0)
65+
parser (>= 3.3.0.2)
3866
rainbow (>= 2.2.2, < 4.0)
39-
regexp_parser (>= 1.8, < 3.0)
40-
rexml (>= 3.2.5, < 4.0)
41-
rubocop-ast (>= 1.24.1, < 2.0)
67+
regexp_parser (>= 2.9.3, < 3.0)
68+
rubocop-ast (>= 1.47.1, < 2.0)
4269
ruby-progressbar (~> 1.7)
43-
unicode-display_width (>= 2.4.0, < 3.0)
44-
rubocop-ast (1.26.0)
45-
parser (>= 3.2.1.0)
46-
rubocop-espago (1.0.2)
70+
unicode-display_width (>= 2.4.0, < 4.0)
71+
rubocop-ast (1.47.1)
72+
parser (>= 3.3.7.2)
73+
prism (~> 1.4)
74+
rubocop-espago (1.2.0)
4775
rubocop
48-
ruby-progressbar (1.11.0)
76+
rubocop-sorbet (0.11.0)
77+
lint_roller
78+
rubocop (>= 1.75.2)
79+
ruby-progressbar (1.13.0)
80+
securerandom (0.4.1)
4981
shale (1.2.2)
5082
bigdecimal
5183
shoulda-context (2.0.0)
52-
sorbet (0.5.11372)
53-
sorbet-static (= 0.5.11372)
54-
sorbet-runtime (0.5.11372)
55-
sorbet-static (0.5.11372-universal-darwin)
56-
sorbet-static (0.5.11372-x86_64-linux)
57-
sorbet-static-and-runtime (0.5.11372)
58-
sorbet (= 0.5.11372)
59-
sorbet-runtime (= 0.5.11372)
60-
spoom (1.3.2)
84+
sorbet (0.6.12642)
85+
sorbet-static (= 0.6.12642)
86+
sorbet-runtime (0.6.12642)
87+
sorbet-static (0.6.12642-universal-darwin)
88+
sorbet-static (0.6.12642-x86_64-linux)
89+
sorbet-static-and-runtime (0.6.12642)
90+
sorbet (= 0.6.12642)
91+
sorbet-runtime (= 0.6.12642)
92+
spoom (1.6.1)
6193
erubi (>= 1.10.0)
62-
prism (>= 0.19.0)
94+
prism (>= 0.28.0)
95+
rbi (>= 0.2.3)
6396
sorbet-static-and-runtime (>= 0.5.10187)
6497
thor (>= 0.19.2)
65-
tapioca (0.14.1)
98+
tapioca (0.16.11)
99+
benchmark
66100
bundler (>= 2.2.25)
67101
netrc (>= 0.11.0)
68102
parallel (>= 1.21.0)
69-
rbi (>= 0.1.4, < 0.2)
103+
rbi (~> 0.2)
70104
sorbet-static-and-runtime (>= 0.5.11087)
71105
spoom (>= 1.2.0)
72106
thor (>= 1.2.0)
73107
yard-sorbet
74-
thor (1.2.1)
75-
unicode-display_width (2.4.2)
76-
webrick (1.7.0)
77-
yard (0.9.28)
78-
webrick (~> 1.7.0)
79-
yard-sorbet (0.8.1)
80-
sorbet-runtime (>= 0.5)
81-
yard (>= 0.9)
108+
thor (1.4.0)
109+
tzinfo (2.0.6)
110+
concurrent-ruby (~> 1.0)
111+
unicode-display_width (3.2.0)
112+
unicode-emoji (~> 4.1)
113+
unicode-emoji (4.1.0)
114+
uri (1.0.4)
115+
yard (0.9.37)
116+
yard-sorbet (0.9.0)
117+
sorbet-runtime
118+
yard
82119

83120
PLATFORMS
84121
arm64-darwin-20
@@ -87,13 +124,16 @@ PLATFORMS
87124
x86_64-linux
88125

89126
DEPENDENCIES
127+
activemodel (~> 8.0)
90128
base64 (~> 0.3)
91129
byebug (~> 11.1)
92130
minitest (~> 5.0)
93131
mutex_m (~> 0.3)
94132
racc (~> 1.8)
95133
rake (~> 13.0)
96-
rubocop-espago (~> 1.0)
134+
rubocop (~> 1.81)
135+
rubocop-espago (~> 1.2)
136+
rubocop-sorbet (~> 0.11)
97137
shale-builder!
98138
shoulda-context (~> 2.0)
99139
sorbet (>= 0.5)

0 commit comments

Comments
 (0)