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 sports documentation and update sports #2600

Merged
merged 2 commits into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,11 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'main


### Sports
- [Faker::Sports](doc/sports/sports.md)
- [Faker::Sports::Basketball](doc/sports/basketball.md)
- [Faker::Sports::Football](doc/sports/football.md)
- [Faker::Sports::Mountaineering](doc/sports/mountaineering.md)
- [Faker::Sports::Volleyball](doc/sports/volleyball.md)

### Tv Shows
- [Faker::TvShows::AquaTeenHungerForce](doc/tv_shows/aqua_teen_hunger_force.md)
Expand Down
41 changes: 41 additions & 0 deletions doc/sports/sports.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Faker::Sports

## Conventional (Olympic including Paralympic) Sports

```ruby
# Any one of the below four categories:
Faker::Sports.sport #=> "Snowboard"

Faker::Sports.summer_olympics_sport #=> "Triathlon"

Faker::Sports.winter_olympics_sport #=> "Luge"

Faker::Sports.summer_paralympics_sport #=> "Goalball"

Faker::Sports.winter_paralympics_sport #=> "Wheelchair curling"
```

## Ancient Sports

```ruby
Faker::Sports.ancient_olympics_sport #=> "Chariot racing"

# Any modern or ancient olympic sport:
Faker::Sports.sport(include_ancient: true) #=> "Rugby"
```

## Unusual Sports (just for fun)

```ruby
Faker::Sports.unusual_sport #=> "Camel wrestling"

# Any modern olympic or unusual sport:
Faker::Sports.sport(include_unusual: true) #=> "Gurning"
```

## Full list

```ruby
# Modern, ancient or unusual:
Faker::Sports.sport(include_ancient: true, include_unusual: true) #=> "Powerlifting"
```
26 changes: 18 additions & 8 deletions lib/locales/en/sport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ en:
- Baseball # Technically part of "Baseball Softball" according to IOC website
- Basketball
- Beach volleyball
- BMX freestyle
- BMX racing
- BMX freestyle # Officially "Cycling BMX Freestyle"
- BMX racing # Officially "Cycling BMX Racing"
- Boxing
- Canoe/kayak flatwater
- Canoe/kayak slalom
Expand All @@ -27,11 +27,11 @@ en:
- Karate
- Marathon swimming
- Modern pentathlon
- Mountain bike
- Mountain bike # Officially "Cycling Mountain Bike"
- Rhythmic gymnastics
- Road cycling
- Road cycling # Officially "Cycling Road"
- Rowing
- Rugby
- Rugby # Officially "Rugby Sevens"
- Sailing
- Shooting
- Skateboarding
Expand All @@ -42,7 +42,7 @@ en:
- Table tennis
- Taekwondo
- Tennis
- Track cycling
- Track cycling # Officially "Cycling Track"
- Trampoline
- Triathlon
- Volleyball
Expand All @@ -53,7 +53,7 @@ en:
- Alpine skiing
- Biathlon
- Bobsleigh
- Cross-country
- Cross-country skiing
- Curling
- Figure skating
- Freestyle skiing
Expand All @@ -63,17 +63,18 @@ en:
- Short track speed skating
- Skeleton
- Ski jumping
- Ski mountaineering
- Snowboard
- Speed skating
summer_paralympics: # Source https://www.paralympic.org/sports
- Archery
- Athletics
- Badminton
- Blind football
- Boccia
- Canoe
- Cycling
- Equestrian
- Football (5-a-side)
- Goalball
- Judo
- Powerlifting
Expand Down Expand Up @@ -110,12 +111,21 @@ en:
- Ban'ei
- Bathtubbing
- Bed racing
- Bossaball
- Botaoshi
- Beer Can Regatta
- Black pudding throwing
- Bog snorkelling
- Bottle kicking
- Camel jumping
- Camel wrestling
- Chess boxing
- Extreme ironing
- Flugtag/Birdman
- Gurning
- Kastenlauf (Beer crate running)
- Oil wrestling
- Poohsticks
- Wife carrying
- Zorbing

thdaraujo marked this conversation as resolved.
Show resolved Hide resolved