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

Cleanup books. Add Fantasy::Tolkien to README. #2154

Merged
merged 4 commits into from Mar 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -28,6 +28,7 @@ development.
- [Default](#default)
- [Blockchain](#blockchain)
- [Books](#books)
- [Fantasy](#fantasy)
Copy link
Member

@vbrazo vbrazo Oct 11, 2020

Choose a reason for hiding this comment

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

What does Fantasy do and why do we need a new namespace?

Copy link
Contributor

Choose a reason for hiding this comment

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

Came in with the new Faker::Fantasy::Tolkien. Since LotR and the Hobbit are equally popular as both movies and books, it didn't really make sense for that stuff to be in either. Since Tolkien is often attributed to being the grandfather of the modern fantasy world, I thought it was fitting to create a new namespace for it there.

We can alias some of the other fantasy stuff into Fantasy later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fantasy was the new namespace I was asked to add in PR #2152 to consolidate and normalize the existing Tolkien generators (Movies::Hobbit and Movies::LordOfTheRings). The quotes section in these 'movie' generators betray their origin as books.

- [Creature](#creature)
- [Games](#games)
- [Japanese Media](#japanese-media)
Expand Down Expand Up @@ -227,6 +228,9 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
- [Faker::Books::Dune](doc/books/dune.md)
- [Faker::Books::Lovecraft](doc/books/lovecraft.md)

### Fantasy
- [Faker::Fantasy::Tokien](doc/fantasy/tolkien.md)

### Creature
- [Faker::Creature::Animal](doc/creature/animal.md)
- [Faker::Creature::Cat](doc/creature/cat.md)
Expand Down
15 changes: 15 additions & 0 deletions doc/fantasy/tolkien.md
@@ -0,0 +1,15 @@
# Faker::Fantasy::Tolkien

```ruby
# Any character from the entire Tolkien legendarium
Faker::Fantasy::Tolkien.character #=> "Bungo Baggins"

# Any location from the entire Tolkien legendarium
Faker::Fantasy::Tolkien.location #=> "Minas Morgul"

# Any poem title from the entire Tolkien legendarium
Faker::Fantasy::Tolkien.poem #=> "Fifteen birds in five fir trees"

# Any race from the entire Tolkien legendarium
Faker::Fantasy::Tolkien.race #=> "Ents"
```