gpx_manipulator 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/gpx_manipulator.gemspec +2 -2
- data/lib/gpx_manipulator/track.rb +6 -2
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0db007fbc723d006bf83bb4c11c2487e11d5889206263caa6a93fee49c95a0e
|
4
|
+
data.tar.gz: 6bf074be414d3df574c0842750971ade5380c0a81531e9458adf36267d20f501
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 185abe67d540cf4c9528f8e3bd0213c853daf42882c55869249f82b70d8809e0186e9893a2bdecd9830c72a0d2ea7ea4c8f724b95d333b00d28adecc50579227
|
7
|
+
data.tar.gz: 9022a041426b8d845c62ff6bf30cd9786709eed23d4d7543f6847d1ffa58110af197bde96d17a9876bed8f13d40ac0bf8b6a38b516539d510982dc3a59d3ef63
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gpx_manipulator (0.
|
4
|
+
gpx_manipulator (0.2.0)
|
5
5
|
geokit (= 1.13)
|
6
6
|
gpx (= 1.0)
|
7
7
|
|
@@ -41,8 +41,8 @@ PLATFORMS
|
|
41
41
|
|
42
42
|
DEPENDENCIES
|
43
43
|
gpx_manipulator!
|
44
|
-
pry (
|
45
|
-
rspec (
|
44
|
+
pry (~> 0.13)
|
45
|
+
rspec (~> 3.9)
|
46
46
|
|
47
47
|
BUNDLED WITH
|
48
48
|
2.0.2
|
data/gpx_manipulator.gemspec
CHANGED
@@ -5,10 +5,10 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = 'gpx_manipulator'
|
8
|
-
s.version = '0.2.
|
8
|
+
s.version = '0.2.1'
|
9
9
|
s.date = '2020-04-15'
|
10
10
|
s.summary = 'Manipulating GPX file'
|
11
|
-
s.description = 'Optimazing and manipulating GPX file data. For my private purposes
|
11
|
+
s.description = 'Optimazing and manipulating GPX file data. For my private purposes'
|
12
12
|
s.authors = ['Staszek Zawadzki']
|
13
13
|
s.email = 'st.zawadzki@gmail.com'
|
14
14
|
|
@@ -13,12 +13,16 @@ class Track
|
|
13
13
|
@points ||= @track.points
|
14
14
|
end
|
15
15
|
|
16
|
+
def total_distance
|
17
|
+
@track.distance
|
18
|
+
end
|
19
|
+
|
16
20
|
def total_elevation_gain
|
17
21
|
sum = 0.0
|
18
22
|
pair_size = points.size - 1
|
19
23
|
|
20
24
|
pair_size.times do |i|
|
21
|
-
sum += ascent(points[i], points[i+1])
|
25
|
+
sum += ascent(points[i], points[i + 1])
|
22
26
|
end
|
23
27
|
sum.floor
|
24
28
|
end
|
@@ -33,7 +37,7 @@ class Track
|
|
33
37
|
end
|
34
38
|
|
35
39
|
def pt_per_km
|
36
|
-
(points.count /
|
40
|
+
(points.count / total_distance).round
|
37
41
|
end
|
38
42
|
|
39
43
|
def max_distance_from_the_start
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gpx_manipulator
|
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
|
- Staszek Zawadzki
|
@@ -66,8 +66,7 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.9'
|
69
|
-
description: Optimazing and manipulating GPX file data. For my private purposes
|
70
|
-
maybe you'll find it helpfull
|
69
|
+
description: Optimazing and manipulating GPX file data. For my private purposes
|
71
70
|
email: st.zawadzki@gmail.com
|
72
71
|
executables: []
|
73
72
|
extensions: []
|