norman-graticule 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. data/CHANGELOG.txt +46 -0
  2. data/LICENSE.txt +30 -0
  3. data/Manifest.txt +73 -0
  4. data/README.txt +29 -0
  5. data/Rakefile +86 -0
  6. data/bin/geocode +5 -0
  7. data/init.rb +2 -0
  8. data/lib/graticule/cli.rb +64 -0
  9. data/lib/graticule/distance/haversine.rb +40 -0
  10. data/lib/graticule/distance/spherical.rb +52 -0
  11. data/lib/graticule/distance/vincenty.rb +76 -0
  12. data/lib/graticule/distance.rb +29 -0
  13. data/lib/graticule/geocoder/base.rb +113 -0
  14. data/lib/graticule/geocoder/bogus.rb +15 -0
  15. data/lib/graticule/geocoder/geocoder_ca.rb +54 -0
  16. data/lib/graticule/geocoder/geocoder_us.rb +49 -0
  17. data/lib/graticule/geocoder/google.rb +120 -0
  18. data/lib/graticule/geocoder/host_ip.rb +41 -0
  19. data/lib/graticule/geocoder/local_search_maps.rb +45 -0
  20. data/lib/graticule/geocoder/map_quest.rb +109 -0
  21. data/lib/graticule/geocoder/meta_carta.rb +33 -0
  22. data/lib/graticule/geocoder/multi.rb +46 -0
  23. data/lib/graticule/geocoder/postcode_anywhere.rb +63 -0
  24. data/lib/graticule/geocoder/rest.rb +18 -0
  25. data/lib/graticule/geocoder/yahoo.rb +102 -0
  26. data/lib/graticule/geocoder.rb +21 -0
  27. data/lib/graticule/location.rb +57 -0
  28. data/lib/graticule/version.rb +9 -0
  29. data/lib/graticule.rb +24 -0
  30. data/test/config.yml.default +36 -0
  31. data/test/fixtures/responses/geocoder_us/success.xml +18 -0
  32. data/test/fixtures/responses/geocoder_us/unknown.xml +1 -0
  33. data/test/fixtures/responses/google/badkey.xml +1 -0
  34. data/test/fixtures/responses/google/limit.xml +10 -0
  35. data/test/fixtures/responses/google/missing_address.xml +1 -0
  36. data/test/fixtures/responses/google/only_coordinates.xml +1 -0
  37. data/test/fixtures/responses/google/partial.xml +1 -0
  38. data/test/fixtures/responses/google/server_error.xml +10 -0
  39. data/test/fixtures/responses/google/success.xml +1 -0
  40. data/test/fixtures/responses/google/unavailable.xml +1 -0
  41. data/test/fixtures/responses/google/unknown_address.xml +1 -0
  42. data/test/fixtures/responses/host_ip/private.txt +4 -0
  43. data/test/fixtures/responses/host_ip/success.txt +4 -0
  44. data/test/fixtures/responses/host_ip/unknown.txt +4 -0
  45. data/test/fixtures/responses/local_search_maps/empty.txt +1 -0
  46. data/test/fixtures/responses/local_search_maps/not_found.txt +1 -0
  47. data/test/fixtures/responses/local_search_maps/success.txt +1 -0
  48. data/test/fixtures/responses/meta_carta/bad_address.xml +17 -0
  49. data/test/fixtures/responses/meta_carta/multiple.xml +33 -0
  50. data/test/fixtures/responses/meta_carta/success.xml +31 -0
  51. data/test/fixtures/responses/postcode_anywhere/badkey.xml +9 -0
  52. data/test/fixtures/responses/postcode_anywhere/canada.xml +16 -0
  53. data/test/fixtures/responses/postcode_anywhere/empty.xml +16 -0
  54. data/test/fixtures/responses/postcode_anywhere/success.xml +16 -0
  55. data/test/fixtures/responses/postcode_anywhere/uk.xml +18 -0
  56. data/test/fixtures/responses/yahoo/success.xml +3 -0
  57. data/test/fixtures/responses/yahoo/unknown_address.xml +6 -0
  58. data/test/mocks/uri.rb +52 -0
  59. data/test/test_helper.rb +32 -0
  60. data/test/unit/graticule/distance_test.rb +58 -0
  61. data/test/unit/graticule/geocoder/geocoder_us_test.rb +43 -0
  62. data/test/unit/graticule/geocoder/google_test.rb +107 -0
  63. data/test/unit/graticule/geocoder/host_ip_test.rb +40 -0
  64. data/test/unit/graticule/geocoder/local_search_maps_test.rb +30 -0
  65. data/test/unit/graticule/geocoder/meta_carta_test.rb +44 -0
  66. data/test/unit/graticule/geocoder/multi_test.rb +43 -0
  67. data/test/unit/graticule/geocoder/postcode_anywhere_test.rb +50 -0
  68. data/test/unit/graticule/geocoder/yahoo_test.rb +58 -0
  69. data/test/unit/graticule/geocoder_test.rb +27 -0
  70. data/test/unit/graticule/location_test.rb +66 -0
  71. metadata +123 -0
@@ -0,0 +1,107 @@
1
+ require File.dirname(__FILE__) + '/../../../test_helper'
2
+
3
+ module Graticule
4
+ module Geocoder
5
+ class GoogleTest < Test::Unit::TestCase
6
+ def setup
7
+ URI::HTTP.responses = []
8
+ URI::HTTP.uris = []
9
+ @geocoder = Google.new(:key => 'APP_ID')
10
+ end
11
+
12
+ def test_success
13
+ return unless prepare_response(:success)
14
+
15
+ location = Location.new(
16
+ :street => "1600 Amphitheatre Pkwy",
17
+ :locality => "Mountain View",
18
+ :region => "CA",
19
+ :postal_code => "94043",
20
+ :country => "US",
21
+ :longitude => -122.083739,
22
+ :latitude => 37.423021,
23
+ :precision => :address
24
+ )
25
+ assert_equal location, @geocoder.locate('1600 Amphitheatre Parkway, Mountain View, CA')
26
+ end
27
+
28
+ # <?xml version='1.0' encoding='UTF-8'?><kml xmlns='http://earth.google.com/kml/2.0'><Response><name>15-17 </name><Status><code>200</code><request>geocode</request></Status><Placemark id='p1'><Point><coordinates>-17.000000,15.000000,0</coordinates></Point></Placemark></Response></kml>
29
+ def test_only_coordinates
30
+ return unless prepare_response(:only_coordinates)
31
+
32
+ location = Location.new(:longitude => -17.000000, :latitude => 15.000000)
33
+ assert_equal location, @geocoder.locate('15-17 & 16 Railroad Square, Nashua, NH, 03064')
34
+ end
35
+
36
+
37
+
38
+ def test_partial
39
+ return unless prepare_response(:partial)
40
+
41
+ location = Location.new(
42
+ :locality => "San Francisco",
43
+ :region => "CA",
44
+ :country => "US",
45
+ :longitude => -122.418333,
46
+ :latitude => 37.775000
47
+ )
48
+
49
+ assert_equal location, @geocoder.locate('sf ca')
50
+ end
51
+
52
+ def test_locate_with_first
53
+ prepare_response(:multiple)
54
+ location = Location.new(
55
+ :locality => "Gardiner",
56
+ :region => "ME",
57
+ :country => "US",
58
+ :longitude => -69.802949,
59
+ :latitude => 44.198024
60
+ )
61
+ assert @geocoder.locate(:first, 'Gardiner')
62
+ end
63
+
64
+ def test_locate_with_all
65
+ prepare_response(:multiple)
66
+ assert_equal 3, @geocoder.locate(:all, 'Gardiner').size
67
+ end
68
+
69
+ def test_bad_key
70
+ return unless prepare_response(:badkey)
71
+ assert_raises(CredentialsError) { @geocoder.locate('x') }
72
+ end
73
+
74
+ def test_locate_missing_address
75
+ return unless prepare_response(:missing_address)
76
+ assert_raises(AddressError) { @geocoder.locate 'x' }
77
+ end
78
+
79
+ def test_locate_server_error
80
+ return unless prepare_response(:server_error)
81
+ assert_raises(Error) { @geocoder.locate 'x' }
82
+ end
83
+
84
+ def test_locate_too_many_queries
85
+ return unless prepare_response(:limit)
86
+ assert_raises(CredentialsError) { @geocoder.locate 'x' }
87
+ end
88
+
89
+ def test_locate_unavailable_address
90
+ return unless prepare_response(:unavailable)
91
+ assert_raises(AddressError) { @geocoder.locate 'x' }
92
+ end
93
+
94
+ def test_locate_unknown_address
95
+ return unless prepare_response(:unknown_address)
96
+ assert_raises(AddressError) { @geocoder.locate 'x' }
97
+ end
98
+
99
+ protected
100
+
101
+ def prepare_response(id = :success)
102
+ URI::HTTP.responses << response('google', id)
103
+ end
104
+
105
+ end
106
+ end
107
+ end
@@ -0,0 +1,40 @@
1
+ require File.dirname(__FILE__) + '/../../../test_helper'
2
+
3
+ module Graticule
4
+ module Geocoder
5
+ class HostIpTest < Test::Unit::TestCase
6
+
7
+ def setup
8
+ @geocoder = HostIp.new
9
+ URI::HTTP.responses = []
10
+ URI::HTTP.uris = []
11
+ end
12
+
13
+ def test_success
14
+ prepare_response :success
15
+
16
+ location = Location.new :country => 'US', :locality => 'Mountain View',
17
+ :region => 'CA', :latitude => 37.402, :longitude => -122.078
18
+
19
+ assert_equal location, @geocoder.locate('64.233.167.99')
20
+ end
21
+
22
+ def test_unknown
23
+ prepare_response :unknown
24
+ assert_raises(AddressError) { @geocoder.locate('127.0.0.1') }
25
+ end
26
+
27
+ def test_private_ip
28
+ prepare_response :private
29
+ assert_raises(AddressError) { @geocoder.locate('127.0.0.1') }
30
+ end
31
+
32
+ private
33
+
34
+ def prepare_response(id = :success)
35
+ URI::HTTP.responses << response('host_ip', id, 'txt')
36
+ end
37
+
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,30 @@
1
+ require File.dirname(__FILE__) + '/../../../test_helper'
2
+
3
+ module Graticule
4
+ module Geocoder
5
+ class LocalSearchMapsTest < Test::Unit::TestCase
6
+
7
+ def setup
8
+ @geocoder = LocalSearchMaps.new
9
+ URI::HTTP.responses = []
10
+ URI::HTTP.uris = []
11
+ end
12
+
13
+ def test_success
14
+ prepare_response :success
15
+
16
+ location = Location.new :latitude => 51.510036, :longitude => -0.130427
17
+
18
+ assert_equal location, @geocoder.locate(:street => '48 Leicester Square',
19
+ :locality => 'London', :country => 'UK')
20
+ end
21
+
22
+ private
23
+
24
+ def prepare_response(id = :success)
25
+ URI::HTTP.responses << response('local_search_maps', id, 'txt')
26
+ end
27
+
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,44 @@
1
+ require File.dirname(__FILE__) + '/../../../test_helper'
2
+
3
+ module Graticule
4
+ module Geocoder
5
+ class MetaCartaTest < Test::Unit::TestCase
6
+
7
+ def setup
8
+ URI::HTTP.responses = []
9
+ URI::HTTP.uris = []
10
+
11
+ @geocoder = MetaCarta.new
12
+ end
13
+
14
+ def test_locate
15
+ prepare_response(:success)
16
+
17
+ expected = Location.new :latitude => 44.3939, :longitude => 33.3386
18
+
19
+ assert_equal expected, @geocoder.locate('baghdad')
20
+ assert_equal true, URI::HTTP.responses.empty?
21
+ assert_equal 1, URI::HTTP.uris.length
22
+ assert_equal 'http://labs.metacarta.com/GeoParser/?output=locations&q=baghdad',
23
+ URI::HTTP.uris.first
24
+ end
25
+
26
+ def test_locate_bad_address
27
+ prepare_response(:bad_address)
28
+ assert_raises(AddressError) { @geocoder.locate('aoeueou') }
29
+ end
30
+
31
+ def test_locations
32
+ prepare_response(:multiple)
33
+ expected = Location.new :latitude => -122.33083, :longitude => 47.60639
34
+ assert_equal expected, @geocoder.locate('seattle')
35
+ end
36
+
37
+ protected
38
+ def prepare_response(id = :success)
39
+ URI::HTTP.responses << response('meta_carta', id)
40
+ end
41
+
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,43 @@
1
+ require File.dirname(__FILE__) + '/../../../test_helper'
2
+
3
+ module Graticule
4
+ module Geocoder
5
+ class MultiTest < Test::Unit::TestCase
6
+
7
+ def setup
8
+ @mock_geocoders = [mock("geocoder 1"), mock("geocoder 2")]
9
+ @mock_geocoders.each {|g| g.stubs(:locate) }
10
+ @geocoder = Multi.new(*@mock_geocoders)
11
+ end
12
+
13
+ def test_locate_calls_each_geocoder_and_raises_error
14
+ @mock_geocoders.each do |g|
15
+ g.expects(:locate).with('test').raises(Graticule::AddressError)
16
+ end
17
+ assert_raises(Graticule::AddressError) { @geocoder.locate 'test' }
18
+ end
19
+
20
+ def test_locate_returns_first_result_without_calling_others
21
+ result = mock("result")
22
+ @mock_geocoders.first.expects(:locate).returns(result)
23
+ @mock_geocoders.last.expects(:locate).never
24
+ assert_equal result, @geocoder.locate('test')
25
+ end
26
+
27
+ def test_locate_with_custom_block
28
+ @mock_geocoders.first.expects(:locate).returns(1)
29
+ @mock_geocoders.last.expects(:locate).returns(2)
30
+ @geocoder = Multi.new(*@mock_geocoders) {|r| r == 2 }
31
+ assert_equal 2, @geocoder.locate('test')
32
+ end
33
+
34
+ def test_locate_with_custom_block_and_no_match
35
+ @mock_geocoders.first.expects(:locate).returns(1)
36
+ @mock_geocoders.last.expects(:locate).returns(2)
37
+ @geocoder = Multi.new(*@mock_geocoders) {|r| r == 3 }
38
+ assert_raises(Graticule::AddressError) { @geocoder.locate('test') }
39
+ end
40
+
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,50 @@
1
+ # account code: INDIV30777
2
+ # license key: KG39-HM17-PZ95-NR98
3
+ require File.dirname(__FILE__) + '/../../../test_helper'
4
+
5
+ module Graticule
6
+ module Geocoder
7
+ class PostcodeAnywhereTest < Test::Unit::TestCase
8
+
9
+ def setup
10
+ URI::HTTP.responses = []
11
+ URI::HTTP.uris = []
12
+ @geocoder = PostcodeAnywhere.new 'account_code', 'license_key'
13
+ end
14
+
15
+ def test_locate
16
+ prepare_response(:success)
17
+ location = Location.new(
18
+ :street => "204 Campbell Ave",
19
+ :locality => "Revelstoke",
20
+ :region => "BC",
21
+ :postal_code => "V0E",
22
+ :country => "Canada",
23
+ :longitude => -118.196970002204,
24
+ :latitude => 50.9997350418267
25
+ )
26
+ assert_equal location, @geocoder.locate(:street => "204 Campbell Ave",
27
+ :locality => "Revelstoke", :country => "Canada")
28
+ end
29
+
30
+ def test_locate_uk_address
31
+ prepare_response(:uk)
32
+
33
+ location = Location.new :latitude => 51.5728910186362, :longitude => -0.253788666693255
34
+ assert_equal location, @geocoder.locate(:street => '80 Wood Lane', :locality => 'London', :country => 'UK')
35
+ end
36
+
37
+ def test_empty
38
+ prepare_response(:empty)
39
+
40
+ assert_raises(Graticule::AddressError) { @geocoder.locate :street => 'foobar'}
41
+ end
42
+
43
+ protected
44
+ def prepare_response(id)
45
+ URI::HTTP.responses << response('postcode_anywhere', id)
46
+ end
47
+
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,58 @@
1
+ require File.dirname(__FILE__) + '/../../../test_helper'
2
+
3
+ module Graticule
4
+ module Geocoder
5
+ class YahooTest < Test::Unit::TestCase
6
+
7
+ def setup
8
+ URI::HTTP.responses = []
9
+ URI::HTTP.uris = []
10
+ @geocoder = Yahoo.new 'APP_ID'
11
+ @location = Location.new(
12
+ :street => "701 First Ave",
13
+ :locality => "Sunnyvale",
14
+ :region => "CA",
15
+ :postal_code => "94089-1019",
16
+ :country => "US",
17
+ :longitude => -122.024853,
18
+ :latitude => 37.416384,
19
+ :precision => :address
20
+ )
21
+ end
22
+
23
+ def test_locate
24
+ prepare_response(:success)
25
+ assert_equal @location, @geocoder.locate('701 First Street, Sunnyvale, CA')
26
+ end
27
+
28
+ def test_locate_with_first
29
+ prepare_response(:success)
30
+ assert_equal @location, @geocoder.locate(:first, '701 First Street, Sunnyvale, CA')
31
+ end
32
+
33
+ def test_locate_with_all
34
+ prepare_response(:multiple)
35
+ assert_equal 4, @geocoder.locate(:all, 'Gardiner').size
36
+ end
37
+
38
+ def test_url
39
+ prepare_response(:success)
40
+ @geocoder.locate('701 First Street, Sunnyvale, CA')
41
+ assert_equal 'http://api.local.yahoo.com/MapsService/V1/geocode?appid=APP_ID&location=701%20First%20Street,%20Sunnyvale,%20CA&output=xml',
42
+ URI::HTTP.uris.first
43
+ end
44
+
45
+
46
+ def test_locate_bad_address
47
+ prepare_response(:unknown_address)
48
+ assert_raise(Error) { @geocoder.locate('yucksthoeusthaoeusnhtaosu') }
49
+ end
50
+
51
+ protected
52
+ def prepare_response(id)
53
+ URI::HTTP.responses << response('yahoo', id)
54
+ end
55
+
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,27 @@
1
+ require File.dirname(__FILE__) + '/../../test_helper'
2
+
3
+ module Graticule
4
+ class GeocoderTest < Test::Unit::TestCase
5
+
6
+ def test_bogus_service
7
+ assert_equal Geocoder::Bogus, Graticule.service(:bogus)
8
+ end
9
+
10
+ def test_yahoo_service
11
+ assert_equal Geocoder::Yahoo, Graticule.service(:yahoo)
12
+ end
13
+
14
+ def test_google_service
15
+ assert_equal Geocoder::Google, Graticule.service(:google)
16
+ end
17
+
18
+ def test_geocoder_us_service
19
+ assert_equal Geocoder::GeocoderUs, Graticule.service(:geocoder_us)
20
+ end
21
+
22
+ def test_meta_carta_service
23
+ assert_equal Geocoder::MetaCarta, Graticule.service(:meta_carta)
24
+ end
25
+
26
+ end
27
+ end
@@ -0,0 +1,66 @@
1
+ require File.dirname(__FILE__) + '/../../test_helper'
2
+
3
+ module Graticule
4
+ class LocationTest < Test::Unit::TestCase
5
+
6
+ def setup
7
+ @washington_dc = Location.new :latitude => 38.898748, :longitude => -77.037684,
8
+ :street => '1600 Pennsylvania Avenue, NW', :locality => 'Washington',
9
+ :region => 'DC', :postal_code => 20500, :country => 'US'
10
+ end
11
+
12
+ def test_distance_to
13
+ chicago = Location.new(:latitude => 41.85, :longitude => -87.65)
14
+ assert_in_delta 594.820, @washington_dc.distance_to(chicago), 1.0
15
+ end
16
+
17
+ def test_responds_to
18
+ [:latitude, :longitude, :street, :locality, :region, :postal_code, :country, :coordinates, :precision].each do |m|
19
+ assert Location.new.respond_to?(m), "should respond to #{m}"
20
+ end
21
+ end
22
+
23
+ def test_coordinates
24
+ l = Location.new(:latitude => 100, :longitude => 50)
25
+ assert_equal [100, 50], l.coordinates
26
+ end
27
+
28
+ def test_equal
29
+ assert_equal Location.new, Location.new
30
+
31
+ attrs = {:latitude => 100.5389, :longitude => -147.5893, :street => '123 A Street',
32
+ :locality => 'Somewhere', :region => 'NO', :postal_code => '12345', :country => 'USA'}
33
+
34
+ assert_equal Location.new(attrs), Location.new(attrs)
35
+ attrs.each do |k,v|
36
+ assert_equal Location.new(k => v), Location.new(k => v)
37
+ assert_not_equal Location.new, Location.new(k => v)
38
+ assert_not_equal Location.new(attrs), Location.new(attrs.update(k => nil))
39
+ end
40
+ end
41
+
42
+ def test_antipode
43
+ chicago = Location.new(:latitude => 41.85, :longitude => -87.65)
44
+
45
+ assert_equal [-38.898748, 102.962316], @washington_dc.antipode.coordinates
46
+ assert_equal [-41.85, 92.35], chicago.antipode.coordinates
47
+ assert_equal [-41, -180], Graticule::Location.new(:latitude => 41, :longitude => 0).antipode.coordinates
48
+ assert_equal [-41, 179], Graticule::Location.new(:latitude => 41, :longitude => -1).antipode.coordinates
49
+ assert_equal [-41, -179], Graticule::Location.new(:latitude => 41, :longitude => 1).antipode.coordinates
50
+
51
+ assert_equal @washington_dc.coordinates, @washington_dc.antipode.antipode.coordinates
52
+ assert_equal chicago.coordinates, chicago.antipode.antipode.coordinates
53
+ end
54
+
55
+ def test_to_s
56
+ assert_equal "1600 Pennsylvania Avenue, NW\nWashington, DC 20500 US",
57
+ @washington_dc.to_s
58
+ assert_equal "1600 Pennsylvania Avenue, NW\nWashington, DC 20500",
59
+ @washington_dc.to_s(:country => false)
60
+ assert_equal "1600 Pennsylvania Avenue, NW\nWashington, DC 20500",
61
+ @washington_dc.to_s(:country => false)
62
+ assert_equal "1600 Pennsylvania Avenue, NW\nWashington, DC 20500\nlatitude: 38.898748, longitude: -77.037684",
63
+ @washington_dc.to_s(:country => false, :coordinates => true)
64
+ end
65
+ end
66
+ end
metadata ADDED
@@ -0,0 +1,123 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: norman-graticule
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.7
5
+ platform: ruby
6
+ authors:
7
+ - Brandon Keepers
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-07-09 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: Graticule is a geocoding API that provides a common interface to all the popular services, including Google, Yahoo, Geocoder.us, and MetaCarta.
17
+ email: brandon@opensoul.org
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - CHANGELOG.txt
24
+ - README.txt
25
+ files:
26
+ - CHANGELOG.txt
27
+ - LICENSE.txt
28
+ - Manifest.txt
29
+ - README.txt
30
+ - Rakefile
31
+ - bin/geocode
32
+ - init.rb
33
+ - lib/graticule.rb
34
+ - lib/graticule/cli.rb
35
+ - lib/graticule/distance.rb
36
+ - lib/graticule/distance/haversine.rb
37
+ - lib/graticule/distance/spherical.rb
38
+ - lib/graticule/distance/vincenty.rb
39
+ - lib/graticule/geocoder.rb
40
+ - lib/graticule/geocoder/base.rb
41
+ - lib/graticule/geocoder/bogus.rb
42
+ - lib/graticule/geocoder/geocoder_ca.rb
43
+ - lib/graticule/geocoder/geocoder_us.rb
44
+ - lib/graticule/geocoder/google.rb
45
+ - lib/graticule/geocoder/host_ip.rb
46
+ - lib/graticule/geocoder/local_search_maps.rb
47
+ - lib/graticule/geocoder/map_quest.rb
48
+ - lib/graticule/geocoder/meta_carta.rb
49
+ - lib/graticule/geocoder/multi.rb
50
+ - lib/graticule/geocoder/postcode_anywhere.rb
51
+ - lib/graticule/geocoder/rest.rb
52
+ - lib/graticule/geocoder/yahoo.rb
53
+ - lib/graticule/location.rb
54
+ - lib/graticule/version.rb
55
+ has_rdoc: true
56
+ homepage: http://graticule.rubyforge.org
57
+ post_install_message:
58
+ rdoc_options:
59
+ - --main
60
+ - README.txt
61
+ require_paths:
62
+ - lib
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: "0"
68
+ version:
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: "0"
74
+ version:
75
+ requirements: []
76
+
77
+ rubyforge_project:
78
+ rubygems_version: 1.2.0
79
+ signing_key:
80
+ specification_version: 2
81
+ summary: API for using all the popular geocoding services.
82
+ test_files:
83
+ - test/config.yml.default
84
+ - test/fixtures/responses/geocoder_us/success.xml
85
+ - test/fixtures/responses/geocoder_us/unknown.xml
86
+ - test/fixtures/responses/google/badkey.xml
87
+ - test/fixtures/responses/google/limit.xml
88
+ - test/fixtures/responses/google/missing_address.xml
89
+ - test/fixtures/responses/google/only_coordinates.xml
90
+ - test/fixtures/responses/google/partial.xml
91
+ - test/fixtures/responses/google/server_error.xml
92
+ - test/fixtures/responses/google/success.xml
93
+ - test/fixtures/responses/google/unavailable.xml
94
+ - test/fixtures/responses/google/unknown_address.xml
95
+ - test/fixtures/responses/host_ip/private.txt
96
+ - test/fixtures/responses/host_ip/success.txt
97
+ - test/fixtures/responses/host_ip/unknown.txt
98
+ - test/fixtures/responses/local_search_maps/empty.txt
99
+ - test/fixtures/responses/local_search_maps/not_found.txt
100
+ - test/fixtures/responses/local_search_maps/success.txt
101
+ - test/fixtures/responses/meta_carta/bad_address.xml
102
+ - test/fixtures/responses/meta_carta/multiple.xml
103
+ - test/fixtures/responses/meta_carta/success.xml
104
+ - test/fixtures/responses/postcode_anywhere/badkey.xml
105
+ - test/fixtures/responses/postcode_anywhere/canada.xml
106
+ - test/fixtures/responses/postcode_anywhere/empty.xml
107
+ - test/fixtures/responses/postcode_anywhere/success.xml
108
+ - test/fixtures/responses/postcode_anywhere/uk.xml
109
+ - test/fixtures/responses/yahoo/success.xml
110
+ - test/fixtures/responses/yahoo/unknown_address.xml
111
+ - test/mocks/uri.rb
112
+ - test/test_helper.rb
113
+ - test/unit/graticule/distance_test.rb
114
+ - test/unit/graticule/geocoder/geocoder_us_test.rb
115
+ - test/unit/graticule/geocoder/google_test.rb
116
+ - test/unit/graticule/geocoder/host_ip_test.rb
117
+ - test/unit/graticule/geocoder/local_search_maps_test.rb
118
+ - test/unit/graticule/geocoder/meta_carta_test.rb
119
+ - test/unit/graticule/geocoder/multi_test.rb
120
+ - test/unit/graticule/geocoder/postcode_anywhere_test.rb
121
+ - test/unit/graticule/geocoder/yahoo_test.rb
122
+ - test/unit/graticule/geocoder_test.rb
123
+ - test/unit/graticule/location_test.rb