simple-trail 0.0.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple_trail/manipulation/enricher.rb +98 -0
- data/lib/simple_trail/manipulation/straightener.rb +6 -5
- data/lib/simple_trail/parser/gpx.rb +7 -1
- data/lib/simple_trail.rb +1 -0
- data/simple-trail.gemspec +1 -1
- data/spec/examples/gss20-full-official.gpx +44524 -0
- data/spec/examples/pois.gpx +2 -0
- data/spec/examples/zyleta2021.gpx +3894 -0
- data/spec/manipulation/enricher_spec.rb +38 -0
- data/spec/parser/gpx_poi_spec.rb +9 -0
- metadata +12 -1
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe Manipulation::Enricher do
|
6
|
+
it 'nothing to enrich' do
|
7
|
+
parser = Parser::Gpx.new('./spec/examples/test_1.gpx')
|
8
|
+
parser.read
|
9
|
+
|
10
|
+
point_count = parser.points.count
|
11
|
+
enrichement_logic = described_class.new(parser.points)
|
12
|
+
enrichement_logic.enrich
|
13
|
+
|
14
|
+
expect(enrichement_logic.enriched_points.count).to eq point_count
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'something to enrich' do
|
18
|
+
parser = Parser::Gpx.new('./spec/examples/zyleta2021.gpx')
|
19
|
+
parser.read
|
20
|
+
|
21
|
+
point_count = parser.points.count
|
22
|
+
enrichement_logic = described_class.new(parser.points)
|
23
|
+
enrichement_logic.enrich
|
24
|
+
|
25
|
+
expect(enrichement_logic.enriched_points.count).not_to eq point_count
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'something more to enrich' do
|
29
|
+
parser = Parser::Gpx.new('./spec/examples/gss20-full-official.gpx')
|
30
|
+
parser.read
|
31
|
+
|
32
|
+
point_count = parser.points.count
|
33
|
+
enrichement_logic = described_class.new(parser.points, 0.1)
|
34
|
+
enrichement_logic.enrich
|
35
|
+
|
36
|
+
expect(enrichement_logic.enriched_points.count).not_to eq point_count
|
37
|
+
end
|
38
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple-trail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Staszek Zawadzki
|
@@ -76,12 +76,15 @@ files:
|
|
76
76
|
- README.md
|
77
77
|
- install.sh
|
78
78
|
- lib/simple_trail.rb
|
79
|
+
- lib/simple_trail/manipulation/enricher.rb
|
79
80
|
- lib/simple_trail/manipulation/statistics.rb
|
80
81
|
- lib/simple_trail/manipulation/straightener.rb
|
81
82
|
- lib/simple_trail/manipulation/unifier.rb
|
82
83
|
- lib/simple_trail/parser/gpx.rb
|
83
84
|
- simple-trail.gemspec
|
85
|
+
- spec/examples/gss20-full-official.gpx
|
84
86
|
- spec/examples/kbl.gpx
|
87
|
+
- spec/examples/pois.gpx
|
85
88
|
- spec/examples/test-xxl.gpx
|
86
89
|
- spec/examples/test_1.gpx
|
87
90
|
- spec/examples/test_10.gpx
|
@@ -96,9 +99,12 @@ files:
|
|
96
99
|
- spec/examples/test_8.gpx
|
97
100
|
- spec/examples/test_9.gpx
|
98
101
|
- spec/examples/test_with_segments.gpx
|
102
|
+
- spec/examples/zyleta2021.gpx
|
103
|
+
- spec/manipulation/enricher_spec.rb
|
99
104
|
- spec/manipulation/statistics_spec.rb
|
100
105
|
- spec/manipulation/straightener_spec.rb
|
101
106
|
- spec/manipulation/unifier_spec.rb
|
107
|
+
- spec/parser/gpx_poi_spec.rb
|
102
108
|
- spec/parser/gpx_spec.rb
|
103
109
|
- spec/spec_helper.rb
|
104
110
|
homepage:
|
@@ -125,7 +131,9 @@ signing_key:
|
|
125
131
|
specification_version: 4
|
126
132
|
summary: Readind and manipulating GPX and other trail representation file
|
127
133
|
test_files:
|
134
|
+
- spec/examples/gss20-full-official.gpx
|
128
135
|
- spec/examples/kbl.gpx
|
136
|
+
- spec/examples/pois.gpx
|
129
137
|
- spec/examples/test-xxl.gpx
|
130
138
|
- spec/examples/test_1.gpx
|
131
139
|
- spec/examples/test_10.gpx
|
@@ -140,8 +148,11 @@ test_files:
|
|
140
148
|
- spec/examples/test_8.gpx
|
141
149
|
- spec/examples/test_9.gpx
|
142
150
|
- spec/examples/test_with_segments.gpx
|
151
|
+
- spec/examples/zyleta2021.gpx
|
152
|
+
- spec/manipulation/enricher_spec.rb
|
143
153
|
- spec/manipulation/statistics_spec.rb
|
144
154
|
- spec/manipulation/straightener_spec.rb
|
145
155
|
- spec/manipulation/unifier_spec.rb
|
156
|
+
- spec/parser/gpx_poi_spec.rb
|
146
157
|
- spec/parser/gpx_spec.rb
|
147
158
|
- spec/spec_helper.rb
|