here_geocoder 0.0.1 → 0.0.2

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: a5fcb2728adf700e4abe3f900463edef3d19a553
4
- data.tar.gz: 735252bb56aee871af33993f70f13a30607dd53d
3
+ metadata.gz: 045d52f982329b712caa09e74b2c854e79228084
4
+ data.tar.gz: cc5a27467e28e63f9a7cb2c35b2c58199dc98b6f
5
5
  SHA512:
6
- metadata.gz: fa747421d0cb138f13add50ee08d578902e1137f366b03ebcec25ec1f1d3de715f26e7be408210e1544bd20d3b9680d13c6daaa7cb68d93779ff0020a99d318c
7
- data.tar.gz: 69e2f271f3d41691a952042dacb8e436147157745616ab5835dacae68596e6de05a9e50f1157b58ba1fd69188af03533202a70467fc782262948f3db55cff946
6
+ metadata.gz: 176e5cc5c974e6bf5f25b4277a7d89a26fab77106319823adf5233e0370e66334dc38a0704b0fff053dd35429f90498bf93e7f3b765baf6febdd764ebe89086b
7
+ data.tar.gz: 5bf4ca66413098bcb98c0f6f6b42c3e39ac22e44c851e6db76c3385bfe50419fbdfca67fb3df5101757d25faf81ca69af0221cb48d4288c9b55f33502fc4cc12
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "here_geocoder"
7
- spec.version = "0.0.1"
7
+ spec.version = "0.0.2"
8
8
  spec.authors = ["Serhiy Rozum"]
9
9
  spec.email = ["sergey.rozum@gmail.com"]
10
10
  spec.summary = %q{Geokit custom geocoder for Here.com service}
data/lib/here_geocoder.rb CHANGED
@@ -1,4 +1,5 @@
1
- require 'geokit'
1
+ require "uri"
2
+ require "geokit"
2
3
 
3
4
  module Geokit
4
5
  module Geocoders
@@ -19,17 +20,17 @@ module Geokit
19
20
 
20
21
  def self.submit_url(address)
21
22
  args = []
22
- args << "app_id=#{Geokit::Inflector.url_escape(app_id)}"
23
- args << "app_code=#{Geokit::Inflector.url_escape(app_code)}"
24
- args << "additionaldata=Country2,1"
25
- args << "language=en-US"
26
- args << "gen=9"
23
+ args << ["app_id", app_id]
24
+ args << ["app_code", app_code]
25
+ args << ["additionaldata", "Country2,1"]
26
+ args << ["language", "en-US"]
27
+ args << ["gen", "9"]
27
28
 
28
29
  address_str = address.is_a?(GeoLoc) ? address.to_geocodeable_s : address
29
30
 
30
- args << "searchtext=#{Geokit::Inflector.url_escape(address_str)}"
31
+ args << ["searchtext", address_str]
31
32
 
32
- [api_endpoint, '?', args.join('&')].join('')
33
+ [api_endpoint, '?', URI.encode_www_form(args)].join('')
33
34
  end
34
35
 
35
36
  def self.api_endpoint
@@ -25,15 +25,15 @@ http_interactions:
25
25
  Content-Type:
26
26
  - application/xml;charset=utf-8
27
27
  Date:
28
- - Thu, 08 Sep 2016 20:11:43 GMT
28
+ - Thu, 08 Sep 2016 22:12:01 GMT
29
29
  Server:
30
30
  - nginx-clojure
31
31
  X-Nlp-Irt:
32
- - '1383'
32
+ - '5502'
33
33
  X-Nlp-Log:
34
34
  - Z2NfYz0tIGdjX2w9LSBnY19tPWFk
35
35
  X-Nlp-Tid:
36
- - daf93d23-30ab-4162-bfe0-f1f1a08b8944
36
+ - 2f747c34-bc45-4e2a-a3a2-31b5f5ccce59
37
37
  X-Served-By:
38
38
  - i-0a61c712.us-west-2a
39
39
  Content-Length:
@@ -42,7 +42,7 @@ http_interactions:
42
42
  - keep-alive
43
43
  body:
44
44
  encoding: ASCII-8BIT
45
- string: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:Search xmlns:ns2="http://www.navteq.com/lbsp/Search-Search/4"><Response><MetaInfo><Timestamp>2016-09-08T19:54:35.721Z</Timestamp></MetaInfo></Response></ns2:Search>
45
+ string: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:Search xmlns:ns2="http://www.navteq.com/lbsp/Search-Search/4"><Response><MetaInfo><Timestamp>2016-09-08T22:12:01.564Z</Timestamp></MetaInfo></Response></ns2:Search>
46
46
  http_version:
47
- recorded_at: Thu, 08 Sep 2016 20:11:43 GMT
47
+ recorded_at: Thu, 08 Sep 2016 22:12:01 GMT
48
48
  recorded_with: VCR 3.0.3
@@ -23,15 +23,15 @@ http_interactions:
23
23
  Content-Type:
24
24
  - application/xml;charset=utf-8
25
25
  Date:
26
- - Thu, 08 Sep 2016 20:10:14 GMT
26
+ - Thu, 08 Sep 2016 22:12:01 GMT
27
27
  Server:
28
28
  - nginx-clojure
29
29
  X-Nlp-Irt:
30
- - '1326'
30
+ - '955'
31
31
  X-Nlp-Log:
32
32
  - ''
33
33
  X-Nlp-Tid:
34
- - 8a8d745e-7098-4d88-b9de-5cd4480ae7cc
34
+ - 08b8079e-9848-45d2-ba7c-537c48d49e46
35
35
  X-Served-By:
36
36
  - i-0a61c712.us-west-2a
37
37
  Content-Length:
@@ -43,5 +43,5 @@ http_interactions:
43
43
  string: <ns2:Error xmlns:ns2="http://www.navteq.com/lbsp/Errors/1" type="PermissionError"
44
44
  subtype="InvalidCredentials"><Details>invalid credentials for test</Details></ns2:Error>
45
45
  http_version:
46
- recorded_at: Thu, 08 Sep 2016 20:10:15 GMT
46
+ recorded_at: Thu, 08 Sep 2016 22:12:01 GMT
47
47
  recorded_with: VCR 3.0.3
@@ -25,24 +25,24 @@ http_interactions:
25
25
  Content-Type:
26
26
  - application/xml;charset=utf-8
27
27
  Date:
28
- - Thu, 08 Sep 2016 20:11:43 GMT
28
+ - Thu, 08 Sep 2016 22:12:01 GMT
29
29
  Server:
30
30
  - nginx-clojure
31
31
  X-Nlp-Irt:
32
- - '2929'
32
+ - '4414'
33
33
  X-Nlp-Log:
34
34
  - Z2NfYz1VU0EgZ2NfbD1jaXR5IGdjX209YXI=
35
35
  X-Nlp-Tid:
36
- - d0d1ed09-1cda-4ca9-a2a1-5ee746f81500
36
+ - 06eae949-4ffa-4aaa-9bc2-9b018d2f6a63
37
37
  X-Served-By:
38
38
  - i-0a61c712.us-west-2a
39
39
  Content-Length:
40
- - '627'
40
+ - '626'
41
41
  Connection:
42
42
  - keep-alive
43
43
  body:
44
44
  encoding: ASCII-8BIT
45
- string: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:Search xmlns:ns2="http://www.navteq.com/lbsp/Search-Search/4"><Response><MetaInfo><Timestamp>2016-09-08T19:47:49.087Z</Timestamp></MetaInfo><View
45
+ string: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:Search xmlns:ns2="http://www.navteq.com/lbsp/Search-Search/4"><Response><MetaInfo><Timestamp>2016-09-08T22:12:01.403Z</Timestamp></MetaInfo><View
46
46
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:SearchResultsViewType"><ViewId>0</ViewId><Result><Relevance>1.0</Relevance><MatchLevel>city</MatchLevel><MatchQuality><State>1.0</State><City>1.0</City></MatchQuality><Location><LocationId>NT_FE3T7HawlbK76SxDmyKlUA</LocationId><LocationType>area</LocationType><DisplayPosition><Latitude>37.37172</Latitude><Longitude>-122.03801</Longitude></DisplayPosition><NavigationPosition><Latitude>37.37172</Latitude><Longitude>-122.03801</Longitude></NavigationPosition><MapView><TopLeft><Latitude>37.45103</Latitude><Longitude>-122.06566</Longitude></TopLeft><BottomRight><Latitude>37.3323</Latitude><Longitude>-121.98241</Longitude></BottomRight></MapView><Address><Label>Sunnyvale,
47
47
  CA, United States</Label><Country>USA</Country><State>CA</State><County>Santa
48
48
  Clara</County><City>Sunnyvale</City><PostalCode>94086</PostalCode><AdditionalData
@@ -50,5 +50,5 @@ http_interactions:
50
50
  States</AdditionalData><AdditionalData key="StateName">California</AdditionalData><AdditionalData
51
51
  key="CountyName">Santa Clara</AdditionalData><AdditionalData key="PostalCodeType">N</AdditionalData></Address></Location></Result></View></Response></ns2:Search>
52
52
  http_version:
53
- recorded_at: Thu, 08 Sep 2016 20:11:43 GMT
53
+ recorded_at: Thu, 08 Sep 2016 22:12:01 GMT
54
54
  recorded_with: VCR 3.0.3
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: here_geocoder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serhiy Rozum