where_was_i 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: af13af41cb05d18d3084de41b04c6876dccffbe5
4
- data.tar.gz: 3aa33bfa697733a7ed454e882797c4cd52e747c8
3
+ metadata.gz: 242a6d7f16a48047d488d96ffb165e30a52d3d1a
4
+ data.tar.gz: 952cfde8ff571f5323f914a8eecf4d37927444d3
5
5
  SHA512:
6
- metadata.gz: 282b3e85109110fd42920f84c7b37763995a879e1a6b7729745e41ce64ef569556d7c43d83fee7c011aac7704d382ab5c33f1322727643b9a080376dba89d58e
7
- data.tar.gz: 381154a92ce76bb626110d56768fb2a7250402c2069d4b1a84e812c0956dfe59cdc4a899c65f1cfe9a8e9508378f2b265abe410d88723b854df1e3f13d773c42
6
+ metadata.gz: 1cdd173cb330480fdc69cd0f1cf8edd0d30c84288e03ffc8f30b2dcc9d351679a12a3aa5f9fa9c8bd568800ad5bc04f258715f5c261d32ff0b787bdbe55bc3bf
7
+ data.tar.gz: 3f167b0d85647d7a767111abef7be5fd859bef15a492401540a346a60eaa086f4c5b9a1142b7f5acb84dc48b1ff2468f0bdede7ee5498357249062fc16169294
@@ -4,7 +4,7 @@ module WhereWasI
4
4
 
5
5
  # Use a GPX file as a data source for location inferences.
6
6
  class Gpx
7
- attr_reader :tracks, :intersegment_behavior
7
+ attr_reader :intersegment_behavior
8
8
 
9
9
  Infinity = 1.0/0
10
10
 
@@ -36,6 +36,11 @@ module WhereWasI
36
36
  @tracks_added = false
37
37
  end
38
38
 
39
+ def tracks
40
+ add_tracks if ! @tracks_added
41
+ @tracks
42
+ end
43
+
39
44
  # extract track data from gpx data
40
45
  #
41
46
  # it's not necessary to call this directly
@@ -19,6 +19,12 @@ module WhereWasI
19
19
  @points = {}
20
20
  end
21
21
 
22
+ def points
23
+ @points.map do |time,location|
24
+ self.class.array_to_hash(location)
25
+ end
26
+ end
27
+
22
28
  # add a point to the track
23
29
  #
24
30
  # @param [Float] lat latitude
@@ -1,3 +1,3 @@
1
1
  module WhereWasI
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/where_was_i.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["alex@crackpot.org"]
11
11
  spec.summary = %q{Infer where you were using a GPX data file.}
12
12
  spec.description = %q{Given a GPX file and a time reference, return a location.}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/alexdean/where_was_i"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: where_was_i
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Dean
@@ -187,7 +187,7 @@ files:
187
187
  - spec/lib/where_was_i/track_spec.rb
188
188
  - spec/spec_helper.rb
189
189
  - where_was_i.gemspec
190
- homepage: ''
190
+ homepage: https://github.com/alexdean/where_was_i
191
191
  licenses:
192
192
  - MIT
193
193
  metadata: {}