gooby 0.9.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.
Files changed (224) hide show
  1. data/README +242 -0
  2. data/bin/example_usage.rb +38 -0
  3. data/bin/tests_gen.rb +16 -0
  4. data/data/20050305_corporate_cup_hm.csv +251 -0
  5. data/data/20050305_corporate_cup_hm.xml +2208 -0
  6. data/data/20050430_nashville_marathon.csv +1208 -0
  7. data/data/20050430_nashville_marathon.xml +10043 -0
  8. data/data/20051119_dowd_ymca_hm.csv +251 -0
  9. data/data/20051119_dowd_ymca_hm.xml +2210 -0
  10. data/data/20051124_hyatt_turkey_trot_8K.csv +321 -0
  11. data/data/20051124_hyatt_turkey_trot_8K.xml +2651 -0
  12. data/data/2007_03_03.tcx +6207 -0
  13. data/data/forerunner_2007.xml +259014 -0
  14. data/data/geo_data.txt +171 -0
  15. data/data/phx.csv +1280 -0
  16. data/data/phx.xml +10620 -0
  17. data/data/run_2007_01_01_16_38_27.xml +2020 -0
  18. data/data/run_2007_01_06_15_27_31.xml +2020 -0
  19. data/data/run_2007_01_10_12_25_47.xml +820 -0
  20. data/data/run_2007_01_10_22_44_54.csv +112 -0
  21. data/data/run_2007_01_10_22_44_54.xml +908 -0
  22. data/data/run_2007_01_11_10_48_45.xml +1292 -0
  23. data/data/run_2007_01_13_15_37_06.xml +1964 -0
  24. data/data/run_2007_01_14_15_46_02.xml +1368 -0
  25. data/data/run_2007_01_15_14_01_48.xml +1868 -0
  26. data/data/run_2007_01_20_16_22_05.xml +1702 -0
  27. data/data/run_2007_01_27_17_32_13.xml +3626 -0
  28. data/data/run_2007_01_28_19_14_52.xml +2538 -0
  29. data/data/run_2007_02_03_14_30_20.xml +2016 -0
  30. data/data/run_2007_02_04_18_02_30.xml +1476 -0
  31. data/data/run_2007_02_17_16_29_35.xml +1236 -0
  32. data/data/run_2007_02_19_14_44_33.xml +1816 -0
  33. data/data/run_2007_02_23_15_53_55.xml +36 -0
  34. data/data/run_2007_02_23_15_55_20.xml +1296 -0
  35. data/data/run_2007_02_24_15_01_35.csv +484 -0
  36. data/data/run_2007_02_24_15_01_35.xml +3884 -0
  37. data/data/test1.txt +4 -0
  38. data/img/gicons/blank.png +0 -0
  39. data/img/gicons/dd-end.png +0 -0
  40. data/img/gicons/dd-start.png +0 -0
  41. data/img/gicons/marker.png +0 -0
  42. data/img/gicons/marker0.png +0 -0
  43. data/img/gicons/marker00.png +0 -0
  44. data/img/gicons/marker01.png +0 -0
  45. data/img/gicons/marker02.png +0 -0
  46. data/img/gicons/marker03.png +0 -0
  47. data/img/gicons/marker04.png +0 -0
  48. data/img/gicons/marker05.png +0 -0
  49. data/img/gicons/marker06.png +0 -0
  50. data/img/gicons/marker07.png +0 -0
  51. data/img/gicons/marker08.png +0 -0
  52. data/img/gicons/marker09.png +0 -0
  53. data/img/gicons/marker1.png +0 -0
  54. data/img/gicons/marker10.png +0 -0
  55. data/img/gicons/marker11.png +0 -0
  56. data/img/gicons/marker12.png +0 -0
  57. data/img/gicons/marker13.png +0 -0
  58. data/img/gicons/marker14.png +0 -0
  59. data/img/gicons/marker15.png +0 -0
  60. data/img/gicons/marker16.png +0 -0
  61. data/img/gicons/marker17.png +0 -0
  62. data/img/gicons/marker18.png +0 -0
  63. data/img/gicons/marker19.png +0 -0
  64. data/img/gicons/marker2.png +0 -0
  65. data/img/gicons/marker20.png +0 -0
  66. data/img/gicons/marker21.png +0 -0
  67. data/img/gicons/marker22.png +0 -0
  68. data/img/gicons/marker23.png +0 -0
  69. data/img/gicons/marker24.png +0 -0
  70. data/img/gicons/marker25.png +0 -0
  71. data/img/gicons/marker26.png +0 -0
  72. data/img/gicons/marker27.png +0 -0
  73. data/img/gicons/marker28.png +0 -0
  74. data/img/gicons/marker29.png +0 -0
  75. data/img/gicons/marker3.png +0 -0
  76. data/img/gicons/marker30.png +0 -0
  77. data/img/gicons/marker31.png +0 -0
  78. data/img/gicons/marker32.png +0 -0
  79. data/img/gicons/marker33.png +0 -0
  80. data/img/gicons/marker34.png +0 -0
  81. data/img/gicons/marker35.png +0 -0
  82. data/img/gicons/marker36.png +0 -0
  83. data/img/gicons/marker37.png +0 -0
  84. data/img/gicons/marker38.png +0 -0
  85. data/img/gicons/marker39.png +0 -0
  86. data/img/gicons/marker4.png +0 -0
  87. data/img/gicons/marker40.png +0 -0
  88. data/img/gicons/marker41.png +0 -0
  89. data/img/gicons/marker42.png +0 -0
  90. data/img/gicons/marker43.png +0 -0
  91. data/img/gicons/marker44.png +0 -0
  92. data/img/gicons/marker45.png +0 -0
  93. data/img/gicons/marker46.png +0 -0
  94. data/img/gicons/marker47.png +0 -0
  95. data/img/gicons/marker48.png +0 -0
  96. data/img/gicons/marker49.png +0 -0
  97. data/img/gicons/marker5.png +0 -0
  98. data/img/gicons/marker50.png +0 -0
  99. data/img/gicons/marker51.png +0 -0
  100. data/img/gicons/marker52.png +0 -0
  101. data/img/gicons/marker53.png +0 -0
  102. data/img/gicons/marker54.png +0 -0
  103. data/img/gicons/marker55.png +0 -0
  104. data/img/gicons/marker56.png +0 -0
  105. data/img/gicons/marker57.png +0 -0
  106. data/img/gicons/marker58.png +0 -0
  107. data/img/gicons/marker59.png +0 -0
  108. data/img/gicons/marker6.png +0 -0
  109. data/img/gicons/marker60.png +0 -0
  110. data/img/gicons/marker61.png +0 -0
  111. data/img/gicons/marker62.png +0 -0
  112. data/img/gicons/marker63.png +0 -0
  113. data/img/gicons/marker64.png +0 -0
  114. data/img/gicons/marker65.png +0 -0
  115. data/img/gicons/marker66.png +0 -0
  116. data/img/gicons/marker67.png +0 -0
  117. data/img/gicons/marker68.png +0 -0
  118. data/img/gicons/marker69.png +0 -0
  119. data/img/gicons/marker7.png +0 -0
  120. data/img/gicons/marker70.png +0 -0
  121. data/img/gicons/marker71.png +0 -0
  122. data/img/gicons/marker72.png +0 -0
  123. data/img/gicons/marker73.png +0 -0
  124. data/img/gicons/marker74.png +0 -0
  125. data/img/gicons/marker75.png +0 -0
  126. data/img/gicons/marker76.png +0 -0
  127. data/img/gicons/marker77.png +0 -0
  128. data/img/gicons/marker78.png +0 -0
  129. data/img/gicons/marker79.png +0 -0
  130. data/img/gicons/marker8.png +0 -0
  131. data/img/gicons/marker80.png +0 -0
  132. data/img/gicons/marker81.png +0 -0
  133. data/img/gicons/marker82.png +0 -0
  134. data/img/gicons/marker83.png +0 -0
  135. data/img/gicons/marker84.png +0 -0
  136. data/img/gicons/marker85.png +0 -0
  137. data/img/gicons/marker86.png +0 -0
  138. data/img/gicons/marker87.png +0 -0
  139. data/img/gicons/marker88.png +0 -0
  140. data/img/gicons/marker89.png +0 -0
  141. data/img/gicons/marker9.png +0 -0
  142. data/img/gicons/marker90.png +0 -0
  143. data/img/gicons/marker91.png +0 -0
  144. data/img/gicons/marker92.png +0 -0
  145. data/img/gicons/marker93.png +0 -0
  146. data/img/gicons/marker94.png +0 -0
  147. data/img/gicons/marker95.png +0 -0
  148. data/img/gicons/marker96.png +0 -0
  149. data/img/gicons/marker97.png +0 -0
  150. data/img/gicons/marker98.png +0 -0
  151. data/img/gicons/marker99.png +0 -0
  152. data/img/gicons/markerA.png +0 -0
  153. data/img/gicons/markerB.png +0 -0
  154. data/img/gicons/markerC.png +0 -0
  155. data/img/gicons/markerD.png +0 -0
  156. data/img/gicons/markerE.png +0 -0
  157. data/img/gicons/markerF.png +0 -0
  158. data/img/gicons/markerG.png +0 -0
  159. data/img/gicons/markerH.png +0 -0
  160. data/img/gicons/markerI.png +0 -0
  161. data/img/gicons/markerJ.png +0 -0
  162. data/img/gicons/mm_20_red.png +0 -0
  163. data/img/gicons/mm_20_shadow.png +0 -0
  164. data/img/gicons/readme.txt +11 -0
  165. data/img/gicons/shadow50.png +0 -0
  166. data/lib/gooby/cls_counter_hash.rb +78 -0
  167. data/lib/gooby/cls_delim_line.rb +35 -0
  168. data/lib/gooby/cls_dttm.rb +79 -0
  169. data/lib/gooby/cls_duration.rb +79 -0
  170. data/lib/gooby/cls_forerunner_xml_parser.rb +178 -0
  171. data/lib/gooby/cls_forerunner_xml_splitter.rb +109 -0
  172. data/lib/gooby/cls_geo_data.rb +181 -0
  173. data/lib/gooby/cls_gooby_command.rb +35 -0
  174. data/lib/gooby/cls_gooby_object.rb +18 -0
  175. data/lib/gooby/cls_google_map_generator.rb +363 -0
  176. data/lib/gooby/cls_history.rb +33 -0
  177. data/lib/gooby/cls_lap.rb +22 -0
  178. data/lib/gooby/cls_line.rb +75 -0
  179. data/lib/gooby/cls_options.rb +67 -0
  180. data/lib/gooby/cls_position.rb +44 -0
  181. data/lib/gooby/cls_run.rb +194 -0
  182. data/lib/gooby/cls_simple_xml_parser.rb +41 -0
  183. data/lib/gooby/cls_test_regen.rb +182 -0
  184. data/lib/gooby/cls_track.rb +47 -0
  185. data/lib/gooby/cls_trackpoint.rb +200 -0
  186. data/lib/gooby/mod_introspect.rb +26 -0
  187. data/lib/gooby/mod_io.rb +58 -0
  188. data/lib/gooby/mod_project_info.rb +80 -0
  189. data/lib/gooby/mod_string.rb +19 -0
  190. data/lib/gooby/mod_test_helper.rb +15 -0
  191. data/lib/gooby.rb +2265 -0
  192. data/pkg/code_header.txt +21 -0
  193. data/pkg/pkg.rb +236 -0
  194. data/pkg/test_header.txt +19 -0
  195. data/samples/20041113_richmond_marathon.html +532 -0
  196. data/samples/20050305_corporate_cup_hm.html +448 -0
  197. data/samples/20050430_nashville_marathon.html +530 -0
  198. data/samples/gps_point_capture.html +54 -0
  199. data/samples/phoenix_marathon.html +542 -0
  200. data/samples/run_2007_01_10_22_44_54.html +201 -0
  201. data/samples/run_2007_02_24_15_01_35.html +298 -0
  202. data/tests/tc_cls_counter_hash.rb +107 -0
  203. data/tests/tc_cls_delim_line.rb +74 -0
  204. data/tests/tc_cls_dttm.rb +131 -0
  205. data/tests/tc_cls_duration.rb +51 -0
  206. data/tests/tc_cls_forerunner_xml_parser.rb +70 -0
  207. data/tests/tc_cls_geo_data.xxx +71 -0
  208. data/tests/tc_cls_gooby_object.rb +26 -0
  209. data/tests/tc_cls_google_map_generator.rb +109 -0
  210. data/tests/tc_cls_history.rb +46 -0
  211. data/tests/tc_cls_lap.rb +38 -0
  212. data/tests/tc_cls_line.rb +110 -0
  213. data/tests/tc_cls_options.rb +79 -0
  214. data/tests/tc_cls_position.rb +66 -0
  215. data/tests/tc_cls_run.rb +142 -0
  216. data/tests/tc_cls_simple_xml_parser.rb +50 -0
  217. data/tests/tc_cls_track.rb +70 -0
  218. data/tests/tc_cls_trackpoint.rb +145 -0
  219. data/tests/tc_mod_introspect.rb +32 -0
  220. data/tests/tc_mod_io.rb +53 -0
  221. data/tests/tc_mod_project_info.rb +79 -0
  222. data/tests/tc_mod_string.rb +58 -0
  223. data/tests/ts_gooby.rb +1237 -0
  224. metadata +270 -0
@@ -0,0 +1,32 @@
1
+ ### Copyright 2007 by Chris Joakim.
2
+ ### Gooby is available under GNU General Public License (GPL) license.
3
+
4
+ =begin rdoc
5
+
6
+ This class tests the functionality in module Gooby::Introspect.
7
+
8
+ =end
9
+
10
+ require 'gooby'
11
+ require 'test/unit'
12
+
13
+ class TestModuleIntrospect < Test::Unit::TestCase
14
+
15
+ include Gooby::TestHelper
16
+
17
+ @debug = false
18
+
19
+ ### Start of tests. Keep this line - see class TestGenerator.
20
+
21
+ def test_module_Introspect
22
+
23
+ end
24
+
25
+ def test_module_Introspect_introspect
26
+
27
+ end
28
+
29
+ def test_module_Introspect_to_yaml_properties
30
+
31
+ end
32
+ end
@@ -0,0 +1,53 @@
1
+ ### Copyright 2007 by Chris Joakim.
2
+ ### Gooby is available under GNU General Public License (GPL) license.
3
+
4
+ =begin rdoc
5
+
6
+ This class tests the functionality in module Gooby::GoobyIO.
7
+
8
+ =end
9
+
10
+ require 'gooby'
11
+ require 'test/unit'
12
+
13
+ class TestModuleGoobyIO < Test::Unit::TestCase
14
+
15
+ include Gooby::TestHelper
16
+
17
+ @debug = false
18
+
19
+ ### Start of tests. Keep this line - see class TestGenerator.
20
+
21
+ def test_module_GoobyIO
22
+
23
+ fn = 'data/test1.txt'
24
+ obj = Gooby::GoobyObject.new
25
+ a1 = obj.read_lines(fn, false)
26
+ a2 = obj.read_lines(fn, true)
27
+ a3 = obj.read_as_ascii_lines(fn, 10, false)
28
+
29
+ puts '' if @debug
30
+ a1.each { |line| puts line } if @debug
31
+ a2.each { |line| puts line } if @debug
32
+ a3.each { |line| puts line } if @debug
33
+
34
+ assert_equal('This is just a file', a2[0], "a2[0] is not as expected.")
35
+ assert_equal('This is just a file', a3[0], "a3[0] is not as expected.")
36
+ assert_equal('test data.', a2[3], "a2[1] is not as expected.")
37
+ assert_equal(' test data.', a3[3], "a3[3] is not as expected.")
38
+
39
+ puts "todo: implement #{name}" if @debug
40
+ end
41
+
42
+ def test_module_GoobyIO_read_as_ascii_lines
43
+
44
+ end
45
+
46
+ def test_module_GoobyIO_read_lines
47
+
48
+ end
49
+
50
+ def test_module_GoobyIO_strip_lines
51
+
52
+ end
53
+ end
@@ -0,0 +1,79 @@
1
+ ### Copyright 2007 by Chris Joakim.
2
+ ### Gooby is available under GNU General Public License (GPL) license.
3
+
4
+ =begin rdoc
5
+
6
+ This class tests the functionality in module Gooby::ProjectInfo.
7
+
8
+ =end
9
+
10
+ require 'gooby'
11
+ require 'test/unit'
12
+
13
+ class TestModuleProjectInfo < Test::Unit::TestCase
14
+
15
+ include Gooby::TestHelper
16
+
17
+ @debug = false
18
+
19
+ ### Start of tests. Keep this line - see class TestGenerator.
20
+
21
+ def test_module_GoobyProjectInfo
22
+
23
+ end
24
+
25
+ def test_module_GoobyProjectInfo_google_maps_api_level
26
+
27
+ obj = Gooby::GoobyObject.new
28
+ assert_equal '2', obj.google_maps_api_level
29
+ end
30
+
31
+ def test_module_GoobyProjectInfo_project_author
32
+
33
+ obj = Gooby::GoobyObject.new
34
+ end
35
+
36
+ def test_module_GoobyProjectInfo_project_copyright
37
+
38
+ end
39
+
40
+ # Warning: possible obsolete test method - test_module_GoobyProjectInfo_project_copyrightttt
41
+
42
+ def test_module_GoobyProjectInfo_project_copyrightttt
43
+
44
+ obj = Gooby::GoobyObject.new
45
+ assert_equal 'Copyright (C) 2007 Chris Joakim', obj.project_copyright
46
+ end
47
+
48
+ def test_module_GoobyProjectInfo_project_date
49
+
50
+ obj = Gooby::GoobyObject.new
51
+ assert_equal '2007/03/03', obj.project_date
52
+ end
53
+
54
+ def test_module_GoobyProjectInfo_project_license
55
+
56
+ obj = Gooby::GoobyObject.new
57
+ assert_equal 'GNU General Public License (GPL). See http://www.gnu.org/copyleft/gpl.html', obj.project_license
58
+ end
59
+
60
+ def test_module_GoobyProjectInfo_project_version_number
61
+
62
+ obj = Gooby::GoobyObject.new
63
+ assert_equal '0.9.3', obj.project_version_number
64
+ end
65
+
66
+ def test_module_GoobyProjectInfo_project_year
67
+
68
+ obj = Gooby::GoobyObject.new
69
+ assert_equal '2007', obj.project_year
70
+ end
71
+
72
+ def test_module_GoobyProjectInfo_some_new_thing
73
+
74
+ end
75
+
76
+ def test_module_GoobyProjectInfo_tested_files
77
+
78
+ end
79
+ end
@@ -0,0 +1,58 @@
1
+ ### Copyright 2007 by Chris Joakim.
2
+ ### Gooby is available under GNU General Public License (GPL) license.
3
+
4
+ =begin rdoc
5
+
6
+ This class tests the functionality in module Gooby::GoobyString.
7
+
8
+ =end
9
+
10
+ require 'gooby'
11
+ require 'test/unit'
12
+
13
+ class TestModuleGoobyString < Test::Unit::TestCase
14
+
15
+ include Gooby::TestHelper
16
+
17
+ @debug = false
18
+
19
+ ### Start of tests. Keep this line - see class TestGenerator.
20
+
21
+ def test_module_GoobyString
22
+
23
+ end
24
+
25
+ def test_module_GoobyString_tokenize
26
+
27
+ obj = Gooby::GoobyObject.new
28
+ s = '35.4954711908794 -80.83214521408081 Home at South Faulkner Way Stopsign'
29
+ array = obj.tokenize(s, nil)
30
+ actual = array.size
31
+ expected = 8
32
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
33
+
34
+ actual = array[1]
35
+ expected = '-80.83214521408081'
36
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
37
+
38
+ actual = array[6]
39
+ expected = 'Way'
40
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
41
+
42
+ obj = Gooby::GoobyObject.new
43
+ s = 'twain , faulkner, wolfe, caldwell '
44
+ array = obj.tokenize(s, ',', false)
45
+
46
+ actual = array.size
47
+ expected = 4
48
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
49
+
50
+ actual = array[0]
51
+ expected = 'twain '
52
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
53
+
54
+ actual = array[3]
55
+ expected = ' caldwell '
56
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
57
+ end
58
+ end