From edd0e736c32c005c95b25565b131434693760cd1 Mon Sep 17 00:00:00 2001 From: Conner Hiatt Date: Wed, 2 May 2018 20:17:45 -0700 Subject: [PATCH 1/5] Add Faker::StrangerThings Added Stranger Things character and quotes with passing tests and docs. --- README.md | 1 + doc/stranger_thing.md | 7 ++++++ lib/faker/stranger_thing.rb | 13 +++++++++++ lib/locales/en/stranger_thing.yml | 36 +++++++++++++++++++++++++++++++ test/test_stranger_thing.rb | 15 +++++++++++++ 5 files changed, 72 insertions(+) create mode 100644 doc/stranger_thing.md create mode 100644 lib/faker/stranger_thing.rb create mode 100644 lib/locales/en/stranger_thing.yml create mode 100644 test/test_stranger_thing.rb diff --git a/README.md b/README.md index 6c1c10cafc..82328190a5 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,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..54ac7d3197 --- /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 From 8aee1ec8ab89cbc74dd54c06837159f9f69e0fb7 Mon Sep 17 00:00:00 2001 From: Conner Hiatt Date: Wed, 2 May 2018 20:17:45 -0700 Subject: [PATCH 2/5] Add Faker::StrangerThings Added Stranger Things character and quotes with passing tests and docs. --- README.md | 1 + doc/stranger_thing.md | 7 ++++++ lib/faker/stranger_thing.rb | 13 +++++++++++ lib/locales/en/stranger_thing.yml | 36 +++++++++++++++++++++++++++++++ test/test_stranger_thing.rb | 15 +++++++++++++ 5 files changed, 72 insertions(+) create mode 100644 doc/stranger_thing.md create mode 100644 lib/faker/stranger_thing.rb create mode 100644 lib/locales/en/stranger_thing.yml create mode 100644 test/test_stranger_thing.rb diff --git a/README.md b/README.md index 8bbcd3f1bf..88941a3aa9 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,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..54ac7d3197 --- /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 From 02969b53a8ee23ac75d6ac90bd4dd6db4eade305 Mon Sep 17 00:00:00 2001 From: Conner Hiatt Date: Thu, 17 May 2018 19:29:20 -0700 Subject: [PATCH 3/5] merge master, and conflicts --- Gemfile | 8 ++++++++ Gemfile.lock | 1 + test/test_stranger_thing.rb | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index d85a14c69c..e3fead69f8 100644 --- a/Gemfile +++ b/Gemfile @@ -2,3 +2,11 @@ source 'https://rubygems.org' # Specify your gem's dependencies in faker.gemspec gemspec + +group :development, :test do + gem "pry" + gem "test-unit" + gem "rake" + gem "minitest" + gem "timecop" +end diff --git a/Gemfile.lock b/Gemfile.lock index c2fa899638..61a8527b0f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -56,6 +56,7 @@ DEPENDENCIES coveralls (>= 0.8.21) faker! minitest + pry rake rubocop test-unit diff --git a/test/test_stranger_thing.rb b/test/test_stranger_thing.rb index 54ac7d3197..85c930f17e 100644 --- a/test/test_stranger_thing.rb +++ b/test/test_stranger_thing.rb @@ -3,7 +3,7 @@ class TestStrangerThings < Test::Unit::TestCase def setup @tester = Faker::StrangerThings -end + end def test_characters assert @tester.character.match(/\w+/) From 0a2fcff91866e055aaa5880f2c87b0a739d2d11e Mon Sep 17 00:00:00 2001 From: Conner Hiatt Date: Thu, 17 May 2018 19:32:15 -0700 Subject: [PATCH 4/5] added changelog addition --- CHANGELOG.md | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d39aa917e..2f21c454fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,14 +5,15 @@ **Additions** +- [PR #1199](https://github.com/stympy/faker/pull/1199) Add Faker::StrangerThings [@Connerh92](https://github.com/Connerh92) - [PR #1204](https://github.com/stympy/faker/pull/1204) Update sample output of `Faker::App.version` [@joshuapinter](https://github.com/joshuapinter) - [PR #1218](https://github.com/stympy/faker/pull/1218) Add Faker::Myst [@SpyMaster356](https://github.com/SpyMaster356) - [PR #1192](https://github.com/stympy/faker/pull/1192) Space: Added space launch vehicule [@gauth-ier](https://github.com/Gauth-ier) - [PR #1211](https://github.com/stympy/faker/pull/1211) Add bands, genres, and albums to Music [@jmkoni](https://github.com/jmkoni) -- [PR #1198](https://github.com/stympy/faker/pull/1135) Rename methods on Faker::Types to avoid shadowing ruby standard methods [@MarcPer](https://github.com/MarcPer) -- [PR #1135](https://github.com/stympy/faker/pull/1135) Added documentation for dumb and dumber [@cnharris10](https://github.com/cnharris10) -- [PR #1142](https://github.com/stympy/faker/pull/1142) Missing i18n jobs fix [@PuZZleDucK](https://github.com/PuZZleDucK) -- [PR #1213](https://github.com/stympy/faker/pull/1213) Add missing tests after adding Coveralls [@vbrazo](https://github.com/vbrazo) +- [PR #1198](https://github.com/stympy/faker/pull/1135) Rename methods on Faker::Types to avoid shadowing ruby standard methods [@MarcPer](https://github.com/MarcPer) +- [PR #1135](https://github.com/stympy/faker/pull/1135) Added documentation for dumb and dumber [@cnharris10](https://github.com/cnharris10) +- [PR #1142](https://github.com/stympy/faker/pull/1142) Missing i18n jobs fix [@PuZZleDucK](https://github.com/PuZZleDucK) +- [PR #1213](https://github.com/stympy/faker/pull/1213) Add missing tests after adding Coveralls [@vbrazo](https://github.com/vbrazo) - [PR #1215](https://github.com/stympy/faker/pull/1215) Added Nato Phonetic Alphabet [@timcustard](https://github.com/timcustard) - [PR #1212](https://github.com/stympy/faker/pull/1212) Coveralls should ignore test folder [@vbrazo](https://github.com/timcustard) - [PR #1209](https://github.com/stympy/faker/pull/1209) Add Faker::Source [@graciano](https://github.com/graciano) @@ -23,16 +24,16 @@ - [PR #1136](https://github.com/stympy/faker/pull/1136) Modify Faker::Internet.slug [@philduffen](https://github.com/philduffen) - [PR #924](https://github.com/stympy/faker/pull/924) Rubocop + fixes [@stephengroat](https://github.com/stephengroat) - [PR #1189](https://github.com/stympy/faker/pull/1189) Add Faker::Football [@AlexGascon](https://github.com/AlexGascon) -- [PR #1202](https://github.com/stympy/faker/pull/1202) adds both inclusive and binary gender option [@jmkoni](https://github.com/jmkoni) -- [PR #1124](https://github.com/stympy/faker/pull/1124) Fix ranges for Brazilian zip codes [@lucasqueiroz](https://github.com/lucasqueiroz) -- [PR #1122](https://github.com/stympy/faker/pull/1122) Fix formatting for Brazilian phone and cell phone numbers [@lucasqueiroz](https://github.com/lucasqueiroz) -- [PR #1138](https://github.com/stympy/faker/pull/1138) Update locales - Faker::Overwatch [@tanner0101](https://github.com/tanner0101) -- [PR #1203](https://github.com/stympy/faker/pull/1203) Finnish locale has 50 most common male, female, and last names [@Glenf](https://github.com/Glenf) -- [PR #1183](https://github.com/stympy/faker/pull/1183) Correct the spelling of Gringotts [@rhoen](https://github.com/rhoen) +- [PR #1202](https://github.com/stympy/faker/pull/1202) adds both inclusive and binary gender option [@jmkoni](https://github.com/jmkoni) +- [PR #1124](https://github.com/stympy/faker/pull/1124) Fix ranges for Brazilian zip codes [@lucasqueiroz](https://github.com/lucasqueiroz) +- [PR #1122](https://github.com/stympy/faker/pull/1122) Fix formatting for Brazilian phone and cell phone numbers [@lucasqueiroz](https://github.com/lucasqueiroz) +- [PR #1138](https://github.com/stympy/faker/pull/1138) Update locales - Faker::Overwatch [@tanner0101](https://github.com/tanner0101) +- [PR #1203](https://github.com/stympy/faker/pull/1203) Finnish locale has 50 most common male, female, and last names [@Glenf](https://github.com/Glenf) +- [PR #1183](https://github.com/stympy/faker/pull/1183) Correct the spelling of Gringotts [@rhoen](https://github.com/rhoen) - [PR #1170](https://github.com/stympy/faker/pull/1170) First_name and last_name should use the parse method - :ru locale [@vbrazo](https://github.com/vbrazo) -- [PR #1190](https://github.com/stympy/faker/pull/1190) Add Nation object, its specs and docs [@gkunwar](https://github.com/gkunwar) -- [PR #1197](https://github.com/stympy/faker/pull/1197) Fixes NL postcode [@JonathanWThom](https://github.com/JonathanWThom) -- [PR #1177](https://github.com/stympy/faker/pull/1177) Update Faker::Number.between docs [@SpyMaster356](https://github.com/SpyMaster356) +- [PR #1190](https://github.com/stympy/faker/pull/1190) Add Nation object, its specs and docs [@gkunwar](https://github.com/gkunwar) +- [PR #1197](https://github.com/stympy/faker/pull/1197) Fixes NL postcode [@JonathanWThom](https://github.com/JonathanWThom) +- [PR #1177](https://github.com/stympy/faker/pull/1177) Update Faker::Number.between docs [@SpyMaster356](https://github.com/SpyMaster356) - [PR #1172](https://github.com/stympy/faker/pull/1172) Fix Fixnum reference warning [@vbrazo](https://github.com/vbrazo) - [PR #1173](https://github.com/stympy/faker/pull/1173) Fix tests warning [@vbrazo](https://github.com/vbrazo) - [PR #1193](https://github.com/stympy/faker/pull/1193) Add Faker::MichaelScott API [@snayrouz](https://github.com/snayrouz) @@ -490,7 +491,7 @@ ## v1.6.0 (2015-11-23) * Lots of bug fixes -- most notably, a fix for email addresses and domains in non-en locales * Updated locales: de, en-AU, en-NZ, en-SG, en-US, en-au-ocker, en, es, fr, he, it, ja, nb-NO, pl, pt-BR, sk, and zh-CN -* Updated classes: Address, Avatar, Book, Code, Commerce, Company, Hipster, IDNumber, Internet, Number, Placeholdit, Shakespeare, and Time +* Updated classes: Address, Avatar, Book, Code, Commerce, Company, Hipster, IDNumber, Internet, Number, Placeholdit, Shakespeare, and Time ## v1.5.0 (2015-08-17) * Added logos @@ -540,7 +541,7 @@ * 1 major change: * Removed deprecated methods from Address: earth_country, us_state, us_state_abbr, uk_postcode, uk_county * Many minor changes (please see github pull requests for credits) - * Added many localizations + * Added many localizations * Added range and array support for Lorem ## v1.0.1 (2011-09-27) @@ -574,7 +575,7 @@ * Added Canadian translation [igbanam] * Added Norwegian translation [kytrinyx] * Lots of translation-related cleanup [kytrinyx] - + ## v0.9.5 (2011-01-27) * 1 minor bug fix: @@ -616,7 +617,7 @@ * 3 major enhancements: * Added Lorem to generate fake Latin * Added secondary_address to Address, and made inclusion of - secondary address in street_address optional (false by + secondary address in street_address optional (false by default). * Added UK address methods [Caius Durling] From a3dea0cf1884ea9cba68bc881a6ba18f037c1b0a Mon Sep 17 00:00:00 2001 From: Conner Hiatt Date: Sun, 20 May 2018 16:59:42 -0700 Subject: [PATCH 5/5] Merge remote-tracking branch 'upstream/master' --- Gemfile | 8 -------- Gemfile.lock | 3 +-- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Gemfile b/Gemfile index e3fead69f8..d85a14c69c 100644 --- a/Gemfile +++ b/Gemfile @@ -2,11 +2,3 @@ source 'https://rubygems.org' # Specify your gem's dependencies in faker.gemspec gemspec - -group :development, :test do - gem "pry" - gem "test-unit" - gem "rake" - gem "minitest" - gem "timecop" -end diff --git a/Gemfile.lock b/Gemfile.lock index 61a8527b0f..f8c0759ff6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -56,11 +56,10 @@ DEPENDENCIES coveralls (>= 0.8.21) faker! minitest - pry rake rubocop test-unit timecop BUNDLED WITH - 1.16.1 + 1.16.2