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

Add Faker::SouthPark #1314

Merged
merged 4 commits into from
Jul 17, 2018
Merged
Show file tree
Hide file tree
Changes from 2 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
7 changes: 7 additions & 0 deletions doc/south_park.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Faker::SouthPark

```ruby
Faker::SouthPark.character #=> "Mr. Garrison"

Faker::SouthPark.quote #=> "I'm just getting a little cancer Stan"
```
15 changes: 15 additions & 0 deletions lib/faker/south_park.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic comment added by Rubocop

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1311 may explain the magic comments.


module Faker
class SouthPark < Base
class << self
def character
fetch('south_park.characters')
end

def quote
fetch('south_park.quotes')
end
end
end
end
5 changes: 5 additions & 0 deletions lib/locales/en/south_park.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
en:
faker:
south_park:
characters: ["Sharon Marsh", "Officer Barbrady", "Jesus", "Token Black", "Dr. Alphonse Mephesto", "Stephen Stotch", "Heidi Turner", "Jimmy Valmer", "Sheila Broflovski", "Jimbo Kern", "Ike Broflovski", "Kevin McCormick", "Father Maxi", "Grandpa Marvin Marsh", "Clyde Donovan", "Butters Stotch", "Shelly Marsh", "Kyle Broflovski", "Stuart McCormick", "Carol McCormick", "Timmy Burch", "Ned Gerblansky", "Mr. Mackey", "Satan", "Moses", "PC Principal", "Bradley Biggle", "Randy Marsh", "Kenny McCormick", "Terrance and Phillip", "Mr. Slave", "Sergeant Harrison Yates", "Lemmiwinks", "Mr. Hankey", "Wendy Testaburger", "Santa", "God", "Stan Marsh", "Towelie", "Gerald Broflovski", "Bebe Stevens", "Starvin' Marvin", "Karen McCormick", "David Rodriguez", "Eric Cartman", "Mayor McDaniels", "Tuong Lu Kim", "Tweek Tweak", "Dougie", "Craig Tucker", "Mr. Garrison", "Pip", "Liane Cartman", "Scott Malkinson", "Linda Stotch"]
quotes: ["Hippies. They're everywhere. They wanna save Earth, but all they do is smoke pot and smell bad", "They took our deers", "Kenny’s family is so poor that yesterday, they had to put their cardboard box up for a second mortgage", "Without evil there could be no good, so it must be good to be evil sometimes", "Dad, Tom Cruise won't come out of the closet!", "They took der derrs", "I'm not just sure, I'm HIV positive", "I don't make the rules Kyle, I simply think them up and write them down", "I'm just getting a little cancer Stan", "Respect my authoritaahh!!!", "Your mother was worried sick and I was here drinking beer", "Hey Panda Bear! We don't take kindly to your types around here.", "You know what they say: You can't teach a gay dog straight tricks", "They took our jobs", "Maybe we should send you to a concentration camp", "Life is short butters, & thats why you have to do whatever you want all the time", "No we haven't actually seen it Tom, we're just reporting it"]
17 changes: 17 additions & 0 deletions test/test_faker_south_park.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true

require_relative 'test_helper'

class TestFakerSouthPark < Test::Unit::TestCase
def setup
@tester = Faker::SouthPark
end

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

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