azimuth 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +4 -0
- data/CONTRIBUTING.md +34 -0
- data/LICENSE +20 -0
- data/README.md +98 -0
- data/Rakefile +42 -0
- data/azimuth.gemspec +31 -0
- data/lib/azimuth.rb +25 -0
- data/lib/azimuth/client.rb +26 -0
- data/lib/azimuth/client/route_matrix.rb +38 -0
- data/lib/azimuth/configuration.rb +43 -0
- data/lib/azimuth/connection.rb +28 -0
- data/lib/azimuth/error.rb +45 -0
- data/lib/azimuth/request.rb +30 -0
- data/lib/azimuth/response/raise_error.rb +18 -0
- data/lib/azimuth/version.rb +5 -0
- data/spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/behaves_like_a_route_matrix_request/returns_locations_coordinates.yml +87 -0
- data/spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/behaves_like_a_route_matrix_request/returns_locations_distances_to_destination.yml +87 -0
- data/spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/behaves_like_a_route_matrix_request/returns_locations_driving_times_to_destination.yml +87 -0
- data/spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/with_all_to_all_options/it_returns_destination_informations.yml +88 -0
- data/spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/with_many_to_one_options/does_not_return_destination_informations.yml +87 -0
- data/spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/with_no_optionnal_options/does_not_return_destination_informations.yml +87 -0
- data/spec/lib/azimuth/client/route_matrix_spec.rb +39 -0
- data/spec/lib/azimuth/client_spec.rb +56 -0
- data/spec/lib/azimuth/request_spec.rb +11 -0
- data/spec/lib/azimuth_spec.rb +32 -0
- data/spec/spec_helper.rb +52 -0
- data/spec/support/shared_examples/error.rb +15 -0
- data/spec/support/shared_examples/route_matrix_request.rb +26 -0
- metadata +170 -0
@@ -0,0 +1,87 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://www.mapquestapi.com/directions/v2/routematrix?key=<API_KEY>
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "{\"locations\":[\"48.843079, 2.314442\",\"48.869061, 2.383329\",\"49.000000,
|
9
|
+
2.300000\"],\"options\":{}}"
|
10
|
+
headers:
|
11
|
+
User-Agent:
|
12
|
+
- Faraday v0.8.9
|
13
|
+
Content-Type:
|
14
|
+
- application/json
|
15
|
+
Accept-Encoding:
|
16
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
17
|
+
Accept:
|
18
|
+
- "*/*"
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 200
|
22
|
+
message: OK
|
23
|
+
headers:
|
24
|
+
Server:
|
25
|
+
- Apache-Coyote/1.1
|
26
|
+
Access-Control-Allow-Origin:
|
27
|
+
- "*"
|
28
|
+
Access-Control-Allow-Methods:
|
29
|
+
- OPTIONS,GET,POST
|
30
|
+
Set-Cookie:
|
31
|
+
- JSESSIONID=3534BF65D920222EB7019EB2BDF42D5D; Path=/directions/; HttpOnly
|
32
|
+
Expires:
|
33
|
+
- Mon, 20 Dec 1998 01:00:00 GMT
|
34
|
+
Last-Modified:
|
35
|
+
- Mon, 13 Jan 2014 18:40:55 GMT
|
36
|
+
Cache-Control:
|
37
|
+
- no-cache, must-revalidate
|
38
|
+
Pragma:
|
39
|
+
- no-cache
|
40
|
+
Content-Type:
|
41
|
+
- application/json;charset=UTF-8
|
42
|
+
Content-Length:
|
43
|
+
- '1592'
|
44
|
+
Date:
|
45
|
+
- Mon, 13 Jan 2014 18:40:55 GMT
|
46
|
+
body:
|
47
|
+
encoding: ASCII-8BIT
|
48
|
+
string: !binary |-
|
49
|
+
eyJhbGxUb0FsbCI6ZmFsc2UsImRpc3RhbmNlIjpbMCw0LjkwOSwxNy45Njhd
|
50
|
+
LCJ0aW1lIjpbMCwxMDE5LDIxMjldLCJsb2NhdGlvbnMiOlt7ImxhdExuZyI6
|
51
|
+
eyJsbmci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ZXN0LCBJbmMuIiwiaW1hZ2VVcmwiOiJo
|
82
|
+
dHRwOi8vYXBpLm1xY2RuLmNvbS9yZXMvbXFsb2dvLmdpZiIsImltYWdlQWx0
|
83
|
+
VGV4dCI6IsKpIDIwMTMgTWFwUXVlc3QsIEluYy4ifSwic3RhdHVzY29kZSI6
|
84
|
+
MCwibWVzc2FnZXMiOltdfX0=
|
85
|
+
http_version:
|
86
|
+
recorded_at: Mon, 13 Jan 2014 18:40:56 GMT
|
87
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Azimuth::Client::RouteMatrix do
|
4
|
+
describe '.route_matrix', :vcr do
|
5
|
+
it_behaves_like 'a route matrix request'
|
6
|
+
|
7
|
+
let(:locations) do
|
8
|
+
['48.843079, 2.314442', '48.869061, 2.383329', '49.000000, 2.300000']
|
9
|
+
end
|
10
|
+
|
11
|
+
context 'with no optionnal options' do
|
12
|
+
let(:route_matrix_result) { client.route_matrix(locations) }
|
13
|
+
|
14
|
+
it 'does not return destination informations' do
|
15
|
+
expect(route_matrix_result.size).to eql 2
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context 'with many to one options' do
|
20
|
+
let(:route_matrix_result) do
|
21
|
+
client.route_matrix(locations, manyToOne: true)
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'does not return destination informations' do
|
25
|
+
expect(route_matrix_result.size).to eql 2
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
context 'with all to all options' do
|
30
|
+
let(:route_matrix_result) do
|
31
|
+
client.route_matrix(locations, allToAll: true)
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'it returns destination informations' do
|
35
|
+
expect(route_matrix_result.size).to eql 3
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Azimuth::Client do
|
4
|
+
describe 'module configuration' do
|
5
|
+
before do
|
6
|
+
Azimuth.reset!
|
7
|
+
|
8
|
+
Azimuth.configure do |config|
|
9
|
+
Azimuth::Configuration::VALID_OPTIONS.each do |key|
|
10
|
+
config.send("#{key}=", "Some #{key}")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
after { Azimuth.reset! }
|
16
|
+
|
17
|
+
it "inherits the module configuration" do
|
18
|
+
client = Azimuth::Client.new
|
19
|
+
|
20
|
+
Azimuth::Configuration::VALID_OPTIONS.each do |key|
|
21
|
+
expect(client.instance_variable_get(:"@#{key}")).to eq "Some #{key}"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context 'with class level configuration' do
|
27
|
+
describe 'api_endpoint' do
|
28
|
+
it 'sets api_endpoint' do
|
29
|
+
client = Azimuth::Client.new
|
30
|
+
|
31
|
+
expect(client.api_endpoint).
|
32
|
+
to eql 'http://www.mapquestapi.com/directions/v2/'
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'overrides module configuration' do
|
36
|
+
client = Azimuth::Client.new(api_endpoint: 'http://fuubar.com')
|
37
|
+
|
38
|
+
expect(client.api_endpoint).to eql 'http://fuubar.com'
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe 'api_key' do
|
43
|
+
it 'sets api_key' do
|
44
|
+
client = Azimuth::Client.new
|
45
|
+
|
46
|
+
expect(client.api_key).to be_nil
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'overrides module configuration' do
|
50
|
+
client = Azimuth::Client.new(api_key: 'randomkey')
|
51
|
+
|
52
|
+
expect(client.api_key).to eql 'randomkey'
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Azimuth::Request do
|
4
|
+
it_behaves_like 'an error', 400, Azimuth::ErrorWithInput
|
5
|
+
it_behaves_like 'an error', 403, Azimuth::KeyRelatedError
|
6
|
+
it_behaves_like 'an error', 500, Azimuth::UnknownError
|
7
|
+
|
8
|
+
Array(600...699).each do |status_code|
|
9
|
+
it_behaves_like 'an error', status_code, Azimuth::OtherError
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Azimuth do
|
4
|
+
describe '.respond_to?' do
|
5
|
+
context 'with an existing Azimuth method' do
|
6
|
+
it 'responds to method' do
|
7
|
+
expect(Azimuth.respond_to?(:new, true)).to be_true
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
context 'with an existing Azimuth::Client method' do
|
12
|
+
it 'responds to method' do
|
13
|
+
expect(Azimuth.respond_to?(:post, true)).to be_true
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'delegates to Azimuth::Client' do
|
17
|
+
Azimuth::Client.stub_chain(:new, :post).and_return(true)
|
18
|
+
|
19
|
+
expect(Azimuth::Client).to receive(:new).ordered
|
20
|
+
expect(Azimuth::Client).to receive(:new).ordered
|
21
|
+
|
22
|
+
Azimuth.post('fuubar', test: {} )
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe '.new' do
|
28
|
+
it 'returns a Azimuth::Client' do
|
29
|
+
expect(Azimuth.new).to be_a Azimuth::Client
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
require 'coveralls'
|
3
|
+
|
4
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
5
|
+
SimpleCov::Formatter::HTMLFormatter,
|
6
|
+
Coveralls::SimpleCov::Formatter
|
7
|
+
]
|
8
|
+
|
9
|
+
SimpleCov.start do
|
10
|
+
add_filter 'spec'
|
11
|
+
add_filter 'lib/azimuth/response'
|
12
|
+
end
|
13
|
+
|
14
|
+
require 'rspec'
|
15
|
+
require 'vcr'
|
16
|
+
require 'json'
|
17
|
+
require 'webmock/rspec'
|
18
|
+
require 'azimuth'
|
19
|
+
require 'uri'
|
20
|
+
|
21
|
+
Dir['./spec/support/**/*.rb'].each { |f| require f }
|
22
|
+
|
23
|
+
WebMock.disable_net_connect!(allow: 'coveralls.io')
|
24
|
+
|
25
|
+
VCR.configure do |c|
|
26
|
+
c.cassette_library_dir = 'spec/cassettes'
|
27
|
+
c.hook_into :webmock
|
28
|
+
c.filter_sensitive_data('<API_KEY>') do
|
29
|
+
URI.escape(test_api_key)
|
30
|
+
end
|
31
|
+
c.configure_rspec_metadata!
|
32
|
+
end
|
33
|
+
|
34
|
+
RSpec.configure do |c|
|
35
|
+
c.treat_symbols_as_metadata_keys_with_true_values = true
|
36
|
+
end
|
37
|
+
|
38
|
+
def stub_post(url)
|
39
|
+
stub_request(:post, map_quest_direction_url(url))
|
40
|
+
end
|
41
|
+
|
42
|
+
def map_quest_direction_url(url)
|
43
|
+
"http://www.mapquestapi.com/directions/v2/#{url}?key=#{test_api_key}"
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_api_key
|
47
|
+
ENV.fetch('MAP_QUEST_API_KEY', 'test_api_key')
|
48
|
+
end
|
49
|
+
|
50
|
+
def client
|
51
|
+
Azimuth.new(api_key: test_api_key)
|
52
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
shared_examples 'an error' do |status_code, exception|
|
2
|
+
it "raising #{exception.name} when http status code is #{status_code}" do
|
3
|
+
VCR.turn_off!
|
4
|
+
|
5
|
+
endpoint = 'bigboombadaboum'
|
6
|
+
|
7
|
+
stub_post(endpoint).to_return(
|
8
|
+
body: { info: { statuscode: status_code, messages: ['error'] } }.to_json,
|
9
|
+
)
|
10
|
+
|
11
|
+
expect { client.post(endpoint) }.to raise_error(exception, 'error')
|
12
|
+
|
13
|
+
VCR.turn_on!
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
shared_examples 'a route matrix request' do
|
2
|
+
let(:locations) do
|
3
|
+
['48.843079, 2.314442', '48.869061, 2.383329', '49.000000, 2.300000']
|
4
|
+
end
|
5
|
+
|
6
|
+
let(:route_matrix_result) { client.route_matrix(locations) }
|
7
|
+
|
8
|
+
it 'returns locations distances to destination' do
|
9
|
+
route_matrix_result.each do |location|
|
10
|
+
expect(location.distance).not_to be_nil
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'returns locations driving times to destination' do
|
15
|
+
route_matrix_result.each do |location|
|
16
|
+
expect(location.time).not_to be_nil
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'returns locations coordinates' do
|
21
|
+
route_matrix_result.each do |location|
|
22
|
+
expect(location.latitude).not_to be_nil
|
23
|
+
expect(location.longitude).not_to be_nil
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,170 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: azimuth
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Aylic Petit
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-01-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.8.9
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.8.9
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faraday_middleware
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.9.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.9.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: hashie
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.0.5
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.0.5
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: json
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.8.1
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.8.1
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: multi_json
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.8.4
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.8.4
|
97
|
+
description: Simple Ruby wrapper for the MapQuest Direction API.
|
98
|
+
email:
|
99
|
+
- sush@users.noreply.github.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".yardopts"
|
105
|
+
- CONTRIBUTING.md
|
106
|
+
- LICENSE
|
107
|
+
- README.md
|
108
|
+
- Rakefile
|
109
|
+
- azimuth.gemspec
|
110
|
+
- lib/azimuth.rb
|
111
|
+
- lib/azimuth/client.rb
|
112
|
+
- lib/azimuth/client/route_matrix.rb
|
113
|
+
- lib/azimuth/configuration.rb
|
114
|
+
- lib/azimuth/connection.rb
|
115
|
+
- lib/azimuth/error.rb
|
116
|
+
- lib/azimuth/request.rb
|
117
|
+
- lib/azimuth/response/raise_error.rb
|
118
|
+
- lib/azimuth/version.rb
|
119
|
+
- spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/behaves_like_a_route_matrix_request/returns_locations_coordinates.yml
|
120
|
+
- spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/behaves_like_a_route_matrix_request/returns_locations_distances_to_destination.yml
|
121
|
+
- spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/behaves_like_a_route_matrix_request/returns_locations_driving_times_to_destination.yml
|
122
|
+
- spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/with_all_to_all_options/it_returns_destination_informations.yml
|
123
|
+
- spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/with_many_to_one_options/does_not_return_destination_informations.yml
|
124
|
+
- spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/with_no_optionnal_options/does_not_return_destination_informations.yml
|
125
|
+
- spec/lib/azimuth/client/route_matrix_spec.rb
|
126
|
+
- spec/lib/azimuth/client_spec.rb
|
127
|
+
- spec/lib/azimuth/request_spec.rb
|
128
|
+
- spec/lib/azimuth_spec.rb
|
129
|
+
- spec/spec_helper.rb
|
130
|
+
- spec/support/shared_examples/error.rb
|
131
|
+
- spec/support/shared_examples/route_matrix_request.rb
|
132
|
+
homepage: https://github.com/sush/azimuth
|
133
|
+
licenses:
|
134
|
+
- MIT
|
135
|
+
metadata: {}
|
136
|
+
post_install_message:
|
137
|
+
rdoc_options: []
|
138
|
+
require_paths:
|
139
|
+
- lib
|
140
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 1.9.2
|
145
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
|
+
requirements:
|
147
|
+
- - ">="
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
requirements: []
|
151
|
+
rubyforge_project:
|
152
|
+
rubygems_version: 2.2.0
|
153
|
+
signing_key:
|
154
|
+
specification_version: 4
|
155
|
+
summary: MapQuest Direction API Ruby wrapper
|
156
|
+
test_files:
|
157
|
+
- spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/behaves_like_a_route_matrix_request/returns_locations_coordinates.yml
|
158
|
+
- spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/behaves_like_a_route_matrix_request/returns_locations_distances_to_destination.yml
|
159
|
+
- spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/behaves_like_a_route_matrix_request/returns_locations_driving_times_to_destination.yml
|
160
|
+
- spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/with_all_to_all_options/it_returns_destination_informations.yml
|
161
|
+
- spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/with_many_to_one_options/does_not_return_destination_informations.yml
|
162
|
+
- spec/cassettes/Azimuth_Client_RouteMatrix/_route_matrix/with_no_optionnal_options/does_not_return_destination_informations.yml
|
163
|
+
- spec/lib/azimuth/client/route_matrix_spec.rb
|
164
|
+
- spec/lib/azimuth/client_spec.rb
|
165
|
+
- spec/lib/azimuth/request_spec.rb
|
166
|
+
- spec/lib/azimuth_spec.rb
|
167
|
+
- spec/spec_helper.rb
|
168
|
+
- spec/support/shared_examples/error.rb
|
169
|
+
- spec/support/shared_examples/route_matrix_request.rb
|
170
|
+
has_rdoc:
|