gds-api-adapters 4.1.2 → 4.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gds_api/test_helpers/imminence.rb +6 -8
- data/lib/gds_api/version.rb +1 -1
- metadata +3 -3
@@ -5,16 +5,14 @@ module GdsApi
|
|
5
5
|
module Imminence
|
6
6
|
# Generally true. If you are initializing the client differently,
|
7
7
|
# you could redefine/override the constant or stub directly.
|
8
|
-
|
8
|
+
IMMINENCE_API_ENDPOINT = Plek.current.find('imminence')
|
9
9
|
|
10
10
|
def imminence_has_places(latitude, longitude, details)
|
11
11
|
response = JSON.dump(details['details'])
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
to_return(:status => 200, :body => response, :headers => {})
|
17
|
-
end
|
13
|
+
stub_request(:get, "#{IMMINENCE_API_ENDPOINT}/places/#{details['slug']}.json").
|
14
|
+
with(:query => {"lat" => latitude, "lng" => longitude, "limit" => "5"}).
|
15
|
+
to_return(:status => 200, :body => response, :headers => {})
|
18
16
|
end
|
19
17
|
|
20
18
|
def imminence_has_business_support_schemes(facets_hash, schemes)
|
@@ -25,7 +23,7 @@ module GdsApi
|
|
25
23
|
"results" => schemes
|
26
24
|
}
|
27
25
|
|
28
|
-
stub_request(:get, "
|
26
|
+
stub_request(:get, "#{IMMINENCE_API_ENDPOINT}/business_support_schemes.json").
|
29
27
|
with(query: facets_hash).
|
30
28
|
to_return(status: 200, body: results.to_json, headers: {})
|
31
29
|
end
|
@@ -40,7 +38,7 @@ module GdsApi
|
|
40
38
|
"results" => []
|
41
39
|
}
|
42
40
|
|
43
|
-
stub_request(:get, %r{\
|
41
|
+
stub_request(:get, %r{\A#{IMMINENCE_API_ENDPOINT}/business_support_schemes\.json}).
|
44
42
|
to_return(:body => empty_results.to_json)
|
45
43
|
end
|
46
44
|
end
|
data/lib/gds_api/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: gds-api-adapters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 4.1.
|
5
|
+
version: 4.1.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- James Stewart
|
@@ -214,7 +214,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
214
214
|
requirements:
|
215
215
|
- - ">="
|
216
216
|
- !ruby/object:Gem::Version
|
217
|
-
hash:
|
217
|
+
hash: 306816274510639352
|
218
218
|
segments:
|
219
219
|
- 0
|
220
220
|
version: "0"
|
@@ -223,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
223
223
|
requirements:
|
224
224
|
- - ">="
|
225
225
|
- !ruby/object:Gem::Version
|
226
|
-
hash:
|
226
|
+
hash: 306816274510639352
|
227
227
|
segments:
|
228
228
|
- 0
|
229
229
|
version: "0"
|