Skip to content

Commit fde1586

Browse files
author
Sara Jackson
authored
Drop support for Rails 7.0 and Ruby 3.1 (#1045)
Drops support for Rails 7.0, see https://endoflife.date/rails Drops support for Ruby 3.1, see https://endoflife.date/ruby Also removing HTMLEscapeHelper which was a test utility I added just to support html escaping strings in tests for Rails 7.0.
1 parent 10cc025 commit fde1586

9 files changed

Lines changed: 44 additions & 93 deletions

File tree

.github/workflows/tests.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,12 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
gemfile:
19-
- "7.0"
2019
- "7.1"
2120
- "7.2"
2221
- "8.0"
2322
ruby:
24-
- "3.1.6"
25-
- "3.2.5"
26-
- "3.3.5"
27-
exclude:
28-
- ruby: "3.1.6"
29-
gemfile: "8.0"
23+
- "3.2.8"
24+
- "3.3.7"
3025

3126
env:
3227
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.gemfile }}.gemfile

Appraisals

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
appraise "rails_7.0" do
2-
gem "railties", "~> 7.0.0"
3-
# The following gems will not be bundled with Ruby 3.4
4-
gem "base64", require: false
5-
gem "bigdecimal", require: false
6-
gem "drb", require: false
7-
gem "mutex_m", require: false
8-
end
9-
101
appraise "rails_7.1" do
112
gem "railties", "~> 7.1.0"
123
end

Gemfile.lock

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ GEM
7070
argon2 (2.3.0)
7171
ffi (~> 1.15)
7272
ffi-compiler (~> 1.0)
73-
ast (2.4.2)
73+
ast (2.4.3)
7474
base64 (0.2.0)
7575
bcrypt (3.1.20)
7676
better_html (2.1.1)
@@ -80,7 +80,7 @@ GEM
8080
erubi (~> 1.4)
8181
parser (>= 2.4)
8282
smart_properties
83-
bigdecimal (3.1.8)
83+
bigdecimal (3.1.9)
8484
builder (3.3.0)
8585
capybara (3.40.0)
8686
addressable
@@ -92,8 +92,8 @@ GEM
9292
regexp_parser (>= 1.5, < 3.0)
9393
xpath (~> 3.2)
9494
coderay (1.1.3)
95-
concurrent-ruby (1.3.4)
96-
connection_pool (2.4.1)
95+
concurrent-ruby (1.3.5)
96+
connection_pool (2.5.0)
9797
crass (1.0.6)
9898
database_cleaner (2.0.2)
9999
database_cleaner-active_record (>= 2, < 3)
@@ -106,14 +106,14 @@ GEM
106106
drb (2.2.1)
107107
email_validator (2.2.4)
108108
activemodel
109-
erb_lint (0.6.0)
109+
erb_lint (0.9.0)
110110
activesupport
111111
better_html (>= 2.0.1)
112112
parser (>= 2.7.1.4)
113113
rainbow
114114
rubocop (>= 1)
115115
smart_properties
116-
erubi (1.13.0)
116+
erubi (1.13.1)
117117
factory_bot (6.4.6)
118118
activesupport (>= 5.0.0)
119119
factory_bot_rails (6.4.3)
@@ -125,16 +125,17 @@ GEM
125125
rake
126126
globalid (1.2.1)
127127
activesupport (>= 6.1)
128-
i18n (1.14.5)
128+
i18n (1.14.7)
129129
concurrent-ruby (~> 1.0)
130130
io-console (0.7.2)
131131
irb (1.14.0)
132132
rdoc (>= 4.0.0)
133133
reline (>= 0.4.2)
134-
json (2.7.2)
135-
language_server-protocol (3.17.0.3)
136-
logger (1.6.0)
137-
loofah (2.22.0)
134+
json (2.10.2)
135+
language_server-protocol (3.17.0.4)
136+
lint_roller (1.1.0)
137+
logger (1.7.0)
138+
loofah (2.24.0)
138139
crass (~> 1.0.2)
139140
nokogiri (>= 1.12.0)
140141
mail (2.8.1)
@@ -145,8 +146,8 @@ GEM
145146
matrix (0.4.2)
146147
method_source (1.1.0)
147148
mini_mime (1.1.5)
148-
mini_portile2 (2.8.7)
149-
minitest (5.25.1)
149+
mini_portile2 (2.8.8)
150+
minitest (5.25.5)
150151
net-imap (0.5.1)
151152
date
152153
net-protocol
@@ -156,13 +157,14 @@ GEM
156157
timeout
157158
net-smtp (0.5.0)
158159
net-protocol
159-
nokogiri (1.16.7)
160+
nokogiri (1.18.6)
160161
mini_portile2 (~> 2.8.2)
161162
racc (~> 1.4)
162163
parallel (1.26.3)
163-
parser (3.3.4.2)
164+
parser (3.3.7.3)
164165
ast (~> 2.4.1)
165166
racc
167+
prism (1.4.0)
166168
pry (0.14.2)
167169
coderay (~> 1.1)
168170
method_source (~> 1.0)
@@ -186,9 +188,9 @@ GEM
186188
activesupport (>= 5.0.0)
187189
minitest
188190
nokogiri (>= 1.6)
189-
rails-html-sanitizer (1.6.0)
191+
rails-html-sanitizer (1.6.2)
190192
loofah (~> 2.21)
191-
nokogiri (~> 1.14)
193+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
192194
railties (7.2.0)
193195
actionpack (= 7.2.0)
194196
activesupport (= 7.2.0)
@@ -201,11 +203,9 @@ GEM
201203
rake (13.2.1)
202204
rdoc (6.7.0)
203205
psych (>= 4.0.0)
204-
regexp_parser (2.9.2)
206+
regexp_parser (2.10.0)
205207
reline (0.5.9)
206208
io-console (~> 0.5)
207-
rexml (3.3.5)
208-
strscan
209209
rspec-core (3.13.0)
210210
rspec-support (~> 3.13.0)
211211
rspec-expectations (3.13.1)
@@ -223,33 +223,35 @@ GEM
223223
rspec-mocks (~> 3.13)
224224
rspec-support (~> 3.13)
225225
rspec-support (3.13.1)
226-
rubocop (1.65.1)
226+
rubocop (1.75.1)
227227
json (~> 2.3)
228-
language_server-protocol (>= 3.17.0)
228+
language_server-protocol (~> 3.17.0.2)
229+
lint_roller (~> 1.1.0)
229230
parallel (~> 1.10)
230231
parser (>= 3.3.0.2)
231232
rainbow (>= 2.2.2, < 4.0)
232-
regexp_parser (>= 2.4, < 3.0)
233-
rexml (>= 3.2.5, < 4.0)
234-
rubocop-ast (>= 1.31.1, < 2.0)
233+
regexp_parser (>= 2.9.3, < 3.0)
234+
rubocop-ast (>= 1.43.0, < 2.0)
235235
ruby-progressbar (~> 1.7)
236-
unicode-display_width (>= 2.4.0, < 3.0)
237-
rubocop-ast (1.32.1)
238-
parser (>= 3.3.1.0)
236+
unicode-display_width (>= 2.4.0, < 4.0)
237+
rubocop-ast (1.43.0)
238+
parser (>= 3.3.7.2)
239+
prism (~> 1.4)
239240
ruby-progressbar (1.13.0)
240-
securerandom (0.3.1)
241+
securerandom (0.4.1)
241242
shoulda-matchers (6.4.0)
242243
activesupport (>= 5.2.0)
243244
smart_properties (1.17.0)
244245
sqlite3 (1.7.3)
245246
mini_portile2 (~> 2.8.0)
246247
stringio (3.1.1)
247-
strscan (3.1.0)
248248
thor (1.3.1)
249249
timeout (0.4.1)
250250
tzinfo (2.0.6)
251251
concurrent-ruby (~> 1.0)
252-
unicode-display_width (2.5.0)
252+
unicode-display_width (3.1.4)
253+
unicode-emoji (~> 4.0, >= 4.0.4)
254+
unicode-emoji (4.0.4)
253255
useragent (0.16.10)
254256
webrick (1.8.1)
255257
xpath (3.2.0)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ monitored by contributors.
1818

1919
## Getting Started
2020

21-
Clearance is a Rails engine tested against Rails `>= 7.0` and Ruby `>= 3.1.6`.
21+
Clearance is a Rails engine tested against Rails `>= 7.1` and Ruby `>= 3.2.8`.
2222

2323
You can add it to your Gemfile with:
2424

gemfiles/rails_7.0.gemfile

Lines changed: 0 additions & 24 deletions
This file was deleted.

spec/controllers/passwords_controller_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
}
3434

3535
email = ActionMailer::Base.deliveries.last
36-
expect(email.subject).to match(translated_string("passwords.edit.title"))
36+
expect(email.subject).to match(I18n.t("passwords.edit.title"))
3737
end
3838

3939
it "re-renders the page when turbo is enabled" do
@@ -53,7 +53,7 @@
5353
password: {},
5454
}
5555

56-
expect(flash.now[:alert]).to match(translated_string("flashes.failure_when_missing_email"))
56+
expect(flash.now[:alert]).to match(I18n.t("flashes.failure_when_missing_email"))
5757
expect(response).to render_template(:new)
5858
end
5959

@@ -74,7 +74,7 @@
7474
},
7575
}
7676

77-
expect(flash.now[:alert]).to match(translated_string("flashes.failure_when_missing_email"))
77+
expect(flash.now[:alert]).to match(I18n.t("flashes.failure_when_missing_email"))
7878
expect(response).to render_template(:new)
7979
end
8080

@@ -164,7 +164,7 @@
164164
}
165165

166166
expect(response).to render_template(:new)
167-
expect(flash.now[:alert]).to match(translated_string("flashes.failure_when_forbidden"))
167+
expect(flash.now[:alert]).to match(I18n.t("flashes.failure_when_forbidden"))
168168
end
169169
end
170170

@@ -178,7 +178,7 @@
178178
}
179179

180180
expect(response).to render_template(:new)
181-
expect(flash.now[:alert]).to match(translated_string("flashes.failure_when_forbidden"))
181+
expect(flash.now[:alert]).to match(I18n.t("flashes.failure_when_forbidden"))
182182
end
183183
end
184184

@@ -278,7 +278,7 @@
278278
new_password: "",
279279
)
280280

281-
expect(flash.now[:alert]).to match(translated_string("flashes.failure_after_update"))
281+
expect(flash.now[:alert]).to match(I18n.t("flashes.failure_after_update"))
282282
expect(response).to have_http_status(:unprocessable_entity)
283283
expect(response).to render_template(:edit)
284284
end

spec/controllers/permissions_controller_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def show
5858
it "denies access to show and display a flash message" do
5959
get :show
6060

61-
expect(flash[:alert]).to match(translated_string("flashes.failure_when_not_signed_in"))
61+
expect(flash[:alert]).to match(I18n.t("flashes.failure_when_not_signed_in"))
6262
end
6363
end
6464

spec/controllers/sessions_controller_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
}
4242

4343
expect(response).to render_template(:new)
44-
expect(flash[:alert]).to match(translated_string("flashes.failure_after_create"))
44+
expect(flash[:alert]).to match(I18n.t("flashes.failure_after_create"))
4545
end
4646
end
4747

spec/support/html_escape_helper.rb

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)