google_places 0.15.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +4 -4
- data/google_places.gemspec +1 -1
- data/lib/google_places/spot.rb +4 -0
- data/spec/google_places/spot_spec.rb +8 -0
- data/spec/vcr_cassettes/single_spot.yml +36 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTAyNjgwZDU1NDE4N2FjOTZjNjEyNjI5YTc0MjA3MmY3YjRkNzFlMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWQyZWM4NzMzOTRjNTAwZmM2NTNiNTFlZGZiNDE2MDNhNzIyYmUzMA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2YwZDczMGU5YWZjNDUyMGZmYmY0NWJhMmMxNGExOGM1ZjJkODMzZGZhYWYy
|
10
|
+
Yjg3NDMzMzU5YjAyMTU1OGFiY2UxM2M4Y2I3YTgxMzk3NTM1ZDllOTkxYzcy
|
11
|
+
MDZiNGRhMzFlY2QzYjI5OTcxMjg5ZmU2ZDcwMGQyYTJlZWJkZGQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTk4OTJmY2EzNTMwN2FjNjNjYTZiY2Q1ZjZhYjE3NTg2NGU5NWY2MjkxMGI3
|
14
|
+
MGZlYjUyZDU3ZWZiNThmMDRlNGYyMTJkNjI5MWRmNWY3M2M3MmQ4OTJkYmE5
|
15
|
+
ZDU2ODIxNjhiZjZmZGM0N2VhZGVjZDQzNDc4ZjNhNTE0ZDIyMDQ=
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
google_places (0.
|
4
|
+
google_places (0.15.0)
|
5
5
|
httparty
|
6
6
|
|
7
7
|
GEM
|
@@ -9,11 +9,11 @@ GEM
|
|
9
9
|
specs:
|
10
10
|
diff-lcs (1.1.3)
|
11
11
|
fakeweb (1.3.0)
|
12
|
-
httparty (0.
|
12
|
+
httparty (0.11.0)
|
13
13
|
multi_json (~> 1.0)
|
14
14
|
multi_xml (>= 0.5.2)
|
15
|
-
multi_json (1.7.
|
16
|
-
multi_xml (0.5.
|
15
|
+
multi_json (1.7.7)
|
16
|
+
multi_xml (0.5.4)
|
17
17
|
rspec (2.11.0)
|
18
18
|
rspec-core (~> 2.11.0)
|
19
19
|
rspec-expectations (~> 2.11.0)
|
data/google_places.gemspec
CHANGED
data/lib/google_places/spot.rb
CHANGED
@@ -311,6 +311,10 @@ module GooglePlaces
|
|
311
311
|
@nextpagetoken = json_result_object['nextpagetoken']
|
312
312
|
end
|
313
313
|
|
314
|
+
def [] (key)
|
315
|
+
send(key)
|
316
|
+
end
|
317
|
+
|
314
318
|
def address_component(address_component_type, address_component_length)
|
315
319
|
if component = address_components_of_type(address_component_type)
|
316
320
|
component.first[address_component_length] unless component.first.nil?
|
@@ -194,6 +194,14 @@ describe GooglePlaces::Spot do
|
|
194
194
|
it "should have the attribute: #{attribute}" do
|
195
195
|
@spot.respond_to?(attribute).should == true
|
196
196
|
end
|
197
|
+
|
198
|
+
it "should respond to ['#{attribute}']" do
|
199
|
+
expect { @spot[attribute] }.to_not raise_error
|
200
|
+
end
|
201
|
+
|
202
|
+
it "should respond to [:#{attribute}]" do
|
203
|
+
expect { @spot[attribute.to_sym] }.to_not raise_error
|
204
|
+
end
|
197
205
|
end
|
198
206
|
it 'should contain 5 reviews' do
|
199
207
|
@spot.reviews.size == 5
|
@@ -494,4 +494,40 @@ http_interactions:
|
|
494
494
|
\"OK\"\n}\n"
|
495
495
|
http_version: '1.1'
|
496
496
|
recorded_at: Fri, 22 Mar 2013 11:00:08 GMT
|
497
|
+
- request:
|
498
|
+
method: get
|
499
|
+
uri: https://maps.googleapis.com/maps/api/place/details/json?reference=CnRpAAAAlO2WvF_4eOqp02TAWKsXpPSCFz8KxBjraWhB4MSvdUPqXN0yCpxQgblam1LeRENcWZF-9-2CEfUwlHUli61PaYe0e7dUPAU302tk6KkalnKqx7nv07iFA1Ca_Y1WoCLH9adEWwkxKMITlbGhUUz9-hIQPxQ4Bp_dz5nHloUFkj3rkBoUDSPqy2smqMnPEo4ayfbDupeKEZY&sensor=false&key=AIzaSyATGBjcfrRXQtNEMMyt8Fw7tSGEY8PQwv0
|
500
|
+
body:
|
501
|
+
encoding: US-ASCII
|
502
|
+
string: ''
|
503
|
+
headers: {}
|
504
|
+
response:
|
505
|
+
status:
|
506
|
+
code: 200
|
507
|
+
message: OK
|
508
|
+
headers:
|
509
|
+
content-type:
|
510
|
+
- application/json; charset=UTF-8
|
511
|
+
date:
|
512
|
+
- Mon, 08 Jul 2013 09:53:59 GMT
|
513
|
+
expires:
|
514
|
+
- Mon, 08 Jul 2013 09:58:59 GMT
|
515
|
+
cache-control:
|
516
|
+
- public, max-age=300
|
517
|
+
vary:
|
518
|
+
- Accept-Language
|
519
|
+
server:
|
520
|
+
- mafe
|
521
|
+
x-xss-protection:
|
522
|
+
- 1; mode=block
|
523
|
+
x-frame-options:
|
524
|
+
- SAMEORIGIN
|
525
|
+
connection:
|
526
|
+
- close
|
527
|
+
body:
|
528
|
+
encoding: US-ASCII
|
529
|
+
string: ! "{\n \"debug_info\" : [],\n \"html_attributions\" : [],\n \"status\"
|
530
|
+
: \"NOT_FOUND\"\n}\n"
|
531
|
+
http_version: '1.1'
|
532
|
+
recorded_at: Mon, 08 Jul 2013 09:54:02 GMT
|
497
533
|
recorded_with: VCR 2.2.5
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_places
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcel de Graaf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|