gooby 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README +48 -67
- data/bin/20050305_corporate_cup_hm_to_csv.rb +9 -0
- data/bin/20050430_nashville_marathon_to_csv.rb +9 -0
- data/bin/20060115_phoenix_marathon_to_csv.rb +9 -0
- data/bin/activity_2007_03_10_13_02_32.xml_to_csv.rb +9 -0
- data/bin/{tests_gen.rb → code_scan.rb} +6 -4
- data/bin/example_usage.rb +2 -3
- data/bin/example_usage.sh +52 -0
- data/bin/gen_gap_phx.rb +10 -0
- data/bin/gen_gmap_cc_2005.rb +10 -0
- data/bin/gen_gmap_cc_2007.rb +10 -0
- data/bin/gen_gmap_nashville.rb +10 -0
- data/bin/gen_gmap_phx.rb +10 -0
- data/bin/phx_to_csv.rb +47 -0
- data/bin/split_forerunner_logbook_2007.rb +10 -0
- data/bin/split_training_center_2007.rb +8 -0
- data/data/{2007_03_04.tcx → 2007_03_10.tcx} +11694 -0
- data/data/activity_2007_03_10_13_02_32.csv +1168 -0
- data/data/activity_2007_03_10_13_02_32.xml +11695 -0
- data/data/forerunner_2007.xml +0 -227142
- data/img/gicons/readme.txt +3 -0
- data/lib/gooby.rb +625 -552
- data/samples/20050305_corporate_cup_hm.html +271 -269
- data/samples/20050430_nashville_marathon.html +1240 -246
- data/samples/20060115_phoenix_marathon.html +1596 -0
- data/samples/20070310_corporate_cup_hm.html +1367 -0
- data/samples/phoenix_marathon.html +1312 -258
- data/tests/ts_gooby.rb +423 -551
- data/tests/ts_gooby_min.rb +550 -0
- metadata +25 -67
- data/bin/tcx_ex.rb +0 -35
- data/data/20051124_hyatt_turkey_trot_8K.csv +0 -321
- data/data/20051124_hyatt_turkey_trot_8K.xml +0 -2651
- data/data/2007_03_03.tcx +0 -6207
- data/data/activity_2007_03_04_15_22_36.xml +0 -10545
- data/data/run_2007_01_01_16_38_27.xml +0 -2020
- data/data/run_2007_02_24_15_01_35.csv +0 -484
- data/data/run_2007_02_24_15_01_35.xml +0 -3884
- data/lib/gooby/cls_counter_hash.rb +0 -78
- data/lib/gooby/cls_delim_line.rb +0 -35
- data/lib/gooby/cls_dttm.rb +0 -79
- data/lib/gooby/cls_duration.rb +0 -79
- data/lib/gooby/cls_forerunner_xml_parser.rb +0 -178
- data/lib/gooby/cls_forerunner_xml_splitter.rb +0 -109
- data/lib/gooby/cls_geo_data.rb +0 -181
- data/lib/gooby/cls_gooby_command.rb +0 -46
- data/lib/gooby/cls_gooby_object.rb +0 -18
- data/lib/gooby/cls_google_map_generator.rb +0 -363
- data/lib/gooby/cls_history.rb +0 -33
- data/lib/gooby/cls_lap.rb +0 -22
- data/lib/gooby/cls_line.rb +0 -75
- data/lib/gooby/cls_options.rb +0 -67
- data/lib/gooby/cls_position.rb +0 -44
- data/lib/gooby/cls_run.rb +0 -194
- data/lib/gooby/cls_simple_xml_parser.rb +0 -41
- data/lib/gooby/cls_test_regen.rb +0 -182
- data/lib/gooby/cls_track.rb +0 -47
- data/lib/gooby/cls_trackpoint.rb +0 -200
- data/lib/gooby/cls_training_center_parser.rb +0 -183
- data/lib/gooby/cls_training_center_splitter.rb +0 -109
- data/lib/gooby/mod_introspect.rb +0 -26
- data/lib/gooby/mod_io.rb +0 -58
- data/lib/gooby/mod_project_info.rb +0 -80
- data/lib/gooby/mod_string.rb +0 -19
- data/lib/gooby/mod_test_helper.rb +0 -15
- data/samples/20041113_richmond_marathon.html +0 -532
- data/samples/run_2007_01_10_22_44_54.html +0 -201
- data/samples/run_2007_02_24_15_01_35.html +0 -298
- data/tests/tc_cls_counter_hash.rb +0 -107
- data/tests/tc_cls_delim_line.rb +0 -74
- data/tests/tc_cls_dttm.rb +0 -131
- data/tests/tc_cls_duration.rb +0 -51
- data/tests/tc_cls_forerunner_xml_parser.rb +0 -70
- data/tests/tc_cls_geo_data.xxx +0 -71
- data/tests/tc_cls_gooby_object.rb +0 -26
- data/tests/tc_cls_google_map_generator.rb +0 -109
- data/tests/tc_cls_history.rb +0 -46
- data/tests/tc_cls_lap.rb +0 -38
- data/tests/tc_cls_line.rb +0 -110
- data/tests/tc_cls_options.rb +0 -79
- data/tests/tc_cls_position.rb +0 -66
- data/tests/tc_cls_run.rb +0 -142
- data/tests/tc_cls_simple_xml_parser.rb +0 -50
- data/tests/tc_cls_track.rb +0 -70
- data/tests/tc_cls_trackpoint.rb +0 -145
- data/tests/tc_mod_introspect.rb +0 -32
- data/tests/tc_mod_io.rb +0 -53
- data/tests/tc_mod_project_info.rb +0 -79
- data/tests/tc_mod_string.rb +0 -58
- /data/data/{phx.csv → 20060115_phoenix_marathon.csv} +0 -0
- /data/data/{phx.xml → 20060115_phoenix_marathon.xml} +0 -0
@@ -1,107 +0,0 @@
|
|
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 class Gooby::CounterHash.
|
7
|
-
|
8
|
-
=end
|
9
|
-
|
10
|
-
require 'gooby'
|
11
|
-
require 'test/unit'
|
12
|
-
|
13
|
-
class TestClassCounterHash < 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_class_CounterHash
|
22
|
-
|
23
|
-
# See the method-level tests below.
|
24
|
-
end
|
25
|
-
|
26
|
-
def test_class_CounterHash_decrement
|
27
|
-
|
28
|
-
cHash = Gooby::CounterHash.new
|
29
|
-
7.times { cHash.decrement("seven") }
|
30
|
-
391.times { cHash.decrement("391") }
|
31
|
-
assert(cHash.value('seven') == -7, "decremented value not -7.")
|
32
|
-
assert(cHash.value('391') == -391, "decremented value not -391.")
|
33
|
-
assert(cHash.sorted_keys.size == 2, "sorted_keys size is not 2.")
|
34
|
-
end
|
35
|
-
|
36
|
-
def test_class_CounterHash_increment
|
37
|
-
|
38
|
-
cHash = Gooby::CounterHash.new
|
39
|
-
33.times { cHash.increment("33") }
|
40
|
-
123.times { cHash.increment("123") }
|
41
|
-
assert(cHash.value('33') == 33, "incremented value not 33.")
|
42
|
-
assert(cHash.value('123') == 123, "incremented value not 123.")
|
43
|
-
assert(cHash.sorted_keys.size == 2, "sorted_keys size is not 2.")
|
44
|
-
end
|
45
|
-
|
46
|
-
def test_class_CounterHash_initialize
|
47
|
-
|
48
|
-
cHash = Gooby::CounterHash.new
|
49
|
-
assert(cHash.value('test') == 0, "initial value is not 0.")
|
50
|
-
assert(cHash.sorted_keys.size == 0, "sorted_keys size is not 0.")
|
51
|
-
end
|
52
|
-
|
53
|
-
def test_class_CounterHash_sorted_keys
|
54
|
-
|
55
|
-
cHash = Gooby::CounterHash.new
|
56
|
-
cHash.increment('OS/X')
|
57
|
-
cHash.decrement('Windows')
|
58
|
-
cHash.increment('Linux')
|
59
|
-
array = cHash.sorted_keys
|
60
|
-
assert(array.class == Array, "sorted_keys is not an Array; #{array.class}.")
|
61
|
-
assert(cHash.sorted_keys.size == 3, "sorted_keys size is not 3.")
|
62
|
-
assert(array[0] == 'Linux', "sorted_keys element 0 is incorrect.")
|
63
|
-
assert(array[1] == 'OS/X', "sorted_keys element 1 is incorrect.")
|
64
|
-
assert(array[2] == 'Windows', "sorted_keys element 2 is incorrect.")
|
65
|
-
end
|
66
|
-
|
67
|
-
def test_class_CounterHash_to_s
|
68
|
-
|
69
|
-
cHash = Gooby::CounterHash.new
|
70
|
-
cHash.increment("romeo")
|
71
|
-
cHash.increment("maybelline")
|
72
|
-
cHash.decrement("romeo")
|
73
|
-
cHash.increment("yingling")
|
74
|
-
cHash.increment("maybelline")
|
75
|
-
cHash.decrement("domino")
|
76
|
-
cHash.increment("yingling")
|
77
|
-
cHash.increment("maybelline")
|
78
|
-
cHash.increment("leppie")
|
79
|
-
|
80
|
-
expected = 'CHash: key: [domino] val: [-1] key: [leppie] val: [1] key: [maybelline] val: [3] key: [romeo] val: [0] key: [yingling] val: [2]'
|
81
|
-
actual = cHash.to_s
|
82
|
-
assert_equal(expected, actual, "to_s value is not as expected; #{actual} vs #{expected}")
|
83
|
-
end
|
84
|
-
|
85
|
-
def test_class_CounterHash_to_xml
|
86
|
-
|
87
|
-
cHash = Gooby::CounterHash.new
|
88
|
-
cHash.increment("romeo")
|
89
|
-
cHash.increment("maybelline")
|
90
|
-
cHash.decrement("romeo")
|
91
|
-
cHash.increment("yingling")
|
92
|
-
cHash.increment("maybelline")
|
93
|
-
cHash.decrement("domino")
|
94
|
-
cHash.increment("yingling")
|
95
|
-
cHash.increment("maybelline")
|
96
|
-
cHash.increment("leppie")
|
97
|
-
|
98
|
-
expected = "<CHash> <entry key='domino' value='-1'/> <entry key='leppie' value='1'/> <entry key='maybelline' value='3'/> <entry key='romeo' value='0'/> <entry key='yingling' value='2'/> </CHash>"
|
99
|
-
actual = cHash.to_xml(false)
|
100
|
-
assert_equal(expected, actual, "to_xml value is not as expected; #{actual} vs #{expected}")
|
101
|
-
end
|
102
|
-
|
103
|
-
def test_class_CounterHash_value
|
104
|
-
|
105
|
-
# This method is tested in the other test methods.
|
106
|
-
end
|
107
|
-
end
|
data/tests/tc_cls_delim_line.rb
DELETED
@@ -1,74 +0,0 @@
|
|
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 class Gooby::DelimLine.
|
7
|
-
|
8
|
-
=end
|
9
|
-
|
10
|
-
require 'gooby'
|
11
|
-
require 'test/unit'
|
12
|
-
|
13
|
-
class TestClassDelimLine < 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_class_DelimLine
|
22
|
-
|
23
|
-
line = '1 | 2007-01-01 | 16:38:43 | 1167669523 | 2 | 35.49532 | -80.83167 | 242.870 | 0.0313362638280469 '
|
24
|
-
dline = Gooby::DelimLine.new(line)
|
25
|
-
|
26
|
-
expected = 'DelimLine: length: 101 trim: true delim: | tokens: 9'
|
27
|
-
actual = dline.to_s
|
28
|
-
assert_equal(expected, actual, "to_xml value is not as expected; #{actual} vs #{expected}")
|
29
|
-
|
30
|
-
expected = '1'
|
31
|
-
actual = dline.tokens[0]
|
32
|
-
assert_equal(expected, actual, "to_xml value is not as expected; #{actual} vs #{expected}")
|
33
|
-
|
34
|
-
expected = '16:38:43'
|
35
|
-
actual = dline.tokens[2]
|
36
|
-
assert_equal(expected, actual, "to_xml value is not as expected; #{actual} vs #{expected}")
|
37
|
-
|
38
|
-
expected = '0.0313362638280469'
|
39
|
-
actual = dline.tokens[-1]
|
40
|
-
assert_equal(expected, actual, "to_xml value is not as expected; #{actual} vs #{expected}")
|
41
|
-
end
|
42
|
-
|
43
|
-
def test_class_DelimLine_as_trackpoint
|
44
|
-
|
45
|
-
line = '6 | 2007-01-13T16:35:53Z | 243 | 35.49517 | -80.83215 | 237.583 | 6.51627221396902 '
|
46
|
-
dline = Gooby::DelimLine.new(line)
|
47
|
-
tkpt = dline.as_trackpoint(0, 3, 4, 5, 1) # (numIdx, latIdx, lngIdx, altIdx, timeIdx)
|
48
|
-
end
|
49
|
-
|
50
|
-
def test_class_DelimLine_initialize
|
51
|
-
|
52
|
-
# This method is tested in the other test methods.
|
53
|
-
end
|
54
|
-
|
55
|
-
def test_class_DelimLine_is_comment?
|
56
|
-
|
57
|
-
dline = Gooby::DelimLine.new('# this is a comment line')
|
58
|
-
bool1 = dline.is_comment?
|
59
|
-
|
60
|
-
dline = Gooby::DelimLine.new('this is not a comment line')
|
61
|
-
bool2 = dline.is_comment?
|
62
|
-
|
63
|
-
dline = Gooby::DelimLine.new(' # this is a comment line')
|
64
|
-
bool3 = dline.is_comment?
|
65
|
-
|
66
|
-
assert(bool1 == true, "line 1 should be a comment")
|
67
|
-
assert(bool2 == false, "line 2 not should be a comment")
|
68
|
-
assert(bool3 == true, "line 3 should be a comment")
|
69
|
-
end
|
70
|
-
|
71
|
-
def test_class_DelimLine_to_s
|
72
|
-
|
73
|
-
end
|
74
|
-
end
|
data/tests/tc_cls_dttm.rb
DELETED
@@ -1,131 +0,0 @@
|
|
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 class Gooby::DtTm.
|
7
|
-
|
8
|
-
=end
|
9
|
-
|
10
|
-
require 'gooby'
|
11
|
-
require 'test/unit'
|
12
|
-
|
13
|
-
class TestClassDtTm < Test::Unit::TestCase
|
14
|
-
|
15
|
-
include Gooby::TestHelper
|
16
|
-
include Gooby::Con
|
17
|
-
|
18
|
-
@debug = false
|
19
|
-
|
20
|
-
### Start of tests. Keep this line - see class TestGenerator.
|
21
|
-
|
22
|
-
def test_class_DtTm
|
23
|
-
|
24
|
-
# This class is tested in the methods below.
|
25
|
-
end
|
26
|
-
|
27
|
-
def test_class_DtTm_hh_mm_ss
|
28
|
-
|
29
|
-
s = '2006-01-15T01:02:00Z'
|
30
|
-
dt = Gooby::DtTm.new(s)
|
31
|
-
actual = dt.hh_mm_ss
|
32
|
-
expected = '01:02:00'
|
33
|
-
assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
|
34
|
-
|
35
|
-
s = '2006-01-15T03:41:40Z'
|
36
|
-
dt = Gooby::DtTm.new(s)
|
37
|
-
actual = dt.hh_mm_ss
|
38
|
-
expected = '03:41:40'
|
39
|
-
assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
|
40
|
-
end
|
41
|
-
|
42
|
-
def test_class_DtTm_hhmmss_diff
|
43
|
-
|
44
|
-
s1 = '2006-01-15T02:39:37Z'
|
45
|
-
dt1 = Gooby::DtTm.new(s1)
|
46
|
-
s2 = '2006-01-15T03:41:40Z'
|
47
|
-
dt2 = Gooby::DtTm.new(s2)
|
48
|
-
actual = dt2.hhmmss_diff(dt1)
|
49
|
-
expected = '01:02:03'
|
50
|
-
assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
|
51
|
-
end
|
52
|
-
|
53
|
-
def test_class_DtTm_initialize
|
54
|
-
|
55
|
-
dt1 = Gooby::DtTm.new(nil)
|
56
|
-
dt2 = Gooby::DtTm.new('too short')
|
57
|
-
dt3 = Gooby::DtTm.new('2006-01-15T03:41:40Z')
|
58
|
-
|
59
|
-
assert(dt1.valid == false, "dt1 should not be valid.")
|
60
|
-
assert(dt2.valid == false, "dt2 should not be valid.")
|
61
|
-
assert(dt3.valid == true, "dt3 should not be valid.")
|
62
|
-
assert(dt1.to_i == invalid_time, "dt1 to_i should be #{invalid_time}.")
|
63
|
-
|
64
|
-
end
|
65
|
-
|
66
|
-
# Warning: possible obsolete test method - test_class_DtTm_parse
|
67
|
-
|
68
|
-
def test_class_DtTm_parse
|
69
|
-
|
70
|
-
# This method is tested in the other test methods.
|
71
|
-
end
|
72
|
-
|
73
|
-
def test_class_DtTm_print_string
|
74
|
-
|
75
|
-
dt = Gooby::DtTm.new('2007-02-01T02:13:52Z')
|
76
|
-
actual = dt.print_string
|
77
|
-
expected = "DtTm: 2007-02-01 02:13:52 1170296032 2007-02-01T02:13:52Z"
|
78
|
-
assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
|
79
|
-
end
|
80
|
-
|
81
|
-
def test_class_DtTm_seconds_diff
|
82
|
-
|
83
|
-
dt1 = Gooby::DtTm.new('2007-02-01T11:59:59Z')
|
84
|
-
dt2 = Gooby::DtTm.new('2007-02-01T12:00:00Z')
|
85
|
-
dt3 = Gooby::DtTm.new('2007-02-01T13:01:02')
|
86
|
-
|
87
|
-
actual = dt2.seconds_diff(dt1)
|
88
|
-
expected = 1
|
89
|
-
assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
|
90
|
-
|
91
|
-
actual = dt3.seconds_diff(dt1)
|
92
|
-
expected = 3663
|
93
|
-
assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
|
94
|
-
|
95
|
-
actual = dt1.seconds_diff(dt3)
|
96
|
-
expected = -3663
|
97
|
-
assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
|
98
|
-
end
|
99
|
-
|
100
|
-
def test_class_DtTm_to_i
|
101
|
-
|
102
|
-
dt = Gooby::DtTm.new('2007-02-01T02:13:52Z')
|
103
|
-
actual = dt.to_i
|
104
|
-
expected = 1170296032
|
105
|
-
assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
|
106
|
-
end
|
107
|
-
|
108
|
-
def test_class_DtTm_to_s
|
109
|
-
|
110
|
-
dt = Gooby::DtTm.new('2007-02-01T02:13:52Z')
|
111
|
-
actual = dt.to_s
|
112
|
-
expected = "2007-02-01T02:13:52Z"
|
113
|
-
assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
|
114
|
-
end
|
115
|
-
|
116
|
-
def test_class_DtTm_yyyy_mm_dd
|
117
|
-
|
118
|
-
dt = Gooby::DtTm.new('2007-02-01T02:13:52Z')
|
119
|
-
actual = dt.yyyy_mm_dd
|
120
|
-
expected = "2007-02-01"
|
121
|
-
assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
|
122
|
-
end
|
123
|
-
|
124
|
-
def test_class_DtTm_yyyy_mm_dd_hh_mm_ss
|
125
|
-
|
126
|
-
dt = Gooby::DtTm.new('2007-02-01T02:13:52Z')
|
127
|
-
actual = dt.yyyy_mm_dd_hh_mm_ss
|
128
|
-
expected = "2007-02-01 02:13:52"
|
129
|
-
assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
|
130
|
-
end
|
131
|
-
end
|
data/tests/tc_cls_duration.rb
DELETED
@@ -1,51 +0,0 @@
|
|
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 class Gooby::Duration.
|
7
|
-
|
8
|
-
=end
|
9
|
-
|
10
|
-
require 'gooby'
|
11
|
-
require 'test/unit'
|
12
|
-
|
13
|
-
class TestClassDuration < Test::Unit::TestCase
|
14
|
-
|
15
|
-
include Gooby::TestHelper
|
16
|
-
include Gooby::Con
|
17
|
-
|
18
|
-
@debug = false
|
19
|
-
|
20
|
-
### Start of tests. Keep this line - see class TestGenerator.
|
21
|
-
|
22
|
-
def test_class_Duration
|
23
|
-
|
24
|
-
d1 = Gooby::Duration.new('PT507.870S')
|
25
|
-
s1a = d1.to_s
|
26
|
-
s1b = d1.print_string
|
27
|
-
actual = s1a
|
28
|
-
expected = '08:27.87'
|
29
|
-
assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
|
30
|
-
|
31
|
-
actual = s1b
|
32
|
-
expected = 'Duration: 507.870 sec: 507.87 min: 8.4645 mmss: 08:27.87 bm: 8 fm: 0.464499999999999 fs: 27.87'
|
33
|
-
assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
|
34
|
-
end
|
35
|
-
|
36
|
-
def test_class_Duration_initialize
|
37
|
-
|
38
|
-
end
|
39
|
-
|
40
|
-
def test_class_Duration_print_string
|
41
|
-
|
42
|
-
end
|
43
|
-
|
44
|
-
def test_class_Duration_scrub
|
45
|
-
|
46
|
-
end
|
47
|
-
|
48
|
-
def test_class_Duration_to_s
|
49
|
-
|
50
|
-
end
|
51
|
-
end
|
@@ -1,70 +0,0 @@
|
|
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 class Gooby::ForerunnerXmlParser.
|
7
|
-
|
8
|
-
=end
|
9
|
-
|
10
|
-
require 'gooby'
|
11
|
-
require 'test/unit'
|
12
|
-
|
13
|
-
class TestClassForerunnerXmlParser < 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_class_ForerunnerXmlParser
|
22
|
-
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_class_ForerunnerXmlParser_detail_tag?
|
26
|
-
|
27
|
-
end
|
28
|
-
|
29
|
-
def test_class_ForerunnerXmlParser_dump
|
30
|
-
|
31
|
-
end
|
32
|
-
|
33
|
-
def test_class_ForerunnerXmlParser_gdump
|
34
|
-
|
35
|
-
end
|
36
|
-
|
37
|
-
def test_class_ForerunnerXmlParser_initialize
|
38
|
-
|
39
|
-
end
|
40
|
-
|
41
|
-
def test_class_ForerunnerXmlParser_is_tag?
|
42
|
-
|
43
|
-
end
|
44
|
-
|
45
|
-
def test_class_ForerunnerXmlParser_put_all_run_tkpt_csv
|
46
|
-
|
47
|
-
end
|
48
|
-
|
49
|
-
def test_class_ForerunnerXmlParser_put_run_csv
|
50
|
-
|
51
|
-
end
|
52
|
-
|
53
|
-
def test_class_ForerunnerXmlParser_tag_end
|
54
|
-
|
55
|
-
end
|
56
|
-
|
57
|
-
def test_class_ForerunnerXmlParser_tag_start
|
58
|
-
|
59
|
-
end
|
60
|
-
|
61
|
-
def test_class_ForerunnerXmlParser_text
|
62
|
-
|
63
|
-
end
|
64
|
-
|
65
|
-
# Warning: possible obsolete test method - test_stub
|
66
|
-
|
67
|
-
def test_stub
|
68
|
-
|
69
|
-
end
|
70
|
-
end
|
data/tests/tc_cls_geo_data.xxx
DELETED
@@ -1,71 +0,0 @@
|
|
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 class Gooby::GeoData.
|
7
|
-
|
8
|
-
=end
|
9
|
-
|
10
|
-
require 'gooby'
|
11
|
-
require 'test/unit'
|
12
|
-
|
13
|
-
class TestClassGeoData < 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_class_GeoData
|
22
|
-
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_class_GeoData_add_poi
|
26
|
-
|
27
|
-
end
|
28
|
-
|
29
|
-
def test_class_GeoData_add_route
|
30
|
-
|
31
|
-
end
|
32
|
-
|
33
|
-
def test_class_GeoData_add_track
|
34
|
-
|
35
|
-
end
|
36
|
-
|
37
|
-
def test_class_GeoData_dump
|
38
|
-
|
39
|
-
geo = Gooby::GeoData.new(nil)
|
40
|
-
geo.dump
|
41
|
-
end
|
42
|
-
|
43
|
-
def test_class_GeoData_initialize
|
44
|
-
|
45
|
-
geo = Gooby::GeoData.new(nil)
|
46
|
-
puts geo.to_s
|
47
|
-
|
48
|
-
end
|
49
|
-
|
50
|
-
# Warning: possible obsolete test method - test_class_GeoData_parse
|
51
|
-
|
52
|
-
def test_class_GeoData_parse
|
53
|
-
|
54
|
-
end
|
55
|
-
|
56
|
-
def test_class_GeoData_parse_poi
|
57
|
-
|
58
|
-
end
|
59
|
-
|
60
|
-
def test_class_GeoData_parse_routes
|
61
|
-
|
62
|
-
end
|
63
|
-
|
64
|
-
def test_class_GeoData_parse_tracks
|
65
|
-
|
66
|
-
end
|
67
|
-
|
68
|
-
def test_class_GeoData_to_s
|
69
|
-
|
70
|
-
end
|
71
|
-
end
|
@@ -1,26 +0,0 @@
|
|
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 class Gooby::GoobyObject.
|
7
|
-
|
8
|
-
=end
|
9
|
-
|
10
|
-
require 'gooby'
|
11
|
-
require 'test/unit'
|
12
|
-
|
13
|
-
class TestClassGoobyObject < 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
|
-
# Warning: possible obsolete test method - test_stub
|
22
|
-
|
23
|
-
def test_stub
|
24
|
-
|
25
|
-
end
|
26
|
-
end
|
@@ -1,109 +0,0 @@
|
|
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 class Gooby::GoogleMapGenerator.
|
7
|
-
|
8
|
-
=end
|
9
|
-
|
10
|
-
require 'gooby'
|
11
|
-
require 'test/unit'
|
12
|
-
|
13
|
-
class TestClassGoogleMapGenerator < 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_class_GoogleMapGenerator
|
22
|
-
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_class_GoogleMapGenerator_compute_center_point
|
26
|
-
|
27
|
-
end
|
28
|
-
|
29
|
-
def test_class_GoogleMapGenerator_filter_trackpoints
|
30
|
-
|
31
|
-
end
|
32
|
-
|
33
|
-
def test_class_GoogleMapGenerator_generate
|
34
|
-
|
35
|
-
gen = Gooby::GoogleMapGenerator.new('data/phx.csv')
|
36
|
-
content_hash = gen.generate(nil)
|
37
|
-
#content_hash.keys.sort.each { | key | puts key }
|
38
|
-
|
39
|
-
s = <<HERE
|
40
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
41
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
42
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
43
|
-
<head>
|
44
|
-
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
45
|
-
<title> Google Map by Gooby </title>
|
46
|
-
#{content_hash['key_js']}
|
47
|
-
#{content_hash['main_js_start']}
|
48
|
-
#{content_hash['main_js_route_overlay']}
|
49
|
-
#{content_hash['main_js_checkpoint_overlays']}
|
50
|
-
#{content_hash['main_js_map_clicked_listeners']}
|
51
|
-
#{content_hash['main_js_end']}
|
52
|
-
</head>
|
53
|
-
<body onload="load()" onunload="GUnload()">
|
54
|
-
<center>
|
55
|
-
<h3> #{content_hash['title']} </h3>
|
56
|
-
<h5> Generated by Gooby #{content_hash['when_generated']} <br> Gooby = Google APIs + Ruby </h5>
|
57
|
-
#{content_hash['map_div']}
|
58
|
-
#{content_hash['messages_div']}
|
59
|
-
</center>
|
60
|
-
</body>
|
61
|
-
</html>
|
62
|
-
HERE
|
63
|
-
|
64
|
-
html_file = File.new("zgen_gmap.html", "w")
|
65
|
-
html_file.write(s)
|
66
|
-
html_file.flush
|
67
|
-
html_file.close
|
68
|
-
end
|
69
|
-
|
70
|
-
def test_class_GoogleMapGenerator_generate_key_js
|
71
|
-
|
72
|
-
end
|
73
|
-
|
74
|
-
def test_class_GoogleMapGenerator_generate_main_js_checkpoint_overlays
|
75
|
-
|
76
|
-
end
|
77
|
-
|
78
|
-
def test_class_GoogleMapGenerator_generate_main_js_end
|
79
|
-
|
80
|
-
end
|
81
|
-
|
82
|
-
def test_class_GoogleMapGenerator_generate_main_js_map_clicked_listeners
|
83
|
-
|
84
|
-
end
|
85
|
-
|
86
|
-
def test_class_GoogleMapGenerator_generate_main_js_route_overlay
|
87
|
-
|
88
|
-
end
|
89
|
-
|
90
|
-
def test_class_GoogleMapGenerator_generate_main_js_start
|
91
|
-
|
92
|
-
end
|
93
|
-
|
94
|
-
def test_class_GoogleMapGenerator_generate_map_div
|
95
|
-
|
96
|
-
end
|
97
|
-
|
98
|
-
def test_class_GoogleMapGenerator_generate_messages_div
|
99
|
-
|
100
|
-
end
|
101
|
-
|
102
|
-
def test_class_GoogleMapGenerator_generate_page
|
103
|
-
|
104
|
-
end
|
105
|
-
|
106
|
-
def test_class_GoogleMapGenerator_initialize
|
107
|
-
|
108
|
-
end
|
109
|
-
end
|
data/tests/tc_cls_history.rb
DELETED
@@ -1,46 +0,0 @@
|
|
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 class Gooby::History.
|
7
|
-
|
8
|
-
=end
|
9
|
-
|
10
|
-
require 'gooby'
|
11
|
-
require 'test/unit'
|
12
|
-
|
13
|
-
class TestClassHistory < 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_class_History
|
22
|
-
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_class_History_add_run
|
26
|
-
|
27
|
-
end
|
28
|
-
|
29
|
-
def test_class_History_initialize
|
30
|
-
|
31
|
-
end
|
32
|
-
|
33
|
-
def test_class_History_print_string
|
34
|
-
|
35
|
-
end
|
36
|
-
|
37
|
-
def test_class_History_to_s
|
38
|
-
|
39
|
-
end
|
40
|
-
|
41
|
-
# Warning: possible obsolete test method - test_stub
|
42
|
-
|
43
|
-
def test_stub
|
44
|
-
|
45
|
-
end
|
46
|
-
end
|