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.
- data/README +242 -0
- data/bin/example_usage.rb +38 -0
- data/bin/tests_gen.rb +16 -0
- data/data/20050305_corporate_cup_hm.csv +251 -0
- data/data/20050305_corporate_cup_hm.xml +2208 -0
- data/data/20050430_nashville_marathon.csv +1208 -0
- data/data/20050430_nashville_marathon.xml +10043 -0
- data/data/20051119_dowd_ymca_hm.csv +251 -0
- data/data/20051119_dowd_ymca_hm.xml +2210 -0
- data/data/20051124_hyatt_turkey_trot_8K.csv +321 -0
- data/data/20051124_hyatt_turkey_trot_8K.xml +2651 -0
- data/data/2007_03_03.tcx +6207 -0
- data/data/forerunner_2007.xml +259014 -0
- data/data/geo_data.txt +171 -0
- data/data/phx.csv +1280 -0
- data/data/phx.xml +10620 -0
- data/data/run_2007_01_01_16_38_27.xml +2020 -0
- data/data/run_2007_01_06_15_27_31.xml +2020 -0
- data/data/run_2007_01_10_12_25_47.xml +820 -0
- data/data/run_2007_01_10_22_44_54.csv +112 -0
- data/data/run_2007_01_10_22_44_54.xml +908 -0
- data/data/run_2007_01_11_10_48_45.xml +1292 -0
- data/data/run_2007_01_13_15_37_06.xml +1964 -0
- data/data/run_2007_01_14_15_46_02.xml +1368 -0
- data/data/run_2007_01_15_14_01_48.xml +1868 -0
- data/data/run_2007_01_20_16_22_05.xml +1702 -0
- data/data/run_2007_01_27_17_32_13.xml +3626 -0
- data/data/run_2007_01_28_19_14_52.xml +2538 -0
- data/data/run_2007_02_03_14_30_20.xml +2016 -0
- data/data/run_2007_02_04_18_02_30.xml +1476 -0
- data/data/run_2007_02_17_16_29_35.xml +1236 -0
- data/data/run_2007_02_19_14_44_33.xml +1816 -0
- data/data/run_2007_02_23_15_53_55.xml +36 -0
- data/data/run_2007_02_23_15_55_20.xml +1296 -0
- data/data/run_2007_02_24_15_01_35.csv +484 -0
- data/data/run_2007_02_24_15_01_35.xml +3884 -0
- data/data/test1.txt +4 -0
- data/img/gicons/blank.png +0 -0
- data/img/gicons/dd-end.png +0 -0
- data/img/gicons/dd-start.png +0 -0
- data/img/gicons/marker.png +0 -0
- data/img/gicons/marker0.png +0 -0
- data/img/gicons/marker00.png +0 -0
- data/img/gicons/marker01.png +0 -0
- data/img/gicons/marker02.png +0 -0
- data/img/gicons/marker03.png +0 -0
- data/img/gicons/marker04.png +0 -0
- data/img/gicons/marker05.png +0 -0
- data/img/gicons/marker06.png +0 -0
- data/img/gicons/marker07.png +0 -0
- data/img/gicons/marker08.png +0 -0
- data/img/gicons/marker09.png +0 -0
- data/img/gicons/marker1.png +0 -0
- data/img/gicons/marker10.png +0 -0
- data/img/gicons/marker11.png +0 -0
- data/img/gicons/marker12.png +0 -0
- data/img/gicons/marker13.png +0 -0
- data/img/gicons/marker14.png +0 -0
- data/img/gicons/marker15.png +0 -0
- data/img/gicons/marker16.png +0 -0
- data/img/gicons/marker17.png +0 -0
- data/img/gicons/marker18.png +0 -0
- data/img/gicons/marker19.png +0 -0
- data/img/gicons/marker2.png +0 -0
- data/img/gicons/marker20.png +0 -0
- data/img/gicons/marker21.png +0 -0
- data/img/gicons/marker22.png +0 -0
- data/img/gicons/marker23.png +0 -0
- data/img/gicons/marker24.png +0 -0
- data/img/gicons/marker25.png +0 -0
- data/img/gicons/marker26.png +0 -0
- data/img/gicons/marker27.png +0 -0
- data/img/gicons/marker28.png +0 -0
- data/img/gicons/marker29.png +0 -0
- data/img/gicons/marker3.png +0 -0
- data/img/gicons/marker30.png +0 -0
- data/img/gicons/marker31.png +0 -0
- data/img/gicons/marker32.png +0 -0
- data/img/gicons/marker33.png +0 -0
- data/img/gicons/marker34.png +0 -0
- data/img/gicons/marker35.png +0 -0
- data/img/gicons/marker36.png +0 -0
- data/img/gicons/marker37.png +0 -0
- data/img/gicons/marker38.png +0 -0
- data/img/gicons/marker39.png +0 -0
- data/img/gicons/marker4.png +0 -0
- data/img/gicons/marker40.png +0 -0
- data/img/gicons/marker41.png +0 -0
- data/img/gicons/marker42.png +0 -0
- data/img/gicons/marker43.png +0 -0
- data/img/gicons/marker44.png +0 -0
- data/img/gicons/marker45.png +0 -0
- data/img/gicons/marker46.png +0 -0
- data/img/gicons/marker47.png +0 -0
- data/img/gicons/marker48.png +0 -0
- data/img/gicons/marker49.png +0 -0
- data/img/gicons/marker5.png +0 -0
- data/img/gicons/marker50.png +0 -0
- data/img/gicons/marker51.png +0 -0
- data/img/gicons/marker52.png +0 -0
- data/img/gicons/marker53.png +0 -0
- data/img/gicons/marker54.png +0 -0
- data/img/gicons/marker55.png +0 -0
- data/img/gicons/marker56.png +0 -0
- data/img/gicons/marker57.png +0 -0
- data/img/gicons/marker58.png +0 -0
- data/img/gicons/marker59.png +0 -0
- data/img/gicons/marker6.png +0 -0
- data/img/gicons/marker60.png +0 -0
- data/img/gicons/marker61.png +0 -0
- data/img/gicons/marker62.png +0 -0
- data/img/gicons/marker63.png +0 -0
- data/img/gicons/marker64.png +0 -0
- data/img/gicons/marker65.png +0 -0
- data/img/gicons/marker66.png +0 -0
- data/img/gicons/marker67.png +0 -0
- data/img/gicons/marker68.png +0 -0
- data/img/gicons/marker69.png +0 -0
- data/img/gicons/marker7.png +0 -0
- data/img/gicons/marker70.png +0 -0
- data/img/gicons/marker71.png +0 -0
- data/img/gicons/marker72.png +0 -0
- data/img/gicons/marker73.png +0 -0
- data/img/gicons/marker74.png +0 -0
- data/img/gicons/marker75.png +0 -0
- data/img/gicons/marker76.png +0 -0
- data/img/gicons/marker77.png +0 -0
- data/img/gicons/marker78.png +0 -0
- data/img/gicons/marker79.png +0 -0
- data/img/gicons/marker8.png +0 -0
- data/img/gicons/marker80.png +0 -0
- data/img/gicons/marker81.png +0 -0
- data/img/gicons/marker82.png +0 -0
- data/img/gicons/marker83.png +0 -0
- data/img/gicons/marker84.png +0 -0
- data/img/gicons/marker85.png +0 -0
- data/img/gicons/marker86.png +0 -0
- data/img/gicons/marker87.png +0 -0
- data/img/gicons/marker88.png +0 -0
- data/img/gicons/marker89.png +0 -0
- data/img/gicons/marker9.png +0 -0
- data/img/gicons/marker90.png +0 -0
- data/img/gicons/marker91.png +0 -0
- data/img/gicons/marker92.png +0 -0
- data/img/gicons/marker93.png +0 -0
- data/img/gicons/marker94.png +0 -0
- data/img/gicons/marker95.png +0 -0
- data/img/gicons/marker96.png +0 -0
- data/img/gicons/marker97.png +0 -0
- data/img/gicons/marker98.png +0 -0
- data/img/gicons/marker99.png +0 -0
- data/img/gicons/markerA.png +0 -0
- data/img/gicons/markerB.png +0 -0
- data/img/gicons/markerC.png +0 -0
- data/img/gicons/markerD.png +0 -0
- data/img/gicons/markerE.png +0 -0
- data/img/gicons/markerF.png +0 -0
- data/img/gicons/markerG.png +0 -0
- data/img/gicons/markerH.png +0 -0
- data/img/gicons/markerI.png +0 -0
- data/img/gicons/markerJ.png +0 -0
- data/img/gicons/mm_20_red.png +0 -0
- data/img/gicons/mm_20_shadow.png +0 -0
- data/img/gicons/readme.txt +11 -0
- data/img/gicons/shadow50.png +0 -0
- data/lib/gooby/cls_counter_hash.rb +78 -0
- data/lib/gooby/cls_delim_line.rb +35 -0
- data/lib/gooby/cls_dttm.rb +79 -0
- data/lib/gooby/cls_duration.rb +79 -0
- data/lib/gooby/cls_forerunner_xml_parser.rb +178 -0
- data/lib/gooby/cls_forerunner_xml_splitter.rb +109 -0
- data/lib/gooby/cls_geo_data.rb +181 -0
- data/lib/gooby/cls_gooby_command.rb +35 -0
- data/lib/gooby/cls_gooby_object.rb +18 -0
- data/lib/gooby/cls_google_map_generator.rb +363 -0
- data/lib/gooby/cls_history.rb +33 -0
- data/lib/gooby/cls_lap.rb +22 -0
- data/lib/gooby/cls_line.rb +75 -0
- data/lib/gooby/cls_options.rb +67 -0
- data/lib/gooby/cls_position.rb +44 -0
- data/lib/gooby/cls_run.rb +194 -0
- data/lib/gooby/cls_simple_xml_parser.rb +41 -0
- data/lib/gooby/cls_test_regen.rb +182 -0
- data/lib/gooby/cls_track.rb +47 -0
- data/lib/gooby/cls_trackpoint.rb +200 -0
- data/lib/gooby/mod_introspect.rb +26 -0
- data/lib/gooby/mod_io.rb +58 -0
- data/lib/gooby/mod_project_info.rb +80 -0
- data/lib/gooby/mod_string.rb +19 -0
- data/lib/gooby/mod_test_helper.rb +15 -0
- data/lib/gooby.rb +2265 -0
- data/pkg/code_header.txt +21 -0
- data/pkg/pkg.rb +236 -0
- data/pkg/test_header.txt +19 -0
- data/samples/20041113_richmond_marathon.html +532 -0
- data/samples/20050305_corporate_cup_hm.html +448 -0
- data/samples/20050430_nashville_marathon.html +530 -0
- data/samples/gps_point_capture.html +54 -0
- data/samples/phoenix_marathon.html +542 -0
- data/samples/run_2007_01_10_22_44_54.html +201 -0
- data/samples/run_2007_02_24_15_01_35.html +298 -0
- data/tests/tc_cls_counter_hash.rb +107 -0
- data/tests/tc_cls_delim_line.rb +74 -0
- data/tests/tc_cls_dttm.rb +131 -0
- data/tests/tc_cls_duration.rb +51 -0
- data/tests/tc_cls_forerunner_xml_parser.rb +70 -0
- data/tests/tc_cls_geo_data.xxx +71 -0
- data/tests/tc_cls_gooby_object.rb +26 -0
- data/tests/tc_cls_google_map_generator.rb +109 -0
- data/tests/tc_cls_history.rb +46 -0
- data/tests/tc_cls_lap.rb +38 -0
- data/tests/tc_cls_line.rb +110 -0
- data/tests/tc_cls_options.rb +79 -0
- data/tests/tc_cls_position.rb +66 -0
- data/tests/tc_cls_run.rb +142 -0
- data/tests/tc_cls_simple_xml_parser.rb +50 -0
- data/tests/tc_cls_track.rb +70 -0
- data/tests/tc_cls_trackpoint.rb +145 -0
- data/tests/tc_mod_introspect.rb +32 -0
- data/tests/tc_mod_io.rb +53 -0
- data/tests/tc_mod_project_info.rb +79 -0
- data/tests/tc_mod_string.rb +58 -0
- data/tests/ts_gooby.rb +1237 -0
- 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
|
data/tests/tc_mod_io.rb
ADDED
|
@@ -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
|