alexrabarts / iso_country_codes

A Ruby library that provides ISO 3166-1 country codes/names and ISO 4217 currencies
http://github.com/alexrabarts/iso-country-codes
163 stars 62 forks source link

Handle names with commas and parenthesis #37

Closed bettse closed 8 years ago

bettse commented 8 years ago

The source material for the library contains some names with parenthesis or commas, like "Korea (Republic of)", this enhances search_by_name to accommodate finding these when the input string is undelimited (ex. "Republic of Korea".

bettse commented 8 years ago

ref #35

bettse commented 8 years ago

Attempting to test this locally, I ran into a problem with the require 'test/unit' failing to find that file. I didn't see test-unit in the Gemfile, so I added it locally in order to get the tests working. I can add that change to this PR, or another, if the omission of test-unit from the Gemfile is a bug.

greysteil commented 8 years ago

The test/unit is a Ruby 2.2 issue. I'll tackle in a separate PR.

bettse commented 8 years ago

I like the idea of ignoring the ordering, so I took it a step further and used a Set so it doesn't need to be sorted. I've pushed my changes for your feedback.

greysteil commented 8 years ago

Nice! I'm 👍 after specs. (If you rebase off master you'll get a bigger Travis matrix, too.)

bettse commented 8 years ago

rebased and green :)

greysteil commented 8 years ago

Awesome, thanks!

greysteil commented 8 years ago

Released as 0.7.5.