mapbox_directions 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +4 -0
- data/.travis.yml +14 -0
- data/Gemfile +6 -0
- data/Guardfile +5 -0
- data/LICENSE.txt +22 -0
- data/README.md +148 -0
- data/Rakefile +2 -0
- data/lib/mapbox_directions.rb +12 -0
- data/lib/mapbox_directions/client.rb +43 -0
- data/lib/mapbox_directions/error.rb +7 -0
- data/lib/mapbox_directions/model.rb +6 -0
- data/lib/mapbox_directions/model/location.rb +19 -0
- data/lib/mapbox_directions/model/maneuver.rb +14 -0
- data/lib/mapbox_directions/model/point.rb +17 -0
- data/lib/mapbox_directions/model/response.rb +16 -0
- data/lib/mapbox_directions/model/route.rb +24 -0
- data/lib/mapbox_directions/model/step.rb +19 -0
- data/lib/mapbox_directions/parametizer.rb +50 -0
- data/lib/mapbox_directions/response_parser.rb +69 -0
- data/lib/mapbox_directions/version.rb +3 -0
- data/mapbox_directions.gemspec +32 -0
- data/spec/acceptance/directions_spec.rb +158 -0
- data/spec/acceptance/no_routes_found_spec.rb +25 -0
- data/spec/acceptance/raising_exceptions_spec.rb +54 -0
- data/spec/fixtures/cassettes/driving_geojson_as_geometry.yml +186 -0
- data/spec/fixtures/cassettes/driving_polyline_as_geometry.yml +186 -0
- data/spec/fixtures/cassettes/no_routes_found.yml +52 -0
- data/spec/fixtures/cassettes/unauthorized.yml +144 -0
- data/spec/lib/mapbox_directions/client_spec.rb +48 -0
- data/spec/lib/mapbox_directions/model/location_spec.rb +21 -0
- data/spec/lib/mapbox_directions/model/point_spec.rb +17 -0
- data/spec/lib/mapbox_directions/model/route_spec.rb +17 -0
- data/spec/lib/mapbox_directions/parametizer_spec.rb +92 -0
- data/spec/lib/mapbox_directions/response_parser_spec.rb +140 -0
- data/spec/spec_helper.rb +18 -0
- metadata +235 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
RSpec.describe MapboxDirections::Point do
|
2
|
+
let(:geojson) do
|
3
|
+
{"type"=>"Feature", "geometry"=>{"type"=>"Point", "coordinates"=>[-122.420013, 37.780094]}, "properties"=>{"name"=>"McAllister Street"}}
|
4
|
+
end
|
5
|
+
|
6
|
+
describe "from_geojson" do
|
7
|
+
let(:point) { described_class.from_geojson(geojson) }
|
8
|
+
|
9
|
+
it "lat" do
|
10
|
+
expect(point.lat).to eq(37.780094)
|
11
|
+
end
|
12
|
+
|
13
|
+
it "lng" do
|
14
|
+
expect(point.lng).to eq(-122.420013)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
RSpec.describe MapboxDirections::Route do
|
2
|
+
let(:line_coordinates) do
|
3
|
+
[[52.513837, 13.389104], [52.513853000000005, 13.389337], [52.514019000000005, 13.389239], [52.514101000000004, 13.389225]]
|
4
|
+
end
|
5
|
+
let(:polyline_geometry) { Polylines::Encoder.encode_points(line_coordinates, 1e6) }
|
6
|
+
let(:route) { described_class.new(geometry: polyline_geometry) }
|
7
|
+
|
8
|
+
describe "transform_polyline_precision" do
|
9
|
+
let(:new_precision) { 1e5 }
|
10
|
+
let(:transformed_polyline) { route.transform_polyline_precision(new_precision) }
|
11
|
+
let(:polyline_encoded_to_1e5) { Polylines::Encoder.encode_points(line_coordinates, 1e5) }
|
12
|
+
|
13
|
+
it "transforms the polyline precision from 1e6 to the one required" do
|
14
|
+
expect(transformed_polyline).to eq(polyline_encoded_to_1e5)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
RSpec.describe MapboxDirections::Parametizer do
|
2
|
+
let(:options) do
|
3
|
+
{
|
4
|
+
access_token: "myAccessToken",
|
5
|
+
mode: mode,
|
6
|
+
origin: origin,
|
7
|
+
destination: "-77.03,38.91",
|
8
|
+
geometry: geometry,
|
9
|
+
alternatives: false,
|
10
|
+
instructions: instructions,
|
11
|
+
invented_opt: "random"
|
12
|
+
}
|
13
|
+
end
|
14
|
+
let(:mode) { "driving" }
|
15
|
+
let(:origin) { "-122.42,37.78" }
|
16
|
+
let(:geometry) { "polyline" }
|
17
|
+
let(:instructions) { "text" }
|
18
|
+
let(:client) { described_class.new(options) }
|
19
|
+
|
20
|
+
describe "params" do
|
21
|
+
context "when the access_token wasn't passed" do
|
22
|
+
it "raises MissingAccessTokenError" do
|
23
|
+
options.delete(:access_token)
|
24
|
+
expect { client.params_hash }.to raise_error(MapboxDirections::MissingAccessTokenError)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
context "when the access_token was passed" do
|
29
|
+
context "returns only accepted params with allowed values" do
|
30
|
+
it "access_token" do
|
31
|
+
expect(client.params_hash[:access_token]).to eq("myAccessToken")
|
32
|
+
end
|
33
|
+
|
34
|
+
it "geometry" do
|
35
|
+
expect(client.params_hash[:geometry]).to eq(geometry)
|
36
|
+
end
|
37
|
+
|
38
|
+
it "alternatives" do
|
39
|
+
expect(client.params_hash[:alternatives]).to eq(false)
|
40
|
+
end
|
41
|
+
|
42
|
+
it "instructions" do
|
43
|
+
expect(client.params_hash[:instructions]).to eq(instructions)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
it "doesn't return unallowed values" do
|
48
|
+
expect(client.params_hash).to_not include(:invented_opt)
|
49
|
+
end
|
50
|
+
|
51
|
+
context "when values are not allowed in an allowed key param" do
|
52
|
+
let(:geometry) { "cardinal" }
|
53
|
+
|
54
|
+
it "it's not returned" do
|
55
|
+
expect(client.params_hash).to_not include(:geometry)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
describe "profile" do
|
62
|
+
context "when the mode of transport is not supported" do
|
63
|
+
let(:mode) { "horse" }
|
64
|
+
|
65
|
+
it "raises a UnsupportedTransportModeError error" do
|
66
|
+
expect{ client.profile }.to raise_error(MapboxDirections::UnsupportedTransportModeError)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
context "when the mode of transport is supported" do
|
71
|
+
it "returns the right string" do
|
72
|
+
expect(client.profile).to eq("mapbox.driving")
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe "waypoints" do
|
78
|
+
context "when some of the locations is wrong formated" do
|
79
|
+
let(:origin) { "12.234" }
|
80
|
+
|
81
|
+
it "raises a CoordinatesFormatError error" do
|
82
|
+
expect{ client.waypoints }.to raise_error(MapboxDirections::CoordinatesFormatError)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
context "when the locations have the right format" do
|
87
|
+
it "returns the waympoints as string as origin and destination" do
|
88
|
+
expect(client.waypoints).to eq("-122.42,37.78;-77.03,38.91")
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,140 @@
|
|
1
|
+
RSpec.describe MapboxDirections::ResponseParser do
|
2
|
+
let(:geometry) { "U}DeB_ZdYa_@lDuEeZka@mQmVw|@_mAe" }
|
3
|
+
let(:summary) { "I80 - I 80;I 90" }
|
4
|
+
let(:distance) { 4524005 }
|
5
|
+
let(:duration) { 163463 }
|
6
|
+
let(:body) do
|
7
|
+
{"origin"=> {"type"=> "Feature","geometry"=> {"type"=> "Point","coordinates"=> [-122.420013,37.780094]},"properties"=> {"name"=> "McAllister Street"}},"destination"=> {"type"=> "Feature","geometry"=> {"type"=> "Point","coordinates"=> [-77.030067,38.91008]},"properties"=> {"name"=> "Logan Circle Northwest"}},"waypoints"=> [],"routes"=> [{"distance"=> distance,"duration"=> duration,"summary"=> summary,"geometry"=> geometry,"steps"=> route_steps}]}
|
8
|
+
end
|
9
|
+
let(:route_steps) do
|
10
|
+
[{"maneuver"=>{"type"=>"depart", "location"=>{"type"=>"Point", "coordinates"=>[-122.420017, 37.780096]}, "instruction"=>"Head east on McAllister Street"}, "distance"=>611, "duration"=>53, "way_name"=>"McAllister Street", "direction"=>"E", "heading"=>80}]
|
11
|
+
end
|
12
|
+
let(:response) { described_class.directions(body) }
|
13
|
+
|
14
|
+
describe "directions" do
|
15
|
+
describe "origin" do
|
16
|
+
let(:origin) { response.origin }
|
17
|
+
|
18
|
+
it "lat" do
|
19
|
+
expect(origin.lat).to eq(37.780094)
|
20
|
+
end
|
21
|
+
|
22
|
+
it "lng" do
|
23
|
+
expect(origin.lng).to eq(-122.420013)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "name" do
|
27
|
+
expect(origin.name).to eq("McAllister Street")
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe "destination" do
|
32
|
+
let(:destination) { response.destination }
|
33
|
+
|
34
|
+
it "lat" do
|
35
|
+
expect(destination.lat).to eq(38.91008)
|
36
|
+
end
|
37
|
+
|
38
|
+
it "lng" do
|
39
|
+
expect(destination.lng).to eq(-77.030067)
|
40
|
+
end
|
41
|
+
|
42
|
+
it "name" do
|
43
|
+
expect(destination.name).to eq("Logan Circle Northwest")
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
it "waypoints" do
|
48
|
+
expect(response.waypoints).to eq(body["waypoints"])
|
49
|
+
end
|
50
|
+
|
51
|
+
describe "routes" do
|
52
|
+
let(:route) { response.routes.first }
|
53
|
+
|
54
|
+
it "distance" do
|
55
|
+
expect(route.distance).to eq(distance)
|
56
|
+
end
|
57
|
+
|
58
|
+
it "duration" do
|
59
|
+
expect(route.duration).to eq(duration)
|
60
|
+
end
|
61
|
+
|
62
|
+
it "summary" do
|
63
|
+
expect(route.summary).to eq(summary)
|
64
|
+
end
|
65
|
+
|
66
|
+
it "geometry" do
|
67
|
+
expect(route.geometry).to eq(geometry)
|
68
|
+
end
|
69
|
+
|
70
|
+
describe "steps" do
|
71
|
+
let(:steps) { route.steps }
|
72
|
+
|
73
|
+
it "is an array with step elements" do
|
74
|
+
expect(steps.count).to be > 0
|
75
|
+
expect(steps.first).to be_kind_of(MapboxDirections::Step)
|
76
|
+
end
|
77
|
+
|
78
|
+
describe "each step contains" do
|
79
|
+
let(:step) { steps.first }
|
80
|
+
|
81
|
+
it "distance" do
|
82
|
+
expect(step.distance).to eq(611)
|
83
|
+
end
|
84
|
+
|
85
|
+
it "duration" do
|
86
|
+
expect(step.duration).to eq(53)
|
87
|
+
end
|
88
|
+
|
89
|
+
it "way_name" do
|
90
|
+
expect(step.way_name).to eq("McAllister Street")
|
91
|
+
end
|
92
|
+
|
93
|
+
it "direction" do
|
94
|
+
expect(step.direction).to eq("E")
|
95
|
+
end
|
96
|
+
|
97
|
+
it "heading" do
|
98
|
+
expect(step.heading).to eq(80)
|
99
|
+
end
|
100
|
+
|
101
|
+
it "lat" do
|
102
|
+
expect(step.lat).to eq(37.780096)
|
103
|
+
end
|
104
|
+
|
105
|
+
it "lng" do
|
106
|
+
expect(step.lng).to eq(-122.420017)
|
107
|
+
end
|
108
|
+
|
109
|
+
describe "maneuver" do
|
110
|
+
let(:maneuver) { step.maneuver }
|
111
|
+
|
112
|
+
it "type" do
|
113
|
+
expect(maneuver.type).to eq("depart")
|
114
|
+
end
|
115
|
+
|
116
|
+
it "instruction" do
|
117
|
+
expect(maneuver.instruction).to eq("Head east on McAllister Street")
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
describe "message" do
|
125
|
+
let(:body) { { "message" => "Not found", "routes" => [] } }
|
126
|
+
|
127
|
+
it "is set" do
|
128
|
+
expect(response.message).to eq(body["message"])
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
describe "error" do
|
133
|
+
let(:body) { { "error" => "Cannot find route between points", "routes" => [] } }
|
134
|
+
|
135
|
+
it "is set" do
|
136
|
+
expect(response.error).to eq(body["error"])
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require "codeclimate-test-reporter"
|
2
|
+
CodeClimate::TestReporter.start
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
Bundler.setup
|
6
|
+
|
7
|
+
require 'mapbox_directions'
|
8
|
+
require 'vcr'
|
9
|
+
|
10
|
+
VCR.configure do |c|
|
11
|
+
c.cassette_library_dir = 'spec/fixtures/cassettes'
|
12
|
+
c.hook_into :webmock
|
13
|
+
c.ignore_hosts 'codeclimate.com'
|
14
|
+
c.default_cassette_options = {
|
15
|
+
match_requests_on: [:method, VCR.request_matchers.uri_without_param(:access_token), :body],
|
16
|
+
record: :new_episodes
|
17
|
+
}
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,235 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mapbox_directions
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- yonelacort
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-06-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: polylines
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: vcr
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
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: webmock
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: byebug
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: guard-rspec
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: ruby_gntp
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
description: Ruby wrapper for the MapBox Directions Service
|
154
|
+
email:
|
155
|
+
- yonedev@gmail.com
|
156
|
+
executables: []
|
157
|
+
extensions: []
|
158
|
+
extra_rdoc_files: []
|
159
|
+
files:
|
160
|
+
- ".gitignore"
|
161
|
+
- ".rspec"
|
162
|
+
- ".travis.yml"
|
163
|
+
- Gemfile
|
164
|
+
- Guardfile
|
165
|
+
- LICENSE.txt
|
166
|
+
- README.md
|
167
|
+
- Rakefile
|
168
|
+
- lib/mapbox_directions.rb
|
169
|
+
- lib/mapbox_directions/client.rb
|
170
|
+
- lib/mapbox_directions/error.rb
|
171
|
+
- lib/mapbox_directions/model.rb
|
172
|
+
- lib/mapbox_directions/model/location.rb
|
173
|
+
- lib/mapbox_directions/model/maneuver.rb
|
174
|
+
- lib/mapbox_directions/model/point.rb
|
175
|
+
- lib/mapbox_directions/model/response.rb
|
176
|
+
- lib/mapbox_directions/model/route.rb
|
177
|
+
- lib/mapbox_directions/model/step.rb
|
178
|
+
- lib/mapbox_directions/parametizer.rb
|
179
|
+
- lib/mapbox_directions/response_parser.rb
|
180
|
+
- lib/mapbox_directions/version.rb
|
181
|
+
- mapbox_directions.gemspec
|
182
|
+
- spec/acceptance/directions_spec.rb
|
183
|
+
- spec/acceptance/no_routes_found_spec.rb
|
184
|
+
- spec/acceptance/raising_exceptions_spec.rb
|
185
|
+
- spec/fixtures/cassettes/driving_geojson_as_geometry.yml
|
186
|
+
- spec/fixtures/cassettes/driving_polyline_as_geometry.yml
|
187
|
+
- spec/fixtures/cassettes/no_routes_found.yml
|
188
|
+
- spec/fixtures/cassettes/unauthorized.yml
|
189
|
+
- spec/lib/mapbox_directions/client_spec.rb
|
190
|
+
- spec/lib/mapbox_directions/model/location_spec.rb
|
191
|
+
- spec/lib/mapbox_directions/model/point_spec.rb
|
192
|
+
- spec/lib/mapbox_directions/model/route_spec.rb
|
193
|
+
- spec/lib/mapbox_directions/parametizer_spec.rb
|
194
|
+
- spec/lib/mapbox_directions/response_parser_spec.rb
|
195
|
+
- spec/spec_helper.rb
|
196
|
+
homepage: ''
|
197
|
+
licenses:
|
198
|
+
- MIT
|
199
|
+
metadata: {}
|
200
|
+
post_install_message:
|
201
|
+
rdoc_options: []
|
202
|
+
require_paths:
|
203
|
+
- lib
|
204
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
|
+
requirements:
|
211
|
+
- - ">="
|
212
|
+
- !ruby/object:Gem::Version
|
213
|
+
version: '0'
|
214
|
+
requirements: []
|
215
|
+
rubyforge_project:
|
216
|
+
rubygems_version: 2.4.2
|
217
|
+
signing_key:
|
218
|
+
specification_version: 4
|
219
|
+
summary: MapBox Directions API
|
220
|
+
test_files:
|
221
|
+
- spec/acceptance/directions_spec.rb
|
222
|
+
- spec/acceptance/no_routes_found_spec.rb
|
223
|
+
- spec/acceptance/raising_exceptions_spec.rb
|
224
|
+
- spec/fixtures/cassettes/driving_geojson_as_geometry.yml
|
225
|
+
- spec/fixtures/cassettes/driving_polyline_as_geometry.yml
|
226
|
+
- spec/fixtures/cassettes/no_routes_found.yml
|
227
|
+
- spec/fixtures/cassettes/unauthorized.yml
|
228
|
+
- spec/lib/mapbox_directions/client_spec.rb
|
229
|
+
- spec/lib/mapbox_directions/model/location_spec.rb
|
230
|
+
- spec/lib/mapbox_directions/model/point_spec.rb
|
231
|
+
- spec/lib/mapbox_directions/model/route_spec.rb
|
232
|
+
- spec/lib/mapbox_directions/parametizer_spec.rb
|
233
|
+
- spec/lib/mapbox_directions/response_parser_spec.rb
|
234
|
+
- spec/spec_helper.rb
|
235
|
+
has_rdoc:
|