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

Allow lookup of EU region using alternate code QUU #94

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

cejaekl
Copy link
Contributor

@cejaekl cejaekl commented Feb 2, 2024

What are you trying to accomplish?

Some systems use the alpha-three code QUU to refer to the European Union.
This is, in a sense, valid, because ISO 3166 defines a private-use range that includes QUU.
For compatibility with such legacy systems, this PR adds the ability to look up the EU/EUE region using code QUU.

What approach did you choose and why?

In implementing this, I realized that we never actually implemented lookup by alternate code at the "country"/continent level; we only implemented it for "provinces". So, to achieve our desired lookup, we have to also allow lookup by alternate codes at the higher levels.

The impact of these changes

Before:

irb(main):002:0> Worldwide.region(code: "QUU").full_name
=> "Unknown Region"

After:

irb(main):001:0> Worldwide.region(code: "QUU").full_name
=> "European Union"

Checklist

  • I have added a CHANGELOG entry for this change (or determined that it isn't needed)

@cejaekl cejaekl marked this pull request as ready for review February 2, 2024 21:05
@cejaekl cejaekl merged commit 72b898a into main Feb 2, 2024
8 checks passed
@arisah-ijeoma arisah-ijeoma mentioned this pull request Feb 2, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants