baidu_lbs 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 +4 -4
- data/lib/baidu_lbs.rb +4 -4
- data/lib/baidu_lbs/{geo_data → geodata}/column.rb +1 -1
- data/lib/baidu_lbs/{geo_data → geodata}/geotable.rb +1 -1
- data/lib/baidu_lbs/{geo_data → geodata}/job.rb +1 -1
- data/lib/baidu_lbs/{geo_data → geodata}/poi.rb +1 -1
- data/lib/baidu_lbs/version.rb +1 -1
- data/test/baidu_lbs/geodata/column_test.rb +5 -5
- data/test/baidu_lbs/geodata/geotable_test.rb +5 -5
- data/test/baidu_lbs/geodata/job_test.rb +2 -2
- data/test/baidu_lbs/geodata/poi_test.rb +6 -6
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9f50a6531d68cd6bc07bc287c1b1a89944b9ad5
|
4
|
+
data.tar.gz: 1095689328a08d9b0436b5d5a5984daba1dbe374
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c202fd63f758988b8177faa7a0dfef9a8727afcc926fd7a52f77a4d1b2b9633a068929a14c378027573ba1f32fd87e7a8b2a5c608d3185d270060e36e60de5a1
|
7
|
+
data.tar.gz: 82950137e9c5b471931b81d9eafaebd8681befcf483aca3c0c7b046b34debe798f9a0da3c8f7cf4b825921af987b836ca82e0cf1c7f62fc2b437a2f403b41a9d
|
data/lib/baidu_lbs.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
require 'baidu_lbs/version'
|
2
2
|
require 'baidu_lbs/configurable'
|
3
3
|
require 'baidu_lbs/client'
|
4
|
-
require 'baidu_lbs/
|
5
|
-
require 'baidu_lbs/
|
6
|
-
require 'baidu_lbs/
|
7
|
-
require 'baidu_lbs/
|
4
|
+
require 'baidu_lbs/geodata/geotable'
|
5
|
+
require 'baidu_lbs/geodata/column'
|
6
|
+
require 'baidu_lbs/geodata/poi'
|
7
|
+
require 'baidu_lbs/geodata/job'
|
8
8
|
|
9
9
|
module BaiduLBS
|
10
10
|
class << self
|
data/lib/baidu_lbs/version.rb
CHANGED
@@ -3,7 +3,7 @@ require 'test_helper'
|
|
3
3
|
class ColumnTest < MiniTest::Test
|
4
4
|
def test_create
|
5
5
|
VCR.use_cassette('geodata/column/create') do
|
6
|
-
result = BaiduLBS::
|
6
|
+
result = BaiduLBS::Geodata::Column.create(name: 'awesome_column',
|
7
7
|
key: 'awesome_column',
|
8
8
|
type: 1,
|
9
9
|
is_sortfilter_field: 1,
|
@@ -17,7 +17,7 @@ class ColumnTest < MiniTest::Test
|
|
17
17
|
|
18
18
|
def test_list
|
19
19
|
VCR.use_cassette('geodata/column/list') do
|
20
|
-
result = BaiduLBS::
|
20
|
+
result = BaiduLBS::Geodata::Column.list(geotable_id: 78835)
|
21
21
|
|
22
22
|
assert_equal 'awesome_column', result['columns'].first['name']
|
23
23
|
end
|
@@ -25,7 +25,7 @@ class ColumnTest < MiniTest::Test
|
|
25
25
|
|
26
26
|
def test_detail
|
27
27
|
VCR.use_cassette('geodata/column/detail') do
|
28
|
-
result = BaiduLBS::
|
28
|
+
result = BaiduLBS::Geodata::Column.detail(geotable_id: 78835, id: 77316)
|
29
29
|
|
30
30
|
assert_equal 'awesome_column', result['column']['name']
|
31
31
|
end
|
@@ -33,7 +33,7 @@ class ColumnTest < MiniTest::Test
|
|
33
33
|
|
34
34
|
def test_update
|
35
35
|
VCR.use_cassette('geodata/column/update') do
|
36
|
-
result = BaiduLBS::
|
36
|
+
result = BaiduLBS::Geodata::Column.update(geotable_id: 78835, id: 77316, name: 'cool_column')
|
37
37
|
|
38
38
|
assert_equal 0, result['status']
|
39
39
|
end
|
@@ -41,7 +41,7 @@ class ColumnTest < MiniTest::Test
|
|
41
41
|
|
42
42
|
def test_delete
|
43
43
|
VCR.use_cassette('geodata/column/delete') do
|
44
|
-
result = BaiduLBS::
|
44
|
+
result = BaiduLBS::Geodata::Column.delete(geotable_id: 78835,id: 77316)
|
45
45
|
|
46
46
|
assert_equal 21, result['status']
|
47
47
|
end
|
@@ -3,7 +3,7 @@ require 'test_helper'
|
|
3
3
|
class GeotableTest < MiniTest::Test
|
4
4
|
def test_create
|
5
5
|
VCR.use_cassette('geodata/geotable/create') do
|
6
|
-
result = BaiduLBS::
|
6
|
+
result = BaiduLBS::Geodata::GeoTable.create(name: 'awesome_places',
|
7
7
|
geotype: 1,
|
8
8
|
is_published: 1)
|
9
9
|
assert_equal 0, result['status']
|
@@ -12,7 +12,7 @@ class GeotableTest < MiniTest::Test
|
|
12
12
|
|
13
13
|
def test_list
|
14
14
|
VCR.use_cassette('geodata/geotable/list') do
|
15
|
-
result = BaiduLBS::
|
15
|
+
result = BaiduLBS::Geodata::GeoTable.list
|
16
16
|
|
17
17
|
assert_equal 'awesome_places' , result['geotables'].first['name']
|
18
18
|
end
|
@@ -20,7 +20,7 @@ class GeotableTest < MiniTest::Test
|
|
20
20
|
|
21
21
|
def test_detail
|
22
22
|
VCR.use_cassette('geodata/geotable/detail') do
|
23
|
-
result = BaiduLBS::
|
23
|
+
result = BaiduLBS::Geodata::GeoTable.detail(78706)
|
24
24
|
|
25
25
|
assert_equal 'awesome_places', result['geotable']['name']
|
26
26
|
end
|
@@ -28,7 +28,7 @@ class GeotableTest < MiniTest::Test
|
|
28
28
|
|
29
29
|
def test_update
|
30
30
|
VCR.use_cassette('geodata/geotable/update') do
|
31
|
-
result = BaiduLBS::
|
31
|
+
result = BaiduLBS::Geodata::GeoTable.update(78706, name: 'cool_places')
|
32
32
|
|
33
33
|
assert_equal 0, result['status']
|
34
34
|
end
|
@@ -36,7 +36,7 @@ class GeotableTest < MiniTest::Test
|
|
36
36
|
|
37
37
|
def test_delete
|
38
38
|
VCR.use_cassette('geodata/geotable/delete') do
|
39
|
-
result = BaiduLBS::
|
39
|
+
result = BaiduLBS::Geodata::GeoTable.delete(78706)
|
40
40
|
|
41
41
|
assert_equal 0, result['status']
|
42
42
|
end
|
@@ -3,7 +3,7 @@ require 'test_helper'
|
|
3
3
|
class JobTest < MiniTest::Test
|
4
4
|
def test_list
|
5
5
|
VCR.use_cassette('geodata/job/list') do
|
6
|
-
result = BaiduLBS::
|
6
|
+
result = BaiduLBS::Geodata::Job.list
|
7
7
|
|
8
8
|
assert_equal 0, result['status']
|
9
9
|
end
|
@@ -11,7 +11,7 @@ class JobTest < MiniTest::Test
|
|
11
11
|
|
12
12
|
def test_detail
|
13
13
|
VCR.use_cassette('geodata/job/detail') do
|
14
|
-
result = BaiduLBS::
|
14
|
+
result = BaiduLBS::Geodata::Job.detail(id: '541c6ee0ba6000ac648b4567')
|
15
15
|
|
16
16
|
assert_equal 0, result['status']
|
17
17
|
end
|
@@ -3,7 +3,7 @@ require 'test_helper'
|
|
3
3
|
class PoiTest < MiniTest::Test
|
4
4
|
def test_create
|
5
5
|
VCR.use_cassette('geodata/poi/create') do
|
6
|
-
result = BaiduLBS::
|
6
|
+
result = BaiduLBS::Geodata::Poi.create(title: 'awesome_poi',
|
7
7
|
longitude: 100,
|
8
8
|
latitude: 100,
|
9
9
|
coord_type: 1,
|
@@ -14,7 +14,7 @@ class PoiTest < MiniTest::Test
|
|
14
14
|
|
15
15
|
def test_list
|
16
16
|
VCR.use_cassette('geodata/poi/list') do
|
17
|
-
result = BaiduLBS::
|
17
|
+
result = BaiduLBS::Geodata::Poi.list(geotable_id: 78835, title: 'awesome_poi')
|
18
18
|
|
19
19
|
assert_equal 'awesome_poi', result['pois'].first['title']
|
20
20
|
end
|
@@ -22,7 +22,7 @@ class PoiTest < MiniTest::Test
|
|
22
22
|
|
23
23
|
def test_detail
|
24
24
|
VCR.use_cassette('geodata/poi/detail') do
|
25
|
-
result = BaiduLBS::
|
25
|
+
result = BaiduLBS::Geodata::Poi.detail(geotable_id: 78835, id: 499219466)
|
26
26
|
|
27
27
|
assert_equal 'awesome_poi', result['poi']['title']
|
28
28
|
end
|
@@ -30,7 +30,7 @@ class PoiTest < MiniTest::Test
|
|
30
30
|
|
31
31
|
def test_update
|
32
32
|
VCR.use_cassette('geodata/poi/update') do
|
33
|
-
result = BaiduLBS::
|
33
|
+
result = BaiduLBS::Geodata::Poi.update(geotable_id: 78835, id: 499219466, title: 'cool_poi')
|
34
34
|
|
35
35
|
assert_equal 0, result['status']
|
36
36
|
end
|
@@ -38,7 +38,7 @@ class PoiTest < MiniTest::Test
|
|
38
38
|
|
39
39
|
def test_delete
|
40
40
|
VCR.use_cassette('geodata/poi/delete') do
|
41
|
-
result = BaiduLBS::
|
41
|
+
result = BaiduLBS::Geodata::Poi.detail(geotable_id: 78835, id: 499219466)
|
42
42
|
|
43
43
|
assert_equal 0, result['status']
|
44
44
|
end
|
@@ -46,7 +46,7 @@ class PoiTest < MiniTest::Test
|
|
46
46
|
|
47
47
|
def test_upload
|
48
48
|
VCR.use_cassette('geodata/poi/upload') do
|
49
|
-
result = BaiduLBS::
|
49
|
+
result = BaiduLBS::Geodata::Poi.upload(geotable_id: 78835,
|
50
50
|
poi_list: File.expand_path('../../../fixtures/poi_list.csv', __FILE__))
|
51
51
|
assert_equal 0, result['status']
|
52
52
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: baidu_lbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Meck
|
@@ -124,11 +124,11 @@ files:
|
|
124
124
|
- lib/baidu_lbs.rb
|
125
125
|
- lib/baidu_lbs/client.rb
|
126
126
|
- lib/baidu_lbs/configurable.rb
|
127
|
-
- lib/baidu_lbs/geo_data/column.rb
|
128
|
-
- lib/baidu_lbs/geo_data/geotable.rb
|
129
|
-
- lib/baidu_lbs/geo_data/job.rb
|
130
|
-
- lib/baidu_lbs/geo_data/poi.rb
|
131
127
|
- lib/baidu_lbs/geo_search.rb
|
128
|
+
- lib/baidu_lbs/geodata/column.rb
|
129
|
+
- lib/baidu_lbs/geodata/geotable.rb
|
130
|
+
- lib/baidu_lbs/geodata/job.rb
|
131
|
+
- lib/baidu_lbs/geodata/poi.rb
|
132
132
|
- lib/baidu_lbs/request.rb
|
133
133
|
- lib/baidu_lbs/version.rb
|
134
134
|
- test/baidu_lbs/geodata/column_test.rb
|