geocoder-olleh 0.3.2 → 0.4.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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3db930f27d7acb2e3c1afe980ab322478482824c
4
- data.tar.gz: b1bd81d0d7287103283f99e8e78cca854ede5be4
3
+ metadata.gz: 7e596f1a0805cfe1fc9ffad2b98d31693c6205ba
4
+ data.tar.gz: 6acdf55e19dffe26ce29d6a342950e8db5ce307c
5
5
  SHA512:
6
- metadata.gz: a4fa1cd9077ed916d39731227a831c22517ebed84d616aa94ac53113cb9d9c33979fe5cdfa2be37d6e9d7a726a974318dfff065d51ffb11a6a10fd2332ed2e0f
7
- data.tar.gz: cef70091fb5de0df9b31ca67880ebefd86c82a1a1d7ddffb22ad6b203570c02e508c23c75878da91ec07c77d9778f0feefbe8cd44811ea69739bbdb92131a665
6
+ metadata.gz: 0a15ff93b1961338481600f3ed5a3ef3000b7a3c9ad0c1bb2162cef2742f32fabd644820e450ad66ed978dee8d6e88e034be776308cc39dc47c05fc5ba69dd53
7
+ data.tar.gz: c171b5992c2c78c9bdd5b34e186ce3601f5fe885f231178e1962705ca30cb7f2edddecbf325e0960995d30e0161ecd3dc1248f64f2746b9f0aa263640236fda8
@@ -18,6 +18,7 @@ Gem::Specification.new do |spec|
18
18
 
19
19
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
20
  spec.require_paths = ["lib"]
21
+ spec.add_dependency "geocoder", "~> 1.3"
21
22
  spec.add_development_dependency "bundler", "~> 1.9"
22
23
  spec.add_development_dependency "rake", "~> 10.0"
23
24
  end
@@ -12,7 +12,6 @@ module Geocoder::Lookup
12
12
  # optimal : based on traffic
13
13
  class Olleh < Base
14
14
 
15
-
16
15
  PRIORITY = {
17
16
  'shortest' => 0, # 최단거리 우선
18
17
  'high_way' => 1, # 고속도로 우선
@@ -65,8 +64,8 @@ module Geocoder::Lookup
65
64
  'search_address_only' => 1
66
65
  }
67
66
 
68
- def use_ssl?
69
- true
67
+ def supported_protocols
68
+ [:http, :https]
70
69
  end
71
70
 
72
71
  def name
@@ -190,22 +189,25 @@ module Geocoder::Lookup
190
189
  end
191
190
 
192
191
  def base_url(query)
193
- case Olleh.check_query_type(query)
194
- when "addr_local_search"
195
- "https://openapi.kt.com/maps/search/km2_LocalSearch?params="
196
- when "route_search"
197
- "https://openapi.kt.com/maps/etc/RouteSearch?params="
198
- when "reverse_geocoding"
199
- "https://openapi.kt.com/maps/geocode/GetAddrByGeocode?params="
200
- when "convert_coord"
201
- "https://openapi.kt.com/maps/etc/ConvertCoord?params="
202
- when "addr_step_search"
203
- "https://openapi.kt.com/maps/search/AddrStepSearch?params="
204
- when "addr_nearest_position_search"
205
- "https://openapi.kt.com/maps/search/AddrNearestPosSearch?params="
206
- else #geocoding
207
- "https://openapi.kt.com/maps/geocode/GetGeocodeByAddr?params="
208
- end
192
+ host = "#{protocol}://openapi.kt.com"
193
+ path =
194
+ case Olleh.check_query_type(query)
195
+ when "addr_local_search"
196
+ "/maps/search/km2_LocalSearch?params="
197
+ when "route_search"
198
+ "/maps/etc/RouteSearch?params="
199
+ when "reverse_geocoding"
200
+ "/maps/geocode/GetAddrByGeocode?params="
201
+ when "convert_coord"
202
+ "/maps/etc/ConvertCoord?params="
203
+ when "addr_step_search"
204
+ "/maps/search/AddrStepSearch?params="
205
+ when "addr_nearest_position_search"
206
+ "/maps/search/AddrNearestPosSearch?params="
207
+ else #geocoding
208
+ "/maps/geocode/GetGeocodeByAddr?params="
209
+ end
210
+ host + path
209
211
  end
210
212
 
211
213
  def query_url_params(query)
@@ -1,5 +1,5 @@
1
1
  module Geocoder
2
2
  module Olleh
3
- VERSION = "0.3.2"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -101,7 +101,7 @@ module Geocoder::Result
101
101
  @data[1]['ROUTE']['total_dist']
102
102
  end
103
103
 
104
- def rg_cound
104
+ def rg_count
105
105
  @data[1]['ROUTE']['rg_count']
106
106
  end
107
107
 
@@ -110,18 +110,7 @@ module Geocoder::Result
110
110
  end
111
111
 
112
112
  ##
113
- # methods for converting coord system
114
- #
115
- def coord_type
116
- @data[1]['COORDTYPE']
117
- end
118
-
119
- def converted_coord
120
- [@data[1]["X"], @data[1]["Y"]]
121
- end
122
-
123
- ##
124
- # methods for parsing adress step search
113
+ # methods for parsing address step search
125
114
  #
126
115
  # 법정동 - 시도
127
116
  def addr_step_sido
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geocoder-olleh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaigouk Kim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-24 00:00:00.000000000 Z
11
+ date: 2016-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: geocoder
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -82,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
96
  version: '0'
83
97
  requirements: []
84
98
  rubyforge_project:
85
- rubygems_version: 2.4.6
99
+ rubygems_version: 2.5.1
86
100
  signing_key:
87
101
  specification_version: 4
88
102
  summary: geocoding with Olleh map api