-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
LoremFlickr support #818
LoremFlickr support #818
Conversation
Updated tests. Updated docs.
…ing all search_terms.
lib/faker/lorem_flickr.rb
Outdated
build_url(size, 'p', search_terms, match_all) | ||
end | ||
|
||
def colorized_image(size = '300x300', color = 'red', search_terms = [], match_all = false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think search_terms needs a valid default value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'll put something like search_terms = ['all']
👍
I've refactored the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you rebase this branch with master, fix the rubocop
violations, add the title of this PR and your GitHub ID to our CHANGELOG.md
and let me know when it's ready for review again? @mrstebo
Will do @vbrazo 👍 |
Pull Request Test Coverage Report for Build 2147
💛 - Coveralls |
You should run |
@vbrazo should be all sorted now 🙌 |
* Added doc] to get started. * Added the LoremFlickr faker class. * Added lorem_flickr to the list of requires. * Added tests for the LoremFlickr class. * Changed search_term to search_terms which takes an array of strings. Updated tests. Updated docs. * Added the match_all parameter so it returns the url of an image matching all search_terms. * Added LoremFlickr to README. * Extracted building out URL to separate method. * Added LoremFlickr.pixelated_image. * Added LoremFlickr.colorized_image. * Added tests for supported colorizations. * Added tests to check that an error is thrown when given an unsupported size. * Added valid default values for methods requiring search_terms. * Updated the docs. * Added documentation for more parameter combinations. * Added separate method for creating grayscale images. * Updated the docs with the new grayscale_image method. * Removed the is_gray parameter from the image method. * Updated the docs. * Fixed Rubocop offenses. * Added title of PR and Github ID to CHANGELOG.md.
I was using
Faker::LoremPixel
, but you get a wider range of images using LoremFlickr.You not only get grayscale images. You also get pixelated and colorized images.