Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ nav_order: 5

*Joel Hawksley*

* Warn if using Ruby < 3.1 or Rails < 7.0, which will not be supported by ViewComponent v4.
* 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.

*Joel Hawksley*

Expand Down
4 changes: 0 additions & 4 deletions lib/view_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ module ViewComponent
autoload :TestCase
autoload :SystemTestCase
autoload :Translatable

if defined?(Rails) && Rails.version < "7.0"
Kernel.warn("ViewComponent v4 will drop support for Rails < 7.0 in 2025.")
end
end

require "view_component/engine" if defined?(Rails::Engine)
8 changes: 4 additions & 4 deletions lib/view_component/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@ def serve_static_preview_assets?(app_config)
end

# :nocov:
if RUBY_VERSION < "3.0.0"
ViewComponent::Deprecation.deprecation_warning("Support for Ruby versions < 3.0.0", "ViewComponent 4.0 will remove support for Ruby versions < 3.0.0 ")
if RUBY_VERSION < "3.2.0"
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")
end

if Rails.version.to_f < 6.1
ViewComponent::Deprecation.deprecation_warning("Support for Rails versions < 6.1", "ViewComponent 4.0 will remove support for Rails versions < 6.1 ")
if Rails.version.to_f < 7.1
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")
end
# :nocov:

Expand Down
2 changes: 0 additions & 2 deletions view_component.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "net-imap"
spec.add_development_dependency "net-pop"
spec.add_development_dependency "net-smtp"
else
spec.post_install_message = "ViewComponent v4 will drop support for Ruby < 3.1 in 2025."
end
end