From 1ed8c585468d27c0d624bd79c44601d1e562f16b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" Date: Thu, 20 Jun 2019 12:23:45 +0000 Subject: [PATCH 1/2] Bump faker from 1.9.3 to 1.9.4 Bumps [faker](https://github.com/stympy/faker) from 1.9.3 to 1.9.4. - [Release notes](https://github.com/stympy/faker/releases) - [Changelog](https://github.com/stympy/faker/blob/master/CHANGELOG.md) - [Commits](https://github.com/stympy/faker/compare/v1.9.3...1.9.4) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7908c2836..aa9ccedf9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -107,14 +107,20 @@ GEM ebnf (1.1.3) rdf (~> 3.0) sxp (~> 1.0) + equatable (0.6.0) erubi (1.8.0) factory_bot (5.0.2) activesupport (>= 4.2.0) factory_bot_rails (5.0.2) factory_bot (~> 5.0.2) railties (>= 4.2.0) - faker (1.9.3) + faker (1.9.4) i18n (>= 0.7) + pastel (~> 0.7.2) + thor (~> 0.20.0) + tty-pager (~> 0.12.0) + tty-screen (~> 0.6.5) + tty-tree (~> 0.3.0) faraday (0.15.4) multipart-post (>= 1.2, < 3) ffi (1.11.1) @@ -177,6 +183,9 @@ GEM parallel (1.17.0) parser (2.6.3.0) ast (~> 2.4.0) + pastel (0.7.3) + equatable (~> 0.6) + tty-color (~> 0.5) pg (1.1.4) pg_search (2.2.0) activerecord (>= 4.2) @@ -306,16 +315,30 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) + strings (0.1.5) + strings-ansi (~> 0.1) + unicode-display_width (~> 1.5) + unicode_utils (~> 1.4) + strings-ansi (0.1.0) sxp (1.0.2) rdf (~> 3.0) thor (0.20.3) thread_safe (0.3.6) + tty-color (0.5.0) + tty-pager (0.12.1) + strings (~> 0.1.4) + tty-screen (~> 0.6) + tty-which (~> 0.4) + tty-screen (0.6.5) + tty-tree (0.3.0) + tty-which (0.4.1) turbolinks (5.2.0) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) tzinfo (1.2.5) thread_safe (~> 0.1) unicode-display_width (1.6.0) + unicode_utils (1.4.0) uniform_notifier (1.12.1) warden (1.2.8) rack (>= 2.0.6) From 495f8d33c67a2296c315afa318f8def1fba2f723 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 23 Jun 2019 14:33:05 -0600 Subject: [PATCH 2/2] 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,