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

Add exclude_words filter to Faker::Lorem.word generator #2761

Merged
merged 4 commits into from
May 31, 2023

Conversation

geophilusd
Copy link
Contributor

@geophilusd geophilusd commented May 15, 2023

Motivation / Background

Faker::Lorem.words() accepts exclude_words whereas Faker::Lorem.word doesn't. Allows the functionality introduced in #2665 to the word method also.

Additional information

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.

Copy link
Contributor

@thdaraujo thdaraujo left a comment

Choose a reason for hiding this comment

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

thanks for submitting this change. I left some comments about the implementation.

lib/faker/default/lorem.rb Outdated Show resolved Hide resolved
test/faker/default/test_faker_lorem.rb Outdated Show resolved Hide resolved
test/faker/default/test_faker_lorem.rb Outdated Show resolved Hide resolved
@geophilusd
Copy link
Contributor Author

Thanks for your feedback @thdaraujo. I have made the necessary changes. Please check.

Copy link
Contributor

@thdaraujo thdaraujo left a comment

Choose a reason for hiding this comment

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

nice!

@thdaraujo thdaraujo changed the title Add exclude_words keyword to Lorem Ipsum word Add exclude_words filter to Faker::Lorem.word generator May 31, 2023
@thdaraujo thdaraujo merged commit b6a8e42 into faker-ruby:main May 31, 2023
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