From 495f8d33c67a2296c315afa318f8def1fba2f723 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 23 Jun 2019 14:33:05 -0600 Subject: [PATCH] Remove some custom Faker generators. They're now provided by the upstream Faker project. --- config/initializers/faker.rb | 12 ---- config/locales/en.yml | 126 +---------------------------------- db/seeds/games.rb | 2 +- 3 files changed, 2 insertions(+), 138 deletions(-) diff --git a/config/initializers/faker.rb b/config/initializers/faker.rb index cca01932a..4b0539058 100644 --- a/config/initializers/faker.rb +++ b/config/initializers/faker.rb @@ -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 diff --git a/config/locales/en.yml b/config/locales/en.yml index 5882c1ec8..f5c588e0a 100644 --- a/config/locales/en.yml +++ b/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', diff --git a/db/seeds/games.rb b/db/seeds/games.rb index 0f5f3ad4e..3f4a772c4 100644 --- a/db/seeds/games.rb +++ b/db/seeds/games.rb @@ -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,