~singpolyma/sgx-jmp

ff7390e33e087f8154e720ca25384c5d23c31dde — Stephen Paul Weber 1 year, 3 months ago aa3117a
Allow lowercase state/province abbreviations

Seems like it won't overlap with other things we allow.
1 files changed, 2 insertions(+), 2 deletions(-)

M lib/tel_selections.rb
M lib/tel_selections.rb => lib/tel_selections.rb +2 -2
@@ 187,7 187,7 @@ class TelSelections
			end

			class CityState
				Q.register(/\A([^,]+)\s*,\s*([A-Z]{2})\Z/, &method(:new))
				Q.register(/\A([^,]+)\s*,\s*([a-zA-Z]{2})\Z/, &method(:new))

				CITY_MAP = {
					"ajax" => "Ajax-Pickering",


@@ 208,7 208,7 @@ class TelSelections

				def initialize(city, state)
					@city = CITY_MAP.fetch(city.downcase, city)
					@state = STATE_MAP.fetch(state, state)
					@state = STATE_MAP.fetch(state.upcase, state.upcase)
				end

				def iris_query