portero 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -34,6 +34,7 @@ Options can be anything the provider allows. All providers may not utilize all o
34
34
 
35
35
  SearchResult objects contain the following fields
36
36
 
37
+ id
37
38
  name
38
39
  address
39
40
  latitude
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Portero
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: portero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: