Skip to content

Commit

Permalink
Remove some custom Faker generators.
Browse files Browse the repository at this point in the history
They're now provided by the upstream Faker project.
  • Loading branch information
connorshea committed Jun 23, 2019
1 parent 1ed8c58 commit 495f8d3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 138 deletions.
12 changes: 0 additions & 12 deletions config/initializers/faker.rb
Expand Up @@ -2,18 +2,6 @@
module GameProperties
class Game < Faker::Base
class << self
def name
fetch('game.name')
end

def platform
fetch('game.platform')
end

def genre
fetch('game.genre')
end

def company
fetch('game.company')
end
Expand Down
126 changes: 1 addition & 125 deletions config/locales/en.yml
@@ -1,132 +1,8 @@
en:
# Faker data for seeding video game titles.
# Faker data for seeding video game data.
# Don't forget to also update faker.rb when you add new Faker data, idiot.
faker:
game:
name: [
'Half-Life',
'Half-Life: Opposing Force',
'Half-Life: Blue Shift',
'Half-Life 2',
'Half-Life 2: Episode One',
'Half-Life 2: Episode Two',
'Portal',
'Portal 2',
'Team Fortress Classic',
'Team Fortress 2',
'Super Mario Bros.',
'Super Mario Bros. 2',
'Super Mario Bros. 3',
'Super Mario World',
'Super Mario Sunshine',
'Super Mario Galaxy',
'Super Mario Galaxy 2',
'Super Mario Odyssey',
'Civilization III',
'Civilization IV',
'Civilization V',
'Civilization VI',
'The Legend of Zelda',
'The Legend of Zelda: Ocarina of Time',
"The Legend of Zelda: Majora's Mask",
'The Legend of Zelda: Twilight Princess',
'The Legend of Zelda: Skyward Sword',
'The Legend of Zelda: Breath of the Wild',
'Pong',
'Pac-Man',
'Starcraft',
'Starcraft II',
'Overwatch',
'Hearthstone',
'Halo: Combat Evolved',
'Halo 2',
'Halo 3',
'Halo 3: ODST',
'Halo: Reach',
'Halo 4',
'Halo 5: Guardians',
'Wii Sports',
'Wii Sports Resort',
'Wii Play',
'Wii Music',
'Pokémon Red',
'Pokémon Blue',
'Pokémon Yellow',
'Pokémon Gold',
'Pokémon Silver',
'Pokémon Crystal',
'Pokémon Ruby',
'Pokémon Sapphire',
'Pokémon FireRed',
'Pokémon LeafGreen',
'Pokémon Emerald',
'Pokémon Diamond',
'Pokémon Pearl',
'Pokémon Platinum',
'Pokémon HeartGold',
'Pokémon SoulSilver',
'Pokémon Black',
'Pokémon White',
'Pokémon Black 2',
'Pokémon White 2',
'Pokémon X',
'Pokémon Y',
'Pokémon Omega Ruby',
'Pokémon Alpha Sapphire',
'Pokémon Sun',
'Pokémon Moon',
'Pokémon Ultra Sun',
'Pokémon Ultra Moon',
"Pokémon: Let's Go Pikachu!",
"Pokémon: Let's Go Eevee!"
]
platform: [
'Xbox',
'Xbox 360',
'Xbox One',
'PlayStation',
'PlayStation 2',
'PlayStation 3',
'PlayStation 4',
'GameBoy',
'GameBoy Color',
'GameBoy Advanced',
'Nintendo DS',
'Nintendo 3DS',
'Nintendo Entertainment System',
'Super Nintendo Entertainment System',
'Nintendo 64',
'GameCube',
'Wii',
'Wii U',
'Nintendo Switch',
'Windows',
'macOS',
'Linux'
]
genre: [
'First-person shooter',
'Puzzle',
'Platformer',
'Action',
'Adventure',
'Strategy',
'Role-playing game',
'Sports',
'Simulation',
'Fighting',
'Massively multiplayer online',
'Stealth',
'Survival',
'Rhythm',
'Survival horror',
'Text adventure',
'Visual novel',
'Real-time strategy',
'Multiplayer online battle arena',
'Tower defense',
'Trivia'
]
company: [
'Valve',
'Nintendo',
Expand Down
2 changes: 1 addition & 1 deletion db/seeds/games.rb
Expand Up @@ -26,7 +26,7 @@ def cover_fetcher
engines.uniq!

game = Game.create!(
name: Faker::Game.unique.name,
name: Faker::Game.unique.title,
description: Faker::Lorem.sentence,
genres: genres,
engines: engines,
Expand Down

0 comments on commit 495f8d3

Please sign in to comment.