Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Male female names #510

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,27 @@ Change log itself follows [Keep a CHANGELOG](http://keepachangelog.com) format.
## Unreleased

### Added

- `Faker.Fruits.En` - add english fruits [[@KevinDaSilvaS](https://github.com/KevinDaSilvaS)]
- `Faker.Person.PtBr.female_first_name` - add Brazilian Portuguese female first name generator [[@FranciscoLira](https://github.com/FranciscoLira)]
- `Faker.Person.PtBr.male_first_name` - add Brazilian Portuguese male first name generator [[@FranciscoLira](https://github.com/FranciscoLira)]
- `Faker.Person.PtBr.female_prefix` - add Brazilian Portuguese female prefix generator [[@FranciscoLira](https://github.com/FranciscoLira)]
- `Faker.Person.PtBr.male_prefix` - add Brazilian Portuguese male prefix generator [[@FranciscoLira](https://github.com/FranciscoLira)]

### Changed

- `Faker.Commerce.PtBr` - add more products in product_name_product [[@igorgbr](https://github.com/igorgbr)]
- `Faker.Fruits.PtBr` - fix typo in nectarina [[@KevinDaSilvaS](https://github.com/KevinDaSilvaS)]
- `Faker.Internet.image_url/0` - switched unresponsive placeholder.it with picsum.photos [[@almirsarajcic](https://github.com/almirsarajcic)]
- `Faker.Vehicle.En` - fix spelling of some common makes/models [[@nskins](https://github.com/nskins)]
- `Faker.Person.PtBr.first_name` - separate male from female names. [[@FranciscoLira](https://github.com/FranciscoLira)]

### Deprecated

### Removed

### Fixed

- `Faker.Currency.code/0` remove duplicates/replace old currencies [[@yassinrais](https://github.com/yassinrais)]
- `Faker.Adress.PtBr` - fix model documentation [[@laraujo7](https://github.com/laraujo7)]
- `Faker.Address.En/0` corrected formatting for US and Britian [[@atavistock](https://github.com/atavistock)]
Expand All @@ -31,6 +39,7 @@ Change log itself follows [Keep a CHANGELOG](http://keepachangelog.com) format.
## 0.17.0

### Added

- `Faker.Internet.StatusCode` [[@emmetreza](https://github.com/emmetreza)]
- CI workflow using GitHub Actions [[@anthonator](https://github.com/anthonator)]
- `Faker.Cat.PtBr` [[@f-francine](https://github.com/f-francine)]
Expand All @@ -39,20 +48,23 @@ Change log itself follows [Keep a CHANGELOG](http://keepachangelog.com) format.
- `Faker.Commerce.PtBr` [[@f-francine](https://github.com/f-francine)]

### Changed

- `Faker.Vehicles` add makes and models that are multi-word, refactor existing fns [[jersearls](https://github.com/jersearls)]
- `Faker.Avatar` switch to `https` to prevent redirect [[igas](https://github.com/igas)]
- Updated build badge for GitHub Actions [[@anthonator](https://github.com/anthonator)]

### Deprecated

### Removed

- Travis CI for CI workflow [[@anthonator](https://github.com/anthonator)]

### Fixed

- `Faker.Team` `creature/0` and `name/0` documentation examples fixed [[@yuriploc](https://github.com/yuriploc)]
- Fix bidirectional formatting [[@MichalDolata](https://github.com/MichalDolata)]
- Extra split for Virgin Islands in the country sampler [[intercaetera](https://github.com/intercaetera)]

### Security

## 0.16.0
Expand Down Expand Up @@ -127,6 +139,7 @@ Change log itself follows [Keep a CHANGELOG](http://keepachangelog.com) format.
- `Faker.Phone.PtBr`[[@netond](https://github.com/netond)]

### Changed

- Fix `Faker.Code.Iban.iban` and `Faker.Gov.It.fiscal_id` doctests [[@vbrazo](https://github.com/vbrazo)]
- `Faker.Address.Es` [[@emig](https://github.com/emig)]
- Set minimum Elixir version to 1.6
Expand All @@ -145,6 +158,7 @@ Change log itself follows [Keep a CHANGELOG](http://keepachangelog.com) format.
- Elixir 1.4 and 1.5 support

### Fixed

- `Faker.Util.upper_letter/0` documentation examples [[@michaelfich](https://github.com/michaelfich)]

### Security
Expand Down
2 changes: 1 addition & 1 deletion lib/faker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ defmodule Faker do
acc
end

@alphabet 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
@alphabet ~c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
defp letter do
Enum.at(@alphabet, random_between(0, Enum.count(@alphabet) - 1))
end
Expand Down
2 changes: 1 addition & 1 deletion lib/faker/address.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Faker.Address do

alias Faker.Person

@geobase32 '0123456789bcdefghjkmnpqrstuvwxyz'
@geobase32 ~c"0123456789bcdefghjkmnpqrstuvwxyz"

@moduledoc """
Functions for generating addresses.
Expand Down
32 changes: 16 additions & 16 deletions lib/faker/address/pt_br.ex
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ defmodule Faker.Address.PtBr do
## Examples

iex> Faker.Address.PtBr.city()
"Senador Kaique Paulista"
"Senador Suélen das Pedras"
iex> Faker.Address.PtBr.city()
"São Roberta dos Dourados"
"São Pedro Lucas do Sul"
iex> Faker.Address.PtBr.city()
"Salto das Flores"
"Três Pedro Henrique"
iex> Faker.Address.PtBr.city()
"Kléber"
"João Gabriel Alegre"
"""
@spec city() :: String.t()
def city do
Expand Down Expand Up @@ -1034,13 +1034,13 @@ defmodule Faker.Address.PtBr do
## Examples

iex> Faker.Address.PtBr.street_address()
"Estação Kaique, 2"
"Estação Suélen, 646"
iex> Faker.Address.PtBr.street_address()
"Lagoa Matheus, 0832"
"Recanto Arthur, 970"
iex> Faker.Address.PtBr.street_address()
"Estrada Diegues, s/n"
"Trecho Júlia Viana, s/n"
iex> Faker.Address.PtBr.street_address()
"Praia Limeira, 020"
"Passarela Morais, s/n"
"""
@spec street_address() :: String.t()
def street_address do
Expand All @@ -1053,13 +1053,13 @@ defmodule Faker.Address.PtBr do
## Examples

iex> Faker.Address.PtBr.street_address(true)
"Estação Kaique, 2 Sala 461"
"Estação Suélen, 646 AP 083"
iex> Faker.Address.PtBr.street_address(false)
"Conjunto Rodrigo, 970"
"Setor da Penha, s/n"
iex> Faker.Address.PtBr.street_address(false)
"Trecho Davi Luiz Limeira, 020"
"Trecho Júlia Viana, s/n"
iex> Faker.Address.PtBr.street_address(false)
"Sítio Maria Eduarda, 097"
"Passarela Morais, s/n"
"""
@spec street_address(true | any) :: String.t()
def street_address(true), do: street_address() <> " " <> secondary_address()
Expand All @@ -1071,13 +1071,13 @@ defmodule Faker.Address.PtBr do
## Examples

iex> Faker.Address.PtBr.street_name()
"Estação Kaique"
"Estação Suélen"
iex> Faker.Address.PtBr.street_name()
"Morro Louise Macieira"
"Colônia Macieira"
iex> Faker.Address.PtBr.street_name()
"Loteamento Maria Alice Junqueira"
"Loteamento Emanuel Albuquerque"
iex> Faker.Address.PtBr.street_name()
"Condomínio da Maia"
"Setor da Penha"
"""
@spec street_name() :: String.t()
def street_name do
Expand Down
20 changes: 10 additions & 10 deletions lib/faker/file.ex
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ defmodule Faker.File do
## Examples

iex> Faker.File.file_extension()
"wav"
"txt"
iex> Faker.File.file_extension()
"wav"
"html"
iex> Faker.File.file_extension()
"doc"
"flac"
iex> Faker.File.file_extension()
"mov"
"odt"
"""
@spec file_extension() :: String.t()
def file_extension do
Expand Down Expand Up @@ -84,11 +84,11 @@ defmodule Faker.File do
iex> Faker.File.file_name()
"aliquam.jpg"
iex> Faker.File.file_name()
"deleniti.doc"
"deleniti.flac"
iex> Faker.File.file_name()
"qui.jpg"
iex> Faker.File.file_name()
"quibusdam.csv"
"quibusdam.webm"
"""
@spec file_name() :: String.t()
def file_name do
Expand Down Expand Up @@ -121,13 +121,13 @@ defmodule Faker.File do
## Examples

iex> Faker.File.mime_type()
"text/css"
"model/mesh"
iex> Faker.File.mime_type()
"message/http"
"image/tiff"
iex> Faker.File.mime_type()
"application/ogg"
"message/partial"
iex> Faker.File.mime_type()
"model/x3d+xml"
"audio/webm"
"""
@spec mime_type :: String.t()
def mime_type do
Expand Down
2 changes: 1 addition & 1 deletion lib/faker/lorem.ex
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ defmodule Faker.Lorem do
end

defp character do
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
alphabet = ~c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
Enum.at(alphabet, Faker.random_between(0, Enum.count(alphabet) - 1))
end
end
Loading