-
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
Add image file method to placeholdit #1243
Add image file method to placeholdit #1243
Conversation
4966656
to
882abc5
Compare
I see the travis error |
The leak probably comes from the use of tempfile, which uses randomness to get unique filenames. The solution would most likely be to not use tempfile. However, I don't think this belongs in Faker. Having the image_file method in the doc would be great, though, to show people how to get that functionality. |
@stympy Thanks for your answer. I'll try to have a look on it in the following days. |
Else let me know if I have to remove my method, and just update the doc. I will update my method first, and then do changes in function of what we decide. |
Yes, I'd recommend dropping the method and just include the method's code in the doc as an example of how to use the image method to get a file. |
Any updates? @nicolas-brousse |
Hey! Sorry I'm really busy those days. I'll try to have a look today to update this. |
882abc5
to
7797c6f
Compare
Show how to use Placehold to download a file from Placeholdit url.
7797c6f
to
400a6b6
Compare
I made a change. Let me know if it's good enough or if you would like some changes. |
* Add Faker::Vehicle.singapore_license_plate (#1410) * Add Singapore vehicle license plate * Update en-SG.yml * Add image file method to placeholdit (#1243) * Update Placeholdit doc Show how to use Placehold to download a file from Placeholdit url. * Code cleanup * Add Faker::Games::SonicTheHedgehog * Update README, CHANGELOG and documentation
* Update Placeholdit doc Show how to use Placehold to download a file from Placeholdit url. * Code cleanup
* Add Faker::Vehicle.singapore_license_plate (faker-ruby#1410) * Add Singapore vehicle license plate * Update en-SG.yml * Add image file method to placeholdit (faker-ruby#1243) * Update Placeholdit doc Show how to use Placehold to download a file from Placeholdit url. * Code cleanup * Add Faker::Games::SonicTheHedgehog * Update README, CHANGELOG and documentation
This PR add a
image_file
method in Placeholdit module to get aFile
object of the image, instead of just the URL.Close #1217.