autobuild 0.5 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +8 -0
- data/Rakefile +19 -11
- data/bin/autobuild +94 -0
- data/doc/classes/Autobuild.html +294 -0
- data/doc/classes/Autobuild.src/M000034.html +25 -0
- data/doc/classes/Autobuild.src/M000035.html +19 -0
- data/doc/classes/Autobuild.src/M000036.html +44 -0
- data/doc/classes/Autobuild.src/M000037.html +19 -0
- data/doc/classes/Autobuild.src/M000038.html +19 -0
- data/doc/classes/Autobuild.src/M000039.html +20 -0
- data/doc/classes/Autobuild/Autotools.html +284 -0
- data/doc/classes/Autobuild/Autotools.src/M000065.html +18 -0
- data/doc/classes/Autobuild/Autotools.src/M000066.html +26 -0
- data/doc/classes/Autobuild/Autotools.src/M000067.html +38 -0
- data/doc/classes/Autobuild/Autotools.src/M000068.html +53 -0
- data/doc/classes/Autobuild/Autotools.src/M000069.html +28 -0
- data/doc/classes/Autobuild/Autotools.src/M000070.html +23 -0
- data/doc/classes/Autobuild/Autotools.src/M000071.html +22 -0
- data/doc/classes/Autobuild/CVSImporter.html +156 -0
- data/doc/classes/Autobuild/CVSImporter.src/M000048.html +24 -0
- data/doc/classes/Autobuild/CVSImporter.src/M000049.html +18 -0
- data/doc/classes/Autobuild/CommandNotFound.html +113 -0
- data/doc/classes/Autobuild/Config.html +146 -0
- data/doc/classes/Autobuild/Config.src/M000040.html +28 -0
- data/doc/classes/Autobuild/Config.src/M000041.html +47 -0
- data/doc/classes/Autobuild/ConfigException.html +113 -0
- data/doc/classes/Autobuild/Exception.html +215 -0
- data/doc/classes/Autobuild/Exception.src/M000103.html +16 -0
- data/doc/classes/Autobuild/Exception.src/M000104.html +16 -0
- data/doc/classes/Autobuild/Exception.src/M000105.html +19 -0
- data/doc/classes/Autobuild/Exception.src/M000106.html +19 -0
- data/doc/classes/Autobuild/GenomModule.html +229 -0
- data/doc/classes/Autobuild/GenomModule.src/M000107.html +20 -0
- data/doc/classes/Autobuild/GenomModule.src/M000108.html +16 -0
- data/doc/classes/Autobuild/GenomModule.src/M000109.html +18 -0
- data/doc/classes/Autobuild/GenomModule.src/M000110.html +29 -0
- data/doc/classes/Autobuild/GenomModule.src/M000111.html +19 -0
- data/doc/classes/Autobuild/GenomModule.src/M000112.html +26 -0
- data/doc/classes/Autobuild/GenomModule.src/M000113.html +35 -0
- data/doc/classes/Autobuild/Import.html +169 -0
- data/doc/classes/Autobuild/Import.src/M000045.html +18 -0
- data/doc/classes/Autobuild/Import.src/M000046.html +18 -0
- data/doc/classes/Autobuild/Import.src/M000047.html +18 -0
- data/doc/classes/Autobuild/Importer.html +154 -0
- data/doc/classes/Autobuild/Importer.src/M000056.html +18 -0
- data/doc/classes/Autobuild/Importer.src/M000057.html +38 -0
- data/doc/classes/Autobuild/ImporterPackage.html +171 -0
- data/doc/classes/Autobuild/ImporterPackage.src/M000115.html +18 -0
- data/doc/classes/Autobuild/ImporterPackage.src/M000116.html +22 -0
- data/doc/classes/Autobuild/ImporterPackage.src/M000117.html +16 -0
- data/doc/classes/Autobuild/Interpolator.html +227 -0
- data/doc/classes/Autobuild/Interpolator.src/M000051.html +18 -0
- data/doc/classes/Autobuild/Interpolator.src/M000052.html +21 -0
- data/doc/classes/Autobuild/Interpolator.src/M000053.html +45 -0
- data/doc/classes/Autobuild/Interpolator.src/M000054.html +39 -0
- data/doc/classes/Autobuild/Interpolator.src/M000055.html +29 -0
- data/doc/classes/Autobuild/MailReporter.html +201 -0
- data/doc/classes/Autobuild/MailReporter.src/M000060.html +24 -0
- data/doc/classes/Autobuild/MailReporter.src/M000061.html +21 -0
- data/doc/classes/Autobuild/MailReporter.src/M000062.html +20 -0
- data/doc/classes/Autobuild/MailReporter.src/M000063.html +18 -0
- data/doc/classes/Autobuild/MailReporter.src/M000064.html +42 -0
- data/doc/classes/Autobuild/Options.html +137 -0
- data/doc/classes/Autobuild/Options.src/M000058.html +27 -0
- data/doc/classes/Autobuild/Package.html +313 -0
- data/doc/classes/Autobuild/Package.src/M000085.html +16 -0
- data/doc/classes/Autobuild/Package.src/M000086.html +19 -0
- data/doc/classes/Autobuild/Package.src/M000087.html +18 -0
- data/doc/classes/Autobuild/Package.src/M000088.html +41 -0
- data/doc/classes/Autobuild/Package.src/M000089.html +22 -0
- data/doc/classes/Autobuild/Package.src/M000090.html +23 -0
- data/doc/classes/Autobuild/Package.src/M000091.html +16 -0
- data/doc/classes/Autobuild/Package.src/M000092.html +24 -0
- data/doc/classes/Autobuild/Package.src/M000093.html +18 -0
- data/doc/classes/Autobuild/Package.src/M000094.html +23 -0
- data/doc/classes/Autobuild/PackageException.html +139 -0
- data/doc/classes/Autobuild/PackageException.src/M000059.html +16 -0
- data/doc/classes/Autobuild/Reporter.html +152 -0
- data/doc/classes/Autobuild/Reporter.src/M000074.html +16 -0
- data/doc/classes/Autobuild/Reporter.src/M000075.html +16 -0
- data/doc/classes/Autobuild/Reporting.html +197 -0
- data/doc/classes/Autobuild/Reporting.src/M000095.html +24 -0
- data/doc/classes/Autobuild/Reporting.src/M000096.html +18 -0
- data/doc/classes/Autobuild/Reporting.src/M000097.html +18 -0
- data/doc/classes/Autobuild/Reporting.src/M000098.html +18 -0
- data/doc/classes/Autobuild/Reporting.src/M000099.html +18 -0
- data/doc/classes/Autobuild/SVNImporter.html +139 -0
- data/doc/classes/Autobuild/SVNImporter.src/M000050.html +23 -0
- data/doc/classes/Autobuild/SourceTreeTask.html +150 -0
- data/doc/classes/Autobuild/SourceTreeTask.src/M000114.html +18 -0
- data/doc/classes/Autobuild/StdoutReporter.html +154 -0
- data/doc/classes/Autobuild/StdoutReporter.src/M000072.html +18 -0
- data/doc/classes/Autobuild/StdoutReporter.src/M000073.html +18 -0
- data/doc/classes/Autobuild/SubcommandFailed.html +194 -0
- data/doc/classes/Autobuild/SubcommandFailed.src/M000100.html +16 -0
- data/doc/classes/Autobuild/SubcommandFailed.src/M000101.html +32 -0
- data/doc/classes/Autobuild/SubcommandFailed.src/M000102.html +20 -0
- data/doc/classes/Autobuild/Subprocess.html +170 -0
- data/doc/classes/Autobuild/Subprocess.src/M000042.html +18 -0
- data/doc/classes/Autobuild/Subprocess.src/M000043.html +96 -0
- data/doc/classes/Autobuild/Subprocess/Failed.html +150 -0
- data/doc/classes/Autobuild/Subprocess/Failed.src/M000044.html +18 -0
- data/doc/classes/Autobuild/TarImporter.html +287 -0
- data/doc/classes/Autobuild/TarImporter.src/M000076.html +28 -0
- data/doc/classes/Autobuild/TarImporter.src/M000077.html +53 -0
- data/doc/classes/Autobuild/TarImporter.src/M000078.html +26 -0
- data/doc/classes/Autobuild/TarImporter.src/M000079.html +16 -0
- data/doc/classes/Autobuild/TarImporter.src/M000080.html +20 -0
- data/doc/classes/Autobuild/TarImporter.src/M000081.html +20 -0
- data/doc/classes/Autobuild/TarImporter.src/M000082.html +30 -0
- data/doc/classes/Autobuild/UndefinedVariable.html +174 -0
- data/doc/classes/Autobuild/UndefinedVariable.src/M000083.html +19 -0
- data/doc/classes/Autobuild/UndefinedVariable.src/M000084.html +18 -0
- data/doc/classes/Hash.html +152 -0
- data/doc/classes/Hash.src/M000019.html +26 -0
- data/doc/classes/Hash.src/M000020.html +23 -0
- data/doc/classes/RMail.html +111 -0
- data/doc/classes/RMail/Message.html +137 -0
- data/doc/classes/RMail/Message.src/M000033.html +25 -0
- data/doc/classes/TC_AttrDefval.html +152 -0
- data/doc/classes/TC_AttrDefval.src/M000024.html +31 -0
- data/doc/classes/TC_AttrDefval.src/M000025.html +22 -0
- data/doc/classes/TC_CVSImport.html +180 -0
- data/doc/classes/TC_CVSImport.src/M000026.html +22 -0
- data/doc/classes/TC_CVSImport.src/M000027.html +21 -0
- data/doc/classes/TC_CVSImport.src/M000028.html +36 -0
- data/doc/classes/TC_Config.html +182 -0
- data/doc/classes/TC_Config.src/M000001.html +20 -0
- data/doc/classes/TC_Config.src/M000002.html +18 -0
- data/doc/classes/TC_Config.src/M000003.html +29 -0
- data/doc/classes/TC_Config.src/M000004.html +20 -0
- data/doc/classes/TC_ConfigInterpolation.html +198 -0
- data/doc/classes/TC_ConfigInterpolation.src/M000015.html +18 -0
- data/doc/classes/TC_ConfigInterpolation.src/M000016.html +18 -0
- data/doc/classes/TC_ConfigInterpolation.src/M000017.html +26 -0
- data/doc/classes/TC_ConfigInterpolation.src/M000018.html +24 -0
- data/doc/classes/TC_SVNImport.html +180 -0
- data/doc/classes/TC_SVNImport.src/M000005.html +22 -0
- data/doc/classes/TC_SVNImport.src/M000006.html +21 -0
- data/doc/classes/TC_SVNImport.src/M000007.html +43 -0
- data/doc/classes/TC_Subcommand.html +208 -0
- data/doc/classes/TC_Subcommand.src/M000021.html +31 -0
- data/doc/classes/TC_Subcommand.src/M000022.html +18 -0
- data/doc/classes/TC_Subcommand.src/M000023.html +30 -0
- data/doc/classes/TC_TarImporter.html +247 -0
- data/doc/classes/TC_TarImporter.src/M000008.html +28 -0
- data/doc/classes/TC_TarImporter.src/M000009.html +21 -0
- data/doc/classes/TC_TarImporter.src/M000010.html +20 -0
- data/doc/classes/TC_TarImporter.src/M000011.html +20 -0
- data/doc/classes/TC_TarImporter.src/M000012.html +26 -0
- data/doc/classes/TC_TarImporter.src/M000013.html +31 -0
- data/doc/classes/TC_TarImporter.src/M000014.html +24 -0
- data/doc/classes/TestTools.html +189 -0
- data/doc/classes/TestTools.src/M000029.html +19 -0
- data/doc/classes/TestTools.src/M000030.html +18 -0
- data/doc/classes/TestTools.src/M000031.html +25 -0
- data/doc/classes/TestTools.src/M000032.html +24 -0
- data/doc/created.rid +1 -0
- data/doc/files/lib/autobuild/config-interpolator_rb.html +108 -0
- data/doc/files/lib/autobuild/config_rb.html +113 -0
- data/doc/files/lib/autobuild/environment_rb.html +101 -0
- data/doc/files/lib/autobuild/exceptions_rb.html +101 -0
- data/doc/files/lib/autobuild/import/cvs_rb.html +109 -0
- data/doc/files/lib/autobuild/import/svn_rb.html +109 -0
- data/doc/files/lib/autobuild/import/tar_rb.html +108 -0
- data/doc/files/lib/autobuild/importer_rb.html +108 -0
- data/doc/files/lib/autobuild/options_rb.html +101 -0
- data/doc/files/lib/autobuild/package_rb.html +110 -0
- data/doc/files/lib/autobuild/packages/autotools_rb.html +111 -0
- data/doc/files/lib/autobuild/packages/genom_rb.html +109 -0
- data/doc/files/lib/autobuild/packages/import_rb.html +109 -0
- data/doc/files/lib/autobuild/reporting_rb.html +113 -0
- data/doc/files/lib/autobuild/subcommand_rb.html +108 -0
- data/doc/files/lib/autobuild/timestamps_rb.html +123 -0
- data/doc/files/test/base_rb.html +113 -0
- data/doc/files/test/test_attr_defval_rb.html +109 -0
- data/doc/files/test/test_config_interpolation_rb.html +111 -0
- data/doc/files/test/test_config_rb.html +111 -0
- data/doc/files/test/test_import_cvs_rb.html +119 -0
- data/doc/files/test/test_import_svn_rb.html +119 -0
- data/doc/files/test/test_import_tar_rb.html +120 -0
- data/doc/files/test/test_subcommand_rb.html +120 -0
- data/doc/files/test/tools_rb.html +110 -0
- data/doc/fr_class_index.html +63 -0
- data/doc/fr_file_index.html +51 -0
- data/doc/fr_method_index.html +143 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/test/base.rb +8 -0
- data/test/test_attr_defval.rb +29 -0
- data/test/test_config.rb +40 -0
- data/test/test_config_interpolation.rb +57 -0
- data/test/test_import_cvs.rb +52 -0
- data/test/test_import_svn.rb +58 -0
- data/test/test_import_tar.rb +88 -0
- data/test/test_subcommand.rb +63 -0
- data/test/tools.rb +39 -0
- metadata +274 -8
data/doc/index.html
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
5
|
+
|
6
|
+
<!--
|
7
|
+
|
8
|
+
RDoc Documentation
|
9
|
+
|
10
|
+
-->
|
11
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
12
|
+
<head>
|
13
|
+
<title>RDoc Documentation</title>
|
14
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
15
|
+
</head>
|
16
|
+
<frameset rows="20%, 80%">
|
17
|
+
<frameset cols="25%,35%,45%">
|
18
|
+
<frame src="fr_file_index.html" title="Files" name="Files" />
|
19
|
+
<frame src="fr_class_index.html" name="Classes" />
|
20
|
+
<frame src="fr_method_index.html" name="Methods" />
|
21
|
+
</frameset>
|
22
|
+
<frame src="files/lib/autobuild/importer_rb.html" name="docwin" />
|
23
|
+
</frameset>
|
24
|
+
</html>
|
data/doc/rdoc-style.css
ADDED
@@ -0,0 +1,208 @@
|
|
1
|
+
|
2
|
+
body {
|
3
|
+
font-family: Verdana,Arial,Helvetica,sans-serif;
|
4
|
+
font-size: 90%;
|
5
|
+
margin: 0;
|
6
|
+
margin-left: 40px;
|
7
|
+
padding: 0;
|
8
|
+
background: white;
|
9
|
+
}
|
10
|
+
|
11
|
+
h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
|
12
|
+
h1 { font-size: 150%; }
|
13
|
+
h2,h3,h4 { margin-top: 1em; }
|
14
|
+
|
15
|
+
a { background: #eef; color: #039; text-decoration: none; }
|
16
|
+
a:hover { background: #039; color: #eef; }
|
17
|
+
|
18
|
+
/* Override the base stylesheet's Anchor inside a table cell */
|
19
|
+
td > a {
|
20
|
+
background: transparent;
|
21
|
+
color: #039;
|
22
|
+
text-decoration: none;
|
23
|
+
}
|
24
|
+
|
25
|
+
/* and inside a section title */
|
26
|
+
.section-title > a {
|
27
|
+
background: transparent;
|
28
|
+
color: #eee;
|
29
|
+
text-decoration: none;
|
30
|
+
}
|
31
|
+
|
32
|
+
/* === Structural elements =================================== */
|
33
|
+
|
34
|
+
div#index {
|
35
|
+
margin: 0;
|
36
|
+
margin-left: -40px;
|
37
|
+
padding: 0;
|
38
|
+
font-size: 90%;
|
39
|
+
}
|
40
|
+
|
41
|
+
|
42
|
+
div#index a {
|
43
|
+
margin-left: 0.7em;
|
44
|
+
}
|
45
|
+
|
46
|
+
div#index .section-bar {
|
47
|
+
margin-left: 0px;
|
48
|
+
padding-left: 0.7em;
|
49
|
+
background: #ccc;
|
50
|
+
font-size: small;
|
51
|
+
}
|
52
|
+
|
53
|
+
|
54
|
+
div#classHeader, div#fileHeader {
|
55
|
+
width: auto;
|
56
|
+
color: white;
|
57
|
+
padding: 0.5em 1.5em 0.5em 1.5em;
|
58
|
+
margin: 0;
|
59
|
+
margin-left: -40px;
|
60
|
+
border-bottom: 3px solid #006;
|
61
|
+
}
|
62
|
+
|
63
|
+
div#classHeader a, div#fileHeader a {
|
64
|
+
background: inherit;
|
65
|
+
color: white;
|
66
|
+
}
|
67
|
+
|
68
|
+
div#classHeader td, div#fileHeader td {
|
69
|
+
background: inherit;
|
70
|
+
color: white;
|
71
|
+
}
|
72
|
+
|
73
|
+
|
74
|
+
div#fileHeader {
|
75
|
+
background: #057;
|
76
|
+
}
|
77
|
+
|
78
|
+
div#classHeader {
|
79
|
+
background: #048;
|
80
|
+
}
|
81
|
+
|
82
|
+
|
83
|
+
.class-name-in-header {
|
84
|
+
font-size: 180%;
|
85
|
+
font-weight: bold;
|
86
|
+
}
|
87
|
+
|
88
|
+
|
89
|
+
div#bodyContent {
|
90
|
+
padding: 0 1.5em 0 1.5em;
|
91
|
+
}
|
92
|
+
|
93
|
+
div#description {
|
94
|
+
padding: 0.5em 1.5em;
|
95
|
+
background: #efefef;
|
96
|
+
border: 1px dotted #999;
|
97
|
+
}
|
98
|
+
|
99
|
+
div#description h1,h2,h3,h4,h5,h6 {
|
100
|
+
color: #125;;
|
101
|
+
background: transparent;
|
102
|
+
}
|
103
|
+
|
104
|
+
div#validator-badges {
|
105
|
+
text-align: center;
|
106
|
+
}
|
107
|
+
div#validator-badges img { border: 0; }
|
108
|
+
|
109
|
+
div#copyright {
|
110
|
+
color: #333;
|
111
|
+
background: #efefef;
|
112
|
+
font: 0.75em sans-serif;
|
113
|
+
margin-top: 5em;
|
114
|
+
margin-bottom: 0;
|
115
|
+
padding: 0.5em 2em;
|
116
|
+
}
|
117
|
+
|
118
|
+
|
119
|
+
/* === Classes =================================== */
|
120
|
+
|
121
|
+
table.header-table {
|
122
|
+
color: white;
|
123
|
+
font-size: small;
|
124
|
+
}
|
125
|
+
|
126
|
+
.type-note {
|
127
|
+
font-size: small;
|
128
|
+
color: #DEDEDE;
|
129
|
+
}
|
130
|
+
|
131
|
+
.xxsection-bar {
|
132
|
+
background: #eee;
|
133
|
+
color: #333;
|
134
|
+
padding: 3px;
|
135
|
+
}
|
136
|
+
|
137
|
+
.section-bar {
|
138
|
+
color: #333;
|
139
|
+
border-bottom: 1px solid #999;
|
140
|
+
margin-left: -20px;
|
141
|
+
}
|
142
|
+
|
143
|
+
|
144
|
+
.section-title {
|
145
|
+
background: #79a;
|
146
|
+
color: #eee;
|
147
|
+
padding: 3px;
|
148
|
+
margin-top: 2em;
|
149
|
+
margin-left: -30px;
|
150
|
+
border: 1px solid #999;
|
151
|
+
}
|
152
|
+
|
153
|
+
.top-aligned-row { vertical-align: top }
|
154
|
+
.bottom-aligned-row { vertical-align: bottom }
|
155
|
+
|
156
|
+
/* --- Context section classes ----------------------- */
|
157
|
+
|
158
|
+
.context-row { }
|
159
|
+
.context-item-name { font-family: monospace; font-weight: bold; color: black; }
|
160
|
+
.context-item-value { font-size: small; color: #448; }
|
161
|
+
.context-item-desc { color: #333; padding-left: 2em; }
|
162
|
+
|
163
|
+
/* --- Method classes -------------------------- */
|
164
|
+
.method-detail {
|
165
|
+
background: #efefef;
|
166
|
+
padding: 0;
|
167
|
+
margin-top: 0.5em;
|
168
|
+
margin-bottom: 1em;
|
169
|
+
border: 1px dotted #ccc;
|
170
|
+
}
|
171
|
+
.method-heading {
|
172
|
+
color: black;
|
173
|
+
background: #ccc;
|
174
|
+
border-bottom: 1px solid #666;
|
175
|
+
padding: 0.2em 0.5em 0 0.5em;
|
176
|
+
}
|
177
|
+
.method-signature { color: black; background: inherit; }
|
178
|
+
.method-name { font-weight: bold; }
|
179
|
+
.method-args { font-style: italic; }
|
180
|
+
.method-description { padding: 0 0.5em 0 0.5em; }
|
181
|
+
|
182
|
+
/* --- Source code sections -------------------- */
|
183
|
+
|
184
|
+
a.source-toggle { font-size: 90%; }
|
185
|
+
div.method-source-code {
|
186
|
+
background: #262626;
|
187
|
+
color: #ffdead;
|
188
|
+
margin: 1em;
|
189
|
+
padding: 0.5em;
|
190
|
+
border: 1px dashed #999;
|
191
|
+
overflow: hidden;
|
192
|
+
}
|
193
|
+
|
194
|
+
div.method-source-code pre { color: #ffdead; overflow: hidden; }
|
195
|
+
|
196
|
+
/* --- Ruby keyword styles --------------------- */
|
197
|
+
|
198
|
+
.standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
|
199
|
+
|
200
|
+
.ruby-constant { color: #7fffd4; background: transparent; }
|
201
|
+
.ruby-keyword { color: #00ffff; background: transparent; }
|
202
|
+
.ruby-ivar { color: #eedd82; background: transparent; }
|
203
|
+
.ruby-operator { color: #00ffee; background: transparent; }
|
204
|
+
.ruby-identifier { color: #ffdead; background: transparent; }
|
205
|
+
.ruby-node { color: #ffa07a; background: transparent; }
|
206
|
+
.ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
|
207
|
+
.ruby-regexp { color: #ffa07a; background: transparent; }
|
208
|
+
.ruby-value { color: #7fffd4; background: transparent; }
|
data/test/base.rb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('..', File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH << File.expand_path('../lib', File.dirname(__FILE__))
|
3
|
+
require 'rubygems'
|
4
|
+
require 'test/unit'
|
5
|
+
require 'test/test_config_interpolation.rb'
|
6
|
+
require 'test/test_config.rb'
|
7
|
+
require 'test/test_subcommand.rb'
|
8
|
+
require 'test/test_import.rb'
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'test/unit/testcase'
|
2
|
+
require 'autobuild/support'
|
3
|
+
|
4
|
+
class TC_AttrDefval
|
5
|
+
def test_basic
|
6
|
+
myclass = Class.new do
|
7
|
+
attr_reader :foo => 10
|
8
|
+
attr_writer :bar => 20
|
9
|
+
attr_accessor :blah => 30
|
10
|
+
end
|
11
|
+
|
12
|
+
myobj = myclass.new
|
13
|
+
assert_equal(10, myobj.foo)
|
14
|
+
assert_equal(20, myobj.bar)
|
15
|
+
myobj.bar = 15
|
16
|
+
assert_equal(15, myobj.bar)
|
17
|
+
assert_equal(30, myobj.blah)
|
18
|
+
myobj.blah = 25
|
19
|
+
assert_equal(25, myobj.blah)
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_defval_notshared
|
23
|
+
a = Class.new { attr_reader :foo => 10 }.new
|
24
|
+
b = Class.new { attr_reader :foo => 20 }.new
|
25
|
+
|
26
|
+
assert_equal(10, a.foo)
|
27
|
+
assert_equal(20, a.foo)
|
28
|
+
end
|
29
|
+
end
|
data/test/test_config.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('..', File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH << File.expand_path('../lib', File.dirname(__FILE__))
|
3
|
+
require 'test/unit'
|
4
|
+
require 'test/tools'
|
5
|
+
require 'autobuild/options'
|
6
|
+
require 'autobuild/config'
|
7
|
+
|
8
|
+
class TC_Config < Test::Unit::TestCase
|
9
|
+
def setup
|
10
|
+
@conffile = TestTools.build_config(binding, 'dummy')
|
11
|
+
@options_hash = File.open(@conffile) { |f| YAML.load(f) }
|
12
|
+
@options = File.open(@conffile) { |f| Autobuild::Config.load(f, Options.default) }
|
13
|
+
end
|
14
|
+
|
15
|
+
def teardown
|
16
|
+
TestTools.clean
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_keys_to_sym
|
20
|
+
symed = @options_hash.keys_to_sym
|
21
|
+
|
22
|
+
pass_through = {}
|
23
|
+
symed.each_recursive { |k, v|
|
24
|
+
assert_kind_of(Symbol, k)
|
25
|
+
pass_through[k] = true
|
26
|
+
}
|
27
|
+
|
28
|
+
assert(pass_through[:PATH])
|
29
|
+
assert(pass_through[:prefix])
|
30
|
+
assert(pass_through[:autobuild])
|
31
|
+
assert_kind_of(String, symed[:autobuild][:srcdir])
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_value_type
|
35
|
+
assert_kind_of(String, $SRCDIR)
|
36
|
+
assert_kind_of(Fixnum, $NICE)
|
37
|
+
assert_equal(0, $NICE)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
@@ -0,0 +1,57 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('..', File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH << File.expand_path('../lib', File.dirname(__FILE__))
|
3
|
+
|
4
|
+
require 'test/unit'
|
5
|
+
require 'autobuild/config-interpolator'
|
6
|
+
|
7
|
+
require 'yaml'
|
8
|
+
require 'stringio'
|
9
|
+
|
10
|
+
class TC_ConfigInterpolation < Test::Unit::TestCase
|
11
|
+
WELL_FORMED = <<EOF
|
12
|
+
defines:
|
13
|
+
global_prefix: /home/doudou
|
14
|
+
srcdir: ${global_prefix}/src
|
15
|
+
prefix: ${global_prefix}/build
|
16
|
+
nice: 10
|
17
|
+
|
18
|
+
autobuild:
|
19
|
+
srcdir: $srcdir
|
20
|
+
prefix: $prefix
|
21
|
+
nice: $nice
|
22
|
+
envvar: $ENVVAR
|
23
|
+
|
24
|
+
EOF
|
25
|
+
|
26
|
+
def setup
|
27
|
+
@wellformed = StringIO.open(WELL_FORMED, 'r') { |d| YAML.load(d) }
|
28
|
+
end
|
29
|
+
|
30
|
+
def teardown
|
31
|
+
@wellformed = nil
|
32
|
+
end
|
33
|
+
|
34
|
+
# Check that interpolation matches both forms ${var} and $var
|
35
|
+
def test_match
|
36
|
+
data = @wellformed['defines']['srcdir']
|
37
|
+
all_matches = []
|
38
|
+
data.gsub(Interpolator::PartialMatch) { |m| all_matches << ($1 || $2) }
|
39
|
+
assert_equal( ['global_prefix'], all_matches )
|
40
|
+
|
41
|
+
data = @wellformed['autobuild']['srcdir']
|
42
|
+
all_matches = []
|
43
|
+
data.gsub(Interpolator::PartialMatch) { |m| all_matches << ($1 || $2) }
|
44
|
+
assert_equal( ['srcdir'], all_matches )
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_interpolation
|
48
|
+
ENV['ENVVAR'] = 'envvar'
|
49
|
+
data = Interpolator.interpolate(@wellformed)
|
50
|
+
assert_equal('/home/doudou/src', data["autobuild"]["srcdir"])
|
51
|
+
assert_equal('/home/doudou/build', data["autobuild"]["prefix"])
|
52
|
+
assert_equal('envvar', data["autobuild"]["envvar"])
|
53
|
+
assert_equal(10, data["autobuild"]["nice"])
|
54
|
+
assert_kind_of(Fixnum, data["autobuild"]["nice"])
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
@@ -0,0 +1,52 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('..', File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH << File.expand_path('../lib', File.dirname(__FILE__))
|
3
|
+
require 'test/unit'
|
4
|
+
require 'test/tools'
|
5
|
+
require 'autobuild/import/cvs'
|
6
|
+
require 'autobuild/import/svn'
|
7
|
+
require 'autobuild/import/tar'
|
8
|
+
|
9
|
+
include Autobuild
|
10
|
+
|
11
|
+
class TC_CVSImport < Test::Unit::TestCase
|
12
|
+
Package = Struct.new :srcdir, :target
|
13
|
+
|
14
|
+
def setup
|
15
|
+
$PROGRAMS = {}
|
16
|
+
$UPDATE = true
|
17
|
+
$LOGDIR = "#{TestTools.tempdir}/log"
|
18
|
+
FileUtils.mkdir_p($LOGDIR)
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
def teardown
|
23
|
+
$PROGRAMS = nil
|
24
|
+
$UPDATE = true
|
25
|
+
$LOGDIR = nil
|
26
|
+
TestTools.clean
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_cvs
|
30
|
+
TestTools.untar('cvsroot.tar')
|
31
|
+
cvsroot = File.join(TestTools.tempdir, 'cvsroot')
|
32
|
+
pkg_cvs = Package.new File.join(TestTools.tempdir, 'cvs'), :cvs
|
33
|
+
|
34
|
+
# Make a checkout
|
35
|
+
importer = Import.cvs [ cvsroot, 'cvs' ], {}
|
36
|
+
importer.import(pkg_cvs)
|
37
|
+
assert( File.exists?(File.join(pkg_cvs.srcdir, 'test')) )
|
38
|
+
|
39
|
+
# Make an update
|
40
|
+
importer.import(pkg_cvs)
|
41
|
+
|
42
|
+
# Make an update fail
|
43
|
+
FileUtils.rm_rf cvsroot
|
44
|
+
assert_raise(Autobuild::SubcommandFailed) { importer.import pkg_cvs }
|
45
|
+
|
46
|
+
# Make a checkout fail
|
47
|
+
FileUtils.rm_rf pkg_cvs.srcdir
|
48
|
+
assert_raise(Autobuild::SubcommandFailed) { importer.import pkg_cvs }
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
|
@@ -0,0 +1,58 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('..', File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH << File.expand_path('../lib', File.dirname(__FILE__))
|
3
|
+
require 'test/unit'
|
4
|
+
require 'test/tools'
|
5
|
+
require 'autobuild/import/cvs'
|
6
|
+
require 'autobuild/import/svn'
|
7
|
+
require 'autobuild/import/tar'
|
8
|
+
include Autobuild
|
9
|
+
|
10
|
+
class TC_SVNImport < Test::Unit::TestCase
|
11
|
+
Package = Struct.new :srcdir, :target
|
12
|
+
|
13
|
+
def setup
|
14
|
+
$PROGRAMS = {}
|
15
|
+
$UPDATE = true
|
16
|
+
$LOGDIR = "#{TestTools.tempdir}/log"
|
17
|
+
FileUtils.mkdir_p($LOGDIR)
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
def teardown
|
22
|
+
$PROGRAMS = nil
|
23
|
+
$UPDATE = true
|
24
|
+
$LOGDIR = nil
|
25
|
+
TestTools.clean
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_svn
|
29
|
+
TestTools.untar('svnroot.tar')
|
30
|
+
svnrepo = File.join(TestTools.tempdir, 'svnroot')
|
31
|
+
svnroot = "file:///#{svnrepo}"
|
32
|
+
pkg_svn = Package.new File.join(TestTools.tempdir, 'svn'), :svn
|
33
|
+
|
34
|
+
# Make a checkout with a splitted URL
|
35
|
+
importer = Import.svn [ svnroot, 'svn' ], {}
|
36
|
+
importer.import(pkg_svn)
|
37
|
+
assert( File.exists?(File.join(pkg_svn.srcdir, 'test')) )
|
38
|
+
|
39
|
+
# Make a checkout with an URL as a string
|
40
|
+
FileUtils.rm_rf pkg_svn.srcdir
|
41
|
+
importer = Import.svn File.join(svnroot, 'svn'), {}
|
42
|
+
importer.import(pkg_svn)
|
43
|
+
assert( File.exists?(File.join(pkg_svn.srcdir, 'test')) )
|
44
|
+
|
45
|
+
# Make an update
|
46
|
+
importer.import(pkg_svn)
|
47
|
+
|
48
|
+
# Make an update fail
|
49
|
+
FileUtils.rm_rf svnrepo
|
50
|
+
assert_raise(SubcommandFailed) { importer.import(pkg_svn) }
|
51
|
+
|
52
|
+
# Make a checkout fail
|
53
|
+
FileUtils.rm_rf pkg_svn.srcdir
|
54
|
+
assert_raise(SubcommandFailed) { importer.import(pkg_svn) }
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
|