open_gpx_2_kml 1.0.2 → 1.0.3
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/Gemfile.lock
CHANGED
@@ -8,7 +8,7 @@ module TF1Converter
|
|
8
8
|
Dir.foreach(input_path) do |file|
|
9
9
|
if TF1Converter::Translation.can_translate?(file)
|
10
10
|
input = File.open("#{input_path}/#{file}", 'r')
|
11
|
-
outfile = file
|
11
|
+
outfile = translate_filename(file)
|
12
12
|
output = File.open("#{output_path}/#{outfile}", 'w')
|
13
13
|
TF1Converter::Translation.from(input).into(output)
|
14
14
|
end
|
@@ -18,5 +18,9 @@ module TF1Converter
|
|
18
18
|
File.delete(File.join(output_path, file)) if file =~ /\.kml$/
|
19
19
|
end
|
20
20
|
end
|
21
|
+
|
22
|
+
def self.translate_filename(file)
|
23
|
+
file.gsub(/\.(gpx|GPX)$/, '.kml')
|
24
|
+
end
|
21
25
|
end
|
22
26
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module TF1Converter
|
2
|
+
describe Environment do
|
3
|
+
describe '.translate_filename' do
|
4
|
+
it 'changes gpx files into kml files' do
|
5
|
+
Environment.translate_filename('somefile.gpx').should == 'somefile.kml'
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'changes BIG gpx files into kml' do
|
9
|
+
Environment.translate_filename('SOMEFILE.GPX').should == 'SOMEFILE.kml'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: open_gpx_2_kml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -235,6 +235,7 @@ files:
|
|
235
235
|
- spec/integration/harness_spec.rb
|
236
236
|
- spec/lib/tf1_converter/config_spec.rb
|
237
237
|
- spec/lib/tf1_converter/csv_file_spec.rb
|
238
|
+
- spec/lib/tf1_converter/environment_spec.rb
|
238
239
|
- spec/lib/tf1_converter/gpx/track_spec.rb
|
239
240
|
- spec/lib/tf1_converter/gpx/waypoint_spec.rb
|
240
241
|
- spec/lib/tf1_converter/kml/track_color_spec.rb
|
@@ -254,7 +255,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
254
255
|
version: '0'
|
255
256
|
segments:
|
256
257
|
- 0
|
257
|
-
hash: -
|
258
|
+
hash: -1250400582194875674
|
258
259
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
259
260
|
none: false
|
260
261
|
requirements:
|
@@ -263,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
263
264
|
version: '0'
|
264
265
|
segments:
|
265
266
|
- 0
|
266
|
-
hash: -
|
267
|
+
hash: -1250400582194875674
|
267
268
|
requirements: []
|
268
269
|
rubyforge_project:
|
269
270
|
rubygems_version: 1.8.23
|
@@ -316,6 +317,7 @@ test_files:
|
|
316
317
|
- spec/integration/harness_spec.rb
|
317
318
|
- spec/lib/tf1_converter/config_spec.rb
|
318
319
|
- spec/lib/tf1_converter/csv_file_spec.rb
|
320
|
+
- spec/lib/tf1_converter/environment_spec.rb
|
319
321
|
- spec/lib/tf1_converter/gpx/track_spec.rb
|
320
322
|
- spec/lib/tf1_converter/gpx/waypoint_spec.rb
|
321
323
|
- spec/lib/tf1_converter/kml/track_color_spec.rb
|