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

Added Faker::Community #1235

Merged
merged 4 commits into from
May 21, 2018
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
2 changes: 2 additions & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
BUNDLE_WITHOUT: "production"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

**Additions**

- [PR #1125](https://github.com/stympy/faker/pull/1125) Added Faker::Community ([geoffhull03](https://github.com/geoffhull03))
- [PR #1129](https://github.com/stympy/faker/pull/1129) Added SingularSiegler quotes ([splashinn](https://github.com/splashinn))
- [PR #1144](https://github.com/stympy/faker/pull/1144) Added polish_register_of_national_economy and polish_taxpayer_identification_number ([rafalpetryka](https://github.com/rafalpetryka))
- [PR #1232](https://github.com/stympy/faker/pull/1144) Fix file permissions ([tagliala](https://github.com/tagliala))
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Contents
- [Faker::Coffee](doc/coffee.md)
- [Faker::Color](doc/color.md)
- [Faker::Commerce](doc/commerce.md)
- [Faker::Community](doc/community.md)
- [Faker::Company](doc/company.md)
- [Faker::Compass](doc/compass.md)
- [Faker::Currency](doc/currency.md)
Expand Down
7 changes: 7 additions & 0 deletions doc/community.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Faker::Community

```ruby
Faker::Community.characters #=> "Jeff Winger"

Faker::Community.quote #=> I fear a political career could shine a negative light on my drug dealing."
```
13 changes: 13 additions & 0 deletions lib/faker/community.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module Faker
class Community < Base
class << self
def characters
fetch('community.characters')
end

def quotes
fetch('community.quotes')
end
end
end
end
33 changes: 33 additions & 0 deletions lib/locales/en/community.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
en:
faker:
community:
characters: ["Jeff Winger", "Britta Perry", "Señor Ben Chang", "Abed Nadir", "Annie Edison", "Dean Craig Pelton", "Pierce Hawthorne", "Troy Barnes", "Shirley Bennett", "Ian Duncan", "Michelle Slater", "Buzz Hickey", "Star Burns", "Magnitude","Leonard Rodriguez", "Garrett Lambert", "Annie's Boobs", "Inspector Spacetime", "Constable Reggie", "Kickpuncher", "Sean Garrig", "Vaughn Miller", "Rich Stephenson", "Neil", "Todd Jacobson", "Annie Kim"]
quotes: [
"Harrison Ford is irradiating our testicles with microwave satellite transmissions!",
"Doing more than the minimum amount of work is my definition of failing.",
"The next person that offers me charity or pity will be mentioned, by name, in my suicide note.",
"I don't have an ego. My Facebook photo is a landscape.",
"Either I'm god, or thruth is relative. Either way: Booyah.",
"I don't step up to being a leader. I reluctantly accept it when it's thrust upon me.",
"Don't talk to me about romance. I had a three way in a hot air balloon.",
"Well I may be a genius, but I'm not a lesbian.",
"I'm going to eat spaceman paninis with black Hitler and there's nothing you can do about it!",
"Do they find thoughts in our butts?",
"I had sex with Eartha Kitt in an airplane bathroom",
"I was so unpopular in high school, the crossing guards used to lure me into traffic.",
"A passing grade? Like a C? Why don't I just get pregnant at a bus station?",
"We're all kind of crazytown bananapants.",
"Make your money, whore.",
"I know what a metaphor is! It's like a thought with another thought's hat on.",
"Frankly, my dear, I don't give a dean!",
"I ate my twin in utero.",
"Fire can't go through doors, stupid. It's not a ghost.",
"You have just been proven racist by the racist prover!",
"So.. what is anthropology? Seriously, does anyone know?",
"I quit doing blow, not being rad.",
"I fear a political career could shine a negative light on my drug dealing.",
"A little trick for achieving the proper competitive mindset: I always envision my opponent having aggresive sex with my mother",
"Look at me. It's clear to you that I am awesome, but I can never admit that, because that would make me an ass.",
"Some flies are too awesome for the wall.",
"We'll definitely be back next year. If not, it'll be because an asteroid has destroyed all human civilization. And that's canon."
]
15 changes: 15 additions & 0 deletions test/test_faker_community.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')

class TestFakerCommunity < Test::Unit::TestCase
def setup
@tester = Faker::Community
end

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

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