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

Update Faker::Australia to Faker::Locations::Australia #2869

Conversation

keshavbiswa
Copy link
Contributor

Motivation / Background

As per the discussion in #2787

This PR updates Faker::Australia to Faker::Locations::Australia to keep it consistent with the directory modules.

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug, refactor something, or add a feature.
  • Tests and Rubocop are passing before submitting your proposed changes.

If you're proposing a new generator:

  • Open an issue first for discussion before you write any code.
  • Double-check the existing generators documentation to make sure the new generator you want to add doesn't already exist.
  • You've reviewed and followed the Documentation guidelines.

Copy link
Contributor

@thdaraujo thdaraujo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

It would also be necessary to:

  • deprecate the previous module and also keep it working
  • change the documentation
  • add tests

Please take a look at #2858 as it's introducing a new way of renaming and deprecating generators.

This can only be merged after #2858.

Also take a look at the contribution guideline on deprecations:

To remove a generator or any other public method, deprecate them first. We use the [`Gem::Deprecate`](https://ruby-doc.org/stdlib-3.1.0/libdoc/rubygems/rdoc/Gem/Deprecate.html).

@keshavbiswa
Copy link
Contributor Author

I see now, Thanks for the suggestions. I will make the neccessary changes 👍

@keshavbiswa
Copy link
Contributor Author

Waiting for #2858 to be merged so I can make necessary changes and merge this.

@stefannibrasil
Copy link
Contributor

Hi @keshavbiswa we've merged #2858.

@keshavbiswa
Copy link
Contributor Author

Hi @keshavbiswa we've merged #2858.

Time to make changes!

dependabot bot and others added 13 commits March 17, 2024 17:32
Bumps [minitest](https://github.com/minitest/minitest) from 5.21.1 to 5.21.2.
- [Changelog](https://github.com/minitest/minitest/blob/master/History.rdoc)
- [Commits](minitest/minitest@v5.21.1...v5.21.2)

---
updated-dependencies:
- dependency-name: minitest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.59.0 to 1.60.2.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop@v1.59.0...v1.60.2)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add Kenya to supported countries

* Add tests for locale

* clan up pull request

* Add landline telephone numbers and cell phone formats
Bumps [minitest](https://github.com/minitest/minitest) from 5.21.2 to 5.22.2.
- [Changelog](https://github.com/minitest/minitest/blob/master/History.rdoc)
- [Commits](minitest/minitest@v5.21.2...v5.22.2)

---
updated-dependencies:
- dependency-name: minitest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [test-unit](https://github.com/test-unit/test-unit) from 3.6.1 to 3.6.2.
- [Release notes](https://github.com/test-unit/test-unit/releases)
- [Commits](test-unit/test-unit@3.6.1...3.6.2)

---
updated-dependencies:
- dependency-name: test-unit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… with other generator's naming convention. (faker-ruby#2858)

* Deprecate IDNumber to IdNumber per issue#2787

* wip

* Add a Faker::Deprecator module

Co-authored-by: Thiago Araujo <thd.araujo@gmail.com>

* Add more specs and improve warning message

---------

Co-authored-by: jamal.mohamed <jamal.mohamed@covermymeds.com>
Co-authored-by: Stefanni Brasil <stefannibrasil@gmail.com>
Co-authored-by: Thiago Araujo <thd.araujo@gmail.com>
* Favor 'The Room' instead of 'Room'

This commit will rename instances of room to the_room including the
locales.  Originally the `room.md` had a typo that referenced ::Room and
not ::TheRoom which is also fixed here.

Ref:
  - faker-ruby#2787

Co-authored-by: Jamal-A-Mohamed <jamalashur@gmail.com>
Co-authored-by: Salvador <salvador.tena@scientist.com>

* Fix/Deprecate FmaBrotherhood Generator

This commit fixes the naming discrpencies with the FmaBrotherhood (now
FullmetalAlchemistBrotherhood) class and its filename.  This adds
deprecation warnings for the old FmaBrotherhood class and also makes the
new FullmetalAlchemistBrotherhood class.

Fix:
  - faker-ruby#2853

* Refactor deprecation for `FmaBrotherhood`

This commit will refactor the changes from `FmaBrotherhood` to
`FullmetalAlchemistBrotherhood` and use `Faker::Deprecator`.

---------

Co-authored-by: Jamal-A-Mohamed <jamalashur@gmail.com>
Co-authored-by: Salvador <salvador.tena@scientist.com>
Co-authored-by: Stefanni Brasil <stefannibrasil@gmail.com>
Bumps [i18n](https://github.com/ruby-i18n/i18n) from 1.14.1 to 1.14.4.
- [Release notes](https://github.com/ruby-i18n/i18n/releases)
- [Changelog](https://github.com/ruby-i18n/i18n/blob/master/CHANGELOG.md)
- [Commits](ruby-i18n/i18n@v1.14.1...v1.14.4)

---
updated-dependencies:
- dependency-name: i18n
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.60.2 to 1.62.1.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop@v1.60.2...v1.62.1)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [yard](https://github.com/lsegal/yard) from 0.9.34 to 0.9.36.
- [Release notes](https://github.com/lsegal/yard/releases)
- [Changelog](https://github.com/lsegal/yard/blob/main/CHANGELOG.md)
- [Commits](lsegal/yard@v0.9.34...v0.9.36)

---
updated-dependencies:
- dependency-name: yard
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@keshavbiswa
Copy link
Contributor Author

Updated the changes @thdaraujo

@keshavbiswa
Copy link
Contributor Author

Forgot the documentation 🤦

Copy link
Contributor

@stefannibrasil stefannibrasil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @keshavbiswa left a couple of comments ⭐

README.md Show resolved Hide resolved
test/faker/locations/test_faker_australia.rb Show resolved Hide resolved
lib/faker/locations/australia.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@stefannibrasil stefannibrasil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, this is looking great! One final change to remove some extra spaces from a location and this is ready to go.

#
# @faker.version next
def location
fetch('locations.australia.locations')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

lib/locales/en/australia.yml Outdated Show resolved Hide resolved
@stefannibrasil
Copy link
Contributor

oh, I haven't heard from the author of this PR in a while so this one is up to be worked on next. It's similar to this one. Would you be interested in fixing this one as well? #2857 @keshavbiswa

@keshavbiswa
Copy link
Contributor Author

oh, I haven't heard from the author of this PR in a while so this one is up to be worked on next. It's similar to this one. Would you be interested in fixing this one as well? #2857 @keshavbiswa

I'll create a new PR for it 👍

Copy link
Contributor

@stefannibrasil stefannibrasil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@stefannibrasil stefannibrasil dismissed thdaraujo’s stale review March 19, 2024 15:34

The changes have been made and this is now good to go

@stefannibrasil stefannibrasil merged commit fcf41f1 into faker-ruby:main Mar 19, 2024
8 checks passed
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.

None yet

8 participants