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 User generator that accepts arguments #1671
Comments
Would this return a hash with the info or a data class with attributes for the data? I believe this would be a nice addition to some other classes as well, like Vehicle, where you could generate one with a random or fixed brand, and it returns a vehicle class with the brand, model, year, doors, license plate, etc |
The new user class method will now allow you to do this ``` user = Faker::Internet.user('name', 'email', password') => {'name' => 'John Doe', 'email' => 'fake_email@test.com', 'password' => 'pass123' } ```
Hi, I was passing by and I found this one, I noticed @ashishra0 started working on it but he closed the PR, So is there any problem working on it? I've came up with a solution to this new one, Check it please, I used some of @ashishra0 code for testing my method too, So thanks to him. |
@AmrAdelKhalil Hey, I had to close that issue because apparently the author had just changed the file structure moments before I came up with a solution. So i had to delete the branch I was working on and pull the fresh changes and start working again. |
@AmrAdelKhalil The issue is still open, I had created a new PR for it #1730 |
@ashishra0 Hey, This is my bad, I didn't notice the PR, My apologies. Hey @vbrazo, |
@AmrAdelKhalil Appreciate it mate! Cheers 👍🏻 |
The new user class method will now allow you to do this ``` user = Faker::Internet.user('name', 'email', password') => {'name' => 'John Doe', 'email' => 'fake_email@test.com', 'password' => 'pass123' } ```
The new user class method will now allow you to do this ``` user = Faker::Internet.user('name', 'email', password') => {'name' => 'John Doe', 'email' => 'fake_email@test.com', 'password' => 'pass123' } ```
* Add user generator that accepts arguments (#1671) The new user class method will now allow you to do this ``` user = Faker::Internet.user('name', 'email', password') => {'name' => 'John Doe', 'email' => 'fake_email@test.com', 'password' => 'pass123' } ``` * Add user generator that accepts arguments (#1671) The new user class method will now allow you to do this ``` user = Faker::Internet.user('name', 'email', password') => {'name' => 'John Doe', 'email' => 'fake_email@test.com', 'password' => 'pass123' } ``` * add yard docs for user generator * Add user generator that accepts arguments (#1671) The new user class method will now allow you to do this ``` user = Faker::Internet.user('name', 'email', password') => {'name' => 'John Doe', 'email' => 'fake_email@test.com', 'password' => 'pass123' } ``` * add yard docs for user generator * reduce hash tags Co-authored-by: Stephen A. Wilson <stephen-356@hotmail.com>
Hey, folks. In an effort to lighten our load as maintainers and be able to serve you better in the future, the faker-ruby team is working on cleaning out the cobwebs in this repo by pruning the backlog. As there are few of us, there are a lot of items that will simply never earn our attention in a reasonable time frame, and rather than giving you an empty promise, we think it makes more sense to focus on more recent issues. That means, unfortunately, that we must close this issue. Don't take this the wrong way: our aim is not to diminish the effort people have made or dismiss problems that have been raised. If you feel that we should reopen this issue, then please let us know so that we can reprioritize it. Thanks! |
Type: Feature Request
About: Rather than cobbling together a User object during development using individual Faker methods, it could be nice to have a generic user method that accepts arguments such as
name
,id
,email
,username
,password
and other common user attributes and returns an object with the desired attributes. Or if no arguments are provided, returns a default User object that hasusername
andpassword
attributes (or whatever attributes make sense for a default case).Example
Instead of having to do:
Create method that allows:
The text was updated successfully, but these errors were encountered: