-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Remove respond_to? check #2202
Draft
tiagomenegaz
wants to merge
15
commits into
v4
Choose a base branch
from
remove-respond-to
base: v4
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+18
−20
Conversation
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
f070b12
to
14c5cf1
Compare
af2eadc
to
691f55c
Compare
691f55c
to
450dfd1
Compare
992be13
to
ffb02e3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish?
This PR removes
respond_to?
from the following files:app/controllers/concerns/view_component/preview_actions.rb
lib/view_component/base.rb
lib/view_component/collection.rb
lib/view_component/slotable.rb
lib/view_component/slotable_default.rb
lib/view_component/translatable.rb
test/sandbox/test/rendering_test.rb
test/sandbox/test/slotable_test.rb
view_component.gemspec
What approach did you choose and why?
Some checks aren't necessary because we don't support discontinued Ruby versions and the code can be written without
respond_to?
.Anything you want to highlight for special attention from reviewers?
I noticed that some
respond_to?
are being used to supportruby2_keywords
. I'm assuming it exists because we want to support old ruby versions. However, based on the gemfile -ruby_version = (ENV["RUBY_VERSION"] || "~> 3.4").to_s
- we don't support Ruby 2 anymore. I'll address these keywords in a different PR.