Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rick and morty #821

Merged
merged 6 commits into from
Feb 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Contents
- [Faker::PhoneNumber](doc/phone_number.md)
- [Faker::Placeholdit](doc/placeholdit.md)
- [Faker::Pokemon](doc/pokemon.md)
- [Faker::RickAndMorty](doc/rick_and_morty.md)
- [Faker::RockBand](doc/rock_band.md)
- [Faker::SlackEmoji](doc/slack_emoji.md)
- [Faker::Space](doc/space.md)
Expand Down
9 changes: 9 additions & 0 deletions doc/rick_and_morty.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Faker::RickAndMorty

```ruby
Faker::RickAndMorty.character #=> "Rick Sanchez"

Faker::RickAndMorty.location #=> "Dimension C-132"

Faker::RickAndMorty.quote #=> "Ohh yea, you gotta get schwifty."
```
1 change: 1 addition & 0 deletions lib/faker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def unique(max_retries = 10_000)
require 'faker/twitter'
require 'faker/harry_potter'
require 'faker/friends'
require 'faker/rick_and_morty'

require 'extensions/array'
require 'extensions/symbol'
Expand Down
17 changes: 17 additions & 0 deletions lib/faker/rick_and_morty.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module Faker
class RickAndMorty < Base
class << self
def character
fetch('rick_and_morty.characters')
end

def location
fetch('rick_and_morty.locations')
end

def quote
fetch('rick_and_morty.quotes')
end
end
end
end
5 changes: 4 additions & 1 deletion lib/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -487,4 +487,7 @@ en:
characters: ["Rachel Green", "Joey Tribbiani", "Phoebe Buffay", "Chandler Bing", "Monica Geller", "Ross Geller", "Richard Burke", "Janice Goralnik", "Gunther", "Emily Waltham", "Carol Willick", "Miss Chanandler Bong"]
locations: ["Central Perk", "Javu", "945 Grove St Apt. 20", "Ralph Lauren", "New York Museum of Prehistoric History", "Days of Our Lives", "15 Yemen Road, Yemen"]
quotes: ["We were on a break!", "Forty-two to twenty-one! Like the turkey, Ross is done!", "SEVEN! SEVEN! SEVEN!", "I'm Monica. I’m disgusting. I stalk guys and keep their underpants.", "Fine judge all you want but... married a lesbian, left a man at the altar, fell in love with a gay ice dancer, threw a girl’s wooden leg in the fire, LIVE IN A BOX.", "Welcome to the real world. It sucks. You’re gonna love it!", "Sure I peed on her. And if I had to, I’d pee on any one of you!", "If the homo sapiens were, in fact, HOMO sapiens…is that why they’re extinct?", "It’s a moo point. It’s like a cow’s opinion; it doesn’t matter. It’s moo.", "You could not be any more wrong. You could try, but you would not be successful.", "You’ve been BAMBOOZLED!", "It was summer… and it was hot. Rachel was there… A lonely grey couch…”OH LOOK!” cried Ned, and then the kingdom was his forever. The End.", "Je m’appelle Claude", "I’m not so good with the advice. Can I interest you in a sarcastic comment?", "Raspberries? Good. Ladyfingers? Good. Beef? GOOD!", "Could I BE wearing any more clothes?", "Oh no, two women love me. They're both gorgeous and sexy. My wallet's too small for my fifties AND MY DIAMOND SHOES ARE TOO TIGHT."]

rick_and_morty:
characters: ["Rick Sanchez", "Tiny Rick", "Morty Smith", "Morty Jr.", "Summer Smith", "Jerry Smith", "Beth Smith", "Snuffles", "Birdperson", "Tammy Gueterman", "Jessica", "Baby Legs", "Mr. Meeseeks", "Scary Terry", "Mr. Poopybutthole", "Unity", "Squanchy", "Shrimply Pibbles", "Dr. Glip-Glop", "Eyeholes Man", "Beth's Mytholog", "Jerry's Mytholog", "Mr. Needful", "Krombopulos Michael", "Mr. Goldenfold", "Snowball"]
locations: ["Dimension C-132", "Dimension C-137", "Earth", "Alphabetrium", "Arbolez Mentorosos", "Bird World", "Cronenberg World", "Dwarf Terrace-9", "Gazorpazorp", "Glapflap", "Hideout Planet", "On a Cob Planet", "Parblesnops", "Pawn Shop Planet", "Planet Squanch", "Pluto", "Purge Planet", "Screaming Sun Earth", "Snorlab"]
quotes: ["Ohh yea, you gotta get schwifty.", "I like what you got.", "Don’t even trip dawg.", "Get off the high road Summer. We all got pink eye because you wouldn't stop texting on the toilet.", "Yo! What up my glip glops!", "It's fine, everything is fine. Theres an infinite number of realities Morty and in a few dozen of those I got lucky and turned everything back to normal.", "Sometimes science is a lot more art, than science. A lot of people don't get that.", "There is no god, Summer; gotta rip that band-aid off now you'll thank me later.", "WUBBA LUBBA DUB DUBS!!!", "Oh, I'm sorry Morty, are you the scientist or are you the kid who wanted to get laid?", "This isn't Game of Thrones, Morty.", "You're our boy dog, don't even trip.", "He's not a hot girl. He can't just bail on his life and set up shop in someone else's.", "I don't get it and I don't need to.", "Pluto's a planet.", "HI! I'M MR MEESEEKS! LOOK AT ME!", "Existence is pain to a meeseeks Jerry, and we will do anything to alleviate that pain.", "Well then get your shit together. Get it all together and put it in a backpack, all your shit, so it's together. ...and if you gotta take it somewhere, take it somewhere ya know? Take it to the shit store and sell it, or put it in a shit museum. I don't care what you do, you just gotta get it together... Get your shit together.", "Aw, c'mon Rick. That doesn't seem so bad.", "Aww, gee, you got me there Rick.", "You're like Hitler, except...Hitler cared about Germany, or something.", "Hello Jerry, come to rub my face in urine again?", "Snuffles was my slave name, you can call me snowball because my fur is pretty and white.", "Go home and drink, grandpa.", "I'm the devil. What should I do when I fail? Give myself an ice cream?"]
19 changes: 19 additions & 0 deletions test/test_faker_rick_and_morty.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')

class TestFakerRickAndMorty < Test::Unit::TestCase
def setup
@tester = Faker::RickAndMorty
end

def test_character
assert @tester.character.match(/\w+/)
end

def test_location
assert @tester.location.match(/\w+/)
end

def test_quote
assert @tester.quote.match(/\w+/)
end
end