tf1_converter 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2">
2
+ <Folder>
3
+ <Placemark>
4
+ <Placemark>
5
+ <Placemark>
6
+ <Placemark>
7
+ <Placemark>
8
+ <Placemark>
9
+ <Placemark>
10
+ <Placemark>
11
+ <Placemark>
12
+ <Placemark>
13
+ <Placemark>
14
+ <Placemark>
15
+ <Placemark>
16
+ <Placemark>
17
+ <Placemark>
18
+ </Folder>
19
+ <Folder>
20
+ <Style id="18-OCT-09_Style">
21
+ <Style id="ACTIVE LOG 001_Style">
22
+ <Style id="ACTIVE LOG 002_Style">
23
+ <Style id="ACTIVE LOG 003_Style">
24
+ <Style id="ACTIVE LOG 004_Style">
25
+ </Folder>
@@ -0,0 +1,34 @@
1
+ require_relative '../lib/tf1_converter/waypoint'
2
+
3
+ module TF1Converter
4
+
5
+ describe Waypoint do
6
+
7
+ it 'converts gpx to xml waypoints' do
8
+ gpx = %Q{
9
+ <wpt lat="38.9199972" lon="-92.2972443">
10
+ <ele>159.7036133</ele>
11
+ <name>001</name>
12
+ <cmt>18-OCT-09 2:17:38PM</cmt>
13
+ <desc>18-OCT-09 2:17:38PM</desc>
14
+ <sym>Custom 0</sym>
15
+ <extensions>
16
+ <gpxx:WaypointExtension xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
17
+ <gpxx:DisplayMode>SymbolAndName</gpxx:DisplayMode>
18
+ </gpxx:WaypointExtension>
19
+ </extensions>
20
+ </wpt>
21
+ }
22
+
23
+ waypoint = Waypoint.new(gpx)
24
+ kml = waypoint.to_xml
25
+ kml.should =~ /<name>001<\/name>/
26
+ kml.should =~ /<Snippet maxLines="0"/
27
+ kml.should =~ /<Style id="normalPlacemark">/
28
+ kml.should =~ /<coordinates>-92\.2972443,38\.9199972<\/coordinates>/
29
+ kml.should =~ /CDATA\[18-OCT-09 2:17:38PM<br>Search Start<br>KML file, tracking, and waypoint comment.<br>USNG: 15SWD6092208133<br>UTM: 15S 560921.64 4308133.45<br>/
30
+ end
31
+
32
+ end
33
+
34
+ end
@@ -0,0 +1,28 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'tf1_converter/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "tf1_converter"
8
+ gem.version = TF1Converter::VERSION
9
+ gem.authors = ["Ethan Vizitei"]
10
+ gem.email = ["ethan.vizitei@gmail.com"]
11
+ gem.description = %q{A GPX to KML converter for Missouri Task Force 1}
12
+ gem.summary = %q{A GPX to KML converter for Missouri Task Force 1}
13
+ gem.homepage = ""
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_development_dependency 'rake', '10.0.3'
21
+ gem.add_development_dependency 'rspec', '2.12.0'
22
+ gem.add_development_dependency 'pry', '0.9.11.4'
23
+
24
+ gem.add_dependency 'thor'
25
+ gem.add_dependency 'nokogiri'
26
+ gem.add_dependency 'builder'
27
+ gem.add_dependency 'geo_swap', '0.2.0'
28
+ end
metadata ADDED
@@ -0,0 +1,182 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tf1_converter
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Ethan Vizitei
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-02-14 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - '='
20
+ - !ruby/object:Gem::Version
21
+ version: 10.0.3
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - '='
28
+ - !ruby/object:Gem::Version
29
+ version: 10.0.3
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - '='
36
+ - !ruby/object:Gem::Version
37
+ version: 2.12.0
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - '='
44
+ - !ruby/object:Gem::Version
45
+ version: 2.12.0
46
+ - !ruby/object:Gem::Dependency
47
+ name: pry
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - '='
52
+ - !ruby/object:Gem::Version
53
+ version: 0.9.11.4
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.9.11.4
62
+ - !ruby/object:Gem::Dependency
63
+ name: thor
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: nokogiri
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: builder
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :runtime
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: geo_swap
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - '='
116
+ - !ruby/object:Gem::Version
117
+ version: 0.2.0
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - '='
124
+ - !ruby/object:Gem::Version
125
+ version: 0.2.0
126
+ description: A GPX to KML converter for Missouri Task Force 1
127
+ email:
128
+ - ethan.vizitei@gmail.com
129
+ executables: []
130
+ extensions: []
131
+ extra_rdoc_files: []
132
+ files:
133
+ - .gitignore
134
+ - .rbenv-version
135
+ - Gemfile
136
+ - Gemfile.lock
137
+ - Rakefile
138
+ - harness.rb
139
+ - input/test.gpx
140
+ - lib/tf1_converter.rb
141
+ - lib/tf1_converter/translation.rb
142
+ - lib/tf1_converter/version.rb
143
+ - lib/tf1_converter/waypoint.rb
144
+ - output/test.kml
145
+ - spec/fixtures/test.gpx
146
+ - spec/fixtures/test.kml
147
+ - spec/waypoint_spec.rb
148
+ - tf1_converter.gemspec
149
+ homepage: ''
150
+ licenses: []
151
+ post_install_message:
152
+ rdoc_options: []
153
+ require_paths:
154
+ - lib
155
+ required_ruby_version: !ruby/object:Gem::Requirement
156
+ none: false
157
+ requirements:
158
+ - - ! '>='
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ segments:
162
+ - 0
163
+ hash: 4230483580213494511
164
+ required_rubygems_version: !ruby/object:Gem::Requirement
165
+ none: false
166
+ requirements:
167
+ - - ! '>='
168
+ - !ruby/object:Gem::Version
169
+ version: '0'
170
+ segments:
171
+ - 0
172
+ hash: 4230483580213494511
173
+ requirements: []
174
+ rubyforge_project:
175
+ rubygems_version: 1.8.23
176
+ signing_key:
177
+ specification_version: 3
178
+ summary: A GPX to KML converter for Missouri Task Force 1
179
+ test_files:
180
+ - spec/fixtures/test.gpx
181
+ - spec/fixtures/test.kml
182
+ - spec/waypoint_spec.rb