simple-trail 0.2.2 → 0.2.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
  SHA256:
3
- metadata.gz: 1764e72de880503bf6d9493359b9c5af1ce9e6e41de6521f38664c1523f50aaf
4
- data.tar.gz: 35e92389256eccfffd647cec6a24ec48cfb7fd132ed52150b59f1ffcd5f705fc
3
+ metadata.gz: c68514bf45dc7a1fc4634824e82aa55a0aae93b1551dcd0b4627b8fe81e4cdb7
4
+ data.tar.gz: fb790e381f48edf24b1fe03fafdaef9bc20ebffc6c4adc002501d4e04c9d42df
5
5
  SHA512:
6
- metadata.gz: f78e80884cb5140bd48ee9705e02eb4110c3af7ef209c16349e231e1906b110e9da3390966e4aa51b6981b23f5957f0804f127f5a31ed0bc6ec51edbb9906d73
7
- data.tar.gz: 92eb3802ea53ac97d626fd383eb98cd5c2111d5e29640ca9e3d29bba4fc001f1d4be6c1a8ec25538cb0d40c46f9285c8c385304206682afd173186c7f5f5cc5a
6
+ metadata.gz: 38045830ba9d6449b43b9eea10bd6dd206b4f1d2279f9b81927fc604f0022be0f850c0299f5849f43520a8b54ef403abe4cace57863a978d5bfea4d2abaa69d9
7
+ data.tar.gz: d29501cca5752bf6c0c1baa34ee8e6a3d9131ed54fc78a6171be209bc984c8fb08f3a6e4fca277a2f98a57174d2c6fdd397c609c3fad26f97f3520f10cf6246c
data/build.sh ADDED
@@ -0,0 +1 @@
1
+ gem build *.gemspec -o pkg/simple-trail.gem
@@ -76,7 +76,7 @@ module Manipulation
76
76
 
77
77
  def add_km_markers
78
78
  total_distance = @points[-1][:total_distance].floor - 1
79
- start_v = @offset.ceil
79
+ start_v = @offset.to_f.ceil
80
80
 
81
81
  (start_v..start_v+total_distance).each do |i|
82
82
  find_and_enrich_first_occurence(i+1)
@@ -84,7 +84,7 @@ 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}
87
+ index = @points.find_index{|point| point[:total_distance] + @offset.to_f > i}
88
88
  @points[index].merge!(label: i)
89
89
  end
90
90
 
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.2'
8
+ s.version = '0.2.4'
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'
@@ -46,8 +46,8 @@ RSpec.describe Manipulation::Enricher do
46
46
 
47
47
  labels = enrichement_logic.enriched_points.map{|h| h[:label]}.compact.uniq
48
48
  expect(labels.size).to eq 506
49
- expect(labels.include?('1')).to be(true)
50
- expect(labels.include?('535')).to be(false)
49
+ expect(labels.include?(1)).to be(true)
50
+ expect(labels.include?(535)).to be(false)
51
51
  end
52
52
 
53
53
  it 'adds labels with offset' do
@@ -58,7 +58,7 @@ RSpec.describe Manipulation::Enricher do
58
58
  enrichement_logic.enrich
59
59
  labels = enrichement_logic.enriched_points.map{|h| h[:label]}.compact.uniq
60
60
  expect(labels.size).to eq 506
61
- expect(labels.include?('1')).to be(false)
62
- expect(labels.include?('535')).to be(true)
61
+ expect(labels.include?(1)).to be(false)
62
+ expect(labels.include?(535)).to be(true)
63
63
  end
64
64
  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.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Staszek Zawadzki
@@ -88,6 +88,7 @@ extra_rdoc_files: []
88
88
  files:
89
89
  - ".rubocop.yml"
90
90
  - README.md
91
+ - build.sh
91
92
  - install.sh
92
93
  - lib/simple_trail.rb
93
94
  - lib/simple_trail/generator/gpx.rb