Skip to content

Commit 383f775

Browse files
authored
update Rails and Ruby EOL support message (#2102)
* update Rails and Ruby EOL support message * clarify changelog * vale * use existing deprecation warnings in engine.rb
1 parent 4dfc7a9 commit 383f775

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

docs/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ nav_order: 5
2626

2727
*Joel Hawksley*
2828

29-
* Warn if using Ruby < 3.1 or Rails < 7.0, which will not be supported by ViewComponent v4.
29+
* Warn if using Ruby < 3.2 or Rails < 7.1, which won't be supported by ViewComponent v4, to be released no earlier than April 1, 2025.
3030

3131
*Joel Hawksley*
3232

lib/view_component.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ module ViewComponent
2121
autoload :TestCase
2222
autoload :SystemTestCase
2323
autoload :Translatable
24-
25-
if defined?(Rails) && Rails.version < "7.0"
26-
Kernel.warn("ViewComponent v4 will drop support for Rails < 7.0 in 2025.")
27-
end
2824
end
2925

3026
require "view_component/engine" if defined?(Rails::Engine)

lib/view_component/engine.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,12 @@ def serve_static_preview_assets?(app_config)
169169
end
170170

171171
# :nocov:
172-
if RUBY_VERSION < "3.0.0"
173-
ViewComponent::Deprecation.deprecation_warning("Support for Ruby versions < 3.0.0", "ViewComponent 4.0 will remove support for Ruby versions < 3.0.0 ")
172+
if RUBY_VERSION < "3.2.0"
173+
ViewComponent::Deprecation.deprecation_warning("Support for Ruby versions < 3.2.0", "ViewComponent v4 will remove support for Ruby versions < 3.2.0 no earlier than April 1, 2025")
174174
end
175175

176-
if Rails.version.to_f < 6.1
177-
ViewComponent::Deprecation.deprecation_warning("Support for Rails versions < 6.1", "ViewComponent 4.0 will remove support for Rails versions < 6.1 ")
176+
if Rails.version.to_f < 7.1
177+
ViewComponent::Deprecation.deprecation_warning("Support for Rails versions < 7.1", "ViewComponent v4 will remove support for Rails versions < 7.1 no earlier than April 1, 2025")
178178
end
179179
# :nocov:
180180

view_component.gemspec

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,5 @@ Gem::Specification.new do |spec|
6565
spec.add_development_dependency "net-imap"
6666
spec.add_development_dependency "net-pop"
6767
spec.add_development_dependency "net-smtp"
68-
else
69-
spec.post_install_message = "ViewComponent v4 will drop support for Ruby < 3.1 in 2025."
7068
end
7169
end

0 commit comments

Comments
 (0)