Skip to content
Snippets Groups Projects
Commit 310a0198 authored by Alex Reisner's avatar Alex Reisner
Browse files

Merge branch '1.0.3' of github.com:alexreisner/geocoder into 1.0.3

parents 9cd8da11 fe464ade
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ Per-release changes to Geocoder. ...@@ -4,6 +4,7 @@ Per-release changes to Geocoder.
== 1.0.3 (??) == 1.0.3 (??)
* Update Google API URL (thanks github.com/soorajb).
* Fix bug: stop double-adjusting units when using kilometers (thanks github.com/hairyheron). * Fix bug: stop double-adjusting units when using kilometers (thanks github.com/hairyheron).
== 1.0.2 (2011 June 25) == 1.0.2 (2011 June 25)
......
...@@ -31,7 +31,7 @@ module Geocoder::Lookup ...@@ -31,7 +31,7 @@ module Geocoder::Lookup
:language => Geocoder::Configuration.language, :language => Geocoder::Configuration.language,
:key => Geocoder::Configuration.api_key :key => Geocoder::Configuration.api_key
} }
"#{protocol}://maps.google.com/maps/api/geocode/json?" + hash_to_query(params) "#{protocol}://maps.googleapis.com/maps/api/geocode/json?" + hash_to_query(params)
end end
end end
end end
......
...@@ -4,7 +4,8 @@ module Geocoder::Result ...@@ -4,7 +4,8 @@ module Geocoder::Result
class Freegeoip < Base class Freegeoip < Base
def address(format = :full) def address(format = :full)
"#{city}#{', ' + state_code unless state_code == ''} #{postal_code}, #{country}".sub(/^[ ,]*/, "") s = state_code.to_s == "" ? "" : ", #{state_code}"
"#{city}#{s} #{postal_code}, #{country}".sub(/^[ ,]*/, "")
end end
def city def city
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment