simplegeo 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/lib/simple_geo/client.rb +32 -9
- data/lib/simple_geo/endpoint.rb +26 -10
- data/simplegeo.gemspec +3 -3
- data/spec/client_spec.rb +54 -20
- metadata +8 -9
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require 'rake'
|
|
4
4
|
begin
|
5
5
|
require 'jeweler'
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.name = "
|
7
|
+
gem.name = "sg-ruby"
|
8
8
|
gem.summary = %Q{A SimpleGeo Ruby Client}
|
9
9
|
gem.email = "dan@dofter.com"
|
10
10
|
gem.homepage = "http://github.com/archfear/sg-ruby"
|
@@ -44,7 +44,7 @@ Rake::RDocTask.new do |rdoc|
|
|
44
44
|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
45
45
|
|
46
46
|
rdoc.rdoc_dir = 'rdoc'
|
47
|
-
rdoc.title = "
|
47
|
+
rdoc.title = "sg-ruby #{version}"
|
48
48
|
rdoc.rdoc_files.include('README*')
|
49
49
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
50
50
|
end
|
data/lib/simple_geo/client.rb
CHANGED
@@ -73,6 +73,8 @@ module SimpleGeo
|
|
73
73
|
def get_nearby_records(layer, options)
|
74
74
|
if options[:geohash]
|
75
75
|
endpoint = Endpoint.nearby_geohash(layer, options.delete(:geohash))
|
76
|
+
elsif options[:ip]
|
77
|
+
endpoint = Endpoint.nearby_ip_address(layer, options.delete(:ip))
|
76
78
|
elsif options[:lat] && options[:lon]
|
77
79
|
endpoint = Endpoint.nearby_coordinates(layer,
|
78
80
|
options.delete(:lat), options.delete(:lon))
|
@@ -102,11 +104,29 @@ module SimpleGeo
|
|
102
104
|
geojson_hash = get Endpoint.nearby_address(lat, lon)
|
103
105
|
HashUtils.symbolize_keys geojson_hash['properties']
|
104
106
|
end
|
105
|
-
|
106
|
-
def
|
107
|
-
|
108
|
-
|
109
|
-
|
107
|
+
|
108
|
+
def get_context(lat, lon)
|
109
|
+
geojson_hash = get Endpoint.context(lat, lon)
|
110
|
+
HashUtils.recursively_symbolize_keys geojson_hash
|
111
|
+
end
|
112
|
+
|
113
|
+
# Required
|
114
|
+
# lat - The latitude of the point
|
115
|
+
# lon - The longitude of the point
|
116
|
+
#
|
117
|
+
# Optional
|
118
|
+
# q - A search term. For example, q=Starbucks would return all places matching the name Starbucks.
|
119
|
+
# category - Filter by an exact classifier (types, categories, subcategories, tags)
|
120
|
+
# radius - Search by radius in kilometers. Default radius is 25km.
|
121
|
+
#
|
122
|
+
# If you provide only a q parameter it does a full-text search
|
123
|
+
# of the name and classifiers of a place. If you provide only the category parameter
|
124
|
+
# it does a full-text search of all classifiers. If you provide q and category,
|
125
|
+
# q is a full-text search of place names and category is an exact match
|
126
|
+
# to one or more of the classifiers.
|
127
|
+
def get_places(lat, lon, options={})
|
128
|
+
geojson_hash = get Endpoint.places(lat, lon, options)
|
129
|
+
HashUtils.recursively_symbolize_keys geojson_hash
|
110
130
|
end
|
111
131
|
|
112
132
|
def get_density(lat, lon, day, hour=nil)
|
@@ -125,23 +145,26 @@ module SimpleGeo
|
|
125
145
|
end
|
126
146
|
|
127
147
|
def get_overlaps(south, west, north, east, options=nil)
|
148
|
+
warn "[DEPRECATION] `SimpleGeo::Client.get_overlaps` is deprecated."
|
128
149
|
info = get Endpoint.overlaps(south, west, north, east), options
|
129
150
|
HashUtils.recursively_symbolize_keys(info)
|
130
151
|
end
|
131
152
|
|
132
153
|
# this API call seems to always return a 404
|
133
154
|
def get_boundary(id)
|
155
|
+
warn "[DEPRECATION] `SimpleGeo::Client.get_boundary` is deprecated. Use `SimpleGeo::Client.get_feature` instead."
|
134
156
|
info = get Endpoint.boundary(id)
|
135
157
|
HashUtils.recursively_symbolize_keys(info)
|
136
158
|
end
|
137
159
|
|
138
160
|
def get_contains(lat, lon)
|
139
|
-
|
140
|
-
|
161
|
+
warn "[DEPRECATION] `SimpleGeo::Client.get_contains` is deprecated. Use `SimpleGeo::Client.get_context` instead."
|
162
|
+
get_context(lat, lon)
|
141
163
|
end
|
142
164
|
|
143
|
-
def
|
144
|
-
|
165
|
+
def get_contains_ip_address(ip)
|
166
|
+
warn "[DEPRECATION] `SimpleGeo::Client.get_contains` is deprecated."
|
167
|
+
info = get Endpoint.contains_ip_address(ip)
|
145
168
|
HashUtils.recursively_symbolize_keys(info)
|
146
169
|
end
|
147
170
|
|
data/lib/simple_geo/endpoint.rb
CHANGED
@@ -28,9 +28,29 @@ module SimpleGeo
|
|
28
28
|
endpoint_url "records/#{layer}/nearby/#{lat},#{lon}.json"
|
29
29
|
end
|
30
30
|
|
31
|
+
def nearby_ip_address(layer, ip)
|
32
|
+
endpoint_url "records/#{layer}/nearby/#{ip}.json"
|
33
|
+
end
|
34
|
+
|
31
35
|
def nearby_address(lat, lon)
|
32
36
|
endpoint_url "nearby/address/#{lat},#{lon}.json"
|
33
37
|
end
|
38
|
+
|
39
|
+
def context(lat, lon)
|
40
|
+
endpoint_url "context/#{lat},#{lon}.json", '1.0'
|
41
|
+
end
|
42
|
+
|
43
|
+
def places(lat, lon, options)
|
44
|
+
if options.empty?
|
45
|
+
endpoint_url "places/#{lat},#{lon}.json", '1.0'
|
46
|
+
else
|
47
|
+
params = ""
|
48
|
+
options.each do |k,v|
|
49
|
+
params << "#{k}=#{v}&"
|
50
|
+
end
|
51
|
+
endpoint_url "places/#{lat},#{lon}.json?#{params.chop!}", '1.0'
|
52
|
+
end
|
53
|
+
end
|
34
54
|
|
35
55
|
def density(lat, lon, day, hour=nil)
|
36
56
|
if hour.nil?
|
@@ -41,14 +61,14 @@ module SimpleGeo
|
|
41
61
|
endpoint_url path
|
42
62
|
end
|
43
63
|
|
44
|
-
def layer(layer)
|
45
|
-
endpoint_url "layer/#{layer}.json"
|
46
|
-
end
|
47
|
-
|
48
64
|
def contains(lat, lon)
|
49
65
|
endpoint_url "contains/#{lat},#{lon}.json"
|
50
66
|
end
|
51
67
|
|
68
|
+
def contains_ip_address(ip)
|
69
|
+
endpoint_url "contains/#{ip}.json"
|
70
|
+
end
|
71
|
+
|
52
72
|
def overlaps(south, west, north, east)
|
53
73
|
endpoint_url "overlaps/#{south},#{west},#{north},#{east}.json"
|
54
74
|
end
|
@@ -57,12 +77,8 @@ module SimpleGeo
|
|
57
77
|
endpoint_url "boundary/#{id}.json"
|
58
78
|
end
|
59
79
|
|
60
|
-
def
|
61
|
-
|
62
|
-
end
|
63
|
-
|
64
|
-
def endpoint_url(path)
|
65
|
-
[REALM, API_VERSION, path].join('/')
|
80
|
+
def endpoint_url(path, version = API_VERSION)
|
81
|
+
[REALM, version, path].join('/')
|
66
82
|
end
|
67
83
|
end
|
68
84
|
|
data/simplegeo.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{simplegeo}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["
|
12
|
-
s.date = %q{
|
11
|
+
s.authors = ["Brian Ryckbost", "Andrew Mager"]
|
12
|
+
s.date = %q{2011-01-12}
|
13
13
|
s.email = %q{andrew@simplegeo.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE",
|
data/spec/client_spec.rb
CHANGED
@@ -485,36 +485,70 @@ describe "Client" do
|
|
485
485
|
}
|
486
486
|
end
|
487
487
|
end
|
488
|
+
|
489
|
+
context "getting a context" do
|
490
|
+
before do
|
491
|
+
stub_request :get,
|
492
|
+
'http://api.simplegeo.com/1.0/context/42.790311,-86.103725.json',
|
493
|
+
:fixture_file => 'context.json'
|
494
|
+
end
|
488
495
|
|
489
|
-
|
490
|
-
|
496
|
+
it "should return a hash with the contextual information" do
|
497
|
+
context_info = SimpleGeo::Client.get_context(42.790311,-86.103725)
|
498
|
+
context_info.should == {:features=>[{:type=>"Region", :license=>"http://creativecommons.org/publicdomain/mark/1.0/", :handle=>"SG_6uJ6wzViqnu1oYhZcDvC6W_42.834306_-85.959803", :subcategory=>"Provincial (Lower)", :bounds=>[-86.166987, 42.767498, -85.782106, 42.943294], :name=>"State House District 90", :category=>"Legislative District", :abbr=>"", :href=>"http://api.simplegeo.com/1.0/features/SG_6uJ6wzViqnu1oYhZcDvC6W_42.834306_-85.959803.json"}, {:type=>"Region", :license=>"http://creativecommons.org/publicdomain/mark/1.0/", :handle=>"SG_4OIGBRyxTiWgCdg0Lyn07s_42.952959_-86.403728", :subcategory=>"Provincial (Upper)", :bounds=>[-87.107669, 42.765202, -85.670247, 43.205978], :name=>"State Senate District 30", :category=>"Legislative District", :abbr=>"", :href=>"http://api.simplegeo.com/1.0/features/SG_4OIGBRyxTiWgCdg0Lyn07s_42.952959_-86.403728.json"}, {:type=>"Region", :license=>"http://creativecommons.org/publicdomain/mark/1.0/", :handle=>"SG_2CIOVMi7dzlPcX4McJ7R2f_42.948535_-86.421882", :subcategory=>"County", :bounds=>[-87.107669, 42.765202, -85.782067, 43.205978], :name=>"Ottawa", :category=>"Administrative", :abbr=>"", :href=>"http://api.simplegeo.com/1.0/features/SG_2CIOVMi7dzlPcX4McJ7R2f_42.948535_-86.421882.json"}, {:type=>"Region", :license=>"http://creativecommons.org/publicdomain/mark/1.0/", :handle=>"SG_4c1GLzrQPs1lzMEwbXXDTG_44.209749_-85.174107", :subcategory=>"", :bounds=>[-89.876047, 41.695801, -82.407822, 48.23452], :name=>"America/Detroit", :category=>"Time Zone", :abbr=>"", :href=>"http://api.simplegeo.com/1.0/features/SG_4c1GLzrQPs1lzMEwbXXDTG_44.209749_-85.174107.json"}, {:type=>"Region", :license=>"http://creativecommons.org/publicdomain/mark/1.0/", :handle=>"SG_4BTI2YCOHn2kKGheRPjEIA_42.740746_-86.087464", :subcategory=>"", :bounds=>[-86.211882, 42.681352, -85.901239, 42.803153], :name=>"49423", :category=>"Postal Code", :abbr=>"", :href=>"http://api.simplegeo.com/1.0/features/SG_4BTI2YCOHn2kKGheRPjEIA_42.740746_-86.087464.json"}, {:type=>"Region", :license=>"http://creativecommons.org/publicdomain/mark/1.0/", :handle=>"SG_3uwSAEdXVBzK1ZER9Nqkdp_45.687160_-112.493107", :subcategory=>"", :bounds=>[-179.142471, 18.930138, 179.78115, 71.41218], :name=>"United States of America", :category=>"National", :abbr=>"", :href=>"http://api.simplegeo.com/1.0/features/SG_3uwSAEdXVBzK1ZER9Nqkdp_45.687160_-112.493107.json"}, {:type=>"Region", :license=>"http://creativecommons.org/publicdomain/mark/1.0/", :handle=>"SG_7PF95202oeSi8UJfS8Du4L_44.874774_-85.730953", :subcategory=>"State", :bounds=>[-90.418392, 41.696118, -82.122971, 48.306063], :name=>"Michigan", :category=>"Subnational", :abbr=>"MI", :href=>"http://api.simplegeo.com/1.0/features/SG_7PF95202oeSi8UJfS8Du4L_44.874774_-85.730953.json"}, {:type=>"Region", :license=>"http://creativecommons.org/publicdomain/mark/1.0/", :handle=>"SG_3ske3SdDp9Vzzr6M5GcNdz_42.772865_-86.121892", :subcategory=>"Unified", :bounds=>[-86.210248, 42.74334, -86.048046, 42.802685], :name=>"Holland City School District", :category=>"School District", :abbr=>"", :href=>"http://api.simplegeo.com/1.0/features/SG_3ske3SdDp9Vzzr6M5GcNdz_42.772865_-86.121892.json"}, {:type=>"Region", :license=>"http://creativecommons.org/publicdomain/mark/1.0/", :handle=>"SG_4wefQyQRSx0qqC75Y4hoLl_42.767627_-86.098521", :subcategory=>"City", :bounds=>[-86.166987, 42.729342, -86.047025, 42.802532], :name=>"Holland", :category=>"Municipal", :abbr=>"", :href=>"http://api.simplegeo.com/1.0/features/SG_4wefQyQRSx0qqC75Y4hoLl_42.767627_-86.098521.json"}, {:type=>"Region", :license=>"http://creativecommons.org/publicdomain/mark/1.0/", :handle=>"SG_0GfZAGyWb5a3aHQm1U7Nzw_42.792354_-86.110755", :subcategory=>"Municipal", :bounds=>[-86.125552, 42.783776, -86.09735, 42.803224], :name=>"1393864002002", :category=>"Legislative District", :abbr=>"", :href=>"http://api.simplegeo.com/1.0/features/SG_0GfZAGyWb5a3aHQm1U7Nzw_42.792354_-86.110755.json"}, {:type=>"Region", :license=>"http://creativecommons.org/publicdomain/mark/1.0/", :handle=>"SG_4Nw3IcoA88j0EvXHP6fneE_42.791087_-86.094830", :subcategory=>"Tract", :bounds=>[-86.111603, 42.783016, -86.080832, 42.80099], :name=>"26139022300", :category=>"US Census", :abbr=>"", :href=>"http://api.simplegeo.com/1.0/features/SG_4Nw3IcoA88j0EvXHP6fneE_42.791087_-86.094830.json"}], :timestamp=>1291928637.193, :query=>{:latitude=>42.790311, :longitude=>-86.103725}}
|
499
|
+
end
|
500
|
+
end
|
501
|
+
|
502
|
+
context "search for nearby places" do
|
503
|
+
context "without optional params" do
|
491
504
|
before do
|
492
505
|
stub_request :get,
|
493
|
-
'http://api.simplegeo.com/0
|
494
|
-
:fixture_file => '
|
506
|
+
'http://api.simplegeo.com/1.0/places/42.790311,-86.103725.json',
|
507
|
+
:fixture_file => 'places.json'
|
495
508
|
end
|
496
509
|
|
497
|
-
it "should return a hash
|
498
|
-
|
499
|
-
layer_info.should == {
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
510
|
+
it "should return a hash with the places nearby" do
|
511
|
+
nearby_places = SimpleGeo::Client.get_places(42.790311, -86.103725)
|
512
|
+
nearby_places.should == {:type=>"FeatureCollection", :total=>25, :features=>[{:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Food & Drink", :category=>"Restaurant", :subcategory=>""}], :tags=>[""], :postcode=>"49423", :city=>"Holland", :address=>"84 E 8th St", :phone=>"+1 616 396 8484", :country=>"US", :name=>"84 East", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.103744, 42.790269]}, :id=>"SG_57YZu0CVFGKQnIulntuuWr_42.790269_-86.103744@1291805576"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Entertainment", :category=>"Cinema", :subcategory=>"Movie Theater"}], :tags=>[""], :postcode=>"49423", :city=>"Holland", :address=>"86 E 8th St", :phone=>"+1 616 395 7403", :country=>"US", :name=>"Knickerbocker Theatre", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.103679, 42.790269]}, :id=>"SG_5iwLxG6ALqH1IBgxCzWZIy_42.790269_-86.103679@1291805576"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Services", :category=>"Real Estate", :subcategory=>"Architect"}], :website=>"www.gmb.com", :tags=>["engineering", "architectural"], :postcode=>"49423", :city=>"Holland", :address=>"85 E 8th St", :phone=>"+1 616 392 7034", :country=>"US", :name=>"Gmb Architects-Engineers", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.103679, 42.790419]}, :id=>"SG_1iwoQtrrKg632jyzQxCnWh_42.790419_-86.103679@1291805576"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Services", :category=>"Banks & Credit Unions", :subcategory=>"Investment Brokerage"}], :tags=>["stock", "bond"], :postcode=>"49423", :city=>"Holland", :address=>"85 E 8th St", :phone=>"+1 616 394 9199", :country=>"US", :name=>"Hilliard Lyons Inc", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.103679, 42.790419]}, :id=>"SG_1XxsjEwzAzO1iVklXUfWSX_42.790419_-86.103679@1291805576"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Services", :category=>"Professional", :subcategory=>"Lawyer & Legal Services"}], :website=>"www.wnj.com", :tags=>["attorney"], :postcode=>"49423", :city=>"Holland", :address=>"85 E 8th St", :phone=>"+1 616 396 9800", :country=>"US", :name=>"Warner Norcross & Judd", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.103679, 42.790419]}, :id=>"SG_0gq8wAnbF1wtS1ISMf28qZ_42.790419_-86.103679@1291674002"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Services", :category=>"Banks & Credit Unions", :subcategory=>"Bank"}], :tags=>[""], :postcode=>"49423", :city=>"Holland", :address=>"81 E 8th St", :phone=>"+1 616 355 2884", :country=>"US", :name=>"West Michigan Community Bank", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.10381, 42.790419]}, :id=>"SG_4rDWezFhTCBLMiWSHOCZPb_42.790419_-86.103810@1291674002"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Retail Goods", :category=>"Shopping", :subcategory=>"Florist"}], :tags=>[""], :postcode=>"49423", :city=>"Holland", :address=>"78 E 8th St", :phone=>"+1 616 396 6369", :country=>"US", :name=>"Indigo Floral", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.103942, 42.790268]}, :id=>"SG_58jgJxBtYRhv9jx0osBZZ0_42.790268_-86.103942@1291674002"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Services", :category=>"Professional", :subcategory=>"Business Services"}], :tags=>["information", "bureau", "convention"], :postcode=>"49423", :city=>"Holland", :address=>"76 E 8th St", :phone=>"+1 616 394 0000", :country=>"US", :name=>"Holland Area Convention", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.104007, 42.790268]}, :id=>"SG_6B9SX7leIDD6L7VBNkSxU7_42.790268_-86.104007@1291674002"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Services", :category=>"Professional", :subcategory=>"Computer Services"}], :website=>"www.fastcadworks.com", :tags=>["design", "system", "graphics"], :postcode=>"49423", :city=>"Holland", :address=>"76 E 8th St", :phone=>"+1 616 392 8088", :country=>"US", :name=>"Fast Cad Works Inc", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.104007, 42.790268]}, :id=>"SG_6PImENDBqa4bKCUecEhx71_42.790268_-86.104007@1291674002"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Services", :category=>"Professional", :subcategory=>"Business Services"}], :tags=>["operation"], :postcode=>"49423", :city=>"Holland", :address=>"76 E 8th St", :phone=>"+1 616 394 0000", :country=>"US", :name=>"Holland Area Cnvntn/Vstrs Brea", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.104007, 42.790268]}, :id=>"SG_7bdzq0CZtU46XOkK0rAnb2_42.790268_-86.104007@1291674002"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Services", :category=>"Utilities", :subcategory=>"Mobile Phone"}], :tags=>["telephone", "cellular"], :postcode=>"49423", :city=>"Holland", :address=>"74 E 8th St", :phone=>"+1 616 396 9000", :country=>"US", :name=>"Citywide Cellular", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.104073, 42.790268]}, :id=>"SG_0MeFGadhDgjUvxctRv1jI0_42.790268_-86.104073@1291674002"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Manufacturing & Wholesale Goods", :category=>"Wholesale", :subcategory=>"Stationery"}], :tags=>["product", "paper"], :postcode=>"49423", :city=>"Holland", :address=>"74 E 8th St", :phone=>"+1 616 928 0069", :country=>"US", :name=>"Paper Projects", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.104073, 42.790268]}, :id=>"SG_1pWaseKLVyM6s4AUy8uk1g_42.790268_-86.104073@1291674002"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Food & Drink", :category=>"Restaurant", :subcategory=>""}], :tags=>[""], :postcode=>"49423", :city=>"Holland", :address=>"73 E 8th St", :phone=>"+1 616 393 6340", :country=>"US", :name=>"Curra Irish Pub", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.104073, 42.790418]}, :id=>"SG_7EHfB3sWifm1cuJEFsIPHM_42.790418_-86.104073@1291805576"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Retail Goods", :category=>"Shopping", :subcategory=>"Musical Instruments"}], :tags=>[""], :postcode=>"49423", :city=>"Holland", :address=>"72 E 8th St", :phone=>"+1 616 494 9433", :country=>"US", :name=>"Holland Rit Music", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.104139, 42.790268]}, :id=>"SG_76E6200B4vVKwohCB9kn7d_42.790268_-86.104139@1291674002"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Public Place", :category=>"Education", :subcategory=>"Special Training"}], :tags=>["instruction", "music"], :postcode=>"49423", :city=>"Holland", :address=>"72 E 8th St", :phone=>"+1 616 392 5455", :country=>"US", :name=>"RIT Music", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.104139, 42.790268]}, :id=>"SG_4o6BJ7oVuFFQd1xaC3Iwu9_42.790268_-86.104139@1291674002"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Services", :category=>"Professional", :subcategory=>"Research"}], :tags=>[""], :postcode=>"49423", :city=>"Holland", :address=>"100 E 8th St", :phone=>"+1 616 395 7678", :country=>"US", :name=>"A C Van Raalte Institute", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.103218, 42.790269]}, :id=>"SG_5HRY8FXZc3mZJk3qhzqhMP_42.790269_-86.103218@1291674002"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Services", :category=>"Banks & Credit Unions", :subcategory=>"Investment Brokerage"}], :tags=>["security"], :postcode=>"49423", :city=>"Holland", :address=>"100 E 8th St", :phone=>"+1 269 983 2587", :country=>"US", :name=>"First of Michigan Corporation", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.103218, 42.790269]}, :id=>"SG_6CD4NhpaIUhUXjrIpt989B_42.790269_-86.103218@1291805576"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Services", :category=>"Banks & Credit Unions", :subcategory=>"Investment Brokerage"}, {:type=>"Services", :category=>"Professional", :subcategory=>"Management & Consulting"}], :tags=>["consultant", "planning", "financial"], :postcode=>"49423", :city=>"Holland", :address=>"100 E 8th St", :phone=>"+1 616 355 9890", :country=>"US", :name=>"Morgan Stanley", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.103218, 42.790269]}, :id=>"SG_6bcMqwMhOCYl98xqOvTHai_42.790269_-86.103218@1291805576"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Services", :category=>"Banks & Credit Unions", :subcategory=>"Investment Brokerage"}], :tags=>["security", "management", "consulting"], :postcode=>"49423", :city=>"Holland", :address=>"100 E 8th St", :phone=>"+1 616 392 5333", :country=>"US", :name=>"Merrill Lynch", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.103218, 42.790269]}, :id=>"SG_1k69enLHB2I9GSIAwYKHZs_42.790269_-86.103218@1291805576"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Services", :category=>"Banks & Credit Unions", :subcategory=>"Investment Brokerage"}], :tags=>["stock", "bond"], :postcode=>"49423", :city=>"Holland", :address=>"100 E 8th St", :phone=>"+1 616 546 3557", :country=>"US", :name=>"Oppenheimer & Co Inc", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.103218, 42.790269]}, :id=>"SG_4wOwAHiiQNDLSwKRYjoYvU_42.790269_-86.103218@1291805576"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Manufacturing & Wholesale Goods", :category=>"Wholesale", :subcategory=>"Furniture"}], :tags=>["household", "wood", "mfg"], :postcode=>"49423", :city=>"Holland", :address=>"100 E 8th St", :phone=>"+1 616 392 8761", :country=>"US", :name=>"Baker Furniture Museum", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.103218, 42.790269]}, :id=>"SG_3koZp5aq0uEvV3EgZ5dBCW_42.790269_-86.103218@1291674002"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Public Place", :category=>"Education", :subcategory=>"College"}], :tags=>["academic", "school"], :postcode=>"49423", :city=>"Holland", :address=>"100 E 8th St", :phone=>"+1 616 395 7919", :country=>"US", :name=>"Hope Academy Of Senior Prf", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.103218, 42.790269]}, :id=>"SG_4Ne2H3wEbDjnNXNcgOTTrd_42.790269_-86.103218@1291674002"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Services", :category=>"Banks & Credit Unions", :subcategory=>"Bank"}], :tags=>["commercial"], :postcode=>"49423", :city=>"Holland", :address=>"100 E 8th St", :phone=>"+1 616 395 2585", :country=>"US", :name=>"Republic Bank", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.103218, 42.790269]}, :id=>"SG_4TgInjExuHo9gtBelHyAeF_42.790269_-86.103218@1291674002"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Services", :category=>"Real Estate", :subcategory=>"Real Estate Agent"}], :tags=>["cooperative"], :postcode=>"49423", :city=>"Holland", :address=>"100 E 8th St", :phone=>"+1 616 399 5125", :country=>"US", :name=>"Beverage Associates Co-Op Inc", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.103218, 42.790269]}, :id=>"SG_2kJmYRSi2D4vye77KO9FvS_42.790269_-86.103218@1291805576"}, {:type=>"Feature", :properties=>{:owner=>"simplegeo", :classifiers=>[{:type=>"Manufacturing & Wholesale Goods", :category=>"Manufacturing", :subcategory=>"Food"}], :website=>"www.newhollandbrew.com", :tags=>["brewer"], :postcode=>"49423", :city=>"Holland", :address=>"66 E 8th St", :phone=>"+1 616 355 6422", :country=>"US", :name=>"New Holland Brewing Co", :province=>"MI"}, :geometry=>{:type=>"Point", :coordinates=>[-86.104336, 42.790268]}, :id=>"SG_7WiYaNPjducHg5gbpH1ukN_42.790268_-86.104336@1291674002"}]}
|
513
|
+
end
|
514
|
+
end
|
515
|
+
|
516
|
+
context "with a search term" do
|
517
|
+
before do
|
518
|
+
stub_request :get,
|
519
|
+
'http://api.simplegeo.com/1.0/places/42.790311,-86.103725.json?q=Dutch',
|
520
|
+
:fixture_file => 'places_q.json'
|
521
|
+
end
|
522
|
+
|
523
|
+
it "should return a hash with the places nearby matching the name" do
|
524
|
+
dutch_places = SimpleGeo::Client.get_places(42.790311, -86.103725, :q => 'Dutch')
|
525
|
+
dutch_places.should == {:type=>"FeatureCollection", :features=>[{:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.112928, 42.801396]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Services", :category=>"Building & Trades", :subcategory=>"Construction"}], :tags=>["tile", "dealer"], :postcode=>"49424", :city=>"Holland", :address=>"129 Howard Ave", :country=>"US", :name=>"Duca The Dutch Carpenter", :phone=>"+1 616 494 0404"}, :id=>"SG_6I3KqAqKIqpRLaduUcUBRr_42.801396_-86.112928@1291674002"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.107095, 42.776685]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Entertainment", :category=>"Travel", :subcategory=>"Hotels & Motels"}], :tags=>["house", "operation", "construction"], :postcode=>"49423", :city=>"Holland", :address=>"560 Central Ave", :country=>"US", :name=>"Dutch Colonial Inn", :phone=>"+1 616 396 3664"}, :id=>"SG_6ucOjwWPjOCcbHeyMJnoY9_42.776685_-86.107095@1291674002"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.098187, 42.775013]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Services", :category=>"Banks & Credit Unions", :subcategory=>"Bank"}], :tags=>["state"], :postcode=>"49423", :city=>"Holland", :address=>"215 E 25th St", :country=>"US", :name=>"Big Dutch Fleet Credit Union", :phone=>"+1 616 396 5000"}, :id=>"SG_6mO5cCEdHU8AFO0OxvLQgP_42.775013_-86.098187@1291674002"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.126474, 42.781931]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Retail Goods", :category=>"Home & Garden", :subcategory=>"Furniture"}], :tags=>["equipment", "kitchen", "cabinet"], :postcode=>"49423", :city=>"Holland", :address=>"420 W 17th St", :country=>"US", :name=>"Dutch Made Custom Cabinetry", :phone=>"+1 616 392 4480"}, :id=>"SG_1SO3yvCM1dWdnSlo3vywBI_42.781931_-86.126474@1291674002"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.13011, 42.779354]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Manufacturing & Wholesale Goods", :category=>"Manufacturing", :subcategory=>"Food"}], :tags=>["product", "salad"], :postcode=>"49423", :city=>"Holland", :address=>"507 W 20th St", :country=>"US", :name=>"Dutch Treat Salads", :phone=>"+1 616 396 3392"}, :id=>"SG_6jFqymBz2f0fL6isDiizHO_42.779354_-86.130110@1291674002"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.089768, 42.810865]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Food & Drink", :category=>"Restaurant", :subcategory=>""}], :tags=>[], :postcode=>"49424", :city=>"Holland", :address=>"2229 N Park Dr", :country=>"US", :name=>"Dutch Subway LLC", :phone=>"+1 616 393 7991"}, :id=>"SG_1Y0brcGA5S8IF0Phta2BwM_42.810865_-86.089768@1291805576"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.087692, 42.811998]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Retail Goods", :category=>"Shopping", :subcategory=>"Gifts & Souvenirs"}], :tags=>["shop"], :postcode=>"49424", :city=>"Holland", :website=>"www.dutchvillage.com", :address=>"12350 James St", :country=>"US", :name=>"Dutch Village", :phone=>"+1 616 396 1475"}, :id=>"SG_20goKPd6BzmzAl787Hmi5h_42.811998_-86.087692@1291674002"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.122281, 42.812614]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Retail Goods", :category=>"Food & Beverages", :subcategory=>"Bakery"}], :tags=>["baker"], :postcode=>"49424", :city=>"Holland", :address=>"501 Butternut Dr", :country=>"US", :name=>"Dutch Delite Bakery", :phone=>"+1 616 399 6050"}, :id=>"SG_7BxMkAcMduxYrtRlSP7JJ5_42.812614_-86.122281@1291674002"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.038383, 42.805126]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Entertainment", :category=>"Travel", :subcategory=>"Campground"}], :tags=>["trailer"], :postcode=>"49464", :city=>"Zeeland", :address=>"10300 Gordon St", :country=>"US", :name=>"Dutch St Camping & Recreation", :phone=>"+1 616 772 4303"}, :id=>"SG_5BE2NtLKOzhR4GEJHqP70I_42.805126_-86.038383@1291805576"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.038383, 42.805126]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Entertainment", :category=>"Travel", :subcategory=>"Campground"}], :tags=>[], :postcode=>"49464", :city=>"Zeeland", :address=>"10300 Gordon St", :country=>"US", :name=>"Dutch Treat Camping & Rec", :phone=>"+1 616 772 4303"}, :id=>"SG_6EqRqswuhnjdXJpzV4tImf_42.805126_-86.038383@1291805576"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.094211, 42.841058]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Retail Goods", :category=>"Shopping", :subcategory=>"Gifts & Souvenirs"}], :tags=>[], :postcode=>"49424", :city=>"Holland", :address=>"12755 Quincy St", :country=>"US", :name=>"Dutch Delft Blue", :phone=>"+1 616 399 1803"}, :id=>"SG_3lJVWKDOt3xnYwgq26dGr8_42.841058_-86.094211@1291674002"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.067609, 42.739675]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Services", :category=>"Retail", :subcategory=>"Car Wash"}], :tags=>["truck", "cleaning"], :postcode=>"49423", :city=>"Holland", :address=>"4356 Lincoln Rd", :country=>"US", :name=>"Dutch Touch Truck Wash", :phone=>"+1 616 396 0679"}, :id=>"SG_6ei1IIEtJ8jLWel1t3QsZv_42.739675_-86.067609@1291674002"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-85.979829, 42.843688]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Manufacturing & Wholesale Goods", :category=>"Wholesale", :subcategory=>"Plants"}], :tags=>["nursery", "tree"], :postcode=>"49464", :city=>"Zeeland", :address=>"4135 80th Ave", :country=>"US", :name=>"Dutch Touch Growers Inc", :phone=>"+1 616 875 7416"}, :id=>"SG_5Sbj5KbLNCSIfh3P0zuyD0_42.843688_-85.979829@1291674002"}], :total=>13}
|
504
526
|
end
|
505
527
|
end
|
506
528
|
|
507
|
-
context "
|
529
|
+
context "with a category" do
|
508
530
|
before do
|
509
531
|
stub_request :get,
|
510
|
-
'http://api.simplegeo.com/0
|
511
|
-
:
|
532
|
+
'http://api.simplegeo.com/1.0/places/42.790311,-86.103725.json?category=coffee',
|
533
|
+
:fixture_file => 'places_category.json'
|
512
534
|
end
|
513
535
|
|
514
|
-
it "should
|
515
|
-
|
516
|
-
|
517
|
-
|
536
|
+
it "should return a hash with the places nearby matching the classifiers" do
|
537
|
+
coffee_places = SimpleGeo::Client.get_places(42.790311, -86.103725, :category => 'coffee')
|
538
|
+
coffee_places.should == {:type=>"FeatureCollection", :features=>[{:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.106339, 42.790389]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Food & Drink", :category=>"Restaurant", :subcategory=>""}], :tags=>["shop", "coffee"], :postcode=>"49423", :city=>"Holland", :website=>"www.jpscoffee.com", :address=>"57 E 8th St", :country=>"US", :name=>"J P's Coffee & Espresso Bar", :phone=>"+1 616 396 5465"}, :id=>"SG_5mG4NZzFGavcAh7OAKIQH5_42.790389_-86.106339@1291805576"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.100164, 42.780542]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Food & Drink", :category=>"Restaurant", :subcategory=>""}], :tags=>["shop", "coffee"], :postcode=>"49423", :city=>"Holland", :address=>"451 Columbia Ave", :country=>"US", :name=>"Leaf & Bean Too", :phone=>"+1 616 355 2251"}, :id=>"SG_0QKaDcYrJbX6OtfwCZcrMt_42.780542_-86.100164@1291805576"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.101407, 42.805658]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Food & Drink", :category=>"Restaurant", :subcategory=>""}], :tags=>["shop", "coffee"], :postcode=>"49424", :city=>"Holland", :address=>"166 E Lakewood Blvd", :country=>"US", :name=>"Joe 2 Go", :phone=>"+1 616 395 5950"}, :id=>"SG_7eWRRtNkDrWZfQQtMo3PAl_42.805658_-86.101407@1291805576"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.123647, 42.797738]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Food & Drink", :category=>"Restaurant", :subcategory=>""}], :tags=>["shop", "coffee"], :postcode=>"49424", :city=>"Holland", :address=>"321 Douglas Ave", :country=>"US", :name=>"Perfect Cup Cafe", :phone=>"+1 616 395 2593"}, :id=>"SG_5jMWhnI7je8uIxRFoIA88u_42.797738_-86.123647@1291805576"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.059282, 42.804026]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Food & Drink", :category=>"Restaurant", :subcategory=>""}], :tags=>["shop", "coffee"], :postcode=>"49424", :city=>"Holland", :address=>"11260 Chicago Dr", :country=>"US", :name=>"Carpe Latte", :phone=>"+1 616 396 6005"}, :id=>"SG_74Ue55SNQhHEfPbZSSHI5a_42.804026_-86.059282@1291805576"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.016332, 42.812393]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Food & Drink", :category=>"Restaurant", :subcategory=>""}], :tags=>["shop", "coffee"], :postcode=>"49464", :city=>"Zeeland", :address=>"111 E Main Ave", :country=>"US", :name=>"Sweet Bean Coffee & Espresso", :phone=>"+1 616 772 6450"}, :id=>"SG_1gQsUcVZpEh6omTmvGFXU6_42.812393_-86.016332@1291805576"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.004882, 42.826855]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Retail Goods", :category=>"Food & Beverages", :subcategory=>"Specialty"}], :tags=>["tea", "coffee"], :postcode=>"49464", :city=>"Zeeland", :address=>"790 Case Karsten Dr", :country=>"US", :name=>"CVC Coffee Svc", :phone=>"+1 616 896 8882"}, :id=>"SG_5OHDBISAiQj2jpjCBAbMTO_42.826855_-86.004882@1291674002"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.204341, 42.656513]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Retail Goods", :category=>"Food & Beverages", :subcategory=>"Specialty"}], :tags=>["tea", "coffee"], :postcode=>"49453", :city=>"Saugatuck", :website=>"www.uncommongroundscafe.com", :address=>"127 Hoffman St", :country=>"US", :name=>"Uncommon Grounds", :phone=>"+1 269 857 3333"}, :id=>"SG_4hMBeWsWfPMa03AIZFy9cQ_42.656513_-86.204341@1291674002"}, {:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.200469, 42.643744]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Food & Drink", :category=>"Restaurant", :subcategory=>""}], :tags=>["shop", "coffee"], :postcode=>"49406", :city=>"Douglas", :address=>"48 E Center St", :country=>"US", :name=>"Respite", :phone=>"+1 269 857 5411"}, :id=>"SG_0IzakqfFENxLpL1nSgIoSw_42.643744_-86.200469@1291805576"}], :total=>9}
|
539
|
+
end
|
540
|
+
end
|
541
|
+
|
542
|
+
context "with a category and a query" do
|
543
|
+
before do
|
544
|
+
stub_request :get,
|
545
|
+
'http://api.simplegeo.com/1.0/places/42.790311,-86.103725.json?category=Restaurant&q=Dutch',
|
546
|
+
:fixture_file => 'places_category_and_q.json'
|
547
|
+
end
|
548
|
+
|
549
|
+
it "should return a hash with the places nearby matching the name and classifiers" do
|
550
|
+
dutch_restaurant_places = SimpleGeo::Client.get_places(42.790311, -86.103725, :category => 'Restaurant', :q => 'Dutch')
|
551
|
+
dutch_restaurant_places.should == {:type=>"FeatureCollection", :features=>[{:type=>"Feature", :geometry=>{:type=>"Point", :coordinates=>[-86.089768, 42.810865]}, :properties=>{:owner=>"simplegeo", :province=>"MI", :classifiers=>[{:type=>"Food & Drink", :category=>"Restaurant", :subcategory=>""}], :tags=>[], :postcode=>"49424", :city=>"Holland", :address=>"2229 N Park Dr", :country=>"US", :name=>"Dutch Subway LLC", :phone=>"+1 616 393 7991"}, :id=>"SG_1Y0brcGA5S8IF0Phta2BwM_42.810865_-86.089768@1291805576"}], :total=>1}
|
518
552
|
end
|
519
553
|
end
|
520
554
|
end
|
@@ -980,7 +1014,7 @@ describe "Client" do
|
|
980
1014
|
context "getting contains info for a set of coordinates" do
|
981
1015
|
before do
|
982
1016
|
stub_request :get,
|
983
|
-
'http://api.simplegeo.com/0
|
1017
|
+
'http://api.simplegeo.com/1.0/context/37.7587890625,-122.4267578125.json',
|
984
1018
|
:fixture_file => 'contains.json'
|
985
1019
|
end
|
986
1020
|
|
@@ -1166,7 +1200,7 @@ describe "Client" do
|
|
1166
1200
|
# context "getting boundary info by id" do
|
1167
1201
|
# before do
|
1168
1202
|
# stub_request :get,
|
1169
|
-
# 'http://api.simplegeo.com/0
|
1203
|
+
# 'http://api.simplegeo.com/1.0/boundary/Neighborhood:Mission_Dolores:9q8yy4.json',
|
1170
1204
|
# :fixture_file => 'boundary.json'
|
1171
1205
|
# end
|
1172
1206
|
#
|
metadata
CHANGED
@@ -1,23 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplegeo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
|
-
-
|
14
|
-
- Scott Windsor
|
13
|
+
- Brian Ryckbost
|
15
14
|
- Andrew Mager
|
16
15
|
autorequire:
|
17
16
|
bindir: bin
|
18
17
|
cert_chain: []
|
19
18
|
|
20
|
-
date:
|
19
|
+
date: 2011-01-12 00:00:00 -08:00
|
21
20
|
default_executable:
|
22
21
|
dependencies:
|
23
22
|
- !ruby/object:Gem::Dependency
|
@@ -151,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
150
|
requirements: []
|
152
151
|
|
153
152
|
rubyforge_project:
|
154
|
-
rubygems_version: 1.
|
153
|
+
rubygems_version: 1.4.2
|
155
154
|
signing_key:
|
156
155
|
specification_version: 3
|
157
156
|
summary: A SimpleGeo Ruby Client
|