-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ViewComponent::Deprecation (#1277)
* Add ViewComponent::Deprecation This should allow consumers to see deprecation warnings that correctly mention the next version of VC. Co-Authored-By: Elia Schito <elia@schito.me> Co-Authored-By: Hans Lemuet <Spone@users.noreply.github.com> * Avoid warning about polymorphic slots getter being redefined ``` lib/view_component/polymorphic_slots.rb:42: warning: method redefined; discarding old header lib/view_component/polymorphic_slots.rb:42: warning: previous definition of header was here lib/view_component/polymorphic_slots.rb:42: warning: method redefined; discarding old items lib/view_component/polymorphic_slots.rb:42: warning: previous definition of items was here ``` * Remove the unsupported frozen_string_literal comment from jbuilder template Was generating this warning: ``` test/sandbox/app/components/jbuilder_component.json.jbuilder:1: warning: `frozen_string_literal' is ignored after any tokens ``` See also: https://bugs.ruby-lang.org/issues/16602 * Add deprecation horizon management to the release script * Update deprecation copy for manually loading the engine Co-authored-by: Cameron Dutro <camertron@github.com> --- Co-authored-by: Max Beizer <max.beizer@gmail.com> Co-authored-by: Hans Lemuet <Spone@users.noreply.github.com> Co-authored-by: Cameron Dutro <camertron@github.com>
- Loading branch information
1 parent
38a3c86
commit 6a5442b
Showing
13 changed files
with
44 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
require "active_support/deprecation" | ||
|
||
module ViewComponent | ||
DEPRECATION_HORIZON = 3 | ||
Deprecation = ActiveSupport::Deprecation.new(DEPRECATION_HORIZON.to_s, "ViewComponent") | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
# frozen_string_literal: true | ||
|
||
json.message @message | ||
json.conent content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters