Skip to content

Commit

Permalink
Add Football Positions (#1438)
Browse files Browse the repository at this point in the history
  • Loading branch information
fblupi authored and vbrazo committed Oct 23, 2018
1 parent 25b9031 commit a66f07a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/football.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ Faker::Football.player #=> "Lionel Messi"
Faker::Football.coach #=> "Jose Mourinho"

Faker::Football.competition #=> "FIFA World Cup"

Faker::Football.position #=> "Defensive Midfielder"
```

4 changes: 4 additions & 0 deletions lib/faker/football.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ def coach
def competition
fetch('football.competitions')
end

def position
fetch('football.positions')
end
end
end
end
1 change: 1 addition & 0 deletions lib/locales/en/football.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ en:
players: ["Lionel Messi", "Gerard Pique", "Sergio Ramos", "Cristiano Ronaldo", "David De Gea", "Paul Pogba", "Antoine Griezmann", "Alvaro Morata", "Andres Iniesta", "Roberto Firmino", "Mohammed Salah", "Harry Kane", "Delle Alli", "Arjen Robben", "Franck Ribery", "Marco Reus", "Robert Lewandoski", "Zlatan Ibrahimovic", "Edinson Cavani", "Sergio Aguero", "Neymar", "Mesut Ozil", "Gianluigi Buffon", "Willian", "Manuel Neuer", "Juan Mata", "Manuel Neuer", "Cesc Fabregas", "Gareth Bale", "Eden Hazard", "Mario Mandzukic"]
coaches: ["Ernesto Valverde", "Zinedine Zidane", "Jose Mourinho", "Antonio Conte", "Jurgen Klopp", "Mauricio Pochettino", "Diego Simeone", "Massimiliano Allegri", "Jupp Heyneckes", "Arsene Wenger", "Jorge Sampaoli", "Fernando Santos", "Didier Deschamps", "Joachim Low", "Julen Lopetegui", "Mauricio Pochettino", "Unai Emery", "Massimiliano Allegri" ]
competitions: ["UEFA European Championship", "Asian Cup", "African Cup of Nations", "Copa America", "UEFA Champions League", "FIFA World Cup", "UEFA Europa League", "Serie A", "Barclays Premier League", "Bundesliga", "Liga Santander", "FA Cup", "Ligue 1", "Primeira Liga", "Eredivisie", "Super League", "Major League Soccer", "Coppa Italia", "DFB Pokal", "CONCACAF Gold Cup", "Nations Cup", "Copa del Rey"]
positions: ["Goalkeeper", "Full Back", "Right Back", "Left Back", "Defensive Midfielder", "Midfielder", "Attacking Midfielder", "Right Midfielder", "Left Midfielder", "Right Wing", "Left Wing", "Second Striker", "Centre Forward"]
4 changes: 4 additions & 0 deletions test/test_faker_football.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ def test_coach
def test_competition
assert @tester.competition.match(/\w+/)
end

def test_position
assert @tester.position.match(/\w+/)
end
end

0 comments on commit a66f07a

Please sign in to comment.