Skip to content

Commit c7b9bb1

Browse files
committed
Drop support to Ruby 3.1
Rails 8 will require Ruby 3.2.0 or newer.
1 parent 3997ed6 commit c7b9bb1

File tree

26 files changed

+83
-159
lines changed

26 files changed

+83
-159
lines changed

Gemfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,4 @@ end
172172
gem "tzinfo-data", platforms: [:windows, :jruby]
173173
gem "wdm", ">= 0.1.0", platforms: [:windows]
174174

175-
# The error_highlight gem only works on CRuby 3.1 or later.
176-
# Also, Rails depends on a new API available since error_highlight 0.4.0.
177-
# (Note that Ruby 3.1 bundles error_highlight 0.3.0.)
178-
if RUBY_VERSION < "3.2"
179-
gem "error_highlight", ">= 0.4.0", platforms: [:ruby]
180-
end
181175
gem "launchy"

actioncable/actioncable.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
99
s.summary = "WebSocket framework for Rails."
1010
s.description = "Structure many real-time application concerns into channels over a single WebSocket connection."
1111

12-
s.required_ruby_version = ">= 3.1.0"
12+
s.required_ruby_version = ">= 3.2.0"
1313

1414
s.license = "MIT"
1515

actionmailbox/actionmailbox.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
99
s.summary = "Inbound email handling framework."
1010
s.description = "Receive and process incoming emails in Rails applications."
1111

12-
s.required_ruby_version = ">= 3.1.0"
12+
s.required_ruby_version = ">= 3.2.0"
1313

1414
s.license = "MIT"
1515

actionmailer/actionmailer.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
99
s.summary = "Email composition and delivery framework (part of Rails)."
1010
s.description = "Email on Rails. Compose, deliver, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments."
1111

12-
s.required_ruby_version = ">= 3.1.0"
12+
s.required_ruby_version = ">= 3.2.0"
1313

1414
s.license = "MIT"
1515

actionpack/actionpack.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
99
s.summary = "Web-flow and rendering framework putting the VC in MVC (part of Rails)."
1010
s.description = "Web apps on Rails. Simple, battle-tested conventions for building and testing MVC web applications. Works with any Rack-compatible server."
1111

12-
s.required_ruby_version = ">= 3.1.0"
12+
s.required_ruby_version = ">= 3.2.0"
1313

1414
s.license = "MIT"
1515

actiontext/actiontext.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
99
s.summary = "Rich text framework."
1010
s.description = "Edit and display rich text in Rails applications."
1111

12-
s.required_ruby_version = ">= 3.1.0"
12+
s.required_ruby_version = ">= 3.2.0"
1313

1414
s.license = "MIT"
1515

actionview/actionview.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
99
s.summary = "Rendering framework putting the V in MVC (part of Rails)."
1010
s.description = "Simple, battle-tested conventions and helpers for building web pages."
1111

12-
s.required_ruby_version = ">= 3.1.0"
12+
s.required_ruby_version = ">= 3.2.0"
1313

1414
s.license = "MIT"
1515

actionview/test/template/render_test.rb

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -208,45 +208,43 @@ def test_render_outside_path
208208
end
209209
end
210210

211-
if RUBY_VERSION >= "3.2"
212-
def test_render_runtime_error
213-
ex = assert_raises(ActionView::Template::Error) {
214-
@view.render(template: "test/runtime_error")
215-
}
216-
erb_btl = ex.backtrace_locations.first
217-
218-
# Get the spot information from ErrorHighlight
219-
translating_frame = ActionDispatch::ExceptionWrapper::SourceMapLocation.new(erb_btl, ex.template)
220-
translated_spot = translating_frame.spot(ex.cause)
221-
222-
assert_equal 6, translated_spot[:first_column]
223-
end
211+
def test_render_runtime_error
212+
ex = assert_raises(ActionView::Template::Error) {
213+
@view.render(template: "test/runtime_error")
214+
}
215+
erb_btl = ex.backtrace_locations.first
224216

225-
def test_render_location_conditional_append
226-
ex = assert_raises(ActionView::Template::Error) {
227-
@view.render(template: "test/unparseable_runtime_error")
228-
}
229-
erb_btl = ex.backtrace_locations.first
217+
# Get the spot information from ErrorHighlight
218+
translating_frame = ActionDispatch::ExceptionWrapper::SourceMapLocation.new(erb_btl, ex.template)
219+
translated_spot = translating_frame.spot(ex.cause)
230220

231-
# Get the spot information from ErrorHighlight
232-
translating_frame = ActionDispatch::ExceptionWrapper::SourceMapLocation.new(erb_btl, ex.template)
233-
translated_spot = translating_frame.spot(ex.cause)
221+
assert_equal 6, translated_spot[:first_column]
222+
end
234223

235-
assert_equal 8, translated_spot[:first_column]
236-
end
224+
def test_render_location_conditional_append
225+
ex = assert_raises(ActionView::Template::Error) {
226+
@view.render(template: "test/unparseable_runtime_error")
227+
}
228+
erb_btl = ex.backtrace_locations.first
237229

238-
def test_render_location_conditional_append_2
239-
ex = assert_raises(ActionView::Template::Error) {
240-
@view.render(template: "test/unparseable_runtime_error_2")
241-
}
242-
erb_btl = ex.backtrace_locations.first
230+
# Get the spot information from ErrorHighlight
231+
translating_frame = ActionDispatch::ExceptionWrapper::SourceMapLocation.new(erb_btl, ex.template)
232+
translated_spot = translating_frame.spot(ex.cause)
243233

244-
# Get the spot information from ErrorHighlight
245-
translating_frame = ActionDispatch::ExceptionWrapper::SourceMapLocation.new(erb_btl, ex.template)
246-
translated_spot = translating_frame.spot(ex.cause)
234+
assert_equal 8, translated_spot[:first_column]
235+
end
247236

248-
assert_instance_of Integer, translated_spot[:first_column]
249-
end
237+
def test_render_location_conditional_append_2
238+
ex = assert_raises(ActionView::Template::Error) {
239+
@view.render(template: "test/unparseable_runtime_error_2")
240+
}
241+
erb_btl = ex.backtrace_locations.first
242+
243+
# Get the spot information from ErrorHighlight
244+
translating_frame = ActionDispatch::ExceptionWrapper::SourceMapLocation.new(erb_btl, ex.template)
245+
translated_spot = translating_frame.spot(ex.cause)
246+
247+
assert_instance_of Integer, translated_spot[:first_column]
250248
end
251249

252250
def test_render_partial

activejob/activejob.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
99
s.summary = "Job framework with pluggable queues."
1010
s.description = "Declare job classes that can be run by a variety of queuing backends."
1111

12-
s.required_ruby_version = ">= 3.1.0"
12+
s.required_ruby_version = ">= 3.2.0"
1313

1414
s.license = "MIT"
1515

activemodel/activemodel.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
99
s.summary = "A toolkit for building modeling frameworks (part of Rails)."
1010
s.description = "A toolkit for building modeling frameworks like Active Record. Rich support for attributes, callbacks, validations, serialization, internationalization, and testing."
1111

12-
s.required_ruby_version = ">= 3.1.0"
12+
s.required_ruby_version = ">= 3.2.0"
1313

1414
s.license = "MIT"
1515

0 commit comments

Comments
 (0)