FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add `Deprecator.skip_warning?` ability to silence deprecators on tests by keshavbiswa · Pull Request #2956 · faker-ruby/faker · GitHub

Add Deprecator.skip_warning? ability to silence deprecators on tests - #2956

Merged
thdaraujo merged 15 commits into
faker-ruby:mainfrom
keshavbiswa:add-silence-to-dep-warnings
Jul 9, 2024
Merged

Add Deprecator.skip_warning? ability to silence deprecators on tests#2956
thdaraujo merged 15 commits into
faker-ruby:mainfrom
keshavbiswa:add-silence-to-dep-warnings

Conversation

Copy link
Copy Markdown
Contributor

Motivation / Background

Fixes: #2948

This Pull Request has been created because We want the ability to silence output warnings for Deprecated Generators in tests.

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug, refactor something, or add a feature.
  • Tests and Rubocop are passing before submitting your proposed changes.

If you're proposing a new generator or locale:

  • Double-check the existing generators documentation to make sure the new generator you want to add doesn't already exist.
  • You've reviewed and followed the Contributing guidelines.

stefannibrasil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This LGTM, thank you!

@thdaraujo could you give a review when you can? Thanks!

Comment thread lib/faker/locations/australia.rb Outdated
Comment thread lib/helpers/deprecator.rb

thdaraujo left a comment
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is just for our own testing purposes, right?

If yes, then it looks good to me - but left a suggestion so we don't use a class variable.

And Faker::Theater still displays a warning, not sure why.

Comment thread lib/helpers/deprecator.rb Outdated
Comment thread lib/helpers/deprecator.rb

Copy link
Copy Markdown
Contributor Author

@thdaraujo Thanks, I'll take a look at your suggestion and also figure out why you're seeing the deprecation message.

Copy link
Copy Markdown
Contributor Author

@thdaraujo @stefannibrasil I have fixed the issue and have updated your requested changes.

Copy link
Copy Markdown
Contributor Author

@stefannibrasil Reordered it, I misunderstood earlier

This variable is not needed anymore.
Comment thread lib/helpers/deprecator.rb Outdated
thdaraujo changed the title Added skip_warning ability to deprecators for tests Added skip_warning ability to silence deprecators on tests Jul 9, 2024
thdaraujo changed the title Added skip_warning ability to silence deprecators on tests Add skip_warning ability to silence deprecators on tests Jul 9, 2024
thdaraujo changed the title Add skip_warning ability to silence deprecators on tests Add Deprecator.skip_warning? ability to silence deprecators on tests Jul 9, 2024

thdaraujo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

perfect, thanks for working on this! @keshavbiswa

thdaraujo merged commit 2b5df17 into faker-ruby:main Jul 9, 2024
keshavbiswa deleted the add-silence-to-dep-warnings branch July 9, 2024 15:28
keshavbiswa restored the add-silence-to-dep-warnings branch July 9, 2024 15:28
keshavbiswa deleted the add-silence-to-dep-warnings branch July 9, 2024 15:28
This file contains hidden or 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
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.

Add option to silence deprecation warnings when running the tests

4 participants


Back | FazBrowse Home | New Git URL