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 Faker::Games namespace #1412

Merged
merged 34 commits into from
Oct 22, 2018

Conversation

ChaoticBoredom
Copy link
Contributor

@ChaoticBoredom ChaoticBoredom commented Oct 16, 2018

Not sure if this is a valuable PR, but this is my attempt to push all the Games into the single folder.
All the Games stuff is now namespaced under Games.

If needed, I can break these up into a bunch of smaller PRs, and I think in the future, a number of smaller PRs would be easier to review. Also likely this should be a minor version bump.

This PR is related to this issue #1318.

Copy link
Member

@vbrazo vbrazo 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 contributing and adding the Games namespace 👍

Couple of things:

  • don't remove the files yet. The old methods should call the new methods, otherwise you'll break users' code in a way that they'll get pissed off.
  • you need to deprecate the methods that you're removing. You should do that in the old objects.

I don't know when we'll release these namespaces. I've also worked on the Lorem namespacing recently. Thanks for coming here and submitting this PR. Someone had to get his/her hands dirty 👍 and this PR is awesome!

ps: Please fix the rubocop offense.

README.md Outdated
- [Faker::Games::Zelda](doc/zelda.md)
- [Faker::Gender](doc/gender.md)
- [Faker::Pokemon](doc/pokemon.md)
- [Faker::GratefulDead](doc/grateful_dead.md)
Copy link
Member

Choose a reason for hiding this comment

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

The order is wrong here. Did you miss the namespace?

@vbrazo
Copy link
Member

vbrazo commented Oct 16, 2018

@ChaoticBoredom we started the discussion in this issue #1318. Please check it out.

@vbrazo vbrazo changed the title Organize games into games dir Add Faker::Games namespace Oct 16, 2018
@ChaoticBoredom
Copy link
Contributor Author

Cool, I likely screwed something up in my merge conflict resolution. Will address. I was looking at that issue for guidance, didn't notice it had the text file. I'd left the Witcher out because it's also a book series so wasn't sure where it belonged. Will add deprecation warnings.
Thanks for the quick review :)

@boardfish
Copy link
Contributor

@ChaoticBoredom I think the Witcher series has the most cultural impact as a game right now, so I'd put it in Games still.

@ChaoticBoredom
Copy link
Contributor Author

Have addressed most requested changes, still need to add tests around the deprecated methods.

@ChaoticBoredom
Copy link
Contributor Author

@vbrazo I think I've addressed everything. I did try and use both existing Games namespacing and your Lorem PR as examples for how to address everything.
I think also that for any future groups, if they are more than two or three objects, should likely be handled as a series of smaller PRs. This definitely grew to be very large 😬

@vbrazo
Copy link
Member

vbrazo commented Oct 20, 2018

Yeah. It's a pretty big one. No need to apologize. As long as your changes add the new namespace and help us transform the library in a more useful work tool, we're happy to review and request changes when necessary.

I'll pull the code, read and test the changes during the weekend 👍

Thanks for adding the tests for the old methods and for the new namespace. That's necessary. Otherwise we don't know if they're really working.

Faker::Games::Dota.quote #=> "Easy now, this stuff is explosive!"
Faker::Games::Dota.quote(hero = 'alchemist') #=> "Better living through alchemy!"
Copy link
Member

Choose a reason for hiding this comment

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

Could we convert this parameter to a keyword argument as it was suggested in this issue #603?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could that be done as a follow-up? Keep this PR as more of a strict re-org?

Copy link
Member

Choose a reason for hiding this comment

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

sure

@vbrazo vbrazo merged commit a34e418 into faker-ruby:master Oct 22, 2018
davidmorton0 pushed a commit to davidmorton0/faker that referenced this pull request Jul 12, 2021
* Move games files into 'games' folder

* Migrate all 'elder_scrolls' code to the 'games' namespace

* Move 'zelda' to the correct 'namespace'

* Update 'fallout' to be in the 'games' namespace

* Update 'pokemon' to be in the 'games' namespace

* Update 'world_of_warcraft' to be in the 'games' namespace

* Update 'overwatch' to be in the 'games' namespace

* Update 'myst' to be in the 'games' namespace

* Update 'league_of_legends' to be in the 'games' namespace

* Update 'dota' to be in the 'games' namespace

* Move 'witcher' to be under 'games' namespace

* Remove rubocop warning

* Restore old file, deprecate methods in favour of new namespaced version

* Restore 'dota' file, add deprecations

* Restore 'elder_scrolls' and deprecate

* Restore 'heroes_of_the_storm' and deprecate

* Restore 'league_of_legends' and deprecate

* Restore 'myst' and deprecate

* Restore 'overwatch' and deprecate

* Restore 'pokemon' and deprecate

* Restore 'world_of_warcraft' and deprecate

* Restore 'zelda' and deprecate

* Address mucked up merge

* Restore 'fallout' and deprecate

* Merge mess still

* Address rubocop violation

* Remove duplicated entry

* Remove extra '::'

* Add tests for the newly deprecated methods

* Update CHANGELOG.md
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