gooby 1.2.0 → 2.0.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.
- data/README +133 -341
- data/config/ballantyne.yaml +11 -0
- data/config/big_sur_marathon.yaml +11 -0
- data/config/crowders_mtn_hike.yaml +11 -0
- data/config/davidson1.yaml +16 -0
- data/config/gooby_config.yaml +28 -135
- data/cucumber.yml +1 -0
- data/features/build_gem.feature +88 -0
- data/features/gooby.feature +300 -0
- data/features/install.feature +78 -0
- data/features/steps/gooby_steps.rb +245 -0
- data/features/support/env.rb +4 -0
- data/lib/gooby.rb +24 -30
- data/lib/gooby_activity.rb +63 -0
- data/lib/gooby_base_object.rb +46 -0
- data/lib/gooby_base_sax_parser.rb +95 -0
- data/lib/gooby_configuration.rb +33 -115
- data/lib/gooby_counter_hash.rb +28 -87
- data/lib/gooby_dttm.rb +88 -66
- data/lib/gooby_environment.rb +48 -0
- data/lib/gooby_garmin_tcx_parser.rb +92 -0
- data/lib/gooby_google_kml_generator.rb +168 -0
- data/lib/gooby_google_map_generator.rb +284 -349
- data/lib/gooby_gpx_parser.rb +97 -0
- data/lib/gooby_help_producer.rb +40 -0
- data/lib/gooby_introspection.rb +25 -0
- data/lib/gooby_io.rb +30 -0
- data/lib/gooby_lap.rb +27 -18
- data/lib/gooby_process.rb +281 -0
- data/lib/gooby_sax_path_parser.rb +43 -0
- data/lib/gooby_tcx_extractor.rb +71 -0
- data/lib/gooby_track_log_parser.rb +114 -0
- data/lib/gooby_trackpoint.rb +276 -0
- data/lib/gooby_xml_object.rb +40 -0
- data/{img/gicons → out/images}/blank.png +0 -0
- data/{img/gicons → out/images}/dd-end.png +0 -0
- data/{img/gicons → out/images}/dd-start.png +0 -0
- data/{img/gicons → out/images}/marker.png +0 -0
- data/{img/gicons → out/images}/marker0.png +0 -0
- data/{img/gicons → out/images}/marker00.png +0 -0
- data/{img/gicons → out/images}/marker01.png +0 -0
- data/{img/gicons → out/images}/marker02.png +0 -0
- data/{img/gicons → out/images}/marker03.png +0 -0
- data/{img/gicons → out/images}/marker04.png +0 -0
- data/{img/gicons → out/images}/marker05.png +0 -0
- data/{img/gicons → out/images}/marker06.png +0 -0
- data/{img/gicons → out/images}/marker07.png +0 -0
- data/{img/gicons → out/images}/marker08.png +0 -0
- data/{img/gicons → out/images}/marker09.png +0 -0
- data/{img/gicons → out/images}/marker1.png +0 -0
- data/{img/gicons → out/images}/marker10.png +0 -0
- data/{img/gicons → out/images}/marker11.png +0 -0
- data/{img/gicons → out/images}/marker12.png +0 -0
- data/{img/gicons → out/images}/marker13.png +0 -0
- data/{img/gicons → out/images}/marker14.png +0 -0
- data/{img/gicons → out/images}/marker15.png +0 -0
- data/{img/gicons → out/images}/marker16.png +0 -0
- data/{img/gicons → out/images}/marker17.png +0 -0
- data/{img/gicons → out/images}/marker18.png +0 -0
- data/{img/gicons → out/images}/marker19.png +0 -0
- data/{img/gicons → out/images}/marker2.png +0 -0
- data/{img/gicons → out/images}/marker20.png +0 -0
- data/{img/gicons → out/images}/marker21.png +0 -0
- data/{img/gicons → out/images}/marker22.png +0 -0
- data/{img/gicons → out/images}/marker23.png +0 -0
- data/{img/gicons → out/images}/marker24.png +0 -0
- data/{img/gicons → out/images}/marker25.png +0 -0
- data/{img/gicons → out/images}/marker26.png +0 -0
- data/{img/gicons → out/images}/marker27.png +0 -0
- data/{img/gicons → out/images}/marker28.png +0 -0
- data/{img/gicons → out/images}/marker29.png +0 -0
- data/{img/gicons → out/images}/marker3.png +0 -0
- data/{img/gicons → out/images}/marker30.png +0 -0
- data/{img/gicons → out/images}/marker31.png +0 -0
- data/{img/gicons → out/images}/marker32.png +0 -0
- data/{img/gicons → out/images}/marker33.png +0 -0
- data/{img/gicons → out/images}/marker34.png +0 -0
- data/{img/gicons → out/images}/marker35.png +0 -0
- data/{img/gicons → out/images}/marker36.png +0 -0
- data/{img/gicons → out/images}/marker37.png +0 -0
- data/{img/gicons → out/images}/marker38.png +0 -0
- data/{img/gicons → out/images}/marker39.png +0 -0
- data/{img/gicons → out/images}/marker4.png +0 -0
- data/{img/gicons → out/images}/marker40.png +0 -0
- data/{img/gicons → out/images}/marker41.png +0 -0
- data/{img/gicons → out/images}/marker42.png +0 -0
- data/{img/gicons → out/images}/marker43.png +0 -0
- data/{img/gicons → out/images}/marker44.png +0 -0
- data/{img/gicons → out/images}/marker45.png +0 -0
- data/{img/gicons → out/images}/marker46.png +0 -0
- data/{img/gicons → out/images}/marker47.png +0 -0
- data/{img/gicons → out/images}/marker48.png +0 -0
- data/{img/gicons → out/images}/marker49.png +0 -0
- data/{img/gicons → out/images}/marker5.png +0 -0
- data/{img/gicons → out/images}/marker50.png +0 -0
- data/{img/gicons → out/images}/marker51.png +0 -0
- data/{img/gicons → out/images}/marker52.png +0 -0
- data/{img/gicons → out/images}/marker53.png +0 -0
- data/{img/gicons → out/images}/marker54.png +0 -0
- data/{img/gicons → out/images}/marker55.png +0 -0
- data/{img/gicons → out/images}/marker56.png +0 -0
- data/{img/gicons → out/images}/marker57.png +0 -0
- data/{img/gicons → out/images}/marker58.png +0 -0
- data/{img/gicons → out/images}/marker59.png +0 -0
- data/{img/gicons → out/images}/marker6.png +0 -0
- data/{img/gicons → out/images}/marker60.png +0 -0
- data/{img/gicons → out/images}/marker61.png +0 -0
- data/{img/gicons → out/images}/marker62.png +0 -0
- data/{img/gicons → out/images}/marker63.png +0 -0
- data/{img/gicons → out/images}/marker64.png +0 -0
- data/{img/gicons → out/images}/marker65.png +0 -0
- data/{img/gicons → out/images}/marker66.png +0 -0
- data/{img/gicons → out/images}/marker67.png +0 -0
- data/{img/gicons → out/images}/marker68.png +0 -0
- data/{img/gicons → out/images}/marker69.png +0 -0
- data/{img/gicons → out/images}/marker7.png +0 -0
- data/{img/gicons → out/images}/marker70.png +0 -0
- data/{img/gicons → out/images}/marker71.png +0 -0
- data/{img/gicons → out/images}/marker72.png +0 -0
- data/{img/gicons → out/images}/marker73.png +0 -0
- data/{img/gicons → out/images}/marker74.png +0 -0
- data/{img/gicons → out/images}/marker75.png +0 -0
- data/{img/gicons → out/images}/marker76.png +0 -0
- data/{img/gicons → out/images}/marker77.png +0 -0
- data/{img/gicons → out/images}/marker78.png +0 -0
- data/{img/gicons → out/images}/marker79.png +0 -0
- data/{img/gicons → out/images}/marker8.png +0 -0
- data/{img/gicons → out/images}/marker80.png +0 -0
- data/{img/gicons → out/images}/marker81.png +0 -0
- data/{img/gicons → out/images}/marker82.png +0 -0
- data/{img/gicons → out/images}/marker83.png +0 -0
- data/{img/gicons → out/images}/marker84.png +0 -0
- data/{img/gicons → out/images}/marker85.png +0 -0
- data/{img/gicons → out/images}/marker86.png +0 -0
- data/{img/gicons → out/images}/marker87.png +0 -0
- data/{img/gicons → out/images}/marker88.png +0 -0
- data/{img/gicons → out/images}/marker89.png +0 -0
- data/{img/gicons → out/images}/marker9.png +0 -0
- data/{img/gicons → out/images}/marker90.png +0 -0
- data/{img/gicons → out/images}/marker91.png +0 -0
- data/{img/gicons → out/images}/marker92.png +0 -0
- data/{img/gicons → out/images}/marker93.png +0 -0
- data/{img/gicons → out/images}/marker94.png +0 -0
- data/{img/gicons → out/images}/marker95.png +0 -0
- data/{img/gicons → out/images}/marker96.png +0 -0
- data/{img/gicons → out/images}/marker97.png +0 -0
- data/{img/gicons → out/images}/marker98.png +0 -0
- data/{img/gicons → out/images}/marker99.png +0 -0
- data/{img/gicons → out/images}/markerA.png +0 -0
- data/{img/gicons → out/images}/markerB.png +0 -0
- data/{img/gicons → out/images}/markerC.png +0 -0
- data/{img/gicons → out/images}/markerD.png +0 -0
- data/{img/gicons → out/images}/markerE.png +0 -0
- data/{img/gicons → out/images}/markerF.png +0 -0
- data/{img/gicons → out/images}/markerG.png +0 -0
- data/{img/gicons → out/images}/markerH.png +0 -0
- data/{img/gicons → out/images}/markerI.png +0 -0
- data/{img/gicons → out/images}/markerJ.png +0 -0
- data/{img/gicons → out/images}/mm_20_red.png +0 -0
- data/{img/gicons → out/images}/mm_20_shadow.png +0 -0
- data/{img/gicons → out/images}/shadow50.png +0 -0
- data/rakefile.rb +79 -0
- data/samples.sh +21 -0
- data/samples/2008_04_27_13_49_50_tcx.csv +2449 -0
- data/samples/2008_04_27_13_49_50_tcx.xml +24560 -0
- data/samples/2009_01_01_14_45_00_tcx.xml +10630 -0
- data/samples/ballantyne.csv +27 -0
- data/samples/ballantyne.gpx +117 -0
- data/samples/ballantyne.kml +91 -0
- data/samples/big_sur_marathon.html +2766 -0
- data/samples/big_sur_marathon.kml +685 -0
- data/samples/build_gem_test_results.txt +6 -0
- data/samples/crowders_mtn_hike.csv +1065 -0
- data/samples/crowders_mtn_hike.html +1283 -0
- data/samples/crowders_mtn_hike.log +1 -0
- data/samples/cucumber_test_results.txt +302 -0
- data/samples/davidson1.csv +1 -0
- data/samples/davidson1.html +75 -0
- data/samples/davidson_1_point_tcx.csv +0 -0
- data/samples/doc.kml +49 -0
- data/samples/gps_track_log_asheville_mt_pisgah.txt +1 -0
- data/samples/gps_track_logs.txt +1 -0
- data/samples/install_test_results.txt +81 -0
- data/samples/mt_pisgah.txt +1 -0
- data/samples/rspec_test_results.txt +5 -0
- data/setup.rb +66 -0
- data/spec/gooby_base_object_spec.rb +116 -0
- data/spec/gooby_counter_hash_spec.rb +34 -0
- data/spec/gooby_dttm_spec.rb +40 -0
- data/spec/gooby_spec_helper.rb +9 -0
- data/spec/gooby_xml_object_spec.rb +32 -0
- metadata +225 -226
- data/bin/code_scan.rb +0 -16
- data/bin/gooby_been_there.rb +0 -33
- data/bin/gooby_config.rb +0 -24
- data/bin/gooby_csv_validation.rb +0 -50
- data/bin/gooby_first_trackpoints_as_poi.rb +0 -31
- data/bin/gooby_gen_gmap.rb +0 -20
- data/bin/gooby_parser.rb +0 -21
- data/bin/gooby_splitter.rb +0 -21
- data/bin/gooby_version.rb +0 -20
- data/bin/run_all.sh +0 -33
- data/bin/run_been_there.sh +0 -19
- data/bin/run_config.sh +0 -12
- data/bin/run_csv_validation.sh +0 -15
- data/bin/run_db_gen.sh +0 -11
- data/bin/run_db_load.sh +0 -11
- data/bin/run_first_trackpoints_as_poi.sh +0 -16
- data/bin/run_gen_gmaps.sh +0 -21
- data/bin/run_parse_full.sh +0 -45
- data/bin/run_parse_samples.sh +0 -21
- data/bin/run_split.sh +0 -24
- data/bin/run_version.sh +0 -12
- data/data/20050305_corporate_cup_hm.csv +0 -251
- data/data/20050305_corporate_cup_hm.xml +0 -2208
- data/data/20050430_nashville_marathon.xml +0 -10043
- data/data/20050430_nashville_marathon_km.csv +0 -1208
- data/data/20060115_phoenix_marathon.csv +0 -1280
- data/data/20060115_phoenix_marathon.xml +0 -10620
- data/data/20070101_davidson_11m.csv +0 -251
- data/data/20070101_davidson_11m.xml +0 -2020
- data/data/20070505_davidson_5k.xml +0 -2875
- data/data/20070505_davidson_5k_km.csv +0 -286
- data/data/hrm1.csv +0 -5
- data/img/gicons/readme.txt +0 -14
- data/lib/gooby_code_scanner.rb +0 -288
- data/lib/gooby_command.rb +0 -210
- data/lib/gooby_course.rb +0 -117
- data/lib/gooby_csv_point.rb +0 -71
- data/lib/gooby_csv_reader.rb +0 -71
- data/lib/gooby_csv_run.rb +0 -28
- data/lib/gooby_delim_line.rb +0 -42
- data/lib/gooby_duration.rb +0 -86
- data/lib/gooby_forerunner_xml_parser.rb +0 -191
- data/lib/gooby_forerunner_xml_splitter.rb +0 -115
- data/lib/gooby_history.rb +0 -41
- data/lib/gooby_kernel.rb +0 -163
- data/lib/gooby_line.rb +0 -80
- data/lib/gooby_object.rb +0 -22
- data/lib/gooby_point.rb +0 -172
- data/lib/gooby_run.rb +0 -213
- data/lib/gooby_simple_xml_parser.rb +0 -50
- data/lib/gooby_test_helper.rb +0 -23
- data/lib/gooby_track.rb +0 -47
- data/lib/gooby_track_point.rb +0 -229
- data/lib/gooby_training_center_xml_parser.rb +0 -224
- data/lib/gooby_training_center_xml_splitter.rb +0 -116
- data/lib/split_code.sh +0 -29
- data/samples/20050305_corporate_cup_hm.html +0 -450
- data/samples/20050430_nashville_marathon.html +0 -1668
- data/samples/20060115_phoenix_marathon.html +0 -1596
- data/samples/20070101_davidson_11m.html +0 -432
- data/samples/20070505_davidson_5k.html +0 -413
- data/samples/been_there.txt +0 -92
- data/samples/hrm1.html +0 -87
- data/sql/gooby.ddl +0 -60
- data/sql/gooby_load.dml +0 -62
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Format: DDD M/D/Y H:M:S -5.00 hrs Datum[116]: WGS 84
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
Feature: Using Gooby
|
|
2
|
+
In order to generate maps with Gooby
|
|
3
|
+
From data recorded on a Garmin GPS device, or the MotionX app on an iPhone
|
|
4
|
+
We get the raw GPS data recorded from the device
|
|
5
|
+
then parse the raw GPS data into a "gooby standard" CSV format
|
|
6
|
+
then generate Google HTML maps from the CSV files
|
|
7
|
+
then generate Google Earth KML maps from the same CSV files
|
|
8
|
+
then enjoy viewing the maps and seeing where we've been.
|
|
9
|
+
|
|
10
|
+
Scenario: Setup the environment and directories for the scenarios that follow # features/gooby.feature:10
|
|
11
|
+
Given GOOBY_HOME is set to '/Users/cjoakim/projects/github/cjoakim/gooby2' # features/steps/gooby_steps.rb:14
|
|
12
|
+
And an empty csv directory within GOOBY_HOME # features/steps/gooby_steps.rb:36
|
|
13
|
+
And an empty out directory within GOOBY_HOME # features/steps/gooby_steps.rb:36
|
|
14
|
+
And an empty tmp directory within GOOBY_HOME # features/steps/gooby_steps.rb:36
|
|
15
|
+
And an empty splits directory within GOOBY_HOME # features/steps/gooby_steps.rb:36
|
|
16
|
+
And file 'gooby_davidson1.kmz' does not exist within GOOBY_HOME # features/steps/gooby_steps.rb:42
|
|
17
|
+
|
|
18
|
+
Scenario: Generate the Gooby help content # features/gooby.feature:18
|
|
19
|
+
When rake task 'gooby:help' is executed # features/steps/gooby_steps.rb:50
|
|
20
|
+
Then the output contains 126 lines, within a tolerance of 2 # features/steps/gooby_steps.rb:117
|
|
21
|
+
And the following lines are expected # features/steps/gooby_steps.rb:78
|
|
22
|
+
And line: Gooby = Google APIs + Ruby. Copyright 2009 by Chris Joakim. # features/steps/gooby_steps.rb:82
|
|
23
|
+
And line: Gooby is available under GNU General Public License (GPL) license. # features/steps/gooby_steps.rb:82
|
|
24
|
+
And line: Version 2.0.0 # features/steps/gooby_steps.rb:82
|
|
25
|
+
And line: Directory Structure: # features/steps/gooby_steps.rb:82
|
|
26
|
+
And line: {GOOBY_HOME} Your chosen directory on your computer in which to store Gooby files. # features/steps/gooby_steps.rb:82
|
|
27
|
+
And line: You must set the "GOOBY_HOME" environment variable on your computer to this # features/steps/gooby_steps.rb:82
|
|
28
|
+
And line: chosen directory name. # features/steps/gooby_steps.rb:82
|
|
29
|
+
And line: {GOOBY_HOME}/config Contains configuration files in yaml format. # features/steps/gooby_steps.rb:82
|
|
30
|
+
And line: File /config/gooby_config.yaml is the "base" configuration file, and is read first. # features/steps/gooby_steps.rb:82
|
|
31
|
+
And line: This file typically remains unchanged after your intial edits to it. Be sure to # features/steps/gooby_steps.rb:82
|
|
32
|
+
And line: set "gmap_key" to your Google Maps key, and "gmap_icon_url_base" to the URL on # features/steps/gooby_steps.rb:82
|
|
33
|
+
And line: your site where the map icon images are located. # features/steps/gooby_steps.rb:82
|
|
34
|
+
And line: You should create one "map-specific" yaml file for each map you wish to create. # features/steps/gooby_steps.rb:82
|
|
35
|
+
And line: It "inherits" all entries from the base configuration file, gooby_config.yaml. # features/steps/gooby_steps.rb:82
|
|
36
|
+
And line: So just specify the additions or overrides in your map-specific yaml files. # features/steps/gooby_steps.rb:82
|
|
37
|
+
And line: This design allows you generate your various maps, without having to frequently # features/steps/gooby_steps.rb:82
|
|
38
|
+
And line: reset the values the the base configuration file. # features/steps/gooby_steps.rb:82
|
|
39
|
+
And line: {GOOBY_HOME}/csv Gooby places CSV data files in this directory. All Gooby parsers create a # features/steps/gooby_steps.rb:82
|
|
40
|
+
And line: standard CSV format that you can use to generate either Google maps or Google Earth # features/steps/gooby_steps.rb:82
|
|
41
|
+
And line: maps with. # features/steps/gooby_steps.rb:82
|
|
42
|
+
And line: {GOOBY_HOME}/data You place data files from your desktop GPS software here. # features/steps/gooby_steps.rb:82
|
|
43
|
+
And line: {GOOBY_HOME}/out Gooby places generated Google Map html files and Google Earth kml files here. # features/steps/gooby_steps.rb:82
|
|
44
|
+
And line: {GOOBY_HOME}/out/images Standard set of images here which are used in the generated html & kml files. # features/steps/gooby_steps.rb:82
|
|
45
|
+
And line: Add your own images here, or replace the existing ones, as necessary. # features/steps/gooby_steps.rb:82
|
|
46
|
+
And line: {GOOBY_HOME}/samples Contains a set of sample files for your reference. # features/steps/gooby_steps.rb:82
|
|
47
|
+
And line: {GOOBY_HOME}/splits Gooby places individual 'activity xml files' here, split-out from a large tcx file. # features/steps/gooby_steps.rb:82
|
|
48
|
+
And line: {GOOBY_HOME}/tmp Temporary files. # features/steps/gooby_steps.rb:82
|
|
49
|
+
And line: List of Gooby commands (in order of typical usage): # features/steps/gooby_steps.rb:82
|
|
50
|
+
And line: rake # Default task; same as 'rake gooby:help'. # features/steps/gooby_steps.rb:82
|
|
51
|
+
And line: rake gooby:help # Display Gooby usage instructions. # features/steps/gooby_steps.rb:82
|
|
52
|
+
And line: rake gooby:extract_activities_from_tcx # Extract individual Activity xml files from a Garmin tcx file # features/steps/gooby_steps.rb:82
|
|
53
|
+
And line: rake gooby:parse_activity_xml_to_csv # Parse an extracted Activity xml file to a corresponding csv file. # features/steps/gooby_steps.rb:82
|
|
54
|
+
And line: rake gooby:parse_track_log_to_csv # Parse a GPS Track Log file a corresponding csv file. # features/steps/gooby_steps.rb:82
|
|
55
|
+
And line: rake gooby:parse_gpx_to_csv # Parse a *.gpx file into a corresponding csv file. # features/steps/gooby_steps.rb:82
|
|
56
|
+
And line: rake gooby:generate_google_map # Generate a Google Map from a csv file. # features/steps/gooby_steps.rb:82
|
|
57
|
+
And line: rake gooby:generate_google_earth_map # Generate a Google Earth kml file from a csv file, with optional # features/steps/gooby_steps.rb:82
|
|
58
|
+
And line: kmz file generation. # features/steps/gooby_steps.rb:82
|
|
59
|
+
And line: Gooby Command Detail: # features/steps/gooby_steps.rb:82
|
|
60
|
+
And line: command: rake gooby:help # features/steps/gooby_steps.rb:82
|
|
61
|
+
And line: description: Displays help information for each Gooby command. # features/steps/gooby_steps.rb:82
|
|
62
|
+
And line: command: rake gooby:extract_activities_from_tcx # features/steps/gooby_steps.rb:82
|
|
63
|
+
And line: description: Splits the potentially huge Garmin Training Center tcx file into individual # features/steps/gooby_steps.rb:82
|
|
64
|
+
And line: Activity xml files, and places these in the /splits directory. Each has a filename # features/steps/gooby_steps.rb:82
|
|
65
|
+
And line: based on the starting date/time of the activity. # features/steps/gooby_steps.rb:82
|
|
66
|
+
And line: parameters: tcx_file - The input file, created by exporting from Garmin Training Center. # features/steps/gooby_steps.rb:82
|
|
67
|
+
And line: Defaults to 'data/current.tcx' in your GOOBY_HOME directory. # features/steps/gooby_steps.rb:82
|
|
68
|
+
And line: command: rake gooby:parse_activity_xml_to_csv # features/steps/gooby_steps.rb:82
|
|
69
|
+
And line: description: Parse an extracted Activity xml 'split' file to a corresponding csv file. # features/steps/gooby_steps.rb:82
|
|
70
|
+
And line: example: rake gooby:parse_activity_xml_to_csv config_file=config/big_sur_marathon.yaml # features/steps/gooby_steps.rb:82
|
|
71
|
+
And line: command: rake gooby:parse_gpx_to_csv # features/steps/gooby_steps.rb:82
|
|
72
|
+
And line: description: Parse a *.gpx file into a corresponding csv file. # features/steps/gooby_steps.rb:82
|
|
73
|
+
And line: example: rake gooby:parse_gpx_to_csv config_file=config/ballantyne.yaml # features/steps/gooby_steps.rb:82
|
|
74
|
+
And line: command: rake gooby:parse_track_log_to_csv # features/steps/gooby_steps.rb:82
|
|
75
|
+
And line: description: Parse an extracted 'GPS Tracks Log' file from MacGpsPro into csv format. # features/steps/gooby_steps.rb:82
|
|
76
|
+
And line: note 2: It is strongly recommended that you manually copy the 'GPS Tracks Log' file # features/steps/gooby_steps.rb:82
|
|
77
|
+
And line: from your MacGpsPro installation to the GOOBY_HOME/data directory, and rename it to # features/steps/gooby_steps.rb:82
|
|
78
|
+
And line: 'gps_track_logs.txt', before running this command. Then manually edit out the lines # features/steps/gooby_steps.rb:82
|
|
79
|
+
And line: not pertinent to the map you want to generate. # features/steps/gooby_steps.rb:82
|
|
80
|
+
And line: note 3: I use MacGpsPro to read the GPS data from my Garmin eTrex Venture device, since the # features/steps/gooby_steps.rb:82
|
|
81
|
+
And line: Garmin Training Center software does not support this device. # features/steps/gooby_steps.rb:82
|
|
82
|
+
And line: example: rake gooby:parse_track_log_to_csv config_file=config/crowders_mtn_hike.yaml # features/steps/gooby_steps.rb:82
|
|
83
|
+
And line: command: rake gooby:generate_google_map # features/steps/gooby_steps.rb:82
|
|
84
|
+
And line: description: Generate a Google Map html file from a csv file. # features/steps/gooby_steps.rb:82
|
|
85
|
+
And line: example: rake gooby:generate_google_map config_file=config/big_sur_marathon.yaml # features/steps/gooby_steps.rb:82
|
|
86
|
+
And line: command: rake gooby:generate_google_earth_map # features/steps/gooby_steps.rb:82
|
|
87
|
+
And line: description: Generate a Google Earth kml file from a csv file. # features/steps/gooby_steps.rb:82
|
|
88
|
+
And line: note 2: Gooby will optionally create a kmz file for you. A kmz file is essentially a # features/steps/gooby_steps.rb:82
|
|
89
|
+
And line: zip file, which contains your kml file(s), as well as any associated files such # features/steps/gooby_steps.rb:82
|
|
90
|
+
And line: as images. Two parameters are required in your yaml config file for kmz generation: # features/steps/gooby_steps.rb:82
|
|
91
|
+
And line: 'kmz_build' must be set to true, and 'kmz_build_command' must be the appropriate # features/steps/gooby_steps.rb:82
|
|
92
|
+
And line: zip-creating command for your operating system and set of installed software. # features/steps/gooby_steps.rb:82
|
|
93
|
+
And line: A Mac OS/X example command is: zip -r gooby_big_sur.kmz . # features/steps/gooby_steps.rb:82
|
|
94
|
+
And line: example: rake gooby:generate_google_earth_map config_file=config/big_sur_marathon.yaml # features/steps/gooby_steps.rb:82
|
|
95
|
+
And line: Your GOOBY_HOME directory is currently set to # features/steps/gooby_steps.rb:82
|
|
96
|
+
And the output contains the expected lines # features/steps/gooby_steps.rb:123
|
|
97
|
+
|
|
98
|
+
Scenario: Split a large TCX file exported from Garmin Training Center # features/gooby.feature:98
|
|
99
|
+
Given we imported the data from our Garmin GPS device model 305 into Garmin Training Center # features/steps/gooby_steps.rb:24
|
|
100
|
+
And exported the data from Garmin Training Center to a TCX file # features/steps/gooby_steps.rb:28
|
|
101
|
+
And the TCX file is named 'data/current.tcx' # features/steps/gooby_steps.rb:32
|
|
102
|
+
When rake task 'gooby:extract_activities_from_tcx' is executed # features/steps/gooby_steps.rb:50
|
|
103
|
+
Then the splits directory contains at least 15 files matching name '2009' # features/steps/gooby_steps.rb:104
|
|
104
|
+
And the splits directory contains at least 90 files matching name '2008' # features/steps/gooby_steps.rb:104
|
|
105
|
+
And the splits directory contains at least 100 files matching name '2007' # features/steps/gooby_steps.rb:104
|
|
106
|
+
And these activity xml files exist: # features/steps/gooby_steps.rb:110
|
|
107
|
+
| file | lines |
|
|
108
|
+
| splits/2008_04_27_13_49_50_tcx.xml | 24560 |
|
|
109
|
+
| splits/2009_01_01_14_45_00_tcx.xml | 10630 |
|
|
110
|
+
|
|
111
|
+
Scenario: Parse an activity xml file to csv # features/gooby.feature:112
|
|
112
|
+
Given the config file we use is 'config/big_sur_marathon.yaml' # features/steps/gooby_steps.rb:20
|
|
113
|
+
When rake task 'gooby:parse_activity_xml_to_csv' is executed # features/steps/gooby_steps.rb:50
|
|
114
|
+
Then the CSV file 'csv/2008_04_27_13_49_50_tcx.csv' is created # features/steps/gooby_steps.rb:64
|
|
115
|
+
And the CSV file contains 2449 trackpoints # features/steps/gooby_steps.rb:86
|
|
116
|
+
And the CSV file contains these trackpoints: # features/steps/gooby_steps.rb:151
|
|
117
|
+
| seq | time | latitude | longitude | distance | elapsed | mph | pace |
|
|
118
|
+
| 1 | 2008-04-27T13:49:50Z | 36.247196 | -121.781665 | 0.0 | 0:00:00 | 0.00 | 0:00 |
|
|
119
|
+
| 1800 | 2008-04-27T15:50:22Z | 36.460703 | -121.924925 | 20.0004984569685 | 3:03:46 | 6.530 | 9:11.29 |
|
|
120
|
+
| 2449 | 2008-04-27T17:09:28Z | 36.538656 | -121.91085 | 26.3666472682879 | 4:05:34 | 6.442 | 9:18.81 |
|
|
121
|
+
|
|
122
|
+
Scenario: Parse a track log file to csv # features/gooby.feature:123
|
|
123
|
+
Given the config file we use is 'config/crowders_mtn_hike.yaml' # features/steps/gooby_steps.rb:20
|
|
124
|
+
When rake task 'gooby:parse_track_log_to_csv' is executed # features/steps/gooby_steps.rb:50
|
|
125
|
+
Then the CSV file 'csv/crowders_mtn_hike.csv' is created # features/steps/gooby_steps.rb:64
|
|
126
|
+
And the CSV file contains 1065 trackpoints # features/steps/gooby_steps.rb:86
|
|
127
|
+
And the CSV file contains these trackpoints: # features/steps/gooby_steps.rb:151
|
|
128
|
+
| seq | time | latitude | longitude | distance | elapsed | mph | pace |
|
|
129
|
+
| 1 | 2008-11-16T08:43:06Z | 35.21357 | -81.29359 | 0.0 | 0:00:00 | 0.00 | 0:00 |
|
|
130
|
+
| 1065 | 2008-11-16T14:46:11Z | 35.26834 | -81.25154 | 15.0878648193097 | 6:03:05 | 2.493 | 24:03.88 |
|
|
131
|
+
|
|
132
|
+
Scenario: Parse a gpx file to csv # features/gooby.feature:133
|
|
133
|
+
Given the config file we use is 'config/ballantyne.yaml' # features/steps/gooby_steps.rb:20
|
|
134
|
+
When rake task 'gooby:parse_gpx_to_csv' is executed # features/steps/gooby_steps.rb:50
|
|
135
|
+
Then the CSV file 'csv/ballantyne.csv' is created # features/steps/gooby_steps.rb:64
|
|
136
|
+
And the CSV file contains 27 trackpoints # features/steps/gooby_steps.rb:86
|
|
137
|
+
And the CSV file contains these trackpoints: # features/steps/gooby_steps.rb:151
|
|
138
|
+
| seq | time | latitude | longitude | distance | elapsed | mph | pace |
|
|
139
|
+
| 1 | 2009-05-14T22:08:50Z | 35.062748 | -80.85562 | 0.0 | 0:00:00 | 0.00 | 0:00 |
|
|
140
|
+
| 27 | 2009-05-14T22:10:43Z | 35.062613 | -80.855448 | 0.0783970446562321 | 0:01:53 | 2.498 | 24:01.38 |
|
|
141
|
+
|
|
142
|
+
Scenario: Generate a Big Sur Marathon Google map in html format # features/gooby.feature:143
|
|
143
|
+
Given the config file we use is 'config/big_sur_marathon.yaml' # features/steps/gooby_steps.rb:20
|
|
144
|
+
When rake task 'gooby:generate_google_map' is executed # features/steps/gooby_steps.rb:50
|
|
145
|
+
Then the HTML file 'out/big_sur_marathon.html' is created # features/steps/gooby_steps.rb:64
|
|
146
|
+
And the HTML file contains 2766 lines # features/steps/gooby_steps.rb:96
|
|
147
|
+
And the following lines are expected # features/steps/gooby_steps.rb:78
|
|
148
|
+
And line: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" # features/steps/gooby_steps.rb:82
|
|
149
|
+
And line: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> # features/steps/gooby_steps.rb:82
|
|
150
|
+
And line: <html xmlns="http://www.w3.org/1999/xhtml"> # features/steps/gooby_steps.rb:82
|
|
151
|
+
And line: <head> # features/steps/gooby_steps.rb:82
|
|
152
|
+
And line: <meta http-equiv="content-type" content="text/html; charset=utf-8"/> # features/steps/gooby_steps.rb:82
|
|
153
|
+
And line: <meta name="description" content="Google Map generated by Gooby version 2.0.0"> # features/steps/gooby_steps.rb:82
|
|
154
|
+
And line: <meta name="keywords" content="Google Map Generated by Gooby version 2.0.0"> # features/steps/gooby_steps.rb:82
|
|
155
|
+
And line: <title> Big Sur Marathon </title> # features/steps/gooby_steps.rb:82
|
|
156
|
+
And line: <script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAdn5SVzjZKZKs1IRkFdx52xR1l5lLpU9GCFYoS8YrTf8v3gVJ2hRLV1dTSiqDWwWSnMRkM7SVr0EKSA' type='text/javascript'></script> # features/steps/gooby_steps.rb:82
|
|
157
|
+
And line: <script type="text/javascript"> # features/steps/gooby_steps.rb:82
|
|
158
|
+
And line: //<![CDATA[ # features/steps/gooby_steps.rb:82
|
|
159
|
+
And line: function load() { # features/steps/gooby_steps.rb:82
|
|
160
|
+
And line: if (GBrowserIsCompatible()) { # features/steps/gooby_steps.rb:82
|
|
161
|
+
And line: var map = new GMap2(document.getElementById("map")); # features/steps/gooby_steps.rb:82
|
|
162
|
+
And line: map.addControl(new GLargeMapControl()); # features/steps/gooby_steps.rb:82
|
|
163
|
+
And line: map.addControl(new GMapTypeControl()); # features/steps/gooby_steps.rb:82
|
|
164
|
+
And line: var centerPoint = new GLatLng(36.392926, -121.8600045); # features/steps/gooby_steps.rb:82
|
|
165
|
+
And line: map.setCenter(centerPoint, 11); # features/steps/gooby_steps.rb:82
|
|
166
|
+
And line: var points = new Array(); # features/steps/gooby_steps.rb:82
|
|
167
|
+
And line: points.push(new GLatLng(36.247196,-121.781665)); # features/steps/gooby_steps.rb:82
|
|
168
|
+
And line: // points.push(new GLatLng(36.247208,-121.78167)); # features/steps/gooby_steps.rb:82
|
|
169
|
+
And line: points.push(new GLatLng(36.538656,-121.91085)); # features/steps/gooby_steps.rb:82
|
|
170
|
+
And line: // app_max=200.0 ratio=12.245 increment=12 # features/steps/gooby_steps.rb:82
|
|
171
|
+
And line: var routePolyline = new GPolyline(points); # features/steps/gooby_steps.rb:82
|
|
172
|
+
And line: map.addOverlay(routePolyline); # features/steps/gooby_steps.rb:82
|
|
173
|
+
And line: // Create a base icon for all of our markers that specifies the # features/steps/gooby_steps.rb:82
|
|
174
|
+
And line: // shadow, icon dimensions, etc. # features/steps/gooby_steps.rb:82
|
|
175
|
+
And line: var baseIcon = new GIcon(); # features/steps/gooby_steps.rb:82
|
|
176
|
+
And line: baseIcon.shadow = "images/shadow50.png"; # features/steps/gooby_steps.rb:82
|
|
177
|
+
And line: baseIcon.iconSize = new GSize(20, 34); # features/steps/gooby_steps.rb:82
|
|
178
|
+
And line: baseIcon.shadowSize = new GSize(37, 34); # features/steps/gooby_steps.rb:82
|
|
179
|
+
And line: baseIcon.iconAnchor = new GPoint(9, 34); # features/steps/gooby_steps.rb:82
|
|
180
|
+
And line: baseIcon.infoWindowAnchor = new GPoint(9, 2); # features/steps/gooby_steps.rb:82
|
|
181
|
+
And line: baseIcon.infoShadowAnchor = new GPoint(18, 25); # features/steps/gooby_steps.rb:82
|
|
182
|
+
And line: var iconStart = new GIcon(baseIcon); # features/steps/gooby_steps.rb:82
|
|
183
|
+
And line: iconStart.image = "images/dd-start.png"; # features/steps/gooby_steps.rb:82
|
|
184
|
+
And line: var pStart = new GPoint(-121.781665, 36.247196); # features/steps/gooby_steps.rb:82
|
|
185
|
+
And line: var mStart = new GMarker(pStart, iconStart); # features/steps/gooby_steps.rb:82
|
|
186
|
+
And line: GEvent.addListener(mStart, "click", function() { # features/steps/gooby_steps.rb:82
|
|
187
|
+
And line: mStart.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Start!</b> # features/steps/gooby_steps.rb:82
|
|
188
|
+
And line: map.addOverlay(mStart); # features/steps/gooby_steps.rb:82
|
|
189
|
+
And line: var icon1 = new GIcon(baseIcon); # features/steps/gooby_steps.rb:82
|
|
190
|
+
And line: icon1.image = "images/marker1.png"; # features/steps/gooby_steps.rb:82
|
|
191
|
+
And line: var p1 = new GPoint(-121.788872, 36.259338); # features/steps/gooby_steps.rb:82
|
|
192
|
+
And line: var m1 = new GMarker(p1, icon1); # features/steps/gooby_steps.rb:82
|
|
193
|
+
And line: GEvent.addListener(m1, "click", function() { # features/steps/gooby_steps.rb:82
|
|
194
|
+
And line: m1.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Mile 1</b> # features/steps/gooby_steps.rb:82
|
|
195
|
+
And line: map.addOverlay(m1); # features/steps/gooby_steps.rb:82
|
|
196
|
+
And line: var icon26 = new GIcon(baseIcon); # features/steps/gooby_steps.rb:82
|
|
197
|
+
And line: icon26.image = "images/marker26.png"; # features/steps/gooby_steps.rb:82
|
|
198
|
+
And line: var p26 = new GPoint(-121.914424, 36.534368); # features/steps/gooby_steps.rb:82
|
|
199
|
+
And line: var m26 = new GMarker(p26, icon26); # features/steps/gooby_steps.rb:82
|
|
200
|
+
And line: GEvent.addListener(m26, "click", function() { # features/steps/gooby_steps.rb:82
|
|
201
|
+
And line: m26.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Mile 26</b> # features/steps/gooby_steps.rb:82
|
|
202
|
+
And line: map.addOverlay(m26); # features/steps/gooby_steps.rb:82
|
|
203
|
+
And line: var iconFinish = new GIcon(baseIcon); # features/steps/gooby_steps.rb:82
|
|
204
|
+
And line: iconFinish.image = "images/dd-end.png"; # features/steps/gooby_steps.rb:82
|
|
205
|
+
And line: var pFinish = new GPoint(-121.91085, 36.538656); # features/steps/gooby_steps.rb:82
|
|
206
|
+
And line: var mFinish = new GMarker(pFinish, iconFinish); # features/steps/gooby_steps.rb:82
|
|
207
|
+
And line: GEvent.addListener(mFinish, "click", function() { # features/steps/gooby_steps.rb:82
|
|
208
|
+
And line: mFinish.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Finish!</b> # features/steps/gooby_steps.rb:82
|
|
209
|
+
And line: map.addOverlay(mFinish); # features/steps/gooby_steps.rb:82
|
|
210
|
+
And line: </script> # features/steps/gooby_steps.rb:82
|
|
211
|
+
And line: </head> # features/steps/gooby_steps.rb:82
|
|
212
|
+
And line: <body onload="load()" onunload="GUnload()"> # features/steps/gooby_steps.rb:82
|
|
213
|
+
And line: <center> # features/steps/gooby_steps.rb:82
|
|
214
|
+
And line: <h3> Big Sur Marathon </h3> # features/steps/gooby_steps.rb:82
|
|
215
|
+
And line: <div id="map" style="width: 1500px; height: 800px"></div> # features/steps/gooby_steps.rb:82
|
|
216
|
+
And line: <div id="messages"></div> # features/steps/gooby_steps.rb:82
|
|
217
|
+
And line: </center> # features/steps/gooby_steps.rb:82
|
|
218
|
+
And line: </body> # features/steps/gooby_steps.rb:82
|
|
219
|
+
And line: </html> # features/steps/gooby_steps.rb:82
|
|
220
|
+
And the HTML contains the expected lines # features/steps/gooby_steps.rb:123
|
|
221
|
+
|
|
222
|
+
Scenario: Generate a Big Sur Marathon Google Earth map in kml format # features/gooby.feature:223
|
|
223
|
+
Given the config file we use is 'config/big_sur_marathon.yaml' # features/steps/gooby_steps.rb:20
|
|
224
|
+
When rake task 'gooby:generate_google_earth_map' is executed # features/steps/gooby_steps.rb:50
|
|
225
|
+
Then the KML file 'out/big_sur_marathon.kml' is created # features/steps/gooby_steps.rb:64
|
|
226
|
+
And the KML file contains 685 lines # features/steps/gooby_steps.rb:100
|
|
227
|
+
And the following lines are expected # features/steps/gooby_steps.rb:78
|
|
228
|
+
And line: <?xml version="1.0" encoding="UTF-8"?> # features/steps/gooby_steps.rb:82
|
|
229
|
+
And line: <kml xmlns="http://www.opengis.net/kml/2.2"> # features/steps/gooby_steps.rb:82
|
|
230
|
+
And line: <Document> # features/steps/gooby_steps.rb:82
|
|
231
|
+
And line: <!-- kml file generated by Gooby version 2.0.0 --> # features/steps/gooby_steps.rb:82
|
|
232
|
+
And line: <name>Big Sur Marathon</name> # features/steps/gooby_steps.rb:82
|
|
233
|
+
And line: <Style id="goobyStyle"> # features/steps/gooby_steps.rb:82
|
|
234
|
+
And line: <name>Start</name> # features/steps/gooby_steps.rb:82
|
|
235
|
+
And line: <description><table align='left'><tr><td colspan='2'><b>Start!</b> # features/steps/gooby_steps.rb:82
|
|
236
|
+
And line: <href>images/dd-start.png</href> # features/steps/gooby_steps.rb:82
|
|
237
|
+
And line: <coordinates>-121.781665,36.247196,1</coordinates> # features/steps/gooby_steps.rb:82
|
|
238
|
+
And line: <name>Finish</name> # features/steps/gooby_steps.rb:82
|
|
239
|
+
And line: <description><table align='left'><tr><td colspan='2'><b>Finish!</b> # features/steps/gooby_steps.rb:82
|
|
240
|
+
And line: <href>images/dd-end.png</href> # features/steps/gooby_steps.rb:82
|
|
241
|
+
And line: <coordinates>-121.91085,36.538656,1</coordinates> # features/steps/gooby_steps.rb:82
|
|
242
|
+
And line: <visibility>1</visibility> # features/steps/gooby_steps.rb:82
|
|
243
|
+
And line: <description>Route</description> # features/steps/gooby_steps.rb:82
|
|
244
|
+
And line: <styleUrl>#goobyStyle</styleUrl> # features/steps/gooby_steps.rb:82
|
|
245
|
+
And line: <LineString> # features/steps/gooby_steps.rb:82
|
|
246
|
+
And line: <tessellate>1</tessellate> # features/steps/gooby_steps.rb:82
|
|
247
|
+
And line: <altitudeMode>relativeToGround</altitudeMode> # features/steps/gooby_steps.rb:82
|
|
248
|
+
And line: <coordinates> # features/steps/gooby_steps.rb:82
|
|
249
|
+
And line: -121.781665,36.247196,1 # features/steps/gooby_steps.rb:82
|
|
250
|
+
And line: -121.782714,36.248216,1 # features/steps/gooby_steps.rb:82
|
|
251
|
+
And line: -121.784484,36.249009,1 # features/steps/gooby_steps.rb:82
|
|
252
|
+
And line: -121.912713,36.536075,1 # features/steps/gooby_steps.rb:82
|
|
253
|
+
And line: -121.911365,36.537773,1 # features/steps/gooby_steps.rb:82
|
|
254
|
+
And line: -121.91085,36.538656,1 # features/steps/gooby_steps.rb:82
|
|
255
|
+
And line: </coordinates> # features/steps/gooby_steps.rb:82
|
|
256
|
+
And line: </LineString> # features/steps/gooby_steps.rb:82
|
|
257
|
+
And line: </Placemark> # features/steps/gooby_steps.rb:82
|
|
258
|
+
And line: </Document> # features/steps/gooby_steps.rb:82
|
|
259
|
+
And line: </kml> # features/steps/gooby_steps.rb:82
|
|
260
|
+
And the KML contains the expected lines # features/steps/gooby_steps.rb:123
|
|
261
|
+
|
|
262
|
+
Scenario: Parse the Davidson 11-miler activity xml file to csv # features/gooby.feature:263
|
|
263
|
+
Given the config file we use is 'config/davidson1.yaml' # features/steps/gooby_steps.rb:20
|
|
264
|
+
When rake task 'gooby:parse_activity_xml_to_csv' is executed # features/steps/gooby_steps.rb:50
|
|
265
|
+
Then the CSV file 'csv/davidson1.csv' is created # features/steps/gooby_steps.rb:64
|
|
266
|
+
And the CSV file contains 1060 trackpoints # features/steps/gooby_steps.rb:86
|
|
267
|
+
And the CSV file contains these trackpoints: # features/steps/gooby_steps.rb:151
|
|
268
|
+
| seq | time | latitude | longitude | distance | elapsed | mph | pace |
|
|
269
|
+
| 1 | 2009-01-01T14:45:00Z | 35.495525 | -80.83215 | 0.0 | 0:00:00 | 0.00 | 0:00 |
|
|
270
|
+
| 1060 | 2009-01-01T16:25:22Z | 35.495495 | -80.832109 | 11.0685814547597 | 1:40:22 | 6.617 | 9:04.06 |
|
|
271
|
+
And we edit CSV file 'csv/davidson1.csv' to contain only point number 1 # features/steps/gooby_steps.rb:143
|
|
272
|
+
|
|
273
|
+
Scenario: Generate a single-point Google map in html format # features/gooby.feature:274
|
|
274
|
+
Given the config file we use is 'config/davidson1.yaml' # features/steps/gooby_steps.rb:20
|
|
275
|
+
When rake task 'gooby:generate_google_map' is executed # features/steps/gooby_steps.rb:50
|
|
276
|
+
Then the HTML file 'out/davidson1.html' is created # features/steps/gooby_steps.rb:64
|
|
277
|
+
And the HTML file contains 75 lines # features/steps/gooby_steps.rb:96
|
|
278
|
+
|
|
279
|
+
Scenario: Generate a single-point Google Earth map in kmz format # features/gooby.feature:280
|
|
280
|
+
Given the config file we use is 'config/davidson1.yaml' # features/steps/gooby_steps.rb:20
|
|
281
|
+
When rake task 'gooby:generate_google_earth_map' is executed # features/steps/gooby_steps.rb:50
|
|
282
|
+
Then the KML file 'out/doc.kml' is created # features/steps/gooby_steps.rb:64
|
|
283
|
+
And the KML file contains 49 lines # features/steps/gooby_steps.rb:100
|
|
284
|
+
Then the KMZ file 'gooby_davidson1.kmz' is created # features/steps/gooby_steps.rb:64
|
|
285
|
+
|
|
286
|
+
Scenario: Generate a Crowders Mt. Hike Google map in html format from Garmin eTrex Venture source data # features/gooby.feature:287
|
|
287
|
+
Given the config file we use is 'config/crowders_mtn_hike.yaml' # features/steps/gooby_steps.rb:20
|
|
288
|
+
When rake task 'gooby:generate_google_map' is executed # features/steps/gooby_steps.rb:50
|
|
289
|
+
Then the HTML file 'out/crowders_mtn_hike.html' is created # features/steps/gooby_steps.rb:64
|
|
290
|
+
And the HTML file contains 1283 lines # features/steps/gooby_steps.rb:96
|
|
291
|
+
|
|
292
|
+
Scenario: Generate a Google Earth map in kml format from iPhone & MotionX app source data # features/gooby.feature:293
|
|
293
|
+
Given the config file we use is 'config/ballantyne.yaml' # features/steps/gooby_steps.rb:20
|
|
294
|
+
When rake task 'gooby:generate_google_earth_map' is executed # features/steps/gooby_steps.rb:50
|
|
295
|
+
Then the KML file 'out/ballantyne.kml' is created # features/steps/gooby_steps.rb:64
|
|
296
|
+
And the KML file contains 91 lines # features/steps/gooby_steps.rb:100
|
|
297
|
+
|
|
298
|
+
Scenario: Save the generated files for packaging in the gooby gem # features/gooby.feature:299
|
|
299
|
+
Then copy the generated files to the samples directory # features/steps/gooby_steps.rb:172
|
|
300
|
+
|
|
301
|
+
14 scenarios (14 passed)
|
|
302
|
+
247 steps (247 passed)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Trackpoint,2009-01-01T14:45:00Z,2009-01-01T14:45:00Z,1,2,2009-01-01T14:45:01Z,0:00:01,35.495525,-80.832162,785.817522533,0.000677711575281491,24:35.55,2.440
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
|
6
|
+
<meta name="description" content="Google Map generated by Gooby version 2.0.0">
|
|
7
|
+
<meta name="keywords" content="Google Map Generated by Gooby version 2.0.0">
|
|
8
|
+
<title> Davidson, NC </title>
|
|
9
|
+
<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAdn5SVzjZKZKs1IRkFdx52xR1l5lLpU9GCFYoS8YrTf8v3gVJ2hRLV1dTSiqDWwWSnMRkM7SVr0EKSA' type='text/javascript'></script>
|
|
10
|
+
<script type="text/javascript">
|
|
11
|
+
//<![CDATA[
|
|
12
|
+
function load() {
|
|
13
|
+
if (GBrowserIsCompatible()) {
|
|
14
|
+
var map = new GMap2(document.getElementById("map"));
|
|
15
|
+
map.addControl(new GLargeMapControl());
|
|
16
|
+
map.addControl(new GMapTypeControl());
|
|
17
|
+
|
|
18
|
+
var centerPoint = new GLatLng(35.495525, -80.832162); // Map generated by Gooby
|
|
19
|
+
map.setCenter(centerPoint, 12);
|
|
20
|
+
|
|
21
|
+
var points = new Array();
|
|
22
|
+
points.push(new GLatLng(35.495525,-80.832162));
|
|
23
|
+
|
|
24
|
+
// app_max=200.0 ratio=0.005 increment=1
|
|
25
|
+
|
|
26
|
+
var routePolyline = new GPolyline(points);
|
|
27
|
+
map.addOverlay(routePolyline);
|
|
28
|
+
|
|
29
|
+
// Create a base icon for all of our markers that specifies the
|
|
30
|
+
// shadow, icon dimensions, etc.
|
|
31
|
+
var baseIcon = new GIcon();
|
|
32
|
+
baseIcon.shadow = "images/shadow50.png";
|
|
33
|
+
baseIcon.iconSize = new GSize(20, 34);
|
|
34
|
+
baseIcon.shadowSize = new GSize(37, 34);
|
|
35
|
+
baseIcon.iconAnchor = new GPoint(9, 34);
|
|
36
|
+
baseIcon.infoWindowAnchor = new GPoint(9, 2);
|
|
37
|
+
baseIcon.infoShadowAnchor = new GPoint(18, 25);
|
|
38
|
+
|
|
39
|
+
var iconStart = new GIcon(baseIcon);
|
|
40
|
+
iconStart.image = "images/dd-start.png";
|
|
41
|
+
var pStart = new GPoint(-80.832162, 35.495525);
|
|
42
|
+
var mStart = new GMarker(pStart, iconStart);
|
|
43
|
+
GEvent.addListener(mStart, "click", function() {
|
|
44
|
+
mStart.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Home</b></td></tr><tr><td>Latitude: </td><td style='padding-left:12px;padding-right:1px;'>35.495525</td></tr><tr><td>Longitude: </td><td style='padding-left:12px;padding-right:1px;'>-80.832162</td></tr></table>");
|
|
45
|
+
});
|
|
46
|
+
map.addOverlay(mStart);
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
GEvent.addListener(map, "click", function() {
|
|
52
|
+
var center = map.getCenter();
|
|
53
|
+
|
|
54
|
+
document.getElementById("messages").innerHTML = 'click: ' + center.toString();
|
|
55
|
+
});
|
|
56
|
+
GEvent.addListener(map, "moveend", function() {
|
|
57
|
+
var center = map.getCenter();
|
|
58
|
+
|
|
59
|
+
document.getElementById("messages").innerHTML = 'moveend: ' + center.toString();
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
//]]>
|
|
65
|
+
|
|
66
|
+
</script>
|
|
67
|
+
</head>
|
|
68
|
+
<body onload="load()" onunload="GUnload()">
|
|
69
|
+
<center>
|
|
70
|
+
<h3> Davidson, NC </h3>
|
|
71
|
+
<div id="map" style="width: 1500px; height: 800px"></div>
|
|
72
|
+
<div id="messages"></div>
|
|
73
|
+
</center>
|
|
74
|
+
</body>
|
|
75
|
+
</html>
|
|
File without changes
|
data/samples/doc.kml
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<kml xmlns="http://www.opengis.net/kml/2.2">
|
|
3
|
+
<Document>
|
|
4
|
+
<!-- kml file generated by Gooby version 2.0.0 -->
|
|
5
|
+
<name>Davidson, NC</name>
|
|
6
|
+
<Style id="goobyStyle">
|
|
7
|
+
<BalloonStyle>
|
|
8
|
+
<text>$[description]</text>
|
|
9
|
+
</BalloonStyle>
|
|
10
|
+
<LineStyle>
|
|
11
|
+
<color>7f0000ff</color>
|
|
12
|
+
<width>4</width>
|
|
13
|
+
</LineStyle>
|
|
14
|
+
<PolyStyle>
|
|
15
|
+
<color>7f0000ff</color>
|
|
16
|
+
</PolyStyle>
|
|
17
|
+
</Style>
|
|
18
|
+
|
|
19
|
+
<Placemark>
|
|
20
|
+
<name>Start</name>
|
|
21
|
+
<description><table align='left'><tr><td colspan='2'><b>Start!</b></td></tr><tr><td>Average MPH: </td><td style='padding-left:12px;padding-right:1px;'>2.440</td></tr><tr><td>Latitude: </td><td style='padding-left:12px;padding-right:1px;'>35.495525</td></tr><tr><td>Longitude: </td><td style='padding-left:12px;padding-right:1px;'>-80.832162</td></tr></table></description>
|
|
22
|
+
<Style>
|
|
23
|
+
<IconStyle>
|
|
24
|
+
<Icon>
|
|
25
|
+
<href>images/dd-start.png</href>
|
|
26
|
+
</Icon>
|
|
27
|
+
</IconStyle>
|
|
28
|
+
</Style>
|
|
29
|
+
<styleUrl>#goobyStyle</styleUrl>
|
|
30
|
+
<Point>
|
|
31
|
+
<coordinates>-80.832162,35.495525,1</coordinates>
|
|
32
|
+
</Point>
|
|
33
|
+
</Placemark>
|
|
34
|
+
|
|
35
|
+
<Placemark>
|
|
36
|
+
<name>Route</name>
|
|
37
|
+
<visibility>1</visibility>
|
|
38
|
+
<description>Route</description>
|
|
39
|
+
<styleUrl>#goobyStyle</styleUrl>
|
|
40
|
+
<LineString>
|
|
41
|
+
<tessellate>1</tessellate>
|
|
42
|
+
<altitudeMode>relativeToGround</altitudeMode>
|
|
43
|
+
<coordinates>
|
|
44
|
+
-80.832162,35.495525,1
|
|
45
|
+
</coordinates>
|
|
46
|
+
</LineString>
|
|
47
|
+
</Placemark>
|
|
48
|
+
</Document>
|
|
49
|
+
</kml>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Format: DDD M/D/Y H:M:S -5.00 hrs Datum[116]: WGS 84
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Format: DDD M/D/Y H:M:S -5.00 hrs Datum[116]: WGS 84
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
Feature: Install Gooby
|
|
2
|
+
Gem file 'gooby-2.0.0.gem' has been created and downloaded
|
|
3
|
+
now we install it, run setup.rb, and ensure that certain files are present
|
|
4
|
+
|
|
5
|
+
Scenario: Execute the install process # features/install.feature:5
|
|
6
|
+
Given file 'install.sh' exists # features/steps/gooby_steps.rb:187
|
|
7
|
+
And the gem we are installing is named 'gooby-2.0.0.gem' # features/steps/gooby_steps.rb:209
|
|
8
|
+
And file '/temp/gooby-2.0.0.gem' exists # features/steps/gooby_steps.rb:187
|
|
9
|
+
And file 'gem_list_after_uninstall.txt' is removed if present # features/steps/gooby_steps.rb:213
|
|
10
|
+
And file 'gem_list_after_install.txt' is removed if present # features/steps/gooby_steps.rb:213
|
|
11
|
+
And GOOBY_HOME is set to '/Users/cjoakim/gooby' # features/steps/gooby_steps.rb:14
|
|
12
|
+
And the GOOBY_HOME directory is recreated # features/steps/gooby_steps.rb:198
|
|
13
|
+
Then we execute the shell script './install.sh' # features/steps/gooby_steps.rb:226
|
|
14
|
+
And my garmin training center export file 'current.tcx' file is restored # features/steps/gooby_steps.rb:205
|
|
15
|
+
And these unpacked files exist within directory '/Users/cjoakim/gooby': # features/steps/gooby_steps.rb:231
|
|
16
|
+
| file | type |
|
|
17
|
+
| config | directory |
|
|
18
|
+
| csv | directory |
|
|
19
|
+
| data | directory |
|
|
20
|
+
| features/steps | directory |
|
|
21
|
+
| features/support | directory |
|
|
22
|
+
| out/images | directory |
|
|
23
|
+
| samples | directory |
|
|
24
|
+
| splits | directory |
|
|
25
|
+
| tmp | directory |
|
|
26
|
+
| cucumber.yml | regular |
|
|
27
|
+
| README | regular |
|
|
28
|
+
| rakefile.rb | regular |
|
|
29
|
+
| samples.sh | regular |
|
|
30
|
+
| setup.rb | regular |
|
|
31
|
+
| config/ballantyne.yaml | regular |
|
|
32
|
+
| config/big_sur_marathon.yaml | regular |
|
|
33
|
+
| config/crowders_mtn_hike.yaml | regular |
|
|
34
|
+
| config/davidson1.yaml | regular |
|
|
35
|
+
| config/gooby_config.yaml | regular |
|
|
36
|
+
| data/current.tcx | regular |
|
|
37
|
+
| features/build_gem.feature | regular |
|
|
38
|
+
| features/gooby.feature | regular |
|
|
39
|
+
| features/install.feature | regular |
|
|
40
|
+
| features/steps/gooby_steps.rb | regular |
|
|
41
|
+
| features/support/env.rb | regular |
|
|
42
|
+
| out/images/dd-end.png | regular |
|
|
43
|
+
| out/images/dd-end.png | regular |
|
|
44
|
+
| out/images/marker1.png | regular |
|
|
45
|
+
| out/images/marker26.png | regular |
|
|
46
|
+
| out/images/shadow50.png | regular |
|
|
47
|
+
| samples/2008_04_27_13_49_50_tcx.csv | regular |
|
|
48
|
+
| samples/2008_04_27_13_49_50_tcx.xml | regular |
|
|
49
|
+
| samples/2009_01_01_14_45_00_tcx.xml | regular |
|
|
50
|
+
| samples/ballantyne.csv | regular |
|
|
51
|
+
| samples/ballantyne.gpx | regular |
|
|
52
|
+
| samples/ballantyne.kml | regular |
|
|
53
|
+
| samples/big_sur_marathon.html | regular |
|
|
54
|
+
| samples/big_sur_marathon.kml | regular |
|
|
55
|
+
| samples/build_gem_test_results.txt | regular |
|
|
56
|
+
| samples/crowders_mtn_hike.csv | regular |
|
|
57
|
+
| samples/crowders_mtn_hike.html | regular |
|
|
58
|
+
| samples/crowders_mtn_hike.log | regular |
|
|
59
|
+
| samples/cucumber_test_results.txt | regular |
|
|
60
|
+
| samples/davidson1.csv | regular |
|
|
61
|
+
| samples/davidson1.html | regular |
|
|
62
|
+
| samples/doc.kml | regular |
|
|
63
|
+
| samples/gps_track_log_asheville_mt_pisgah.txt | regular |
|
|
64
|
+
| samples/gps_track_logs.txt | regular |
|
|
65
|
+
| samples/install_test_results.txt | regular |
|
|
66
|
+
| samples/mt_pisgah.txt | regular |
|
|
67
|
+
| samples/rspec_test_results.txt | regular |
|
|
68
|
+
And these generated files exist within directory '/Users/cjoakim/gooby': # features/install.feature:70
|
|
69
|
+
| file | type |
|
|
70
|
+
| out/horse.ccc | regular |
|
|
71
|
+
|
|
72
|
+
1 scenario (1 undefined)
|
|
73
|
+
11 steps (1 undefined, 10 passed)
|
|
74
|
+
|
|
75
|
+
You can implement step definitions for undefined steps with these snippets:
|
|
76
|
+
|
|
77
|
+
Then /^these generated files exist within directory '\/Users\/cjoakim\/gooby':$/ do |table|
|
|
78
|
+
# table is a Cucumber::Ast::Table
|
|
79
|
+
pending
|
|
80
|
+
end
|
|
81
|
+
|