Skip to content
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

Deprecate #to_miq_a #483

Merged
merged 3 commits into from
Jul 24, 2020
Merged

Deprecate #to_miq_a #483

merged 3 commits into from
Jul 24, 2020

Conversation

Array.wrap(self)
end
end

class String
def to_miq_a
ActiveSupport::Deprecation.warn("String#to_miq_a should be replaced by #lines.to_a", caller.drop(1))
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it should include the String class: String#lines.to_a to be consistent with the other messages here.

@jrafanie
Copy link
Member

Is this still WIP @bdunne ? Check out the tests, the messages show the calling code is in rspec, not our code or our tests... is this because it's doing evals/instance_eval or something?

@bdunne bdunne changed the title [WIP] Deprecate #to_miq_a Deprecate #to_miq_a Jul 17, 2020
@miq-bot miq-bot removed the wip label Jul 17, 2020
@bdunne
Copy link
Member Author

bdunne commented Jul 17, 2020

Is this still WIP @bdunne ? Check out the tests, the messages show the calling code is in rspec, not our code or our tests... is this because it's doing evals/instance_eval or something?

I wanted to take care of most of the issues before this was merged to avoid flooding the test output, I think it's okay now. Also fixed the caller location.

These tests are still valid until the code is removed.
@miq-bot
Copy link
Member

miq-bot commented Jul 24, 2020

Checked commits bdunne/manageiq-gems-pending@b2ebaa1~...62070aa with ruby 2.5.7, rubocop 0.69.0, haml-lint 0.28.0, and yamllint
2 files checked, 0 offenses detected
Everything looks fine. 🏆

@jrafanie jrafanie merged commit 05194ac into ManageIQ:master Jul 24, 2020
@bdunne bdunne deleted the to_miq_a branch July 24, 2020 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants