diff --git a/doc/silicon_valley.md b/doc/silicon_valley.md new file mode 100644 index 0000000000..4b1999444d --- /dev/null +++ b/doc/silicon_valley.md @@ -0,0 +1,11 @@ +# Faker::SiliconValley + +```ruby +Faker::SiliconValley.character #=> "Richard Hendricks" + +Faker::SiliconValley.company #=> "Pied Piper" + +Faker::SiliconValley.quote #=> "I got a spot on my pants, kind of like I pissed myself like a big baby." + +Faker::SiliconValley.email #=> "richard@piedpiper.com" +``` diff --git a/lib/faker/silicon_valley.rb b/lib/faker/silicon_valley.rb new file mode 100644 index 0000000000..7212af1192 --- /dev/null +++ b/lib/faker/silicon_valley.rb @@ -0,0 +1,21 @@ +module Faker + class SiliconValley < Base + class << self + def character + fetch('silicon_valley.character') + end + + def company + fetch('silicon_valley.company') + end + + def quote + fetch('silicon_valley.quote') + end + + def email + fetch('silicon_valley.email') + end + end + end +end diff --git a/lib/locales/en/silicon_valley.yml b/lib/locales/en/silicon_valley.yml new file mode 100644 index 0000000000..b7ea92dd97 --- /dev/null +++ b/lib/locales/en/silicon_valley.yml @@ -0,0 +1,15 @@ +silicon_valley: + character: ['Richard Hendricks', 'Erlich Bachman', 'Nelson « Big Head » Bighetti', 'Bertram Gilfoyle', 'Dinesh Chugtai', 'Donald « Jared » Dunn', 'Monica Hall', 'Gavin Belson', 'Laurie Bream', 'Peter Gregory', 'Jian-Yang', 'Jack Barker', 'Russ Hanneman', 'Ron LaFlamme', 'Denpok', 'Pete Monahan'] + company: ['Pied Piper', 'Hooli', 'Raviga Capital', 'End Frame', 'Bachmanity'] + quote: [ + "I got a spot on my pants, kind of like I pissed myself like a big baby.", + "What\'s happening? I\'m sorry, what? Mr. Car?", + "You just brought piss to a sh*t fight!", + "Your muffins smell like s**t and so do your ideas.", + "One of you is one of the least attractive people I\'ve ever met and I\'m not going to say which one.", + "Your logo looks like a sideways vagina. I find that to be racist. Don't you?", + "It looks like a guy sucking a dick, with another dick tucked behind his ear for later. Like a snack dick.", + "We have to act like any animal that\'s been cornered, acting erratically and blindly lashing out at anything around us", + "I don\'t know about you people, but I don\'t want to live in a world where someone else makes the world a better place better than we do.", + "What? Revenue? No, no, no, no, no. No."] + email: ['richard@piedpiper.test', 'bertram@piedpiper.test', 'dinesh@piedpiper.test', 'jared@piedpiper.test', 'bighead@nipplealert.test', 'erlich@bachmanity.test', 'monica@raviga.test', 'laurie@raviga.test', 'gavin@hooli.test', 'russ@threecommaclub.test', 'denpok@hooli.test'] diff --git a/test/test_faker_silicon_valley.rb b/test/test_faker_silicon_valley.rb new file mode 100644 index 0000000000..aa4d6f387a --- /dev/null +++ b/test/test_faker_silicon_valley.rb @@ -0,0 +1,23 @@ +require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb') + +class TestFakerSiliconValley < Test::Unit::TestCase + def setup + @silicon_valley = Faker::SiliconValley + end + + def test_character + assert @silicon_valley.character.match(/\w+/) + end + + def test_company + assert @silicon_valley.company.match(/\w+/) + end + + def test_quote + assert @silicon_valley.quote.match(/\w+/) + end + + def test_email + assert @silicon_valley.email.match(/\w+/) + end +end