Skip to content

Commit

Permalink
Add Faker::SouthPark (faker-ruby#1314)
Browse files Browse the repository at this point in the history
* Added south park feature

* Renamed south_park.doc to south_park.md

* Updated README to reflect newly added SouthPark feature

* Update CHANGELOG.md
  • Loading branch information
saurabhudaniya200 authored and vbrazo committed Jul 17, 2018
1 parent b037b85 commit 4ed55ef
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- [PR #372](https://github.com/stympy/faker/pull/372) Add test_password_could_achieve_max_length [@oleksii-ti](https://github.com/oleksii-ti)

### Feature Request
- [PR #1314](https://github.com/stympy/faker/pull/1314) Add Faker::SouthPark [@saurabhudaniya200](https://github.com/saurabhudaniya200)
- [PR #1313](https://github.com/stympy/faker/pull/1313) Add Faker::Restaurant [@dwhitlow](https://github.com/dwhitlow)
- [PR #1307](https://github.com/stympy/faker/pull/1307) Add "exclude" method to UniqueGenerator [@mtancoigne](https://github.com/mtancoigne)
- [PR #1115](https://github.com/stympy/faker/pull/1115) Add Faker::Cosmere [@JauntyJames](https://github.com/JauntyJames)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ Contents
- [Faker::SingularSiegler](doc/singular_siegler.md)
- [Faker::SlackEmoji](doc/slack_emoji.md)
- [Faker::Source](doc/source.md)
- [Faker::SouthPark](doc/south_park.md)
- [Faker::Space](doc/space.md)
- [Faker::StarTrek](doc/star_trek.md)
- [Faker::StarWars](doc/star_wars.md)
Expand Down
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

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

0 comments on commit 4ed55ef

Please sign in to comment.