diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b099f6cb6..ec4accb0dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) diff --git a/Gemfile.lock b/Gemfile.lock index 567e8569c4..959d10cb50 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -59,4 +59,4 @@ DEPENDENCIES timecop BUNDLED WITH - 1.16.1 + 1.16.2 diff --git a/README.md b/README.md index ab59aa6fe9..6e4ee6dd8f 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/doc/stranger_thing.md b/doc/stranger_thing.md new file mode 100644 index 0000000000..258078bb6e --- /dev/null +++ b/doc/stranger_thing.md @@ -0,0 +1,7 @@ +# Faker::StrangerThings + +```ruby +Faker::StrangerThings.character #=> "six" + +Faker::StrangerThings.quote #=> "Friends don't lie" +``` diff --git a/lib/faker/stranger_thing.rb b/lib/faker/stranger_thing.rb new file mode 100644 index 0000000000..10c948067d --- /dev/null +++ b/lib/faker/stranger_thing.rb @@ -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 diff --git a/lib/locales/en/stranger_thing.yml b/lib/locales/en/stranger_thing.yml new file mode 100644 index 0000000000..dfc64790b7 --- /dev/null +++ b/lib/locales/en/stranger_thing.yml @@ -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." + ] diff --git a/test/test_stranger_thing.rb b/test/test_stranger_thing.rb new file mode 100644 index 0000000000..85c930f17e --- /dev/null +++ b/test/test_stranger_thing.rb @@ -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