Skip to content

Commit

Permalink
Double check /docs and fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vbrazo committed Jul 29, 2019
1 parent 44e2ecc commit 1012ec7
Show file tree
Hide file tree
Showing 25 changed files with 97 additions and 63 deletions.
12 changes: 6 additions & 6 deletions doc/books/lovecraft.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,30 @@ Faker::Books::Lovecraft.location #=> "Kingsport"

Faker::Books::Lovecraft.word #=> "furtive"

# Optional arguments: word_count=4, random_words_to_add=6
# Keyword arguments: word_count=4, random_words_to_add=6
Faker::Books::Lovecraft.sentence #=> "Furtive antiquarian squamous dank cat loathsome amorphous lurk."
Faker::Books::Lovecraft.sentence(word_count: 3) #=> "Daemoniac antediluvian fainted squamous comprehension gambrel nameless singular."
Faker::Books::Lovecraft.sentence(word_count: 3, random_words_to_add: 1) #=> "Amorphous indescribable tenebrous."

# Optional arguments: number=3, spaces_allowed = false
# Keyword arguments: number=3, spaces_allowed = false
Faker::Books::Lovecraft.words #=> ["manuscript", "abnormal", "singular"]
Faker::Books::Lovecraft.words(number: 2) #=> ["daemoniac", "cat"]
Faker::Books::Lovecraft.words(number: 2, spaces_allowed: true) #=> ["lurk", "charnel"]

# Optional arguments: number=3
# Keyword arguments: number=3
Faker::Books::Lovecraft.sentences #=> ["Nameless loathsome decadent gambrel.", "Ululate swarthy immemorial cat madness gibbous unmentionable unnamable.", "Decadent antediluvian non-euclidean tentacles amorphous tenebrous."]
Faker::Books::Lovecraft.sentences(number: 2) #=> ["Antediluvian amorphous unmentionable singular accursed squamous immemorial.", "Gambrel daemoniac gibbous stygian shunned ululate iridescence abnormal."]

# Optional arguments: sentence_count=3, random_sentences_to_add=3
# Keyword arguments: sentence_count=3, random_sentences_to_add=3
Faker::Books::Lovecraft.paragraph #=> "Squamous nameless daemoniac fungus ululate. Cyclopean stygian decadent loathsome manuscript tenebrous. Foetid abnormal stench. Dank non-euclidean comprehension eldritch. Charnel singular shunned lurk effulgence fungus."
Faker::Books::Lovecraft.paragraph(sentence_count: 2) #=> "Decadent lurk tenebrous loathsome furtive spectral amorphous gibbous. Gambrel eldritch daemoniac cat madness comprehension stygian effulgence."
Faker::Books::Lovecraft.paragraph(sentence_count: 2, random_sentences_to_add: 1) #=> "Stench cyclopean fainted antiquarian nameless. Antiquarian ululate tenebrous non-euclidean effulgence."

# Optional arguments: paragraph_count=3
# Keyword arguments: paragraph_count=3
Faker::Books::Lovecraft.paragraphs #=> ["Noisome daemoniac gibbous abnormal antediluvian. Unutterable fungus accursed stench noisome lurk madness indescribable. Antiquarian fungus gibbering lurk dank fainted. Hideous loathsome manuscript daemoniac lurk charnel foetid.", "Non-euclidean immemorial indescribable accursed furtive. Dank unnamable cyclopean tenebrous stench immemorial. Eldritch abnormal gibbering tenebrous. Singular accursed lurk.", "Charnel antediluvian unnamable cat blasphemous comprehension tenebrous. Nameless accursed amorphous unnamable stench. Squamous unnamable mortal accursed manuscript spectral gambrel amorphous. Shunned stygian charnel unutterable. Tenebrous ululate lurk amorphous unnamable."]
Faker::Books::Lovecraft.paragraphs(number: 2) #=> ["Hideous amorphous manuscript antediluvian non-euclidean cat eldritch foetid. Stench squamous manuscript amorphous gibbering fainted gibbous. Accursed loathsome blasphemous iridescence antediluvian abnormal ululate manuscript. Singular manuscript gibbering decadent accursed indescribable.", "Tenebrous unnamable comprehension antediluvian lurk. Lurk spectral noisome gibbering. Furtive manuscript madness tenebrous daemoniac."]

# Optional arguments: chars=3, supplemental=false
# Keyword arguments: characters=3, supplemental=false
Faker::Books::Lovecraft.paragraph_by_chars #=> "Truffaut stumptown trust fund 8-bit messenger bag portland. Meh kombucha selvage swag biodiesel. Lomo kinfolk jean shorts asymmetrical diy. Wayfarers portland twee stumptown. Wes anderson biodiesel retro 90's pabst. Diy echo 90's mixtape semiotics. Cornho."
Faker::Books::Lovecraft.paragraph_by_chars(characters: 256) #=> "Hella kogi blog narwhal sartorial selfies mustache schlitz. Bespoke normcore kitsch cred hella fixie. Park aesthetic fixie migas twee. Cliche mustache brunch tumblr fixie godard. Drinking pop-up synth hoodie dreamcatcher typewriter. Kitsch biodiesel green."
```
4 changes: 2 additions & 2 deletions doc/default/address.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ Faker::Address.state_abbr #=> "AP"

Faker::Address.country #=> "French Guiana"

# Optional arguments: code
# Keyword arguments: code
Faker::Address.country_by_code(code: 'NL') #=> "Netherlands"

# Optional arguments: name
# Keyword arguments: name
Faker::Address.country_name_to_code(name: 'united_states') #=> "US"

Faker::Address.country_code #=> "IT"
Expand Down
2 changes: 1 addition & 1 deletion doc/default/bank.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Faker::Bank.account_number(digits: 13) #=> 673858237902

Faker::Bank.iban #=> "GB76DZJM33188515981979"

# Optional argument bank_country_code
# Keyword argument: country_code
# All countries should be supported
Faker::Bank.iban(country_code: "be") #=> "BE6375388567752043"

Expand Down
2 changes: 1 addition & 1 deletion doc/default/boolean.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Available since version 1.6.2.

```ruby
# Optional parameter: true_ratio=0.5
Faker::Boolean.boolean #=> true

# Keyword parameter: true_ratio=0.5
Faker::Boolean.boolean(true_ratio: 0.2) #=> false
```
4 changes: 2 additions & 2 deletions doc/default/commerce.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
```ruby
Faker::Commerce.color #=> "lavender"

# Optional arguments max=3, fixed_amount=false
# Keyword arguments max: 3, fixed_amount: false
Faker::Commerce.department #=> "Grocery, Health & Beauty"
Faker::Commerce.department(max: 5) #=> "Grocery, Books, Health & Beauty"
Faker::Commerce.department(max: 2, fixed_amount: true) #=> "Books & Tools"
Expand All @@ -17,7 +17,7 @@ Faker::Commerce.price #=> 44.6
Faker::Commerce.price(range: 0..10.0, as_string: true) #=> "2.18"

# Generate a random promotion code.
# Optional argument digits = 6 for number of random digits in suffix
# Keyword argument digits: 6 for number of random digits in suffix
Faker::Commerce.promotion_code #=> "AmazingDeal829102"
Faker::Commerce.promotion_code(digits: 2) #=> "AmazingPrice57"

Expand Down
17 changes: 13 additions & 4 deletions doc/default/company.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,29 @@ Faker::Company.type #=> "Privately Held"
# Get a random profession
Faker::Company.profession #=> "firefighter"

###############################################################
# Generate country specific identifiers
###############################################################

# Get a random Swedish organisation number
Faker::Company.swedish_organisation_number #=> "7962578022"

# Get a random Czech organisation number
Faker::Company.czech_organisation_number #=> "77778171"

# Get a random French siren number
Faker::Company.french_siren_number #=> "819489626"

# Get a random French siret number
Faker::Company.french_siret_number #=> "81948962600013"

# Get a random Norwegian organisation number
Faker::Company.norwegian_organisation_number #=> "839071558"

# Get a random Australian organisation number
Faker::Company.australian_business_number #=> "81137773602"

# Get a random Spanish organisation number
Faker::Company.spanish_organisation_number #=> "P2344979"

# Get a random Polish taxpayer identification number
Expand All @@ -51,18 +60,18 @@ Faker::Company.polish_taxpayer_identification_number #=> "1060000062"
# Get a random Polish register of national economy number
Faker::Company.polish_register_of_national_economy #=> "123456785"

# Generate South African company registration numbers:
# Get a random South African company registration number
Faker::Company.south_african_pty_ltd_registration_number #=> "5301/714689/07"
Faker::Company.south_african_close_corporation_registration_number #=> "CK74/7585/23"
Faker::Company.south_african_listed_company_registration_number #=> "7039/3135/06"
Faker::Company.south_african_trust_registration_number #=> "IT38/6489900"

# Generate a Brazilian company number (CNPJ)
# Get a random Brazilian company number (CNPJ)
Faker::Company.brazilian_company_number #=> "18553414000618"

# Generate a formatted Brazilian company number (CNPJ)
# Get a random formatted Brazilian company number (CNPJ)
Faker::Company.brazilian_company_number(formatted: true) #=> "00.000.000/0000-00"

# Generate a USA Standard Industrial Classification code (SIC)
# Get a random USA Standard Industrial Classification code (SIC)
Faker::Company.sic_code #=> "0851"
```
24 changes: 24 additions & 0 deletions doc/default/compass.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,46 @@ Available since version 1.8.0.
```ruby
# A random direction
Faker::Compass.direction #=> "southeast"

# Random cardinal
Faker::Compass.cardinal #=> "north"

# Random ordinal
Faker::Compass.ordinal #=> "northwest"

# Random half_wind
Faker::Compass.half_wind #=> "north-northwest"

# Random quarter wind
Faker::Compass.quarter_wind #=> "north by west"

# Random abbreviation
Faker::Compass.abbreviation #=> "NEbN"

# Random cardinal abbreviation
Faker::Compass.cardinal_abbreviation #=> "N"

# Random ordinal abbreviation
Faker::Compass.ordinal_abbreviation #=> "SW"

# Random half wind abbreviation
Faker::Compass.half_wind_abbreviation #=> "NNE"

# Random quarter wind abbreviation
Faker::Compass.quarter_wind_abbreviation #=> "SWbS"

# Random azimuth
Faker::Compass.azimuth #=> "168.75"

# Random cardinal azimuth
Faker::Compass.cardinal_azimuth #=> "90"

# Random ordinal azimuth
Faker::Compass.ordinal_azimuth #=> "135"

# Random half wind azimuth
Faker::Compass.half_wind_azimuth #=> "292.5"

# Random quarter wind azimuth
Faker::Compass.quarter_wind_azimuth #=> "56.25"
```
4 changes: 2 additions & 2 deletions doc/default/date.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

```ruby
# Random date between dates
Faker::Date.between(2.days.ago, Date.today) #=> "Wed, 24 Sep 2014"
Faker::Date.between(from: 2.days.ago, to: Date.today) #=> "Wed, 24 Sep 2014"

# Random date between dates except for certain date
Faker::Date.between_except(1.year.ago, 1.year.from_now, Date.today) #=> "Wed, 24 Sep 2014"
Faker::Date.between_except(from: 1.year.ago, to: 1.year.from_now, excepted: Date.today) #=> "Wed, 24 Sep 2014"

# Random date in the future (up to maximum of N days)
Faker::Date.forward(days: 23) # => "Fri, 03 Oct 2014"
Expand Down
4 changes: 2 additions & 2 deletions doc/default/driving_licence.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Generate a licence number in GB format, as issued in England, Scotland and Wales
# The DVSA does not publish their checksum algorithm, so the last 3 characters
# are random
# Optional arguments: last_name, initials, date_of_birth, gender
# Keyword arguments: last_name, initials, date_of_birth, gender
Faker::DrivingLicence.british_driving_licence #=> "MCDER712081VF7EK"
Faker::DrivingLicence.british_driving_licence(last_name: "O'Carroll",
initials: "J",
Expand All @@ -16,6 +16,6 @@ Faker::DrivingLicence.northern_irish_driving_licence #=> "70702548"

# Generate a UK driving licence number in either GB or NI format, at a rate
# consistent with their relative populations
# Optional arguments: last_name, initials, date_of_birth, gender
# Keyword arguments: last_name, initials, date_of_birth, gender
Faker::DrivingLicence.uk_driving_licence #=> "OCARR815246J91HT"
Faker::DrivingLicence.uk_driving_licence #=> "70702548"
1 change: 0 additions & 1 deletion doc/default/educator.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Faker::Educator.university #=> "Mallowtown Technical College"

Faker::Educator.secondary_school #=> "Iceborough Secondary College"

# [DEPRECATION] `course` is deprecated. Please use `degree` instead.
Faker::Educator.degree #=> "Associate Degree in Criminology"

Faker::Educator.course_name #=> "Criminology 101"
Expand Down
4 changes: 2 additions & 2 deletions doc/default/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ Faker::File.extension #=> "mp3"

Faker::File.mime_type #=> "application/pdf"

# Optional arguments: dir, name, extension, directory_separator
# Keyword arguments: dir, name, extension, directory_separator
Faker::File.file_name(dir: 'path/to') #=> "path/to/something_random.jpg"
Faker::File.file_name(dir: 'foo/bar', name: 'baz') #=> "foo/bar/baz.zip"
Faker::File.file_name(dir: 'foo/bar', name: 'baz', ext: 'doc') #=> "foo/bar/baz.doc"
Faker::File.file_name(dir: 'foo/bar', name: 'baz', ext: 'mp3', directory_separator: '\\') #=> "foo/bar\\baz.mp3"

# Optional arguments: segment_count, root, directory_separator
# Keyword arguments: segment_count, root, directory_separator
Faker::File.dir #=> "et_error/sint_voluptas/quas_veritatis"
Faker::File.dir(segment_count: 2) #=> "ea-suscipit/ut-deleniti"
Faker::File.dir(segment_count: 3, root: nil, directory_separator: '/') #=> "est_porro/fugit_eveniet/incidunt-autem"
Expand Down
4 changes: 2 additions & 2 deletions doc/default/finance.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Faker::Finance

```ruby
# Random credit_card
# Random credit card
Faker::Finance.credit_card #=> "3018-348979-1853"
Faker::Finance.credit_card(:mastercard) #=> "6771-8921-2291-6236"
Faker::Finance.credit_card(:mastercard, :visa) #=> "4448-8934-1277-7195"

# Random vat_number
# Random vat number
Faker::Finance.vat_number #=> "BR38.395.329/2471-83"
Faker::Finance.vat_number(country: 'DE') #=> "DE593306671"
Faker::Finance.vat_number(country: 'ZA') #=> "ZA79494416181"
Expand Down
2 changes: 0 additions & 2 deletions doc/default/food.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Available since version 1.7.0.

```ruby

Faker::Food.description #=> "Three eggs with cilantro, tomatoes, onions, avocados and melted Emmental cheese. With a side of roasted potatoes, and your choice of toast or croissant."

Faker::Food.dish #=> "Caesar Salad"
Expand All @@ -21,5 +20,4 @@ Faker::Food.spice #=> "Caraway Seed"
Faker::Food.sushi #=> "Sea bream"

Faker::Food.vegetables #=> "Broccolini"

```
12 changes: 6 additions & 6 deletions doc/default/hipster.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,37 @@ Adapted from [Hipster Ipsum](http://hipsum.co/)
```ruby
Faker::Hipster.word #=> "irony"

# Optional arguments: num=3, supplemental=false, spaces_allowed = false
# Keyword arguments: number: 3, supplemental: false, spaces_allowed: false
Faker::Hipster.words #=> ["pug", "pitchfork", "chia"]
Faker::Hipster.words(number: 4) #=> ["ugh", "cardigan", "poutine", "stumptown"]
Faker::Hipster.words(number: 4, supplemental: true) #=> ["iste", "seitan", "normcore", "provident"]
Faker::Hipster.words(number: 4, supplemental: true, spaces_allowed: true) #=> ["qui", "magni", "craft beer", "est"]

# Optional arguments: word_count=4, supplemental=false, random_words_to_add=6
# Keyword arguments: word_count: 4, supplemental: false, random_words_to_add: 6
Faker::Hipster.sentence #=> "Park iphone leggings put a bird on it."
Faker::Hipster.sentence(word_count: 3) #=> "Pour-over swag godard."
Faker::Hipster.sentence(word_count: 3, supplemental: true) #=> "Beard laboriosam sequi celiac."
Faker::Hipster.sentence(word_count: 3, supplemental: false, random_words_to_add: 4) #=> "Bitters retro mustache aesthetic biodiesel 8-bit."
Faker::Hipster.sentence(word_count: 3, supplemental: true, random_words_to_add: 4) #=> "Occaecati deleniti messenger bag meh crucifix autem."

# Optional arguments: sentence_count=3, supplemental=false
# Keyword arguments: number: 3, supplemental: false
Faker::Hipster.sentences #=> ["Godard pitchfork vinegar chillwave everyday 90's whatever.", "Pour-over artisan distillery street waistcoat.", "Salvia yr leggings franzen blue bottle."]
Faker::Hipster.sentences(number: 1) #=> ["Before they sold out pinterest venmo umami try-hard ugh hoodie artisan."]
Faker::Hipster.sentences(number: 1, supplemental: true) #=> ["Et sustainable optio aesthetic et."]

# Optional arguments: sentence_count=3, supplemental=false, random_sentences_to_add=3
# Keyword arguments: sentence_count=3, supplemental=false, random_sentences_to_add=3
Faker::Hipster.paragraph #=> "Migas fingerstache pbr&b tofu. Polaroid distillery typewriter echo tofu actually. Slow-carb fanny pack pickled direct trade scenester mlkshk plaid. Banjo venmo chambray cold-pressed typewriter. Fap skateboard intelligentsia."
Faker::Hipster.paragraph(sentence_count: 2) #=> "Yolo tilde farm-to-table hashtag. Lomo kitsch disrupt forage +1."
Faker::Hipster.paragraph(sentence_count: 2, supplemental: true) #=> "Typewriter iste ut viral kombucha voluptatem. Sint voluptates saepe. Direct trade irony chia excepturi yuccie. Biodiesel esse listicle et quam suscipit."
Faker::Hipster.paragraph(sentence_count: 2, supplemental: false, random_sentences_to_add: 4) #=> "Selvage vhs chartreuse narwhal vinegar. Authentic vinyl truffaut carry vhs pop-up. Hammock everyday iphone locavore thundercats bitters vegan goth. Fashion axe banh mi shoreditch whatever artisan."
Faker::Hipster.paragraph(sentence_count: 2, supplemental: true, random_sentences_to_add: 4) #=> "Deep v gluten-free unde waistcoat aperiam migas voluptas dolorum. Aut drinking illo sustainable sapiente. Direct trade fanny pack kale chips ennui semiotics."

# Optional arguments: paragraph_count=3, supplemental=false
# Keyword arguments: number: 3, supplemental: false
Faker::Hipster.paragraphs #=> ["Tilde microdosing blog cliche meggings. Intelligentsia five dollar toast forage yuccie. Master kitsch knausgaard. Try-hard everyday trust fund mumblecore.", "Normcore viral pickled. Listicle humblebrag swag tote bag. Taxidermy street hammock neutra butcher cred kale chips. Blog portland humblebrag trust fund irony.", "Single-origin coffee fixie cleanse tofu xoxo. Post-ironic tote bag ramps gluten-free locavore mumblecore hammock. Umami loko twee. Ugh kitsch before they sold out."]
Faker::Hipster.paragraphs(number: 1) #=> ["Skateboard cronut synth +1 fashion axe. Pop-up polaroid skateboard asymmetrical. Ennui fingerstache shoreditch before they sold out. Tattooed pitchfork ramps. Photo booth yr messenger bag raw denim bespoke locavore lomo synth."]
Faker::Hipster.paragraphs(number: 1, supplemental: true) #=> ["Quae direct trade pbr&b quo taxidermy autem loko. Umami quas ratione migas cardigan sriracha minima. Tenetur perspiciatis pickled sed eum doloribus truffaut. Excepturi dreamcatcher meditation."]

# Optional arguments: chars=3, supplemental=false
# Keyword arguments: characters: 3, supplemental: false
Faker::Hipster.paragraph_by_chars #=> "Truffaut stumptown trust fund 8-bit messenger bag portland. Meh kombucha selvage swag biodiesel. Lomo kinfolk jean shorts asymmetrical diy. Wayfarers portland twee stumptown. Wes anderson biodiesel retro 90's pabst. Diy echo 90's mixtape semiotics. Cornho."
Faker::Hipster.paragraph_by_chars(characters: 256, supplemental: false) #=> "Hella kogi blog narwhal sartorial selfies mustache schlitz. Bespoke normcore kitsch cred hella fixie. Park aesthetic fixie migas twee. Cliche mustache brunch tumblr fixie godard. Drinking pop-up synth hoodie dreamcatcher typewriter. Kitsch biodiesel green."
```
1 change: 0 additions & 1 deletion doc/default/house.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Faker::House


```ruby
Faker::House.furniture #=> "chair"

Expand Down
Loading

0 comments on commit 1012ec7

Please sign in to comment.