Skip to content

Commit

Permalink
Merge pull request #1651 from stympy/v2
Browse files Browse the repository at this point in the history
Preparing for v2
  • Loading branch information
vbrazo committed Jul 31, 2019
2 parents 3356fb0 + 2dd4cc6 commit 020effa
Show file tree
Hide file tree
Showing 424 changed files with 1,346 additions and 4,556 deletions.
154 changes: 153 additions & 1 deletion CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions Gemfile
Expand Up @@ -2,9 +2,5 @@

source 'https://rubygems.org'

# Remove Rubygems deprecation warnings
Deprecate.skip = true if defined?(Deprecate.skip)
Gem::Deprecate.skip = true if defined?(Gem::Deprecate.skip)

# Specify your gem's dependencies in faker.gemspec
gemspec
2 changes: 0 additions & 2 deletions doc/blockchain/tezos.md
@@ -1,7 +1,5 @@
# Faker::Blockchain::Tezos

It might be available in the next version.

```ruby
Faker::Blockchain::Tezos.account #=> "tz1eUsgK6aj752Fbxwk5sAoEFvSDnPjZ4qvk"

Expand Down
6 changes: 4 additions & 2 deletions doc/books/dune.md
Expand Up @@ -11,9 +11,11 @@ Faker::Books::Dune.planet #=> "Caladan"

Faker::Books::Dune.quote #=> "A dead man, surely, no longer requires that water."

Faker::Books::Dune.quote("baron_harkonnen") #=> "He who controls the spice, controls the universe!"
# Keyword arguments: character
Faker::Books::Dune.quote(character: "baron_harkonnen") #=> "He who controls the spice, controls the universe!"

Faker::Books::Dune.saying #=> "You do not beg the sun for mercy."

Faker::Books::Dune.saying("fremen") #=> "May thy knife chip and shatter."
# Keyword arguments: source
Faker::Books::Dune.saying(source: "fremen") #=> "May thy knife chip and shatter."
```
32 changes: 16 additions & 16 deletions doc/books/lovecraft.md
Expand Up @@ -2,7 +2,7 @@

```ruby
Faker::Books::Lovecraft.fhtagn #=> "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn"
Faker::Books::Lovecraft.fhtagn(3) #=> "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn. Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn. Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn"
Faker::Books::Lovecraft.fhtagn(number: 3) #=> "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn. Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn. Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn"

Faker::Books::Lovecraft.deity #=> "Shub-Niggurath"

Expand All @@ -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, random_words_to_add
Faker::Books::Lovecraft.sentence #=> "Furtive antiquarian squamous dank cat loathsome amorphous lurk."
Faker::Books::Lovecraft.sentence(3) #=> "Daemoniac antediluvian fainted squamous comprehension gambrel nameless singular."
Faker::Books::Lovecraft.sentence(3, 1) #=> "Amorphous indescribable tenebrous."
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: num=3, spaces_allowed = false
# Keyword arguments: number, spaces_allowed
Faker::Books::Lovecraft.words #=> ["manuscript", "abnormal", "singular"]
Faker::Books::Lovecraft.words(2) #=> ["daemoniac", "cat"]
Faker::Books::Lovecraft.words(2, true) #=> ["lurk", "charnel"]
Faker::Books::Lovecraft.words(number: 2) #=> ["daemoniac", "cat"]
Faker::Books::Lovecraft.words(number: 2, spaces_allowed: true) #=> ["lurk", "charnel"]

# Optional arguments: sentence_count=3
# Keyword arguments: number
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(2) #=> ["Antediluvian amorphous unmentionable singular accursed squamous immemorial.", "Gambrel daemoniac gibbous stygian shunned ululate iridescence abnormal."]
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, random_sentences_to_add
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(2) #=> "Decadent lurk tenebrous loathsome furtive spectral amorphous gibbous. Gambrel eldritch daemoniac cat madness comprehension stygian effulgence."
Faker::Books::Lovecraft.paragraph(2, 1) #=> "Stench cyclopean fainted antiquarian nameless. Antiquarian ululate tenebrous non-euclidean effulgence."
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: number
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(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."]
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, supplemental
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(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."
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."
```
2 changes: 0 additions & 2 deletions doc/creature/animal.md
@@ -1,7 +1,5 @@
# Faker::Creature::Animal

It might be available in the next version.

```ruby
Faker::Creature::Animal.name #=> "Antelope"
```
2 changes: 0 additions & 2 deletions doc/creature/horse.md
@@ -1,7 +1,5 @@
# Faker::Creature::Horse

It might be available in the next version.

```ruby
Faker::Creature::Horse.name #=> "Noir"

Expand Down
5 changes: 2 additions & 3 deletions doc/default/address.md
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 All @@ -50,5 +50,4 @@ Faker::Address.latitude #=> "-58.17256227443719"
Faker::Address.longitude #=> "-156.65548382095133"

Faker::Address.full_address #=> "282 Kevin Brook, Imogeneborough, CA 58517"

```
8 changes: 4 additions & 4 deletions doc/default/alphanumeric.md
@@ -1,9 +1,9 @@
# Faker::Alphanumeric

It might be available in the next version.

```ruby
Faker::Alphanumeric.alpha 10 #=> "zlvubkrwga"
# Keyword arguments: number
Faker::Alphanumeric.alpha(number: 10) #=> "zlvubkrwga"

Faker::Alphanumeric.alphanumeric 10 #=> "3yfq2phxtb"
# Keyword arguments: number
Faker::Alphanumeric.alphanumeric(number: 10) #=> "3yfq2phxtb"
```
10 changes: 5 additions & 5 deletions doc/default/avatar.md
Expand Up @@ -3,13 +3,13 @@
```ruby
Faker::Avatar.image #=> "https://robohash.org/sitsequiquia.png?size=300x300&set=set1"

Faker::Avatar.image("my-own-slug") #=> "https://robohash.org/my-own-slug.png?size=300x300&set=set1"
Faker::Avatar.image(slug: "my-own-slug") #=> "https://robohash.org/my-own-slug.png?size=300x300&set=set1"

Faker::Avatar.image("my-own-slug", "50x50") #=> "https://robohash.org/my-own-slug.png?size=50x50&set=set1"
Faker::Avatar.image(slug: "my-own-slug", size: "50x50") #=> "https://robohash.org/my-own-slug.png?size=50x50&set=set1"

Faker::Avatar.image("my-own-slug", "50x50", "jpg") #=> "https://robohash.org/my-own-slug.jpg?size=50x50&set=set1"
Faker::Avatar.image(slug: "my-own-slug", size: "50x50", format: "jpg") #=> "https://robohash.org/my-own-slug.jpg?size=50x50&set=set1"

Faker::Avatar.image("my-own-slug", "50x50", "bmp") #=> "https://robohash.org/my-own-slug.bmp?size=50x50&set=set1"
Faker::Avatar.image(slug: "my-own-slug", size: "50x50", format: "bmp") #=> "https://robohash.org/my-own-slug.bmp?size=50x50&set=set1"

Faker::Avatar.image("my-own-slug", "50x50", "bmp", "set1", "bg1") #=> "https://robohash.org/my-own-slug.bmp?size=50x50&set=set1&bgset=bg1"
Faker::Avatar.image(slug: "my-own-slug", size: "50x50", format: "bmp", set: "set1", bgset: "bg1") #=> "https://robohash.org/my-own-slug.bmp?size=50x50&set=set1&bgset=bg1"
```
9 changes: 4 additions & 5 deletions doc/default/bank.md
Expand Up @@ -3,19 +3,18 @@

Faker::Bank.account_number #=> 6738582379

Faker::Bank.account_number(13) #=> 673858237902
# Keyword arguments: digits
Faker::Bank.account_number(digits: 13) #=> 673858237902

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

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

Faker::Bank.name #=> "ABN AMRO CORPORATE FINANCE LIMITED"

Faker::Bank.routing_number #=> "729343831"

Faker::Bank.routing_number(true) #=> "22-3833/64805"

Faker::Bank.swift_bic #=> "AAFMGB21"
```
4 changes: 2 additions & 2 deletions doc/default/boolean.md
Expand Up @@ -3,8 +3,8 @@
Available since version 1.6.2.

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

Faker::Boolean.boolean(0.2) #=> false
# Keyword parameter: true_ratio
Faker::Boolean.boolean(true_ratio: 0.2) #=> false
```
5 changes: 2 additions & 3 deletions doc/default/chile_rut.md
@@ -1,15 +1,14 @@
# Faker::ChileRut

It might be available in the next version.

```ruby
Faker::ChileRut.full_rut #=> "30686957-4"

# Returns rut between 1 (default param) and 99999999
Faker::ChileRut.rut #=> 11235813

# Returns rut between passed minimum rut and 99999999
Faker::ChileRut.rut(20_890_156) #=> 31853211
# Keyword arguments: min_rut
Faker::ChileRut.rut(min_rut: 20_890_156) #=> 31853211

# Every call to rut or full_rut generates a new random rut, so last_rut and dv
# allows you to get the separated parts of the full rut without losing the already generated rut
Expand Down
3 changes: 2 additions & 1 deletion doc/default/code.md
Expand Up @@ -11,7 +11,8 @@ Faker::Code.rut #=> "91389184-8"

Faker::Code.nric #=> "S5589083H"

Faker::Code.nric(27, 34) #=> S8505970Z
# Keyword arguments: min_age, max_age
Faker::Code.nric(min_age: 27, max_age: 34) #=> S8505970Z

Faker::Code.imei #= "546327785982623"

Expand Down
15 changes: 8 additions & 7 deletions doc/default/commerce.md
Expand Up @@ -3,23 +3,24 @@
```ruby
Faker::Commerce.color #=> "lavender"

# Optional arguments max=3, fixed_amount=false
# Keyword arguments: max, fixed_amount
Faker::Commerce.department #=> "Grocery, Health & Beauty"
Faker::Commerce.department(5) #=> "Grocery, Books, Health & Beauty"
Faker::Commerce.department(2, true) #=> "Books & Tools"
Faker::Commerce.department(max: 5) #=> "Grocery, Books, Health & Beauty"
Faker::Commerce.department(max: 2, fixed_amount: true) #=> "Books & Tools"

Faker::Commerce.material #=> "Steel"

Faker::Commerce.product_name #=> "Practical Granite Shirt"

# Produces a Float by default
Faker::Commerce.price #=> 44.6
Faker::Commerce.price(range = 0..10.0, as_string = true) #=> "2.18"
# Keyword arguments: range, as_string
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 arguments: digits
Faker::Commerce.promotion_code #=> "AmazingDeal829102"
Faker::Commerce.promotion_code(digits = 2) #=> "AmazingPrice57"
Faker::Commerce.promotion_code(digits: 2) #=> "AmazingPrice57"

Faker::Commerce.material #=> "Plastic"
```
18 changes: 14 additions & 4 deletions doc/default/company.md
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,19 @@ 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)
# Keyword arguments: formatted
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
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"
```
2 changes: 0 additions & 2 deletions doc/default/cosmere.md
@@ -1,7 +1,5 @@
# Faker::Cosmere

It might be available in the next version.

```ruby
Faker::Cosmere.aon #=> "Rao"

Expand Down
15 changes: 10 additions & 5 deletions doc/default/date.md
Expand Up @@ -2,17 +2,22 @@

```ruby
# Random date between dates
Faker::Date.between(2.days.ago, Date.today) #=> "Wed, 24 Sep 2014"
# Keyword arguments: from, to
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"
# Keyword arguments: from, to, excepted
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(23) # => "Fri, 03 Oct 2014"
# Keyword arguments: days
Faker::Date.forward(days: 23) # => "Fri, 03 Oct 2014"

# Random date in the past (up to maximum of N days)
Faker::Date.backward(14) #=> "Fri, 19 Sep 2014"
# Keyword arguments: days
Faker::Date.backward(days: 14) #=> "Fri, 19 Sep 2014"

# Random birthday date (maximum age between 18 and 65)
Faker::Date.birthday(18, 65) #=> "Mar, 28 Mar 1986"
# Keyword arguments: min_age, max_age
Faker::Date.birthday(min_age: 18, max_age: 65) #=> "Mar, 28 Mar 1986"
```
2 changes: 0 additions & 2 deletions doc/default/dc_comics.md
@@ -1,7 +1,5 @@
# Faker::DcComics

It might be available in the next version.

A fun collection of hundreds of your favorite DC Comics Heroes, Heroines, Villains, Alter Egos and Side Characters. Have fun!

```ruby
Expand Down

0 comments on commit 020effa

Please sign in to comment.