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 +4 -4
- data/Gemfile.lock +3 -3
- data/google_places.gemspec +1 -1
- data/lib/google_places/prediction.rb +5 -0
- data/spec/google_places/prediction_spec.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6cf4c3608d876073641025fdd76161b8954f1b9
|
4
|
+
data.tar.gz: e65004cd9f37b00077d864233f71619acb91f2cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3858844ce1b18424f74289818e610851d146c9c31621d4a20850a4e83d4227feed2ad16d7251340fb3abbe23fed32bb0494ed6fe529e5010ddf111cb2bd27755
|
7
|
+
data.tar.gz: 99ae539590a67883916a154b2a79b6bc3781686737c6e1ae91d59781957c40fe323af36a658c1e104c9042bc60aabc1bb6c8de88f9425e64ac849351cd740927
|
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.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.
|
14
|
+
httparty (0.13.3)
|
15
15
|
json (~> 1.8)
|
16
16
|
multi_xml (>= 0.5.2)
|
17
|
-
json (1.8.
|
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)
|
data/google_places.gemspec
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2015-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|