geo_api 0.1.0 → 1.0.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: 4f55ed5220b1ed6a8386182489524d2321644003
4
- data.tar.gz: 3ad607c47d03b4e4601a20c6b6add414cc11fafb
3
+ metadata.gz: 6f8abfda3728b072eeea68219e2ca14c5a8274d9
4
+ data.tar.gz: 08e5f5418469ff21d5e886d927af3b2fa3f3065c
5
5
  SHA512:
6
- metadata.gz: 5ad3562bda56c8172cef6ad223a0b2c1cb7f651b7b949558e030570dd03bc7e3fe82c62d19bfd8bb4c0fa0efb52ed37e17fb9e34998f1fe4cc5bb2112131445b
7
- data.tar.gz: 86a3f9ca3f6e1b6764e270955f27e969b4679c760357adb90cc506dac4e99d7c545fbe0887fdbc0cb2c50b2a226ab98052c24319351b4eebc187a08ef9329608
6
+ metadata.gz: 065403e1d2c868ddf516f3e13be19ec0fec298bbe18b32464b47955ad2b4cea13ffb9c4ff40a4de667fb91b57f7076fc4760134eae665c42ab7b2b7cbb5c3bde
7
+ data.tar.gz: 5e8e7dabe985f8b527f52c521e8a3f592cce73c6d149d8f601e04ad9cfd0fb68aaffe59e21a9c13bdc4e3d4eef336385a647f89a55ebde80b84bd1bad86e9341
data/Gemfile CHANGED
@@ -2,6 +2,4 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'mongoid', '~> 4.0.0.beta1', github: 'mongoid/mongoid', ref: 'f9e6fdb'
6
- gem 'bson_ext'
7
5
  gem 'coveralls', require: false
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # GeoApi
2
2
 
3
- 位置接口,目前调用百度地理位置api获取格式化的地理位置数据.
3
+ 位置接口,目前调用百度或者高德地理位置api获取格式化的地理位置数据.
4
4
 
5
5
  [![Travis](https://travis-ci.org/liuzelei/geo_api.svg?branch=master)](https://travis-ci.org/liuzelei/geo_api)
6
6
  [![Code Climate](https://codeclimate.com/github/liuzelei/geo_api.png)](https://codeclimate.com/github/liuzelei/geo_api)
@@ -10,28 +10,29 @@
10
10
 
11
11
  添加以下代码到Gemfile:
12
12
 
13
- gem 'geo_api', git: 'git@github.com:liuzelei/geo_api.git', tag: 'v0.0.5'
13
+ gem 'geo_api', git: 'git@github.com:liuzelei/geo_api.git', tag: 'v1.0.0'
14
14
 
15
15
  配置代码:
16
-
17
- GeoApi.setup do |config|
18
- config.server = "http://api.map.baidu.com/geocoder/v2/"
19
- config.key = "" #百度api的key
20
- end
16
+
17
+ GeoApi.setup do |config|
18
+ config.server = "http://api.map.baidu.com/geocoder/v2/"
19
+ config.key = "" #地主api的key
20
+ config.vendor = 'BAIDU|GAODE'
21
+ end
21
22
 
22
23
  ## 使用
23
24
 
24
25
  #### 获取某个字符串的格式化地址信息
25
26
 
26
- GeoApi.LocationService.instance.get_location_from_string("中山公园上海")
27
+ GeoApi.LocationService.instance.get_location_from_string("中山公园上海")
27
28
 
28
29
  #### 获取某个经纬度下的格式化地址信息
29
-
30
- GeoApi.LocationService.instance.get_location_from_coordinate(12.34, 56.78, "bd09ll")
31
-
30
+
31
+ GeoApi.LocationService.instance.get_location_from_coordinate(12.34, 56.78, "bd09ll")
32
+
32
33
  地址的格式化结果是
33
34
 
34
- databack["province"] = "上海市"
35
+ databack["province"] = "上海市"
35
36
  databack["city"] = "上海市"
36
37
  databack["region"] = "浦东新区"
37
38
  databack["detail"] = "灵岩路79弄-1号"
data/geo_api.gemspec CHANGED
@@ -1,4 +1,3 @@
1
- # coding: utf-8
2
1
  lib = File.expand_path('../lib', __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'geo_api/version'
@@ -23,7 +22,4 @@ Gem::Specification.new do |spec|
23
22
  spec.add_development_dependency "rspec"
24
23
  spec.add_development_dependency "guard"
25
24
  spec.add_development_dependency "guard-rspec"
26
-
27
- spec.add_runtime_dependency "bson"
28
- spec.add_runtime_dependency "mongoid"
29
25
  end
@@ -1,4 +1,3 @@
1
- # encoding: utf-8
2
1
  module GeoApi
3
2
  class InstallGenerator < Rails::Generators::Base
4
3
  source_root File.expand_path('../templates', __FILE__)
@@ -2,4 +2,5 @@
2
2
  GeoApi.setup do |config|
3
3
  config.server = "http://apis.map.qq.com/ws/geocoder/v1/"
4
4
  config.key = ""
5
+ config.vendor = "GAODE"
5
6
  end
data/lib/geo_api.rb CHANGED
@@ -1,10 +1,8 @@
1
- # encoding: utf-8
2
1
  require "geo_api/version"
3
2
  require 'geo_api/configuration'
4
- require 'geo_api/models/log'
3
+ require "geo_api/baidu"
4
+ require "geo_api/gaode"
5
5
  require 'logger'
6
- require 'net/http'
7
- require 'json'
8
6
 
9
7
  module GeoApi
10
8
  class << self
@@ -20,8 +18,12 @@ module GeoApi
20
18
  @logger ||= Logger.new(STDOUT)
21
19
  end
22
20
 
21
+ def proxy
22
+ @proxy ||= get_proxy
23
+ end
24
+
23
25
  def get_location_from_string(location)
24
- unless location.blank?
26
+ unless location.nil? || location.length == 0
25
27
  formated_address = location.split(/,|-|;|>|:|\+|\^/)
26
28
  databack = Hash.new
27
29
  databack["province"] = formated_address[0] if formated_address.length > 0
@@ -42,54 +44,23 @@ module GeoApi
42
44
  end
43
45
  end
44
46
 
45
- def get_location_from_coordinate(latitude, longitude, coordtype = 5)
46
- params = { location: "%s,%s" % [latitude, longitude], coordtype: coordtype, key: GeoApi.config.key }
47
- result = send_request(params)
48
- if result && result["status"] == 0 && result["result"]
49
- databack = Hash.new
50
- databack["address"] = result["result"]["address"]
51
- databack["province"] = result["result"]["address_component"]["province"]
52
- databack["city"] = result["result"]["address_component"]["city"]
53
- databack["region"] = result["result"]["address_component"]["district"]
54
- databack["detail"] = result["result"]["address_component"]["street"] + result["result"]["address_component"]["street_number"]
55
- databack["latitude"] = result["result"]["location"]["lat"].to_s
56
- databack["longitude"] = result["result"]["location"]["lng"].to_s
57
-
58
- return databack
59
- else
60
- return nil
61
- end
47
+ def get_location_from_coordinate(longitude, latitude)
48
+ proxy.get_location_from_coordinate(longitude, latitude)
62
49
  end
63
50
 
64
51
  def get_coordinate_from_string(location, city = nil)
65
- params = { address: location, region: city, key: GeoApi.config.key }
66
- result = send_request(params)
67
-
68
- if result["status"] == 0
69
- return result["result"]
70
- else
71
- return nil
72
- end
52
+ proxy.get_coordinate_from_string(location, city = nil)
73
53
  end
74
54
 
75
- private
76
- def send_request(params)
77
- uri = URI(GeoApi.config.server)
78
- params[:output] = 'json'
79
- uri.query = URI.encode_www_form(params)
80
- res = Net::HTTP.get_response(uri)
81
- log = GeoApi::Models::Log.new
82
- log.url = uri
83
- begin
84
- log.request = JSON.parse(params.to_json)
85
- rescue
86
- log.raw_request = params
55
+ def get_proxy
56
+ case config.vendor
57
+ when 'BAIDU'
58
+ return GeoApi::Baidu.new(config)
59
+ when 'GAODE'
60
+ return GeoApi::Gaode.new(config)
61
+ else
62
+ raise '不支持的Vendor'
87
63
  end
88
- log.response = JSON.parse(res.body) if res.is_a?(Net::HTTPSuccess)# && !res.body.blank?
89
- log.save
90
- result = JSON.parse(res.body) if res.is_a?(Net::HTTPSuccess)# && !res.body.blank?
91
-
92
- return result
93
64
  end
94
65
  end
95
66
  end
@@ -0,0 +1,51 @@
1
+ require 'net/http'
2
+ require 'json'
3
+
4
+ module GeoApi
5
+ class Baidu
6
+ attr_accessor :config
7
+
8
+ def initialize(config)
9
+ @config = config
10
+ end
11
+
12
+ def get_location_from_coordinate(latitude, longitude)
13
+ params = { location: "%s,%s" % [latitude, longitude], coordtype: 5, key: @config.key }
14
+ result = send_request(params)
15
+ if result && result["status"] == 0 && result["result"]
16
+ databack = Hash.new
17
+ databack["address"] = result["result"]["address"]
18
+ databack["province"] = result["result"]["address_component"]["province"]
19
+ databack["city"] = result["result"]["address_component"]["city"]
20
+ databack["region"] = result["result"]["address_component"]["district"]
21
+ databack["detail"] = result["result"]["address_component"]["street"] + result["result"]["address_component"]["street_number"]
22
+
23
+ return databack
24
+ else
25
+ return nil
26
+ end
27
+ end
28
+
29
+ def get_coordinate_from_string(location, city = nil)
30
+ params = { address: location, region: city, key: @config.key }
31
+ result = send_request(params)
32
+
33
+ if result["status"] == 0
34
+ return { longitude: result["result"]["lng"], latitude: result["result"]["lat"] }
35
+ else
36
+ return nil
37
+ end
38
+ end
39
+
40
+ private
41
+ def send_request(params)
42
+ uri = URI(@config.server)
43
+ params[:output] = 'json'
44
+ uri.query = URI.encode_www_form(params)
45
+ res = Net::HTTP.get_response(uri)
46
+ result = JSON.parse(res.body) if res.is_a?(Net::HTTPSuccess)# && !res.body.blank?
47
+
48
+ return result
49
+ end
50
+ end
51
+ end
@@ -1,8 +1,7 @@
1
- # encoding: utf-8
2
1
  module GeoApi
3
2
  class Configuration
4
3
  def server
5
- @server ||= "http://apis.map.qq.com/ws/geocoder/v1"
4
+ @server ||= "http://api.map.baidu.com/geocoder/v2/"
6
5
  end
7
6
 
8
7
  def server=(server)
@@ -16,5 +15,13 @@ module GeoApi
16
15
  def key=(key)
17
16
  @key = key
18
17
  end
18
+
19
+ def vendor
20
+ @vendor ||= 'BAIDU'
21
+ end
22
+
23
+ def vendor=(vendor)
24
+ @vendor = vendor
25
+ end
19
26
  end
20
27
  end
@@ -0,0 +1,51 @@
1
+ require 'net/http'
2
+ require 'json'
3
+
4
+ module GeoApi
5
+ class Gaode
6
+ attr_accessor :config
7
+
8
+ def initialize(config)
9
+ @config = config
10
+ end
11
+
12
+ def get_location_from_coordinate(longitude, latitude)
13
+ params = { location: "%s,%s" % [longitude, latitude], key: @config.key }
14
+ result = send_request('regeo', params)
15
+ if !result.nil? && result["status"] == "1" && !result["regeocode"].nil?
16
+ databack = Hash.new
17
+ databack["address"] = result["regeocode"]["formatted_address"]
18
+ databack["province"] = result["regeocode"]["addressComponent"]["province"]
19
+ databack["city"] = result["regeocode"]["addressComponent"]["city"]
20
+ databack["city"] = databack["province"] if databack["city"].nil? || databack["city"].length == 0
21
+ databack["region"] = result["regeocode"]["addressComponent"]["district"]
22
+ databack["detail"] = result["regeocode"]["addressComponent"]["township"]
23
+
24
+ return databack
25
+ else
26
+ return nil
27
+ end
28
+ end
29
+
30
+ def get_coordinate_from_string(location, city = nil)
31
+ params = { address: location, city: city, key: @config.key }
32
+ result = send_request('geo', params)
33
+ if !result.nil? && result["status"] == "1" && !result["geocodes"].nil? && result["geocodes"].length > 0
34
+ location = result["geocodes"][0]["location"].split(',')
35
+ return { longitude: location[0], latitude: location[1] }
36
+ else
37
+ return nil
38
+ end
39
+ end
40
+
41
+ private
42
+ def send_request(path, params)
43
+ uri = URI("#{@config.server}#{path}")
44
+ params[:output] = 'json'
45
+ uri.query = URI.encode_www_form(params)
46
+ res = Net::HTTP.get_response(uri)
47
+ result = JSON.parse(res.body) if res.is_a?(Net::HTTPSuccess)# && !res.body.blank?
48
+ return result
49
+ end
50
+ end
51
+ end
@@ -1,4 +1,3 @@
1
- # encoding: utf-8
2
1
  module GeoApi
3
- VERSION = "0.1.0"
2
+ VERSION = "1.0.0"
4
3
  end
@@ -0,0 +1,46 @@
1
+ require 'spec_helper'
2
+
3
+ describe "test baidu" do
4
+ let(:config) do
5
+ config = GeoApi::Configuration.new
6
+ config.server = "http://api.map.baidu.com/geocoder/v2/"
7
+ config.key = "m48tmnl9BPwnhNOctmrVKMRa"
8
+ config.vendor = "BAIDU"
9
+ config
10
+ end
11
+ let(:baidu) { GeoApi::Baidu.new(config) }
12
+
13
+ it "get location by coordinate" do
14
+ latitude = "39.9834"
15
+ longitude = "116.3229"
16
+
17
+ location = baidu.get_location_from_coordinate(longitude, latitude)
18
+ expect(location["province"]).to eq("北京市")
19
+ expect(location["city"]).to eq("北京市")
20
+ expect(location["region"]).to eq("海淀区")
21
+
22
+ latitude = "36.66"
23
+ longitude = "101.76"
24
+
25
+ location = baidu.get_location_from_coordinate(longitude, latitude)
26
+ expect(location["province"]).to eq("青海省")
27
+ expect(location["city"]).to eq("西宁市")
28
+ expect(location["region"]).to eq("城北区")
29
+ end
30
+
31
+ it "get coordinate from string" do
32
+ result = baidu.get_coordinate_from_string("思南路115弄")
33
+ expect(result[:longitude]).not_to be_empty
34
+ expect(result[:latitude]).not_to be_empty
35
+
36
+ result = baidu.get_coordinate_from_string("思南路115弄", "上海市")
37
+
38
+ expect(result[:longitude]).not_to be_empty
39
+ expect(result[:latitude]).not_to be_empty
40
+
41
+ result = baidu.get_coordinate_from_string("")
42
+
43
+ expect(result).to eq(nil)
44
+
45
+ end
46
+ end
@@ -0,0 +1,46 @@
1
+ require 'spec_helper'
2
+
3
+ describe "test gaode" do
4
+ let(:config) do
5
+ config = GeoApi::Configuration.new
6
+ config.server = 'http://restapi.amap.com/v3/geocode/'
7
+ config.key = 'fc37e6da72d246a47034e05baa6464c6'
8
+ config.vendor = 'GAODE'
9
+ config
10
+ end
11
+ let(:gaode) { GeoApi::Gaode.new(config) }
12
+
13
+ it "get location by coordinate" do
14
+ latitude = "39.9834"
15
+ longitude = "116.3229"
16
+
17
+ location = gaode.get_location_from_coordinate(longitude, latitude)
18
+ expect(location["province"]).to eq("北京市")
19
+ expect(location["city"]).to eq("北京市")
20
+ expect(location["region"]).to eq("海淀区")
21
+
22
+ latitude = "36.66"
23
+ longitude = "101.76"
24
+
25
+ location = gaode.get_location_from_coordinate(longitude, latitude)
26
+ expect(location["province"]).to eq("青海省")
27
+ expect(location["city"]).to eq("西宁市")
28
+ expect(location["region"]).to eq("城北区")
29
+ end
30
+
31
+ it "get coordinate from string" do
32
+ result = gaode.get_coordinate_from_string("思南路115弄")
33
+ expect(result[:longitude]).not_to be_empty
34
+ expect(result[:latitude]).not_to be_empty
35
+
36
+ result = gaode.get_coordinate_from_string("思南路115弄", "上海市")
37
+
38
+ expect(result[:longitude]).not_to be_empty
39
+ expect(result[:latitude]).not_to be_empty
40
+
41
+ result = gaode.get_coordinate_from_string("")
42
+
43
+ expect(result).to eq(nil)
44
+
45
+ end
46
+ end
@@ -1,8 +1,21 @@
1
- # encoding: utf-8
2
1
  require 'spec_helper'
3
2
 
4
3
  describe "test location" do
5
- it "should get location by string" do
4
+ before(:each) do
5
+ GeoApi.setup do |config|
6
+ # config.server = "http://api.map.baidu.com/geocoder/v2/"
7
+ # config.convert_server = "http://api.map.baidu.com/geoconv/v1/"
8
+ # config.key = "m48tmnl9BPwnhNOctmrVKMRa"
9
+ config.server = 'http://restapi.amap.com/v3/geocode/'
10
+ config.key = '54da1e114715acb235ca8d8f1d17d5f9'
11
+ config.vendor = 'GAODE'
12
+ # config.server = "http://apis.map.qq.com/ws/geocoder/v1/"
13
+ # config.key = "NM2BZ-V3HRG-ZHMQO-IPJQD-Q375T-EPFRZ"
14
+ end
15
+
16
+ end
17
+ it "get location by string" do
18
+ p GeoApi.proxy
6
19
  location = GeoApi.get_location_from_string("上海市-灵岩路-79弄1号")
7
20
  expect(location["province"]).to eq("上海市")
8
21
  expect(location["city"]).to eq("上海市")
@@ -19,15 +32,12 @@ describe "test location" do
19
32
  # location = GeoApi.get_location_from_string("城北区")
20
33
  # expect(location["province"]).not_to eq("城北区")
21
34
  end
22
- end
23
-
24
- describe "test location form coordinate" do
25
35
 
26
- it "should get location by coordinate" do
36
+ it "get location by coordinate" do
27
37
  latitude = "39.9834"
28
38
  longitude = "116.3229"
29
39
 
30
- location = GeoApi.get_location_from_coordinate(latitude, longitude, 5)
40
+ location = GeoApi.get_location_from_coordinate(longitude, latitude)
31
41
  expect(location["province"]).to eq("北京市")
32
42
  expect(location["city"]).to eq("北京市")
33
43
  expect(location["region"]).to eq("海淀区")
@@ -35,26 +45,26 @@ describe "test location form coordinate" do
35
45
  latitude = "36.66"
36
46
  longitude = "101.76"
37
47
 
38
- location = GeoApi.get_location_from_coordinate(latitude, longitude, 5)
48
+ location = GeoApi.get_location_from_coordinate(longitude, latitude)
39
49
  expect(location["province"]).to eq("青海省")
40
50
  expect(location["city"]).to eq("西宁市")
41
51
  expect(location["region"]).to eq("城北区")
42
52
  end
43
53
 
44
- it "should get coordinate from string" do
54
+ it "get coordinate from string" do
45
55
  result = GeoApi.get_coordinate_from_string("思南路115弄")
46
- p result
47
- expect(result["location"]).not_to be_empty
56
+ expect(result[:longitude]).not_to be_empty
57
+ expect(result[:latitude]).not_to be_empty
48
58
 
49
59
  result = GeoApi.get_coordinate_from_string("思南路115弄", "上海市")
50
60
 
51
- expect(result["location"]).not_to be_empty
61
+ expect(result[:longitude]).not_to be_empty
62
+ expect(result[:latitude]).not_to be_empty
52
63
 
53
64
  result = GeoApi.get_coordinate_from_string("")
54
65
 
55
66
  expect(result).to eq(nil)
56
67
 
57
-
58
68
  # 500.times do
59
69
  # result = GeoApi.get_coordinate_from_string("思南路115弄")
60
70
  # if result.nil?
data/spec/spec_helper.rb CHANGED
@@ -1,50 +1,14 @@
1
- # encoding utf-8
2
1
  require 'coveralls'
3
2
  Coveralls.wear!
4
3
 
5
4
  require 'bundler/setup'
6
5
  require 'geo_api'
7
- require 'mongoid'
8
6
 
9
7
  Bundler.setup
10
8
 
11
9
  ENV["RAILS_ENV"] ||= 'test'
12
- ENV["MONGOID_SPEC_HOST"] ||= "localhost"
13
- ENV["MONGOID_SPEC_PORT"] ||= "27017"
14
-
15
- HOST = ENV["MONGOID_SPEC_HOST"]
16
- PORT = ENV["MONGOID_SPEC_PORT"].to_i
17
-
18
- def database_id
19
- "sashimi_test"
20
- end
21
-
22
-
23
- CONFIG = {
24
- sessions: {
25
- default: {
26
- database: database_id,
27
- hosts: [ "#{HOST}:#{PORT}" ]
28
- }
29
- }
30
- }
31
-
32
- # Set the database that the spec suite connects to.
33
- Mongoid.configure do |config|
34
- config.load_configuration(CONFIG)
35
- end
36
-
37
- GeoApi.setup do |config|
38
- # config.server = "http://api.map.baidu.com/geocoder/v2/"
39
- # config.convert_server = "http://api.map.baidu.com/geoconv/v1/"
40
- # config.key = "m48tmnl9BPwnhNOctmrVKMRa"
41
-
42
- config.server = "http://apis.map.qq.com/ws/geocoder/v1/"
43
- config.key = "NM2BZ-V3HRG-ZHMQO-IPJQD-Q375T-EPFRZ"
44
- end
45
10
 
46
11
  RSpec.configure do |config|
47
12
  config.before(:each) do
48
- # Mongoid.purge!
49
13
  end
50
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geo_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - liuzelei
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-26 00:00:00.000000000 Z
11
+ date: 2015-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,34 +80,6 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: bson
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: mongoid
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
83
  description: "基础地理位置服务"
112
84
  email:
113
85
  - liuzelei@gmail.com
@@ -127,9 +99,12 @@ files:
127
99
  - lib/generators/geo_api/install_generator.rb
128
100
  - lib/generators/geo_api/templates/initializer.rb
129
101
  - lib/geo_api.rb
102
+ - lib/geo_api/baidu.rb
130
103
  - lib/geo_api/configuration.rb
131
- - lib/geo_api/models/log.rb
104
+ - lib/geo_api/gaode.rb
132
105
  - lib/geo_api/version.rb
106
+ - spec/baidu_spec.rb
107
+ - spec/gaode_spec.rb
133
108
  - spec/location_spec.rb
134
109
  - spec/spec_helper.rb
135
110
  homepage: ''
@@ -152,10 +127,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
127
  version: '0'
153
128
  requirements: []
154
129
  rubyforge_project:
155
- rubygems_version: 2.4.5
130
+ rubygems_version: 2.4.8
156
131
  signing_key:
157
132
  specification_version: 4
158
133
  summary: "提供字符串解析,经纬度解析映射等"
159
134
  test_files:
135
+ - spec/baidu_spec.rb
136
+ - spec/gaode_spec.rb
160
137
  - spec/location_spec.rb
161
138
  - spec/spec_helper.rb
@@ -1,14 +0,0 @@
1
- require 'mongoid'
2
- module GeoApi
3
- module Models
4
- class Log
5
- include Mongoid::Document
6
-
7
- field :url, type: String
8
- field :request, type: Hash
9
- field :raw_request, type: String
10
- field :response, type: Hash
11
-
12
- end
13
- end
14
- end