tf1_converter 0.3.2 → 0.4.0

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.
@@ -0,0 +1,329 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <kml xmlns="http://www.opengis.net/kml/2.2">
3
+ <Document>
4
+ <open>1</open>
5
+ <Snippet maxLines="1"/>
6
+ <description><![CDATA[09-01-2008 12:00:00 PM<br/><br/>TF1 Converter Version 1.0<br/>MO Task Force 1<br/>]]></description>
7
+ <Style id="sn_noicon">
8
+ <IconStyle>
9
+ <Icon/>
10
+ </IconStyle>
11
+ </Style>
12
+ <Folder>
13
+ <name>Waypoints</name>
14
+ <Placemark>
15
+ <name>icon_name_1</name>
16
+ <Snippet maxLines="0"/>
17
+ <Style id="normalPlacemark">
18
+ <IconStyle>
19
+ <Icon>
20
+ <href>c:\program files\gpx2kml\icon\tf_ge\01.png</href>
21
+ </Icon>
22
+ </IconStyle>
23
+ </Style>
24
+ <description><![CDATA[18-OCT-09 2:17:38PM<br>Default<br>KML file, track, and waypoint comment.<br>USNG: 15S WD 60922 8133<br>UTM: 15S 560922mE 4308133mN<br>Lat/Long: 38.9199972/-92.2972443<br>c:\program files\gpx2kml\test - c:\program files\gpx2kml\test]]></description>
25
+ <Point>
26
+ <coordinates>-92.2972443,38.9199972</coordinates>
27
+ </Point>
28
+ </Placemark>
29
+ <Placemark>
30
+ <name>icon_name_3</name>
31
+ <Snippet maxLines="0"/>
32
+ <Style id="normalPlacemark">
33
+ <IconStyle>
34
+ <Icon>
35
+ <href>c:\program files\gpx2kml\icon\tf_ge\03.png</href>
36
+ </Icon>
37
+ </IconStyle>
38
+ </Style>
39
+ <description><![CDATA[18-OCT-09 2:18:07PM<br>Default<br>KML file, track, and waypoint comment.<br>USNG: 15S WD 60946 8109<br>UTM: 15S 560946mE 4308109mN<br>Lat/Long: 38.9197762/-92.2969611<br>c:\program files\gpx2kml\test - c:\program files\gpx2kml\test]]></description>
40
+ <Point>
41
+ <coordinates>-92.2969611,38.9197762</coordinates>
42
+ </Point>
43
+ </Placemark>
44
+ <Placemark>
45
+ <name>icon_name_4</name>
46
+ <Snippet maxLines="0"/>
47
+ <Style id="normalPlacemark">
48
+ <IconStyle>
49
+ <Icon>
50
+ <href>c:\program files\gpx2kml\icon\tf_ge\04.png</href>
51
+ </Icon>
52
+ </IconStyle>
53
+ </Style>
54
+ <description><![CDATA[18-OCT-09 2:18:36PM<br>Default<br>KML file, track, and waypoint comment.<br>USNG: 15S WD 60928 8079<br>UTM: 15S 560928mE 4308079mN<br>Lat/Long: 38.9195040/-92.2971813<br>c:\program files\gpx2kml\test - c:\program files\gpx2kml\test]]></description>
55
+ <Point>
56
+ <coordinates>-92.2971813,38.9195040</coordinates>
57
+ </Point>
58
+ </Placemark>
59
+ <Placemark>
60
+ <name>icon_name_11</name>
61
+ <Snippet maxLines="0"/>
62
+ <Style id="normalPlacemark">
63
+ <IconStyle>
64
+ <Icon>
65
+ <href>c:\program files\gpx2kml\icon\tf_ge\11.png</href>
66
+ </Icon>
67
+ </IconStyle>
68
+ </Style>
69
+ <description><![CDATA[18-OCT-09 2:19:49PM<br>Default<br>KML file, track, and waypoint comment.<br>USNG: 15S WD 60883 8039<br>UTM: 15S 560883mE 4308039mN<br>Lat/Long: 38.9191455/-92.2977024<br>c:\program files\gpx2kml\test - c:\program files\gpx2kml\test]]></description>
70
+ <Point>
71
+ <coordinates>-92.2977024,38.9191455</coordinates>
72
+ </Point>
73
+ </Placemark>
74
+ <Placemark>
75
+ <name>icon_name_18</name>
76
+ <Snippet maxLines="0"/>
77
+ <Style id="normalPlacemark">
78
+ <IconStyle>
79
+ <Icon>
80
+ <href>c:\program files\gpx2kml\icon\tf_ge\18.png</href>
81
+ </Icon>
82
+ </IconStyle>
83
+ </Style>
84
+ <description><![CDATA[18-OCT-09 2:20:33PM<br>Default<br>KML file, track, and waypoint comment.<br>USNG: 15S WD 60912 8043<br>UTM: 15S 560912mE 4308043mN<br>Lat/Long: 38.9191831/-92.2973642<br>c:\program files\gpx2kml\test - c:\program files\gpx2kml\test]]></description>
85
+ <Point>
86
+ <coordinates>-92.2973642,38.9191831</coordinates>
87
+ </Point>
88
+ </Placemark>
89
+ <Placemark>
90
+ <name>icon_name_15</name>
91
+ <Snippet maxLines="0"/>
92
+ <Style id="normalPlacemark">
93
+ <IconStyle>
94
+ <Icon>
95
+ <href>c:\program files\gpx2kml\icon\tf_ge\15.png</href>
96
+ </Icon>
97
+ </IconStyle>
98
+ </Style>
99
+ <description><![CDATA[18-OCT-09 2:21:40PM<br>Default<br>KML file, track, and waypoint comment.<br>USNG: 15S WD 60966 8093<br>UTM: 15S 560966mE 4308093mN<br>Lat/Long: 38.9196337/-92.2967348<br>c:\program files\gpx2kml\test - c:\program files\gpx2kml\test]]></description>
100
+ <Point>
101
+ <coordinates>-92.2967348,38.9196337</coordinates>
102
+ </Point>
103
+ </Placemark>
104
+ <Placemark>
105
+ <name>icon_name_13</name>
106
+ <Snippet maxLines="0"/>
107
+ <Style id="normalPlacemark">
108
+ <IconStyle>
109
+ <Icon>
110
+ <href>c:\program files\gpx2kml\icon\tf_ge\13.png</href>
111
+ </Icon>
112
+ </IconStyle>
113
+ </Style>
114
+ <description><![CDATA[18-OCT-09 2:22:29PM<br>Default<br>KML file, track, and waypoint comment.<br>USNG: 15S WD 61002 8066<br>UTM: 15S 561002mE 4308066mN<br>Lat/Long: 38.9193832/-92.2963225<br>c:\program files\gpx2kml\test - c:\program files\gpx2kml\test]]></description>
115
+ <Point>
116
+ <coordinates>-92.2963225,38.9193832</coordinates>
117
+ </Point>
118
+ </Placemark>
119
+ <Placemark>
120
+ <name>icon_name_14</name>
121
+ <Snippet maxLines="0"/>
122
+ <Style id="normalPlacemark">
123
+ <IconStyle>
124
+ <Icon>
125
+ <href>c:\program files\gpx2kml\icon\tf_ge\14.png</href>
126
+ </Icon>
127
+ </IconStyle>
128
+ </Style>
129
+ <description><![CDATA[18-OCT-09 2:23:14PM<br>Default<br>KML file, track, and waypoint comment.<br>USNG: 15S WD 61033 8055<br>UTM: 15S 561033mE 4308055mN<br>Lat/Long: 38.9192829/-92.2959630<br>c:\program files\gpx2kml\test - c:\program files\gpx2kml\test]]></description>
130
+ <Point>
131
+ <coordinates>-92.2959630,38.9192829</coordinates>
132
+ </Point>
133
+ </Placemark>
134
+ <Placemark>
135
+ <name>icon_name_19</name>
136
+ <Snippet maxLines="0"/>
137
+ <Style id="normalPlacemark">
138
+ <IconStyle>
139
+ <Icon>
140
+ <href>c:\program files\gpx2kml\icon\tf_ge\19.png</href>
141
+ </Icon>
142
+ </IconStyle>
143
+ </Style>
144
+ <description><![CDATA[18-OCT-09 2:24:06PM<br>Default<br>KML file, track, and waypoint comment.<br>USNG: 15S WD 60985 8098<br>UTM: 15S 560985mE 4308098mN<br>Lat/Long: 38.9196773/-92.2965171<br>c:\program files\gpx2kml\test - c:\program files\gpx2kml\test]]></description>
145
+ <Point>
146
+ <coordinates>-92.2965171,38.9196773</coordinates>
147
+ </Point>
148
+ </Placemark>
149
+ <Placemark>
150
+ <name>icon_name_16</name>
151
+ <Snippet maxLines="0"/>
152
+ <Style id="normalPlacemark">
153
+ <IconStyle>
154
+ <Icon>
155
+ <href>c:\program files\gpx2kml\icon\tf_ge\16.png</href>
156
+ </Icon>
157
+ </IconStyle>
158
+ </Style>
159
+ <description><![CDATA[18-OCT-09 2:25:24PM<br>Default<br>KML file, track, and waypoint comment.<br>USNG: 15S WD 60909 8156<br>UTM: 15S 560909mE 4308156mN<br>Lat/Long: 38.9202020/-92.2973907<br>c:\program files\gpx2kml\test - c:\program files\gpx2kml\test]]></description>
160
+ <Point>
161
+ <coordinates>-92.2973907,38.9202020</coordinates>
162
+ </Point>
163
+ </Placemark>
164
+ <Placemark>
165
+ <name>icon_name_21</name>
166
+ <Snippet maxLines="0"/>
167
+ <Style id="normalPlacemark">
168
+ <IconStyle>
169
+ <Icon>
170
+ <href>c:\program files\gpx2kml\icon\tf_ge\21.png</href>
171
+ </Icon>
172
+ </IconStyle>
173
+ </Style>
174
+ <description><![CDATA[18-OCT-09 2:26:20PM<br>Default<br>KML file, track, and waypoint comment.<br>USNG: 15S WD 60918 8213<br>UTM: 15S 560918mE 4308213mN<br>Lat/Long: 38.9207150/-92.2972759<br>c:\program files\gpx2kml\test - c:\program files\gpx2kml\test]]></description>
175
+ <Point>
176
+ <coordinates>-92.2972759,38.9207150</coordinates>
177
+ </Point>
178
+ </Placemark>
179
+ <Placemark>
180
+ <name>icon_name_22</name>
181
+ <Snippet maxLines="0"/>
182
+ <Style id="normalPlacemark">
183
+ <IconStyle>
184
+ <Icon>
185
+ <href>c:\program files\gpx2kml\icon\tf_ge\22.png</href>
186
+ </Icon>
187
+ </IconStyle>
188
+ </Style>
189
+ <description><![CDATA[18-OCT-09 2:26:40PM<br>Default<br>KML file, track, and waypoint comment.<br>USNG: 15S WD 60902 8223<br>UTM: 15S 560902mE 4308223mN<br>Lat/Long: 38.9208083/-92.2974574<br>c:\program files\gpx2kml\test - c:\program files\gpx2kml\test]]></description>
190
+ <Point>
191
+ <coordinates>-92.2974574,38.9208083</coordinates>
192
+ </Point>
193
+ </Placemark>
194
+ <Placemark>
195
+ <name>icon_name_23</name>
196
+ <Snippet maxLines="0"/>
197
+ <Style id="normalPlacemark">
198
+ <IconStyle>
199
+ <Icon>
200
+ <href>c:\program files\gpx2kml\icon\tf_ge\23.png</href>
201
+ </Icon>
202
+ </IconStyle>
203
+ </Style>
204
+ <description><![CDATA[18-OCT-09 2:27:10PM<br>Default<br>KML file, track, and waypoint comment.<br>USNG: 15S WD 60880 8191<br>UTM: 15S 560880mE 4308191mN<br>Lat/Long: 38.9205154/-92.2977240<br>c:\program files\gpx2kml\test - c:\program files\gpx2kml\test]]></description>
205
+ <Point>
206
+ <coordinates>-92.2977240,38.9205154</coordinates>
207
+ </Point>
208
+ </Placemark>
209
+ <Placemark>
210
+ <name>icon_name_2</name>
211
+ <Snippet maxLines="0"/>
212
+ <Style id="normalPlacemark">
213
+ <IconStyle>
214
+ <Icon>
215
+ <href>c:\program files\gpx2kml\icon\tf_ge\02.png</href>
216
+ </Icon>
217
+ </IconStyle>
218
+ </Style>
219
+ <description><![CDATA[18-OCT-09 2:29:16PM<br>Default<br>KML file, track, and waypoint comment.<br>USNG: 15S WD 60822 8145<br>UTM: 15S 560822mE 4308145mN<br>Lat/Long: 38.9201116/-92.2983951<br>c:\program files\gpx2kml\test - c:\program files\gpx2kml\test]]></description>
220
+ <Point>
221
+ <coordinates>-92.2983951,38.9201116</coordinates>
222
+ </Point>
223
+ </Placemark>
224
+ <Placemark>
225
+ <name>icon_name_20</name>
226
+ <Snippet maxLines="0"/>
227
+ <Style id="normalPlacemark">
228
+ <IconStyle>
229
+ <Icon>
230
+ <href>c:\program files\gpx2kml\icon\tf_ge\20.png</href>
231
+ </Icon>
232
+ </IconStyle>
233
+ </Style>
234
+ <description><![CDATA[Weber Home<br>Default<br>KML file, track, and waypoint comment.<br>USNG: 15S WD 60826 8138<br>UTM: 15S 560826mE 4308138mN<br>Lat/Long: 38.9200473/-92.2983507<br>c:\program files\gpx2kml\test - c:\program files\gpx2kml\test]]></description>
235
+ <Point>
236
+ <coordinates>-92.2983507,38.9200473</coordinates>
237
+ </Point>
238
+ </Placemark>
239
+ </Folder>
240
+ <Folder>
241
+ <name>Tracks</name>
242
+ <Style id="18-OCT-09_Style">
243
+ <LineStyle>
244
+ <color>f0000080</color>
245
+ <width>3</width>
246
+ </LineStyle>
247
+ </Style>
248
+ <Placemark id="18-OCT-09">
249
+ <name>18-OCT-09</name>
250
+ <description><![CDATA[KML file, track, and waypoint comment.]]></description>
251
+ <styleUrl>#18-OCT-09_Style</styleUrl>
252
+ <LineString>
253
+ <extrude>1</extrude>
254
+ <tessellate>1</tessellate>
255
+ <altitudeMode>clampedToGround</altitudeMode>
256
+ <coordinates>-92.2974500,38.9192166,0 -92.2974480,38.9192131,0 -92.2974491,38.9192131,0 -92.2974498,38.9192121,0 -92.2974481,38.9192053,0 -92.2974619,38.9191897,0 -92.2975066,38.9191654,0 -92.2975411,38.9191634,0 -92.2975676,38.9191661,0 -92.2977170,38.9191401,0 -92.2977401,38.9190596,0 -92.2977100,38.9190338,0 -92.2976056,38.9190399,0 -92.2975292,38.9190577,0 -92.2974253,38.9191198,0 -92.2973117,38.9192653,0 -92.2971953,38.9193899,0 -92.2970750,38.9195301,0 -92.2969539,38.9196197,0 -92.2968409,38.9196836,0 -92.2968185,38.9196751,0 -92.2966788,38.9195942,0 -92.2965691,38.9195161,0 -92.2964531,38.9194482,0 -92.2963269,38.9193805,0 -92.2963000,38.9193815,0 -92.2961640,38.9192872,0 -92.2960841,38.9192231,0 -92.2960546,38.9192064,0 -92.2959645,38.9193209,0 -92.2960287,38.9193560,0 -92.2960931,38.9193992,0 -92.2961377,38.9194369,0 -92.2962814,38.9195250,0 -92.2962871,38.9195328,0 -92.2963490,38.9195311,0 -92.2963994,38.9195736,0 -92.2964627,38.9196379,0 -92.2964759,38.9196596,0 -92.2966064,38.9197274,0 -92.2968050,38.9198301,0 -92.2968177,38.9198532,0 -92.2968948,38.9199238,0 -92.2969240,38.9199364,0 -92.2969881,38.9199673,0 -92.2971074,38.9200326,0 -92.2971658,38.9200600,0 -92.2972693,38.9201327,0 -92.2974267,38.9202471,0 -92.2973874,38.9203061,0 -92.2973550,38.9204382,0 -92.2972989,38.9206033,0 -92.2972725,38.9207438,0 -92.2972764,38.9207743,0 -92.2974020,38.9208257,0 -92.2974725,38.9207973,0 -92.2976285,38.9206118,0 -92.2977527,38.9204926,0 -92.2979666,38.9202957,0 -92.2981386,38.9201607,0 -92.2982495,38.9200683,0 -92.2982619,38.9200570,0 -92.2983682,38.9200564,0 -92.2983768,38.9200948,0 -92.2983971,38.9201153,0 -92.2983873,38.9201652,0</coordinates>
257
+ </LineString>
258
+ </Placemark>
259
+ <Style id="ACTIVE LOG 001_Style">
260
+ <LineStyle>
261
+ <color>f000ffff</color>
262
+ <width>3</width>
263
+ </LineStyle>
264
+ </Style>
265
+ <Placemark id="ACTIVE LOG 001">
266
+ <name>ACTIVE LOG 001</name>
267
+ <description><![CDATA[KML file, track, and waypoint comment.]]></description>
268
+ <styleUrl>#ACTIVE LOG 001_Style</styleUrl>
269
+ <LineString>
270
+ <extrude>1</extrude>
271
+ <tessellate>1</tessellate>
272
+ <altitudeMode>clampedToGround</altitudeMode>
273
+ <coordinates>-92.2974500,38.9192166,0</coordinates>
274
+ </LineString>
275
+ </Placemark>
276
+ <Style id="ACTIVE LOG 002_Style">
277
+ <LineStyle>
278
+ <color>f000ffff</color>
279
+ <width>3</width>
280
+ </LineStyle>
281
+ </Style>
282
+ <Placemark id="ACTIVE LOG 002">
283
+ <name>ACTIVE LOG 002</name>
284
+ <description><![CDATA[KML file, track, and waypoint comment.]]></description>
285
+ <styleUrl>#ACTIVE LOG 002_Style</styleUrl>
286
+ <LineString>
287
+ <extrude>1</extrude>
288
+ <tessellate>1</tessellate>
289
+ <altitudeMode>clampedToGround</altitudeMode>
290
+ <coordinates>-92.2974480,38.9192131,0</coordinates>
291
+ </LineString>
292
+ </Placemark>
293
+ <Style id="ACTIVE LOG 003_Style">
294
+ <LineStyle>
295
+ <color>f000ffff</color>
296
+ <width>3</width>
297
+ </LineStyle>
298
+ </Style>
299
+ <Placemark id="ACTIVE LOG 003">
300
+ <name>ACTIVE LOG 003</name>
301
+ <description><![CDATA[KML file, track, and waypoint comment.]]></description>
302
+ <styleUrl>#ACTIVE LOG 003_Style</styleUrl>
303
+ <LineString>
304
+ <extrude>1</extrude>
305
+ <tessellate>1</tessellate>
306
+ <altitudeMode>clampedToGround</altitudeMode>
307
+ <coordinates>-92.2974491,38.9192131,0</coordinates>
308
+ </LineString>
309
+ </Placemark>
310
+ <Style id="ACTIVE LOG 004_Style">
311
+ <LineStyle>
312
+ <color>f000ffff</color>
313
+ <width>3</width>
314
+ </LineStyle>
315
+ </Style>
316
+ <Placemark id="ACTIVE LOG 004">
317
+ <name>ACTIVE LOG 004</name>
318
+ <description><![CDATA[KML file, track, and waypoint comment.]]></description>
319
+ <styleUrl>#ACTIVE LOG 004_Style</styleUrl>
320
+ <LineString>
321
+ <extrude>1</extrude>
322
+ <tessellate>1</tessellate>
323
+ <altitudeMode>clampedToGround</altitudeMode>
324
+ <coordinates>-92.2974498,38.9192121,0 -92.2974481,38.9192053,0 -92.2974619,38.9191897,0 -92.2975066,38.9191654,0 -92.2975411,38.9191634,0 -92.2975676,38.9191661,0 -92.2977170,38.9191401,0 -92.2977401,38.9190596,0 -92.2977100,38.9190338,0 -92.2976056,38.9190399,0 -92.2975292,38.9190577,0 -92.2974253,38.9191198,0 -92.2973117,38.9192653,0 -92.2971953,38.9193899,0 -92.2970750,38.9195301,0 -92.2969539,38.9196197,0 -92.2968409,38.9196836,0 -92.2968185,38.9196751,0 -92.2966788,38.9195942,0 -92.2965691,38.9195161,0 -92.2964531,38.9194482,0 -92.2963269,38.9193805,0 -92.2963000,38.9193815,0 -92.2961640,38.9192872,0 -92.2960841,38.9192231,0 -92.2960546,38.9192064,0 -92.2959645,38.9193209,0 -92.2960287,38.9193560,0 -92.2960931,38.9193992,0 -92.2961377,38.9194369,0 -92.2962814,38.9195250,0 -92.2962871,38.9195328,0 -92.2963490,38.9195311,0 -92.2963994,38.9195736,0 -92.2964627,38.9196379,0 -92.2964759,38.9196596,0 -92.2966064,38.9197274,0 -92.2968050,38.9198301,0 -92.2968177,38.9198532,0 -92.2968948,38.9199238,0 -92.2969240,38.9199364,0 -92.2969881,38.9199673,0 -92.2971074,38.9200326,0 -92.2971658,38.9200600,0 -92.2972693,38.9201327,0 -92.2974267,38.9202471,0 -92.2973874,38.9203061,0 -92.2973550,38.9204382,0 -92.2972989,38.9206033,0 -92.2972725,38.9207438,0 -92.2972764,38.9207743,0 -92.2974020,38.9208257,0 -92.2974725,38.9207973,0 -92.2976285,38.9206118,0 -92.2977527,38.9204926,0 -92.2979666,38.9202957,0 -92.2981386,38.9201607,0 -92.2982495,38.9200683,0 -92.2982619,38.9200570,0 -92.2983682,38.9200564,0 -92.2983768,38.9200948,0 -92.2983971,38.9201153,0 -92.2983873,38.9201652,0</coordinates>
325
+ </LineString>
326
+ </Placemark>
327
+ </Folder>
328
+ </Document>
329
+ </kml>
@@ -1,4 +1,5 @@
1
1
  require_relative '../../../../lib/tf1_converter/gpx/waypoint'
2
+ require 'nokogiri'
2
3
 
3
4
  module TF1Converter::Gpx
4
5
  describe Waypoint do
@@ -6,6 +7,24 @@ module TF1Converter::Gpx
6
7
  let(:node) { double }
7
8
  let(:waypoint) { Waypoint.new(node, icon_map) }
8
9
 
10
+
11
+ let(:waypoint_by_name_fragment) do
12
+ %Q{
13
+ <wpt lat="38.9199972" lon="-92.2972443">
14
+ <name>icon_name_42</name>
15
+ </wpt>
16
+ }
17
+ end
18
+
19
+ let(:default_fragment) do
20
+ %Q{<wpt lat="38.9199972" lon="-92.2972443"></wpt>}
21
+ end
22
+
23
+ def waypoint_from(fragment)
24
+ node = Nokogiri::XML.fragment(fragment).xpath('wpt').first
25
+ Waypoint.new(node, icon_map)
26
+ end
27
+
9
28
  describe '#icon_name' do
10
29
  it 'returns a matching name from the map' do
11
30
  node.stub_chain(:children, :select, :first, :text){ 'meaningoflife' }
@@ -13,8 +32,14 @@ module TF1Converter::Gpx
13
32
  waypoint.icon_name.should == '42.png'
14
33
  end
15
34
 
35
+ it 'can find a waypoint by name' do
36
+ waypoint = waypoint_from(waypoint_by_name_fragment)
37
+ icon_map['meaningoflife'] = { 'icon' => '42.png', 'name' => 'icon_name_42' }
38
+ waypoint.icon_name.should == '42.png'
39
+ end
40
+
16
41
  it 'returns a default value if there is no sym node' do
17
- node.stub_chain(:children, :select){ [] }
42
+ waypoint = waypoint_from(default_fragment)
18
43
  waypoint.icon_name.should == 'default.png'
19
44
  end
20
45
 
@@ -33,5 +33,14 @@ module TF1Converter
33
33
  #should not raise error
34
34
  TF1Converter::Translation.from(input).into(output)
35
35
  end
36
+
37
+ it 'translates waypoints by name' do
38
+ input = File.open("#{path}/waypoint-by-name.gpx", 'r')
39
+ output = File.open("#{path}/waypoint-by-name.kml", 'w')
40
+ TF1Converter::Config.load(File.expand_path('../../../example/config.yml', local_dir))
41
+ TF1Converter::Translation.from(input).into(output)
42
+ result = File.open("#{path}/waypoint-by-name.kml", 'r')
43
+ result.read.should_not =~ /default\.png/
44
+ end
36
45
  end
37
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tf1_converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
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-02-16 00:00:00.000000000 Z
12
+ date: 2013-02-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -174,6 +174,8 @@ files:
174
174
  - spec/fixtures/ftwood2_expected.kml
175
175
  - spec/fixtures/test.gpx
176
176
  - spec/fixtures/test.kml
177
+ - spec/fixtures/waypoint-by-name.gpx
178
+ - spec/fixtures/waypoint-by-name.kml
177
179
  - spec/lib/tf1_converter/gpx/track_spec.rb
178
180
  - spec/lib/tf1_converter/gpx/waypoint_spec.rb
179
181
  - spec/lib/tf1_converter/translation_spec.rb
@@ -192,7 +194,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
192
194
  version: '0'
193
195
  segments:
194
196
  - 0
195
- hash: 1117436177532010926
197
+ hash: 308764430467443870
196
198
  required_rubygems_version: !ruby/object:Gem::Requirement
197
199
  none: false
198
200
  requirements:
@@ -201,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
203
  version: '0'
202
204
  segments:
203
205
  - 0
204
- hash: 1117436177532010926
206
+ hash: 308764430467443870
205
207
  requirements: []
206
208
  rubyforge_project:
207
209
  rubygems_version: 1.8.23
@@ -215,6 +217,8 @@ test_files:
215
217
  - spec/fixtures/ftwood2_expected.kml
216
218
  - spec/fixtures/test.gpx
217
219
  - spec/fixtures/test.kml
220
+ - spec/fixtures/waypoint-by-name.gpx
221
+ - spec/fixtures/waypoint-by-name.kml
218
222
  - spec/lib/tf1_converter/gpx/track_spec.rb
219
223
  - spec/lib/tf1_converter/gpx/waypoint_spec.rb
220
224
  - spec/lib/tf1_converter/translation_spec.rb