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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 518f9ddcea094f55a14951e9a835f552f286acccde1cb2c7c9f03322bf9c9f7e
4
- data.tar.gz: 4d718ca75ba079f8d672361319d9fe34da1306394e8b231225c89c16dd10c72b
3
+ metadata.gz: e0db007fbc723d006bf83bb4c11c2487e11d5889206263caa6a93fee49c95a0e
4
+ data.tar.gz: 6bf074be414d3df574c0842750971ade5380c0a81531e9458adf36267d20f501
5
5
  SHA512:
6
- metadata.gz: db7df6ad3001342bfa2aff32f7e6e4d447d36725f24e7a6c5365ef403d2edc86142a2eba30e7ad64d926b9ee92d7429584cbd22ca6de6f5c2d9daba9a418b5de
7
- data.tar.gz: 4e35ad6e29701aab43a23a4e4614e0053a5ea526c8d0e0405f5a95ffaed95b6b359daf96cc02a6fef8786f65b5aa3eeaa090ce3a3ab88fdf5b16a46d2646ac8e
6
+ metadata.gz: 185abe67d540cf4c9528f8e3bd0213c853daf42882c55869249f82b70d8809e0186e9893a2bdecd9830c72a0d2ea7ea4c8f724b95d333b00d28adecc50579227
7
+ data.tar.gz: 9022a041426b8d845c62ff6bf30cd9786709eed23d4d7543f6847d1ffa58110af197bde96d17a9876bed8f13d40ac0bf8b6a38b516539d510982dc3a59d3ef63
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gpx_manipulator (0.1.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 (>= 0.13)
45
- rspec (>= 3.9)
44
+ pry (~> 0.13)
45
+ rspec (~> 3.9)
46
46
 
47
47
  BUNDLED WITH
48
48
  2.0.2
@@ -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.0'
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, but maybe you\'ll find it helpfull'
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 / @track.distance).round
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.0
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, but
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: []