simple-trail 0.2.3 → 0.2.5
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 +2 -2
- data/simple-trail.gemspec +1 -1
- data/spec/manipulation/enricher_spec.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31e1ae2c7eae42ebfc12025e5d2aad3694211d63adc83afecd16e8f56ced84dc
|
4
|
+
data.tar.gz: 302d051c4761b2330b504b1b3f6f258078f2affba3e343fa2bd80fc634dfd88e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60389e48d5b20f1ae913fdf2ff45466ca01af63c81476c93d9f8899ae1a43f1b792545f5043782966ec339887494f8a425a28a9229f6dccf5f8c3451220abe36
|
7
|
+
data.tar.gz: 06d43df7c91a0b58f23afd7196583bb1f855adfe2931d606167180dab7cd7d6ef5ffa7b52858aedd72424379efcf9e69bae853e203c901f56cf679ddc453e83e
|
@@ -84,8 +84,8 @@ module Manipulation
|
|
84
84
|
end
|
85
85
|
|
86
86
|
def find_and_enrich_first_occurence(i)
|
87
|
-
index = @points.find_index{|point| point[:total_distance] + @offset > i}
|
88
|
-
@points[index].merge!(label: i)
|
87
|
+
index = @points.find_index{|point| point[:total_distance] + @offset.to_f > i}
|
88
|
+
@points[index].merge!(label: i) if index
|
89
89
|
end
|
90
90
|
|
91
91
|
def calculate_distance(loc1, loc2)
|
data/simple-trail.gemspec
CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = 'simple-trail'
|
8
|
-
s.version = '0.2.
|
8
|
+
s.version = '0.2.5'
|
9
9
|
s.date = '2020-08-03'
|
10
10
|
s.summary = 'Readind and manipulating GPX and other trail representation file'
|
11
11
|
s.description = 'Optimazing and manipulating GPX file data. For my private purposes mostly'
|
@@ -47,6 +47,8 @@ RSpec.describe Manipulation::Enricher do
|
|
47
47
|
labels = enrichement_logic.enriched_points.map{|h| h[:label]}.compact.uniq
|
48
48
|
expect(labels.size).to eq 506
|
49
49
|
expect(labels.include?(1)).to be(true)
|
50
|
+
expect(labels.include?(506)).to be(true)
|
51
|
+
expect(labels.include?(507)).to be(false)
|
50
52
|
expect(labels.include?(535)).to be(false)
|
51
53
|
end
|
52
54
|
|
@@ -59,6 +61,8 @@ RSpec.describe Manipulation::Enricher do
|
|
59
61
|
labels = enrichement_logic.enriched_points.map{|h| h[:label]}.compact.uniq
|
60
62
|
expect(labels.size).to eq 506
|
61
63
|
expect(labels.include?(1)).to be(false)
|
62
|
-
expect(labels.include?(
|
64
|
+
expect(labels.include?(50)).to be(false)
|
65
|
+
expect(labels.include?(51)).to be(true)
|
66
|
+
expect(labels.include?(556)).to be(true)
|
63
67
|
end
|
64
68
|
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.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Staszek Zawadzki
|
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
|
-
rubygems_version: 3.
|
147
|
+
rubygems_version: 3.3.7
|
148
148
|
signing_key:
|
149
149
|
specification_version: 4
|
150
150
|
summary: Readind and manipulating GPX and other trail representation file
|