google_places 0.28.0 → 0.29.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 889a30b980d14ee5ee37b68dcc30c0039e6fb4ba
4
- data.tar.gz: 3d45cca721b971574e5e325e1e4545b8eb033e97
3
+ metadata.gz: c6cf4c3608d876073641025fdd76161b8954f1b9
4
+ data.tar.gz: e65004cd9f37b00077d864233f71619acb91f2cf
5
5
  SHA512:
6
- metadata.gz: 7d271beb633273d4c7846d3b65ba5440536804bd45b4f4e586d8dafe7a5822494c496d916528b703fd9bb7f9f39f173972203e78f6374594596c9b58f750e4f1
7
- data.tar.gz: 6593dd4a627405d28825f2f75729225a56b7774003bc2aa7fc3d07543eb27cd22cd175ed11e628bc0d81726025ee8c913745cf9d36eec93c69583d55d9dd6999
6
+ metadata.gz: 3858844ce1b18424f74289818e610851d146c9c31621d4a20850a4e83d4227feed2ad16d7251340fb3abbe23fed32bb0494ed6fe529e5010ddf111cb2bd27755
7
+ data.tar.gz: 99ae539590a67883916a154b2a79b6bc3781686737c6e1ae91d59781957c40fe323af36a658c1e104c9042bc60aabc1bb6c8de88f9425e64ac849351cd740927
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- google_places (0.27.0)
4
+ google_places (0.28.0)
5
5
  httparty (~> 0.13.1)
6
6
 
7
7
  GEM
@@ -11,10 +11,10 @@ GEM
11
11
  crack (0.4.2)
12
12
  safe_yaml (~> 1.0.0)
13
13
  diff-lcs (1.2.5)
14
- httparty (0.13.1)
14
+ httparty (0.13.3)
15
15
  json (~> 1.8)
16
16
  multi_xml (>= 0.5.2)
17
- json (1.8.1)
17
+ json (1.8.2)
18
18
  multi_xml (0.5.5)
19
19
  rspec (3.0.0)
20
20
  rspec-core (~> 3.0.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.28.0'
6
+ s.version = '0.29.0'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ['Marcel de Graaf']
9
9
  s.email = ['mail@marceldegraaf.net']
@@ -35,6 +35,7 @@ module GooglePlaces
35
35
  radius = options.delete(:radius)
36
36
  retry_options = options.delete(:retry_options) || {}
37
37
  types = options.delete(:types)
38
+ components = options.delete(:components)
38
39
 
39
40
  options = {
40
41
  :input => input,
@@ -57,6 +58,10 @@ module GooglePlaces
57
58
  options[:language] = language
58
59
  end
59
60
 
61
+ if components
62
+ options[:components] = components
63
+ end
64
+
60
65
  request(:predictions_by_input, options)
61
66
  end
62
67
 
@@ -46,6 +46,14 @@ describe GooglePlaces::Prediction, vcr: { cassette_name: 'list_predictions'} do
46
46
 
47
47
  GooglePlaces::Prediction.list_by_input('query', api_key, retry_options: { max: 10, delay: 15 })
48
48
  end
49
+
50
+ it "initiates a request with `components`" do
51
+ options = request_params(components: 'country:in')
52
+ expect(GooglePlaces::Request).to receive(:predictions_by_input).with(options)
53
+
54
+ GooglePlaces::Prediction.list_by_input('query', api_key, components: 'country:in')
55
+ end
56
+
49
57
  end
50
58
 
51
59
  def request_params(options = {})
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.28.0
4
+ version: 0.29.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: 2015-02-05 00:00:00.000000000 Z
11
+ date: 2015-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty