<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/graticule/geocoders/local_search_map.rb</filename>
    </added>
    <added>
      <filename>lib/graticule/geocoders/postcode_anywhere.rb</filename>
    </added>
    <added>
      <filename>test/fixtures/responses/postcode_anywhere/badkey.xml</filename>
    </added>
    <added>
      <filename>test/fixtures/responses/postcode_anywhere/success.xml</filename>
    </added>
    <added>
      <filename>test/unit/graticule/geocoders/postcode_anywhere_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,5 @@
 #!/usr/bin/env ruby
 
-require 'graticule'
+require 'graticule/cli'
 
 Graticule::Cli.start ARGV
\ No newline at end of file</diff>
      <filename>bin/geocode</filename>
    </modified>
    <modified>
      <diff>@@ -9,10 +9,10 @@ require 'graticule/geocoders/rest'
 require 'graticule/geocoders/google'
 require 'graticule/geocoders/yahoo'
 require 'graticule/geocoders/geocoder_us'
+require 'graticule/geocoders/local_search_map'
 require 'graticule/geocoders/meta_carta'
+require 'graticule/geocoders/postcode_anywhere'
 require 'graticule/distance'
 require 'graticule/distance/haversine'
 require 'graticule/distance/spherical'
 require 'graticule/distance/vincenty'
-
-require 'graticule/cli'
\ No newline at end of file</diff>
      <filename>lib/graticule.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,4 @@
+require 'graticule'
 require 'optparse'
 
 module Graticule</diff>
      <filename>lib/graticule/cli.rb</filename>
    </modified>
    <modified>
      <diff>@@ -46,15 +46,14 @@ module Graticule
     # Extracts a Location from +xml+.
     def parse_response(xml) #:nodoc:
       address = REXML::XPath.first(xml, '//xal:AddressDetails', 'xal' =&gt; &quot;urn:oasis:names:tc:ciq:xsdschema:xAL:2.0&quot;)
-      breakpoint
 
       longitude, latitude, = xml.elements['/kml/Response/Placemark/Point/coordinates'].text.split(',').map { |v| v.to_f }
       
       Location.new \
         :street =&gt; value(address.elements['Country/AdministrativeArea/SubAdministrativeArea/Locality/Thoroughfare/ThoroughfareName/text()']),
-        :city =&gt; value(address.elements['Country/AdministrativeArea/SubAdministrativeArea/Locality/LocalityName/text()']),
-        :state =&gt; value(address.elements['Country/AdministrativeArea/AdministrativeAreaName/text()']),
-        :zip =&gt; value(address.elements['Country/AdministrativeArea/SubAdministrativeArea/Locality/PostalCode/PostalCodeNumber/text()']),
+        :locality =&gt; value(address.elements['Country/AdministrativeArea/SubAdministrativeArea/Locality/LocalityName/text()']),
+        :region =&gt; value(address.elements['Country/AdministrativeArea/AdministrativeAreaName/text()']),
+        :postal_code =&gt; value(address.elements['Country/AdministrativeArea/SubAdministrativeArea/Locality/PostalCode/PostalCodeNumber/text()']),
         :country =&gt; value(address.elements['Country/CountryNameCode/text()']),
         :latitude =&gt; latitude,
         :longitude =&gt; longitude,
@@ -63,7 +62,7 @@ module Graticule
 
     # Extracts and raises an error from +xml+, if any.
     def check_error(xml) #:nodoc:
-      status ||= xml.elements['/kml/Response/Status/code'].text.to_i
+      status = xml.elements['/kml/Response/Status/code'].text.to_i
       case status
       when 200 then # ignore, ok
       when 500 then</diff>
      <filename>lib/graticule/geocoders/google.rb</filename>
    </modified>
    <modified>
      <diff>@@ -69,9 +69,9 @@ module Graticule #:nodoc:
         location.longitude = r.elements['Longitude'].text.to_f
 
         location.street = r.elements['Address'].text.titleize unless r.elements['Address'].text.blank?
-        location.city = r.elements['City'].text.titleize unless r.elements['City'].text.blank?
-        location.state = r.elements['State'].text
-        location.zip = r.elements['Zip'].text
+        location.locality = r.elements['City'].text.titleize unless r.elements['City'].text.blank?
+        location.region = r.elements['State'].text
+        location.postal_code = r.elements['Zip'].text
         location.country = r.elements['Country'].text
 
         locations &lt;&lt; location</diff>
      <filename>lib/graticule/geocoders/yahoo.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,12 +2,16 @@ module Graticule
   
   # A geographic location
   class Location
-    attr_accessor :latitude, :longitude, :street, :city, :state, :zip, :country, :precision, :warning
+    attr_accessor :latitude, :longitude, :street, :locality, :region, :postal_code, :country, :precision, :warning
+    alias_method :city, :locality
+    alias_method :state, :region
+    alias_method :zip, :postal_code
     
     def initialize(attrs = {})
       attrs.each do |key,value|
         instance_variable_set &quot;@#{key}&quot;, value
       end
+      self.precision ||= :unknown
     end
     
     # Returns an Array with latitude and longitude.
@@ -16,7 +20,7 @@ module Graticule
     end
     
     def ==(object)
-      super(object) || [:latitude, :longitude, :street, :city, :state, :zip, :country, :precision].all? do |m|
+      super(object) || [:latitude, :longitude, :street, :locality, :region, :postal_code, :country, :precision].all? do |m|
         object.respond_to?(m) &amp;&amp; self.send(m) == object.send(m)
       end
     end
@@ -37,7 +41,7 @@ module Graticule
     def to_s(coordinates = false)
       result = &quot;&quot;
       result &lt;&lt; &quot;#{street}\n&quot; if street
-      result &lt;&lt; [city, [state, zip, country].compact.join(&quot; &quot;)].compact.join(&quot;, &quot;)
+      result &lt;&lt; [locality, [region, postal_code, country].compact.join(&quot; &quot;)].compact.join(&quot;, &quot;)
       result &lt;&lt; &quot;\nlatitude: #{latitude}, longitude: #{longitude}&quot; if coordinates &amp;&amp; [latitude, longitude].any?
       result
     end</diff>
      <filename>lib/graticule/location.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,9 +11,9 @@ module Graticule
       
       location = Location.new(
         :street =&gt; &quot;1600 Amphitheatre Pkwy&quot;,
-        :city =&gt; &quot;Mountain View&quot;,
-        :state =&gt; &quot;CA&quot;,
-        :zip =&gt; &quot;94043&quot;,
+        :locality =&gt; &quot;Mountain View&quot;,
+        :region =&gt; &quot;CA&quot;,
+        :postal_code =&gt; &quot;94043&quot;,
         :country =&gt; &quot;US&quot;,
         :longitude =&gt; -122.083739,
         :latitude =&gt; 37.423021,</diff>
      <filename>test/unit/graticule/geocoders/geocoders.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,9 +11,9 @@ module Graticule
       @geocoder = YahooGeocoder.new 'APP_ID'
       @location = Location.new(
         :street =&gt; &quot;701 First Ave&quot;,
-        :city =&gt; &quot;Sunnyvale&quot;,
-        :state =&gt; &quot;CA&quot;,
-        :zip =&gt; &quot;94089-1019&quot;,
+        :locality =&gt; &quot;Sunnyvale&quot;,
+        :region =&gt; &quot;CA&quot;,
+        :postal_code =&gt; &quot;94089-1019&quot;,
         :country =&gt; &quot;US&quot;,
         :longitude =&gt; -122.024853,
         :latitude =&gt; 37.416384,</diff>
      <filename>test/unit/graticule/geocoders/yahoo_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ module Graticule
     end
     
     def test_responds_to
-      [:latitude, :longitude, :street, :city, :state, :zip, :country, :coordinates, :precision].each do |m|
+      [:latitude, :longitude, :street, :locality, :region, :postal_code, :country, :coordinates, :precision].each do |m|
         assert Location.new.respond_to?(m), &quot;should respond to #{m}&quot;
       end
     end
@@ -24,7 +24,7 @@ module Graticule
       assert_equal Location.new, Location.new
 
       attrs = {:latitude =&gt; 100.5389, :longitude =&gt; -147.5893, :street =&gt; '123 A Street',
-          :city =&gt; 'Somewhere', :state =&gt; 'NO', :zip =&gt; '12345', :country =&gt; 'USA', :precision =&gt; :address}
+          :locality =&gt; 'Somewhere', :region =&gt; 'NO', :postal_code =&gt; '12345', :country =&gt; 'USA', :precision =&gt; :address}
       
       assert_equal Location.new(attrs), Location.new(attrs)
       attrs.each do |k,v|</diff>
      <filename>test/unit/graticule/location_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>94c14760571edf8412c5022132dca3b393f2a0ad</id>
    </parent>
  </parents>
  <author>
    <name>Brandon Keepers</name>
    <email>brandon@collectiveidea.com</email>
  </author>
  <url>http://github.com/collectiveidea/graticule/commit/758ba5c3e974cc23fd3eb35d47f898f1b740b451</url>
  <id>758ba5c3e974cc23fd3eb35d47f898f1b740b451</id>
  <committed-date>2007-03-12T10:54:30-07:00</committed-date>
  <authored-date>2007-03-12T10:54:30-07:00</authored-date>
  <message>added international geocoders
international-ized the location class</message>
  <tree>09e56f6e841e4b73c9b7ff2d0278576d13572b0d</tree>
  <committer>
    <name>Brandon Keepers</name>
    <email>brandon@collectiveidea.com</email>
  </committer>
</commit>
