routing 0.2.0 → 0.2.1
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.
@@ -77,4 +77,25 @@ describe Routing::Parser::HereSimple do
|
|
77
77
|
end
|
78
78
|
end
|
79
79
|
end
|
80
|
+
|
81
|
+
# The fixture used here shows a response from the Here routing service that contains rounding
|
82
|
+
# errors in the following fields:
|
83
|
+
# route[] > waypoint[] > mappedPosition > latitude/longitude
|
84
|
+
# route[] > leg[] > maneuver > position > latitude/longitude
|
85
|
+
#
|
86
|
+
# This two fields are supposed to be the same - yet, they sometimes differ in the 7th decimal place,
|
87
|
+
# which caused the parser to fail. This spec assures the parser still works.
|
88
|
+
context 'with a successful, but very large routing response that includes rounding errors' do
|
89
|
+
let(:response) { fixture('here/response_with_rounding_errors.json') }
|
90
|
+
let(:json_response) { JSON.parse(response) }
|
91
|
+
|
92
|
+
describe '#to_geo_points' do
|
93
|
+
subject { described_class.new(response).to_geo_points }
|
94
|
+
|
95
|
+
it 'returns geopoints' do
|
96
|
+
subject.each { |point| expect(point).to be_a(::Routing::GeoPoint) }
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
80
101
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: routing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Bäuerlein
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-06-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -112,6 +112,7 @@ files:
|
|
112
112
|
- routing.gemspec
|
113
113
|
- spec/fixtures/here/error_response.json
|
114
114
|
- spec/fixtures/here/response.json
|
115
|
+
- spec/fixtures/here/response_with_rounding_errors.json
|
115
116
|
- spec/fixtures/navteq/error_response.json
|
116
117
|
- spec/fixtures/navteq/response.json
|
117
118
|
- spec/routing/adapter/here_spec.rb
|
@@ -141,13 +142,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
142
|
version: '0'
|
142
143
|
requirements: []
|
143
144
|
rubyforge_project:
|
144
|
-
rubygems_version: 2.
|
145
|
+
rubygems_version: 2.4.6
|
145
146
|
signing_key:
|
146
147
|
specification_version: 4
|
147
148
|
summary: A ruby interface for route calculation services
|
148
149
|
test_files:
|
149
150
|
- spec/fixtures/here/error_response.json
|
150
151
|
- spec/fixtures/here/response.json
|
152
|
+
- spec/fixtures/here/response_with_rounding_errors.json
|
151
153
|
- spec/fixtures/navteq/error_response.json
|
152
154
|
- spec/fixtures/navteq/response.json
|
153
155
|
- spec/routing/adapter/here_spec.rb
|