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::Nation.national_sport #1268

Merged
merged 6 commits into from
Jun 5, 2018
Merged

Add Faker::Nation.national_sport #1268

merged 6 commits into from
Jun 5, 2018

Conversation

gkunwar
Copy link
Contributor

@gkunwar gkunwar commented Jun 3, 2018

This PR gives:

  • Random national sport of different nation

Here is issue link: #1267

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.

Unfortunately I think we already have a sport locale.

Take a look at Faker::Team.sport.

I think you could add your locales there?

@gkunwar
Copy link
Contributor Author

gkunwar commented Jun 4, 2018

@vbrazo I have used the previously existing sport locals and added more sports to the locals. Please check.

@vbrazo vbrazo changed the title Random National sport generator Add Faker::Nation.national_sport Jun 5, 2018
@@ -4,5 +4,5 @@ en:
creature: ['ants', 'bats', 'bears', 'bees', 'birds', 'buffalo', 'cats', 'chickens', 'cattle', 'dogs', 'dolphins', 'ducks', 'elephants', 'fishes', 'foxes', 'frogs', 'geese', 'goats', 'horses', 'kangaroos', 'lions', 'monkeys', 'owls', 'oxen', 'penguins', 'people', 'pigs', 'rabbits', 'sheep', 'tigers', 'whales', 'wolves', 'zebras', 'banshees', 'crows', 'black cats', 'chimeras', 'ghosts', 'conspirators', 'dragons', 'dwarves', 'elves', 'enchanters', 'exorcists', 'sons', 'foes', 'giants', 'gnomes', 'goblins', 'gooses', 'griffins', 'lycanthropes', 'nemesis', 'ogres', 'oracles', 'prophets', 'sorcerors', 'spiders', 'spirits', 'vampires', 'warlocks', 'vixens', 'werewolves', 'witches', 'worshipers', 'zombies', 'druids']
name:
- "#{Address.state} #{creature}"
sport: ['baseball', 'basketball', 'football', 'hockey', 'rugby', 'lacrosse', 'soccer']
sport: ['baseball', 'basketball', 'football', 'hockey', 'rugby', 'lacrosse', 'soccer', 'buzkashi', 'cricket', 'kabaddi', 'archery', 'field hockey', 'wrestling', 'association', 'sumo', 'dandi biyo', 'league', 'arnis', 'bandy', 'taekwondo', 'volley ball', 'oil wrestling', 'handball', 'pesäpallo', 'rugby union', 'golf', 'bull fighting', 'shooting', 'gymnastics', 'water polo']
Copy link
Member

Choose a reason for hiding this comment

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

❤️ 💛 🖤 💚 💙


def test_natinonal_sport
assert @tester.national_sport.match(/(\w+\.? ?){2,3}/)
end
Copy link
Member

Choose a reason for hiding this comment

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

👍

@vbrazo vbrazo merged commit d369179 into faker-ruby:master Jun 5, 2018
@vbrazo vbrazo self-requested a review July 19, 2018 01:22
davidmorton0 pushed a commit to davidmorton0/faker that referenced this pull request Jul 12, 2021
* Added test to check for national sport generator

* Added national sports locals and codebase to fetch hem

* Updated documentation

* Used previously exisiting locals for sport and added more sport to the sport

* 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.

2 participants