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

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
382e49b
update Faker::Australia to Faker::Locations::Australia
keshavbiswa Dec 13, 2023
c54a349
Merge branch 'main' into keshav/update-australia-to-locations-australia
keshavbiswa Jan 22, 2024
d095a7c
Bump minitest from 5.21.1 to 5.21.2 (#2894)
dependabot[bot] Feb 2, 2024
18f4d3d
Bump rubocop from 1.59.0 to 1.60.2 (#2896)
dependabot[bot] Feb 2, 2024
9e004ca
Add Kenya to supported countries (#2871)
AndrewNduati Feb 5, 2024
d0aef26
Bump minitest from 5.21.2 to 5.22.2 (#2902)
dependabot[bot] Feb 22, 2024
d62b619
Bump test-unit from 3.6.1 to 3.6.2 (#2906)
dependabot[bot] Feb 22, 2024
dea4fd7
Refactor `Faker::IDNumber` to `Faker::IdNumber` to be more consistent…
Jamal-A-Mohamed Feb 25, 2024
964a223
Fix/Deprecate FmaBrotherhood Generator (#2856)
kirkkwang Feb 26, 2024
08801ce
Bump i18n from 1.14.1 to 1.14.4 (#2913)
dependabot[bot] Mar 13, 2024
ebd93ab
Remove duplicates in doc file (#2914)
mmarusyk Mar 13, 2024
b03b2cc
Bump rubocop from 1.60.2 to 1.62.1 (#2916)
dependabot[bot] Mar 13, 2024
7f05e48
Bump yard from 0.9.34 to 0.9.36 (#2909)
dependabot[bot] Mar 13, 2024
8cb3f4f
Deprecated Faker::Australia
keshavbiswa Mar 17, 2024
bdc58b2
Merge branch 'main' into keshav/update-australia-to-locations-australia
keshavbiswa Mar 17, 2024
783b8a9
Added Docs for Australia
keshavbiswa Mar 18, 2024
7df8a08
Updated Readme to include Locations
keshavbiswa Mar 18, 2024
69d845f
Merge branch 'main' into keshav/update-australia-to-locations-australia
keshavbiswa Mar 18, 2024
9d69731
Updated locales path for australia
keshavbiswa Mar 19, 2024
865bddf
updated test to differentiate deprecated methods
keshavbiswa Mar 19, 2024
2c9ab80
Merge branch 'main' into keshav/update-australia-to-locations-australia
keshavbiswa Mar 19, 2024
391399c
Removed whitespaces from australia.yml
keshavbiswa Mar 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
78 changes: 40 additions & 38 deletions lib/faker/locations/australia.rb
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
# frozen_string_literal: true

module Faker
class Australia < Base
class << self
##
# Produces a location in Australia
#
# @return [String]
#
# @example
# Faker::Australia.location
# #=> "Sydney"
#
# @faker.version next
def location
fetch('australia.locations')
end
class Locations
class Australia < Base
class << self
##
# Produces a location in Australia
#
# @return [String]
#
# @example
# Faker::Locations::Australia.location
# #=> "Sydney"
#
# @faker.version next
def location
fetch('australia.locations')
end

# Produces an Australian animal
#
# @return [String]
#
# @example
# Faker::Australia.animal
# #=> "Dingo"
#
# @faker.version next
def animal
fetch('australia.animals')
end
# Produces an Australian animal
#
# @return [String]
#
# @example
# Faker::Locations::Australia.animal
# #=> "Dingo"
#
# @faker.version next
def animal
fetch('australia.animals')
keshavbiswa marked this conversation as resolved.
Show resolved Hide resolved
end

# Produces an Australian State or Territory
#
# @return [String]
#
# @example
# Faker::Australia.state
# #=> "New South Wales"
#
# @faker.version next
def state
fetch('australia.states')
# Produces an Australian State or Territory
#
# @return [String]
#
# @example
# Faker::Locations::Australia.state
# #=> "New South Wales"
#
# @faker.version next
def state
fetch('australia.states')
end
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class TestFakerAustralia < Test::Unit::TestCase
keshavbiswa marked this conversation as resolved.
Show resolved Hide resolved
def setup
@tester = Faker::Australia
@tester = Faker::Locations::Australia
end

def test_location
Expand Down