Skip to content

Commit 22828df

Browse files
committed
Add support for Rails 7.2, drop Ruby 3.0 and Rails 6.1
1 parent 0e2e311 commit 22828df

File tree

8 files changed

+66
-54
lines changed

8 files changed

+66
-54
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Build
22

33
on:
44
push:
5+
branches: [master]
56
pull_request:
67

78
jobs:
@@ -11,15 +12,15 @@ jobs:
1112

1213
strategy:
1314
matrix:
14-
ruby-version: ["3.0", "3.1", "3.2"]
15+
ruby-version: ["3.1", "3.2", "3.3"]
1516
database:
1617
- sqlite
1718
- postgresql
1819
- mysql
1920
gemfile:
2021
- Gemfile
22+
- spec/ci/rails71.gemfile
2123
- spec/ci/rails70.gemfile
22-
- spec/ci/rails61.gemfile
2324

2425
services:
2526
postgresql:

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2
1+
3.3.5

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ version 0.3.0.
55

66
validates_by_schema uses semantic versioning.
77

8+
## 0.5.2 - 2024-10-29
9+
10+
- Add support for Rails 7.2, drop Ruby 3.0 and Rails 6.1
11+
812
## 0.5.1 - 2023-02-28
913

1014
- Improve load time to configure validations.

Gemfile.lock

Lines changed: 52 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,77 @@
11
PATH
22
remote: .
33
specs:
4-
validates_by_schema (0.5.1)
4+
validates_by_schema (0.5.2)
55
activerecord (>= 6.0.0)
66

77
GEM
88
remote: https://rubygems.org/
99
specs:
10-
actionpack (7.1.3.4)
11-
actionview (= 7.1.3.4)
12-
activesupport (= 7.1.3.4)
10+
actionpack (7.2.1.2)
11+
actionview (= 7.2.1.2)
12+
activesupport (= 7.2.1.2)
1313
nokogiri (>= 1.8.5)
1414
racc
15-
rack (>= 2.2.4)
15+
rack (>= 2.2.4, < 3.2)
1616
rack-session (>= 1.0.1)
1717
rack-test (>= 0.6.3)
1818
rails-dom-testing (~> 2.2)
1919
rails-html-sanitizer (~> 1.6)
20-
actionview (7.1.3.4)
21-
activesupport (= 7.1.3.4)
20+
useragent (~> 0.16)
21+
actionview (7.2.1.2)
22+
activesupport (= 7.2.1.2)
2223
builder (~> 3.1)
2324
erubi (~> 1.11)
2425
rails-dom-testing (~> 2.2)
2526
rails-html-sanitizer (~> 1.6)
26-
activemodel (7.1.3.4)
27-
activesupport (= 7.1.3.4)
28-
activerecord (7.1.3.4)
29-
activemodel (= 7.1.3.4)
30-
activesupport (= 7.1.3.4)
27+
activemodel (7.2.1.2)
28+
activesupport (= 7.2.1.2)
29+
activerecord (7.2.1.2)
30+
activemodel (= 7.2.1.2)
31+
activesupport (= 7.2.1.2)
3132
timeout (>= 0.4.0)
32-
activesupport (7.1.3.4)
33+
activesupport (7.2.1.2)
3334
base64
3435
bigdecimal
35-
concurrent-ruby (~> 1.0, >= 1.0.2)
36+
concurrent-ruby (~> 1.0, >= 1.3.1)
3637
connection_pool (>= 2.2.5)
3738
drb
3839
i18n (>= 1.6, < 2)
40+
logger (>= 1.4.2)
3941
minitest (>= 5.1)
40-
mutex_m
41-
tzinfo (~> 2.0)
42+
securerandom (>= 0.3)
43+
tzinfo (~> 2.0, >= 2.0.5)
4244
base64 (0.2.0)
4345
bigdecimal (3.1.8)
44-
builder (3.2.4)
45-
concurrent-ruby (1.3.1)
46+
builder (3.3.0)
47+
concurrent-ruby (1.3.4)
4648
connection_pool (2.4.1)
4749
crass (1.0.6)
4850
diff-lcs (1.5.1)
49-
docile (1.4.0)
51+
docile (1.4.1)
5052
drb (2.2.1)
51-
erubi (1.12.0)
52-
i18n (1.14.5)
53+
erubi (1.13.0)
54+
i18n (1.14.6)
5355
concurrent-ruby (~> 1.0)
5456
io-console (0.7.2)
55-
irb (1.13.1)
57+
irb (1.14.1)
5658
rdoc (>= 4.0.0)
5759
reline (>= 0.4.2)
58-
loofah (2.22.0)
60+
logger (1.6.1)
61+
loofah (2.23.1)
5962
crass (~> 1.0.2)
6063
nokogiri (>= 1.12.0)
6164
mini_portile2 (2.8.7)
62-
minitest (5.23.1)
63-
mutex_m (0.2.0)
65+
minitest (5.25.1)
6466
mysql2 (0.5.6)
65-
nokogiri (1.16.5)
67+
nokogiri (1.16.7)
6668
mini_portile2 (~> 2.8.2)
6769
racc (~> 1.4)
68-
pg (1.5.6)
70+
pg (1.5.9)
6971
psych (5.1.2)
7072
stringio
71-
racc (1.8.0)
72-
rack (3.0.11)
73+
racc (1.8.1)
74+
rack (3.1.8)
7375
rack-session (2.0.0)
7476
rack (>= 3.0.0)
7577
rack-test (2.1.0)
@@ -84,54 +86,56 @@ GEM
8486
rails-html-sanitizer (1.6.0)
8587
loofah (~> 2.21)
8688
nokogiri (~> 1.14)
87-
railties (7.1.3.4)
88-
actionpack (= 7.1.3.4)
89-
activesupport (= 7.1.3.4)
90-
irb
89+
railties (7.2.1.2)
90+
actionpack (= 7.2.1.2)
91+
activesupport (= 7.2.1.2)
92+
irb (~> 1.13)
9193
rackup (>= 1.0.0)
9294
rake (>= 12.2)
9395
thor (~> 1.0, >= 1.2.2)
9496
zeitwerk (~> 2.6)
9597
rake (13.2.1)
96-
rdoc (6.6.3.1)
98+
rdoc (6.7.0)
9799
psych (>= 4.0.0)
98-
reline (0.5.7)
100+
reline (0.5.10)
99101
io-console (~> 0.5)
100-
rspec-core (3.13.0)
102+
rspec-core (3.13.2)
101103
rspec-support (~> 3.13.0)
102-
rspec-expectations (3.13.0)
104+
rspec-expectations (3.13.3)
103105
diff-lcs (>= 1.2.0, < 2.0)
104106
rspec-support (~> 3.13.0)
105-
rspec-mocks (3.13.1)
107+
rspec-mocks (3.13.2)
106108
diff-lcs (>= 1.2.0, < 2.0)
107109
rspec-support (~> 3.13.0)
108-
rspec-rails (6.1.2)
109-
actionpack (>= 6.1)
110-
activesupport (>= 6.1)
111-
railties (>= 6.1)
110+
rspec-rails (7.0.1)
111+
actionpack (>= 7.0)
112+
activesupport (>= 7.0)
113+
railties (>= 7.0)
112114
rspec-core (~> 3.13)
113115
rspec-expectations (~> 3.13)
114116
rspec-mocks (~> 3.13)
115117
rspec-support (~> 3.13)
116118
rspec-support (3.13.1)
117-
shoulda-matchers (6.2.0)
119+
securerandom (0.3.1)
120+
shoulda-matchers (6.4.0)
118121
activesupport (>= 5.2.0)
119122
simplecov (0.22.0)
120123
docile (~> 1.1)
121124
simplecov-html (~> 0.11)
122125
simplecov_json_formatter (~> 0.1)
123-
simplecov-html (0.12.3)
126+
simplecov-html (0.13.1)
124127
simplecov-lcov (0.8.0)
125128
simplecov_json_formatter (0.1.4)
126129
sqlite3 (1.7.3)
127130
mini_portile2 (~> 2.8.0)
128-
stringio (3.1.0)
129-
thor (1.3.1)
131+
stringio (3.1.1)
132+
thor (1.3.2)
130133
timeout (0.4.1)
131134
tzinfo (2.0.6)
132135
concurrent-ruby (~> 1.0)
133-
webrick (1.8.1)
134-
zeitwerk (2.6.13)
136+
useragent (0.16.10)
137+
webrick (1.8.2)
138+
zeitwerk (2.6.18)
135139

136140
PLATFORMS
137141
ruby

lib/validates_by_schema.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ def validates_by_schema(options = {})
1818

1919
def load_schema!
2020
super
21+
# Set flag here to avoid infinite recursion
22+
@schema_loaded = true
23+
2124
# define schema validations lazy to avoid accessing the database
2225
# at class load time.
2326
define_schema_validations

lib/validates_by_schema/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module ValidatesBySchema
2-
VERSION = '0.5.1'
2+
VERSION = '0.5.2'
33
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ gemspec path: '../..'
55
gem 'simplecov', require: false
66
gem 'simplecov-lcov', require: false
77

8-
gem 'activerecord', '~> 6.1.0'
8+
gem 'activerecord', '~> 7.1.0'

spec/support/models/contraption.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'widget'
22

33
class Contraption < Widget
4-
enum kind: %w(one other)
4+
enum :kind, %w(one other)
55

66
validates_by_schema
77
end

0 commit comments

Comments
 (0)