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

en-AU locale updates #1964

Merged
merged 8 commits into from
May 20, 2020
Merged

en-AU locale updates #1964

merged 8 commits into from
May 20, 2020

Conversation

mattman
Copy link
Contributor

@mattman mattman commented Apr 16, 2020

Description:

Updates the en-AU locale file with the following changes:

  • Faker::Name: Just added the option for middle name to be first name as well as last name
  • Faker::Internet: .edu.au and .gov.au suffixes added
  • Faker::PhoneNumber: This is where the biggest changes are, the ACMA (body that regulates things like phone numbers in Australia) has a list of allowable fake values (https://www.acma.gov.au/use-phone-numbers-fiction), the locale file has been rewritten to reflect this
  • Faker::Address:
    • Postcodes are now more inline with the Australia Post postcode ranges
    • Postcode by state now available with formatting to match each state in line with Australia Post ranges
    • Street suffixes updated to include more Australian options
    • Secondary address now includes Unit, Flat and House
    • Full address updated to allow for mail boxes (PO Boxes) as addresses
    • Time zones now reflect the main canonical Australian time zones
  • Faker::Team: More sports commonly played/done in Australia
  • Faker::Vehicle: Australian format vehicle license plates
  • Faker::Bank: Added some Australian bank names
  • Faker::University: Added some Australian university names
  • Reverted after feedback : Generally converted a lot of the YAML lists to dash format per the style preferences for the Faker project

New method in Faker::Bank

New method Faker::Bank.bsb_number (and supporting private method following same conventions as existing code) introduced as Australian banks do not use the routing format that was already in the code base so a new method was written using some of the recognised bank codes to generate BSB (Bank-State-Bank) numbers

  • Test for new method bsb_number exists
  • Test is passing
  • Method is documented in YARD format
  • Rubocop is happy

Hope this is ok, first time I've done a pull request so welcome your feedback on how to do this better, thank you for an awesome tool! :)

@mattman mattman marked this pull request as draft April 16, 2020 05:43
…st); en-AU locale updates including name's for banks and universities, vehicle registration/license plates, postcode tweaks
@mattman mattman marked this pull request as ready for review April 16, 2020 07:07
@Zeragamba
Copy link
Contributor

Changes look good, however the conflicts need to be resolved

@Zeragamba Zeragamba self-assigned this May 18, 2020
@mattman
Copy link
Contributor Author

mattman commented May 20, 2020

Hey @Zeragamba, thanks for your feedback :) that conflict with the other commit that added docs to Faker::Bank has been resolved now (I think I did it right?)

lib/locales/en-AU.yml Outdated Show resolved Hide resolved
lib/locales/en-AU.yml Outdated Show resolved Hide resolved
@psibi psibi merged commit ca420e7 into faker-ruby:master May 20, 2020
@psibi
Copy link
Member

psibi commented May 20, 2020

Thanks!

@mattman
Copy link
Contributor Author

mattman commented May 20, 2020

Thanks for your help and that of @Zeragamba getting it to a point it could be merged! :)

@Zeragamba
Copy link
Contributor

@psibi remember to squash and merge pull requests. Keeps the history nice and clean. :)

@psibi
Copy link
Member

psibi commented May 21, 2020

@Zeragamba Sorry about that! Will make sure to squash in future. Thanks!

@schlick
Copy link

schlick commented Nov 30, 2020

@mattman I only just came across the ACMA list of allowable fake numbers and thought that would be a great addition to Faker. Started digging around and quickly found your PR. Great, it's already done! Thanks very much for adding it in. Now I can update faker and start using it straight away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants