Skip to content

Commit d58a0a1

Browse files
committed
Update build for Ruby 3.1, fixes #5115
We need to remove Ruby 2.5 because the new net-smtp gem is required for the mail gem on Ruby 3.1 but it does not work on <=2.5. mikel/mail#1439 Also remove an anon struct test which now breaks with safe YAML loading on 3.1.
1 parent 63f6e68 commit d58a0a1

File tree

4 files changed

+108
-83
lines changed

4 files changed

+108
-83
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
ruby: [2.5, 2.6, 2.7, "3.0"]
17+
ruby: ["2.6", "2.7", "3.0", "3.1"]
1818
services:
1919
redis:
2020
image: redis

Gemfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ gem "rails", ">= 6.0.2"
88
gem "sqlite3", platforms: :ruby
99
gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
1010

11+
# mail dependencies
12+
gem "net-smtp", platforms: :mri, require: false
13+
1114
group :test do
1215
gem "minitest"
1316
gem "simplecov"
1417
gem "codecov", require: false
1518
end
1619

1720
group :development, :test do
18-
gem "standard"
21+
gem "standard", require: false
1922
end
2023

2124
group :load_test do

Gemfile.lock

+103-76
Original file line numberDiff line numberDiff line change
@@ -17,60 +17,65 @@ PATH
1717
GEM
1818
remote: https://rubygems.org/
1919
specs:
20-
actioncable (6.1.3.1)
21-
actionpack (= 6.1.3.1)
22-
activesupport (= 6.1.3.1)
20+
actioncable (6.1.4.4)
21+
actionpack (= 6.1.4.4)
22+
activesupport (= 6.1.4.4)
2323
nio4r (~> 2.0)
2424
websocket-driver (>= 0.6.1)
25-
actionmailbox (6.1.3.1)
26-
actionpack (= 6.1.3.1)
27-
activejob (= 6.1.3.1)
28-
activerecord (= 6.1.3.1)
29-
activestorage (= 6.1.3.1)
30-
activesupport (= 6.1.3.1)
25+
actionmailbox (6.1.4.4)
26+
actionpack (= 6.1.4.4)
27+
activejob (= 6.1.4.4)
28+
activerecord (= 6.1.4.4)
29+
activestorage (= 6.1.4.4)
30+
activesupport (= 6.1.4.4)
3131
mail (>= 2.7.1)
32-
actionmailer (6.1.3.1)
33-
actionpack (= 6.1.3.1)
34-
actionview (= 6.1.3.1)
35-
activejob (= 6.1.3.1)
36-
activesupport (= 6.1.3.1)
32+
actionmailer (6.1.4.4)
33+
actionpack (= 6.1.4.4)
34+
actionview (= 6.1.4.4)
35+
activejob (= 6.1.4.4)
36+
activesupport (= 6.1.4.4)
3737
mail (~> 2.5, >= 2.5.4)
3838
rails-dom-testing (~> 2.0)
39-
actionpack (6.1.3.1)
40-
actionview (= 6.1.3.1)
41-
activesupport (= 6.1.3.1)
39+
actionpack (6.1.4.4)
40+
actionview (= 6.1.4.4)
41+
activesupport (= 6.1.4.4)
4242
rack (~> 2.0, >= 2.0.9)
4343
rack-test (>= 0.6.3)
4444
rails-dom-testing (~> 2.0)
4545
rails-html-sanitizer (~> 1.0, >= 1.2.0)
46-
actiontext (6.1.3.1)
47-
actionpack (= 6.1.3.1)
48-
activerecord (= 6.1.3.1)
49-
activestorage (= 6.1.3.1)
50-
activesupport (= 6.1.3.1)
46+
actiontext (6.1.4.4)
47+
actionpack (= 6.1.4.4)
48+
activerecord (= 6.1.4.4)
49+
activestorage (= 6.1.4.4)
50+
activesupport (= 6.1.4.4)
5151
nokogiri (>= 1.8.5)
52-
actionview (6.1.3.1)
53-
activesupport (= 6.1.3.1)
52+
actionview (6.1.4.4)
53+
activesupport (= 6.1.4.4)
5454
builder (~> 3.1)
5555
erubi (~> 1.4)
5656
rails-dom-testing (~> 2.0)
5757
rails-html-sanitizer (~> 1.1, >= 1.2.0)
58-
activejob (6.1.3.1)
59-
activesupport (= 6.1.3.1)
58+
activejob (6.1.4.4)
59+
activesupport (= 6.1.4.4)
6060
globalid (>= 0.3.6)
61-
activemodel (6.1.3.1)
62-
activesupport (= 6.1.3.1)
63-
activerecord (6.1.3.1)
64-
activemodel (= 6.1.3.1)
65-
activesupport (= 6.1.3.1)
66-
activestorage (6.1.3.1)
67-
actionpack (= 6.1.3.1)
68-
activejob (= 6.1.3.1)
69-
activerecord (= 6.1.3.1)
70-
activesupport (= 6.1.3.1)
61+
activemodel (6.1.4.4)
62+
activesupport (= 6.1.4.4)
63+
activerecord (6.1.4.4)
64+
activemodel (= 6.1.4.4)
65+
activesupport (= 6.1.4.4)
66+
activerecord-jdbc-adapter (61.1-java)
67+
activerecord (~> 6.1.0)
68+
activerecord-jdbcsqlite3-adapter (61.1-java)
69+
activerecord-jdbc-adapter (= 61.1)
70+
jdbc-sqlite3 (~> 3.8, < 3.30)
71+
activestorage (6.1.4.4)
72+
actionpack (= 6.1.4.4)
73+
activejob (= 6.1.4.4)
74+
activerecord (= 6.1.4.4)
75+
activesupport (= 6.1.4.4)
7176
marcel (~> 1.0.0)
72-
mini_mime (~> 1.0.2)
73-
activesupport (6.1.3.1)
77+
mini_mime (>= 1.1.0)
78+
activesupport (6.1.4.4)
7479
concurrent-ruby (~> 1.0, >= 1.0.2)
7580
i18n (>= 1.6, < 2)
7681
minitest (>= 5.1)
@@ -81,66 +86,82 @@ GEM
8186
codecov (0.2.8)
8287
json
8388
simplecov
84-
concurrent-ruby (1.1.8)
89+
concurrent-ruby (1.1.9)
8590
connection_pool (2.2.5)
8691
crass (1.0.6)
92+
digest (3.1.0)
8793
docile (1.3.2)
8894
erubi (1.10.0)
89-
globalid (0.4.2)
90-
activesupport (>= 4.2.0)
95+
globalid (1.0.0)
96+
activesupport (>= 5.0)
9197
hiredis (0.6.3)
92-
i18n (1.8.10)
98+
hiredis (0.6.3-java)
99+
i18n (1.8.11)
93100
concurrent-ruby (~> 1.0)
101+
io-wait (0.2.1)
102+
jdbc-sqlite3 (3.28.0)
94103
json (2.3.1)
95-
loofah (2.9.0)
104+
json (2.3.1-java)
105+
loofah (2.13.0)
96106
crass (~> 1.0.2)
97107
nokogiri (>= 1.5.9)
98108
mail (2.7.1)
99109
mini_mime (>= 0.1.1)
100-
marcel (1.0.1)
110+
marcel (1.0.2)
101111
method_source (1.0.0)
102-
mini_mime (1.0.3)
103-
mini_portile2 (2.5.0)
104-
minitest (5.14.4)
105-
nio4r (2.5.7)
106-
nokogiri (1.11.2)
107-
mini_portile2 (~> 2.5.0)
112+
mini_mime (1.1.2)
113+
mini_portile2 (2.6.1)
114+
minitest (5.15.0)
115+
net-protocol (0.1.2)
116+
io-wait
117+
timeout
118+
net-smtp (0.3.1)
119+
digest
120+
net-protocol
121+
timeout
122+
nio4r (2.5.8)
123+
nio4r (2.5.8-java)
124+
nokogiri (1.12.5)
125+
mini_portile2 (~> 2.6.1)
126+
racc (~> 1.4)
127+
nokogiri (1.12.5-java)
108128
racc (~> 1.4)
109129
parallel (1.21.0)
110130
parser (3.1.0.0)
111131
ast (~> 2.4.1)
112-
racc (1.5.2)
132+
racc (1.6.0)
133+
racc (1.6.0-java)
113134
rack (2.2.3)
114135
rack-test (1.1.0)
115136
rack (>= 1.0, < 3)
116-
rails (6.1.3.1)
117-
actioncable (= 6.1.3.1)
118-
actionmailbox (= 6.1.3.1)
119-
actionmailer (= 6.1.3.1)
120-
actionpack (= 6.1.3.1)
121-
actiontext (= 6.1.3.1)
122-
actionview (= 6.1.3.1)
123-
activejob (= 6.1.3.1)
124-
activemodel (= 6.1.3.1)
125-
activerecord (= 6.1.3.1)
126-
activestorage (= 6.1.3.1)
127-
activesupport (= 6.1.3.1)
137+
rails (6.1.4.4)
138+
actioncable (= 6.1.4.4)
139+
actionmailbox (= 6.1.4.4)
140+
actionmailer (= 6.1.4.4)
141+
actionpack (= 6.1.4.4)
142+
actiontext (= 6.1.4.4)
143+
actionview (= 6.1.4.4)
144+
activejob (= 6.1.4.4)
145+
activemodel (= 6.1.4.4)
146+
activerecord (= 6.1.4.4)
147+
activestorage (= 6.1.4.4)
148+
activesupport (= 6.1.4.4)
128149
bundler (>= 1.15.0)
129-
railties (= 6.1.3.1)
150+
railties (= 6.1.4.4)
130151
sprockets-rails (>= 2.0.0)
131152
rails-dom-testing (2.0.3)
132153
activesupport (>= 4.2.0)
133154
nokogiri (>= 1.6)
134-
rails-html-sanitizer (1.3.0)
155+
rails-html-sanitizer (1.4.2)
135156
loofah (~> 2.3)
136-
railties (6.1.3.1)
137-
actionpack (= 6.1.3.1)
138-
activesupport (= 6.1.3.1)
157+
railties (6.1.4.4)
158+
actionpack (= 6.1.4.4)
159+
activesupport (= 6.1.4.4)
139160
method_source
140-
rake (>= 0.8.7)
161+
rake (>= 0.13)
141162
thor (~> 1.0)
142163
rainbow (3.0.0)
143-
rake (13.0.3)
164+
rake (13.0.6)
144165
redis (4.2.5)
145166
regexp_parser (2.2.0)
146167
rexml (3.2.5)
@@ -166,32 +187,38 @@ GEM
166187
sprockets (4.0.2)
167188
concurrent-ruby (~> 1.0)
168189
rack (> 1, < 3)
169-
sprockets-rails (3.2.2)
170-
actionpack (>= 4.0)
171-
activesupport (>= 4.0)
190+
sprockets-rails (3.4.2)
191+
actionpack (>= 5.2)
192+
activesupport (>= 5.2)
172193
sprockets (>= 3.0.0)
173194
sqlite3 (1.4.2)
174195
standard (1.6.0)
175196
rubocop (= 1.24.1)
176197
rubocop-performance (= 1.13.1)
177-
thor (1.1.0)
198+
thor (1.2.1)
199+
timeout (0.2.0)
178200
toxiproxy (1.0.3)
179201
tzinfo (2.0.4)
180202
concurrent-ruby (~> 1.0)
181203
unicode-display_width (2.1.0)
182-
websocket-driver (0.7.3)
204+
websocket-driver (0.7.5)
205+
websocket-extensions (>= 0.1.0)
206+
websocket-driver (0.7.5-java)
183207
websocket-extensions (>= 0.1.0)
184208
websocket-extensions (0.1.5)
185-
zeitwerk (2.4.2)
209+
zeitwerk (2.5.3)
186210

187211
PLATFORMS
212+
java
188213
ruby
214+
universal-java-1.8
189215

190216
DEPENDENCIES
191217
activerecord-jdbcsqlite3-adapter
192218
codecov
193219
hiredis
194220
minitest
221+
net-smtp
195222
rails (>= 6.0.2)
196223
rake
197224
redis-namespace!

test/test_extensions.rb

-5
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,4 @@ def self.doit(arg)
109109
assert_equal 1, q.size
110110
end
111111

112-
it 'allows Psych to serialize anonymous structs' do
113-
obj = Struct.new(:attribute).new(my: 'data')
114-
115-
assert_equal obj.attribute, Psych.load(Psych.dump(obj)).attribute
116-
end
117112
end

0 commit comments

Comments
 (0)