teich-hrmparser 0.4.1 → 0.4.2

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.
data/CHANGELOG.txt CHANGED
@@ -1,3 +1,6 @@
1
+ 0.4.2 - May 9th, 2009
2
+ Fixed GPX to grab time from first trackpoint.
3
+
1
4
  0.4.1 - May 9th, 2009
2
5
  Added GPX support.
3
6
  NOTE: all workouts do NOT account for stopped time.
@@ -11,4 +14,4 @@
11
14
 
12
15
  0.2.3
13
16
  Now should keep lat and lng set to nil when they don't exist in garmin files.
14
-
17
+
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 1
2
+ :patch: 2
3
3
  :major: 0
4
4
  :minor: 4
@@ -7,7 +7,9 @@ module Importer
7
7
  def restore
8
8
  workout = HRMParser::Workout.new(:duration => 0)
9
9
  @xml = Hpricot::XML(@data)
10
- ttime = (@xml/:time).first.innerHTML
10
+
11
+ # Set the time based on first trackpoint. Seen an instance where the gpx begining time is wrong
12
+ ttime = (@xml/:trk/:trkpt/:time).first.innerHTML
11
13
  workout.time = Time.parse(ttime)
12
14
 
13
15
  trackpoints = []
@@ -58,7 +58,7 @@ module HRMParser
58
58
  data = File.read(filename)
59
59
  importer = Importer::GPX.new(:data => data)
60
60
  workout = importer.restore
61
- workout.time.should == Time.parse("Fri May 08 00:58:35 UTC 2009")
61
+ workout.time.should == Time.parse("Thu May 07 21:32:31 UTC 2009")
62
62
 
63
63
  # Duration is actualy less, but we don't account for stopped time right now
64
64
  workout.duration.should be_close(6382,1)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teich-hrmparser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oren Teich