gpx_kml 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13f65ff6210343e36ea2ac9d4dba526063b52acb79e53e0b9041396e5c7f60e8
4
- data.tar.gz: 20812205cf5a53b658bf7a5d4ea4ec389c3d535bdb6ea0f27e0bd06b9865998e
3
+ metadata.gz: 5e5baa68619d80fc2dcec2b53547d77f9ff648f0076234f71a306996385ba188
4
+ data.tar.gz: 410d597702b16c32d806377e973faac2a14349021a4bd72b9073eb0c3db2dbfb
5
5
  SHA512:
6
- metadata.gz: 35887d6a1c43fb454ec18d06e02c7dc9de8b0586eaff513d6f18540b52b19768d5c52332cc5d4c7f94085e404c0253ec66618421d7379eeb624db83340163e36
7
- data.tar.gz: d6d731ba24b088f7f6c35f19a8668a6384c85cba46f486455182457d79dabffd1ac289aafd74bc2d2113ecefcc41b1d19a4a491d068fa5a8d00ba5e1e4f42cb0
6
+ metadata.gz: 31cde7c4ffa0ebc533529bd0f7e84271b90bafb5a670257f1c412406a241c7dc9299af4c9a5545df0cf18d820a3d4e59c14b0e071f81831a6f791695cfc6af01
7
+ data.tar.gz: ac4f7ced1f59b887bdb8bd32b22be6a381d0e7fd09314cb803fbd29c034a4ef2c7124eca88b9fab846a363a527f13e6d029e400d8a3be95dda0ac7f95b06cd1f
data/CHANGELOG.md CHANGED
@@ -1,4 +1,6 @@
1
1
  ### V 0.1.x
2
+ - v 0.1.1:
3
+ - fixed critical bug on output file
2
4
  - v 0.1.0:
3
5
  - fixed changelog link in rubygems.org
4
6
  - removed .idea directory in the project
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gpx_kml (0.1.0)
4
+ gpx_kml (0.1.1)
5
5
  nokogiri (~> 1.12.0)
6
6
  rake (~> 12.0)
7
7
 
data/lib/converter.rb CHANGED
@@ -34,7 +34,7 @@ module CONVERTER
34
34
  end
35
35
  end
36
36
  name = "#{output_path}/#{Time.now.strftime('%Y%m%d%H%M%S')}_#{gpx.file_name[0..-5]}.kml"
37
- f = File.open("#{output_path}/#{name}", 'w')
37
+ f = File.open(name.to_s, 'w')
38
38
  f.write(kml.to_xml)
39
39
  f.close
40
40
  name
@@ -59,7 +59,7 @@ module CONVERTER
59
59
  end
60
60
  end
61
61
  name = "#{output_path}/#{Time.now.strftime('%Y%m%d%H%M%S')}_#{kml.file_name[0..-5]}.gpx"
62
- f = File.open("#{output_path}/#{name}", 'w')
62
+ f = File.open(name.to_s, 'w')
63
63
  f.write(gpx.to_xml)
64
64
  f.close
65
65
  name
@@ -138,8 +138,8 @@ module CONVERTER
138
138
  kml.points.each do |p|
139
139
  next if p.nil?
140
140
 
141
- xml.wpt('lat': "#{p.latitude}", 'lon': "#{p.longitude}") do
142
- xml.ele("#{p.elevation}") unless p.elevation.nil? || p.elevation.empty?
141
+ xml.wpt('lat': p.latitude.to_s, 'lon': p.longitude.to_s) do
142
+ xml.ele(p.elevation.to_s) unless p.elevation.nil? || p.elevation.empty?
143
143
  xml.name(p.name) unless p.name.nil? || p.name.empty?
144
144
  xml.desc("author = #{p.author}") unless p.author.nil? || p.author.empty?
145
145
  xml.link('href': p.link) unless p.link.nil? || p.link.empty?
@@ -160,8 +160,8 @@ module CONVERTER
160
160
  r.points.each do |p|
161
161
  next if p.nil?
162
162
 
163
- xml.rtept('lat': "#{p.latitude}", 'lon': "#{p.longitude}") do
164
- xml.ele("#{p.elevation}") unless p.elevation.nil? || p.elevation.empty?
163
+ xml.rtept('lat': p.latitude.to_s, 'lon': p.longitude.to_s) do
164
+ xml.ele(p.elevation.to_s) unless p.elevation.nil? || p.elevation.empty?
165
165
  xml.desc("author = #{p.author}") unless p.author.nil? || p.author.empty?
166
166
  xml.link('href': p.link) unless p.link.nil? || p.link.empty?
167
167
  end
@@ -184,8 +184,8 @@ module CONVERTER
184
184
  t.points.each do |p|
185
185
  next if p.nil?
186
186
 
187
- xml.trkpt('lat': "#{p.latitude}", 'lon': "#{p.longitude}") do
188
- xml.ele("#{p.elevation}") unless p.elevation.nil? || p.elevation.empty?
187
+ xml.trkpt('lat': p.latitude.to_s, 'lon': p.longitude.to_s) do
188
+ xml.ele(p.elevation.to_s) unless p.elevation.nil? || p.elevation.empty?
189
189
  xml.desc("author = #{p.author}") unless p.author.nil? || p.author.empty?
190
190
  xml.link('href': p.link) unless p.link.nil? || p.link.empty?
191
191
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GPXKML
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gpx_kml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angelo Terzi