portero 0.0.1 → 0.0.2
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.
data/README.md
CHANGED
@@ -18,6 +18,7 @@ module Portero
|
|
18
18
|
results = []
|
19
19
|
venues.each do |found_venue|
|
20
20
|
venue = Portero::SearchResult.new
|
21
|
+
venue.id = found_venue["id"]
|
21
22
|
venue.name = found_venue["name"]
|
22
23
|
venue.address = found_venue["location"]["address"]
|
23
24
|
venue.latitude = found_venue["location"]["lat"]
|
@@ -18,6 +18,7 @@ module Portero
|
|
18
18
|
results = []
|
19
19
|
venues.each do |found_venue|
|
20
20
|
venue = Portero::SearchResult.new
|
21
|
+
venue.id = found_venue["id"]
|
21
22
|
venue.name = found_venue["name"]
|
22
23
|
venue.address = found_venue["formatted_address"]
|
23
24
|
venue.latitude = found_venue["geometry"]["location"]["lat"]
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Portero
|
2
2
|
class SearchResult
|
3
|
-
attr_accessor :name, :address, :latitude, :longitude, :city, :state, :postal_code, :country, :category, :icon, :extra
|
3
|
+
attr_accessor :id, :name, :address, :latitude, :longitude, :city, :state, :postal_code, :country, :category, :icon, :extra
|
4
4
|
end
|
5
5
|
end
|
data/lib/portero/version.rb
CHANGED
@@ -27,6 +27,11 @@ describe Portero::SearchProvider::Foursquare do
|
|
27
27
|
|
28
28
|
describe 'individual' do
|
29
29
|
|
30
|
+
it 'should have an id' do
|
31
|
+
@results.first.id.should == "4ade3739f964a520fa7321e3"
|
32
|
+
end
|
33
|
+
|
34
|
+
|
30
35
|
it 'should have a name' do
|
31
36
|
@results.first.name.should == "Bar Louie"
|
32
37
|
end
|
@@ -28,6 +28,10 @@ describe Portero::SearchProvider::GooglePlaces do
|
|
28
28
|
|
29
29
|
describe 'individual' do
|
30
30
|
|
31
|
+
it 'should have an id' do
|
32
|
+
@results.first.id.should == "d5e15c83a543424975a17a7e801f2fc3e2ac9151"
|
33
|
+
end
|
34
|
+
|
31
35
|
it 'should have a name' do
|
32
36
|
@results.first.name.should == "Dewey's Pizza"
|
33
37
|
end
|