google_places 0.15.0 → 0.16.0

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmNiN2I5Nzc1NWEyODVjZTljYWMwMDZiODZmMmYzNTFhYmQ5MDBlNA==
4
+ YTAyNjgwZDU1NDE4N2FjOTZjNjEyNjI5YTc0MjA3MmY3YjRkNzFlMw==
5
5
  data.tar.gz: !binary |-
6
- ZWVlMzEwYTM0ZjE3NzIyN2U4YTIwNDU0ZjQ1ZDhhYTM5NTIxNzRkMg==
6
+ ZWQyZWM4NzMzOTRjNTAwZmM2NTNiNTFlZGZiNDE2MDNhNzIyYmUzMA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NjVmNTVhMzU5MWNjYTcyZjFjZjVlYzJmODRmMjJlNWZkM2M4MzYwOWNmNGI5
10
- YzAxYWM3MDNlMzJlMDBhNzc5OTkzMmYyMTA4MTMyNzM0NmJlMThiMmZkM2My
11
- NzlkNjJjZmMyNWQ0YmE2MWRkMjA2NzY2NjdjN2E2NDRlYmNmMDg=
9
+ N2YwZDczMGU5YWZjNDUyMGZmYmY0NWJhMmMxNGExOGM1ZjJkODMzZGZhYWYy
10
+ Yjg3NDMzMzU5YjAyMTU1OGFiY2UxM2M4Y2I3YTgxMzk3NTM1ZDllOTkxYzcy
11
+ MDZiNGRhMzFlY2QzYjI5OTcxMjg5ZmU2ZDcwMGQyYTJlZWJkZGQ=
12
12
  data.tar.gz: !binary |-
13
- ZTQ2ZTk3ZDAxZTM2ZDNhY2Q4ODlhOTI5MmJiYmJiNGQ3MmU3ZjViODVmMzk2
14
- MzE2ZGNiYzBhMTNkZThjYmE3Zjk1MDlkZmFkZTYwYWM3N2E0ZDcyNThhYmUy
15
- M2EwMWE4OWNkMDAxNmZlYWU3MzM2NDgzODkyYmM2OWFlY2VkMGE=
13
+ NTk4OTJmY2EzNTMwN2FjNjNjYTZiY2Q1ZjZhYjE3NTg2NGU5NWY2MjkxMGI3
14
+ MGZlYjUyZDU3ZWZiNThmMDRlNGYyMTJkNjI5MWRmNWY3M2M3MmQ4OTJkYmE5
15
+ ZDU2ODIxNjhiZjZmZGM0N2VhZGVjZDQzNDc4ZjNhNTE0ZDIyMDQ=
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- google_places (0.11.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.10.2)
12
+ httparty (0.11.0)
13
13
  multi_json (~> 1.0)
14
14
  multi_xml (>= 0.5.2)
15
- multi_json (1.7.2)
16
- multi_xml (0.5.3)
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)
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "google_places"
6
- s.version = '0.15.0'
6
+ s.version = '0.16.0'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Marcel de Graaf"]
9
9
  s.email = ["mail@marceldegraaf.net"]
@@ -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.15.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-06-22 00:00:00.000000000 Z
11
+ date: 2013-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty