Skip to content
New issue

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

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

Already on GitHub? # to your account

Add Faker::StrangerThings #1199

Merged
merged 7 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
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 #1199](https://github.com/stympy/faker/pull/1199) Add Faker::StrangerThings [@Connerh92](https://github.com/Connerh92)
- [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))
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ DEPENDENCIES
timecop

BUNDLED WITH
1.16.1
1.16.2
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ Contents
- [Faker::Space](doc/space.md)
- [Faker::StarTrek](doc/star_trek.md)
- [Faker::StarWars](doc/star_wars.md)
- [Faker::StrangerThings](doc/stranger_things.md)
- [Faker::String](doc/string.md)
- [Faker::Stripe](doc/stripe.md)
- [Faker::Superhero](doc/superhero.md)
Expand Down
7 changes: 7 additions & 0 deletions doc/stranger_thing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Faker::StrangerThings

```ruby
Faker::StrangerThings.character #=> "six"

Faker::StrangerThings.quote #=> "Friends don't lie"
```
13 changes: 13 additions & 0 deletions lib/faker/stranger_thing.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module Faker
class StrangerThings < Base
class << self
def quote
fetch('stranger_things.quote')
end

def character
fetch('stranger_things.character')
end
end
end
end
36 changes: 36 additions & 0 deletions lib/locales/en/stranger_thing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
en:
faker:
stranger_things:
character: [
"Joyce",
"Lonnie",
"Jonathan",
"Will",
"Nancy",
"Mike",
"Terry",
"Becky",
"Eleven",
"Jim",
"Diane",
"Barbara",
"Steve",
"Dustin",
"Lucas",
"Demogorgon"
]
quote: [
"I just didn’t want you to think I was such a wastoid, you know?",
"You’re going to take out the demigorgon with a slingshot?",
"Mornings are for coffee and contemplation.",
"Eggos?",
"This is not yours to fix alone. You act like you’re all alone out there in the world, but you’re not. You’re not alone.",
"My God, is she Russian?",
"Maybe I’m crazy, maybe I’m out of my mind! But God help me, I will keep these lights up until the day I die if I think there’s a chance that Will’s still out there!",
" Am I dreaming, or is that you, Harrington?",
"How do you know it’s not just a lizard?....Because his face opened up and he ate my cat!",
"Use the shampoo and conditioner and when your hair’s damp, not wet, okay? When it’s damp, you do four puffs of the Farrah Fawcett spray.",
"She will not be able to resist these pearls. *Purrs*",
"So, Jonathan, how was the pull-out?",
"I don’t want you to get hurt at all. And I don’t wanna lose you. Just make sure you heat up some real food. Not just Eggos."
]
15 changes: 15 additions & 0 deletions test/test_stranger_thing.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper')

class TestStrangerThings < Test::Unit::TestCase
def setup
@tester = Faker::StrangerThings
end

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

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