Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

drop use of unuspported_reason_add #260

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

kbrock
Copy link
Member

@kbrock kbrock commented Feb 23, 2024

part of:

Deprecating unsupported_reason_add. Returning the string instead

Note, these are all the same:

unsupported_reason_add(:feature, unsupported_reason(:feature2)) unless supports_feature2?
unsupported_reason_add(:feature, unsupported_reason(:feature2)) unless supports?(:feature2)
unsupported_reason(:feature2) unless supports?(:feature2)
unsupported_reason(:feature2)

@kbrock
Copy link
Member Author

kbrock commented Feb 27, 2024

update:

  • fixed unsupported_reason(:control) || ...

supports :terminate do
unsupported_reason_add(:terminate, unsupported_reason(:control)) unless supports?(:control)
end
supports(:terminate) { unsupported_reason(:control) unless supports?(:control) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can simply be

Suggested change
supports(:terminate) { unsupported_reason(:control) unless supports?(:control) }
supports(:terminate) { unsupported_reason(:control) }

right?

Comment on lines 9 to 11
_("The VM is not powered on")
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_("The VM is not powered on")
end
_("The VM is not powered on")
end
end

@kbrock kbrock force-pushed the unsupports_supports branch from 2df56f7 to 65a2d7a Compare February 27, 2024 23:54
@miq-bot
Copy link
Member

miq-bot commented Feb 27, 2024

Checked commit kbrock@65a2d7a with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
4 files checked, 0 offenses detected
Everything looks fine. ⭐

@agrare agrare merged commit a6c0488 into ManageIQ:master Feb 28, 2024
4 checks passed
@kbrock kbrock deleted the unsupports_supports branch February 29, 2024 14:02
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants