From 0d07d8db6489fd0681590dba75cb9c171a4cc729 Mon Sep 17 00:00:00 2001 From: Liam <40987991+lepari23@users.noreply.github.com> Date: Fri, 14 Apr 2023 08:28:58 +0200 Subject: [PATCH 1/2] Added Archer into tv category. --- README.md | 1 + doc/tv_shows/archer.md | 9 ++++ lib/faker/tv_shows/archer.rb | 51 ++++++++++++++++++++ lib/locales/en/archer.yml | 75 ++++++++++++++++++++++++++++++ test/faker/tv_shows/test_archer.rb | 21 +++++++++ 5 files changed, 157 insertions(+) create mode 100644 doc/tv_shows/archer.md create mode 100644 lib/faker/tv_shows/archer.rb create mode 100644 lib/locales/en/archer.yml create mode 100644 test/faker/tv_shows/test_archer.rb diff --git a/README.md b/README.md index c97d8cfaaf..c80751a664 100644 --- a/README.md +++ b/README.md @@ -438,6 +438,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'main Tv Shows - [Faker::TvShows::AquaTeenHungerForce](doc/tv_shows/aqua_teen_hunger_force.md) + - [Faker::TvShows::Archer](doc/tv_shows/archer.md) - [Faker::TvShows::BigBangTheory](doc/tv_shows/big_bang_theory.md) - [Faker::TvShows::BojackHorseman](doc/tv_shows/bojack_horseman.md) - [Faker::TvShows::BreakingBad](doc/tv_shows/breaking_bad.md) diff --git a/doc/tv_shows/archer.md b/doc/tv_shows/archer.md new file mode 100644 index 0000000000..7d88ed2905 --- /dev/null +++ b/doc/tv_shows/archer.md @@ -0,0 +1,9 @@ +# Faker::TvShows::Archer + +```ruby +Faker::TvShows::Archer.character #=> "Sterling Archer" + +Faker::TvShows::Archer.location #=> "Area 51" + +Faker::TvShows::Archer.quote #=> "Danger Zone!" +``` diff --git a/lib/faker/tv_shows/archer.rb b/lib/faker/tv_shows/archer.rb new file mode 100644 index 0000000000..58d4d8c79c --- /dev/null +++ b/lib/faker/tv_shows/archer.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +module Faker + class TvShows + class Archer < Base + flexible :archer + + class << self + ## + # Produces a character from Archer. + # + # @return [String] + # + # @example + # Faker::TvShows::Archer.character #=> "Sterling Archer" + # + # @faker.version 2.13.0 + def character + fetch('archer.characters') + end + + ## + # Produces a location from Archer. + # + # @return [String] + # + # @example + # Faker::TvShows::Archer.location #=> "The Tuntmore Towers" + # + # @faker.version 2.13.0 + def location + fetch('archer.locations') + end + + ## + # Produces a quote from Archer. + # + # @return [String] + # + # @example + # Faker::TvShows::Archer.quote + # #=> "You're not my supervisor!" + # + # @faker.version 2.13.0 + def quote + fetch('archer.quotes') + end + end + end + end +end diff --git a/lib/locales/en/archer.yml b/lib/locales/en/archer.yml new file mode 100644 index 0000000000..bfdd7bee04 --- /dev/null +++ b/lib/locales/en/archer.yml @@ -0,0 +1,75 @@ +en: + faker: + archer: + characters: + - Sterling Archer + - Lana Kane + - Malory Archer + - Cyril Figgis + - Cheryl Tunt + - Pam Poovey + - Dr. Krieger + - Ray Gillette + - Barry Dylan + - Ron Cadillac + - Woodhouse + - Slater + - Katya Kazanova + - Brett Bunsen + - Conway Stern + - Len Trexler + - George Spelvin + - Trinette McGoon + - Rodney + - Cecil Tunt + - Charles and Rudy + - Gustavo Calderon + - Captain Lammers + - Edie Poovey + - Veronica Deane + - Figgis Agency staff + - Slater's agents + - Popeye + - Barry-6 + - Conway Stern + - Bilbo + - Dutch + locations: + - ISIS Headquarters + - The Tuntmore Towers + - The Archer Apartment + - The Malory Apartment + - The Krieger Lab + - San Marcos Palace + - The KGB Headquarters + - The Vatican + - Area 51 + - Dreamland + - Danger Island + - The Figgis Agency office + - New York City + - Miami + - Monte Carlo + - Hollywood + - Texas + quotes: + - Lana. Lana. Lana!... Danger zone. + - I'm sorry, I can't hear you over the sound of my giant throbbing erection! + - This is why we can't have nice things, people! + - If I cared about what you do on the weekend, I'd stick a shotgun in my mouth and pull the trigger with my toes. + - It's like my brain's a tree and you're those little cookie elves. + - I'm not saying I invented the turtleneck, but I was the first person to realize its potential as a tactical garment. + - You're about as useful as a cock-flavored lollipop. + - You want to take away my freedom? You're gonna have to pry it from my cold, dead hands. + - Just the Tip. + - It's called 'the velveteen touch of a dandy fop.' Look it up. + - Phrasing! + - Danger zone! + - M as in Mancy + - Do you want ants? Because that's how you get ants. + - I swear to god I had something for this. + - I am the one who makes the decisions, and I decide what we do, and we are not murdering people! + - You're not my supervisor! + - That's how you get ants. But seriously, don't eat that. + - Phrasing. Boom! + - Read a book, it'll make you feel better. diff --git a/test/faker/tv_shows/test_archer.rb b/test/faker/tv_shows/test_archer.rb new file mode 100644 index 0000000000..c0337c3d18 --- /dev/null +++ b/test/faker/tv_shows/test_archer.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +require_relative '../../test_helper' + +class TestFakerTvShowsArcher < Test::Unit::TestCase + def setup + @tester = Faker::TvShows::Archer + end + + def test_characters + assert_match(/\w+/, @tester.character) + end + + def test_locations + assert_match(/\w+/, @tester.location) + end + + def test_quote + assert_match(/\w+/, @tester.quote) + end +end From dff75fe884061e893e190cefc831c5a1a59dc722 Mon Sep 17 00:00:00 2001 From: Liam <40987991+lepari23@users.noreply.github.com> Date: Thu, 29 Jun 2023 17:45:44 +0200 Subject: [PATCH 2/2] changed generator version to next --- lib/faker/tv_shows/archer.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/faker/tv_shows/archer.rb b/lib/faker/tv_shows/archer.rb index 58d4d8c79c..f81140901e 100644 --- a/lib/faker/tv_shows/archer.rb +++ b/lib/faker/tv_shows/archer.rb @@ -14,7 +14,7 @@ class << self # @example # Faker::TvShows::Archer.character #=> "Sterling Archer" # - # @faker.version 2.13.0 + # @faker.version next def character fetch('archer.characters') end @@ -27,7 +27,7 @@ def character # @example # Faker::TvShows::Archer.location #=> "The Tuntmore Towers" # - # @faker.version 2.13.0 + # @faker.version next def location fetch('archer.locations') end @@ -41,7 +41,7 @@ def location # Faker::TvShows::Archer.quote # #=> "You're not my supervisor!" # - # @faker.version 2.13.0 + # @faker.version next def quote fetch('archer.quotes') end