rant 0.4.4 → 0.4.6
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/NEWS +38 -0
- data/README +4 -2
- data/Rantfile +50 -12
- data/doc/examples/c_cpp/c++/problem_1_1/another_test.cpp +6 -0
- data/doc/examples/c_cpp/c++/problem_1_1/another_test.h +5 -0
- data/doc/examples/c_cpp/c++/problem_1_1/main.cpp +12 -0
- data/doc/examples/c_cpp/c++/problem_1_1/test.cpp +6 -0
- data/doc/examples/c_cpp/c++/problem_1_1/test.h +5 -0
- data/doc/examples/c_cpp/c++/template.rf +15 -0
- data/doc/examples/c_cpp/c/problem_1_1/another_test.c +6 -0
- data/doc/examples/c_cpp/c/problem_1_1/another_test.h +7 -0
- data/doc/examples/c_cpp/c/problem_1_1/main.c +12 -0
- data/doc/examples/c_cpp/c/problem_1_1/test.c +6 -0
- data/doc/examples/c_cpp/c/problem_1_1/test.h +7 -0
- data/doc/examples/c_cpp/c/template.rf +15 -0
- data/doc/examples/c_cpp/root.rant +46 -0
- data/doc/homepage/index.html +115 -0
- data/doc/homepage/rant_home.css +98 -0
- data/doc/rant.1 +129 -0
- data/doc/rant.rdoc +5 -6
- data/doc/rantfile.rdoc +55 -32
- data/doc/subdirs.rdoc +147 -0
- data/lib/rant.rb +47 -49
- data/lib/rant/coregen.rb +20 -20
- data/lib/rant/import.rb +63 -11
- data/lib/rant/import/archive.rb +47 -15
- data/lib/rant/import/archive/tgz.rb +1 -1
- data/lib/rant/import/autoclean.rb +28 -26
- data/lib/rant/import/c/dependencies.rb +1 -1
- data/lib/rant/import/directedrule.rb +1 -4
- data/lib/rant/import/metadata.rb +30 -7
- data/lib/rant/import/nodes/default.rb +67 -13
- data/lib/rant/import/rubypackage.rb +1 -1
- data/lib/rant/import/rubytest.rb +25 -19
- data/lib/rant/import/signedfile.rb +14 -8
- data/lib/rant/import/sys/more.rb +22 -0
- data/lib/rant/import/sys/tgz.rb +43 -0
- data/lib/rant/import/sys/zip.rb +42 -0
- data/lib/rant/node.rb +19 -13
- data/lib/rant/plugin/configure.rb +1 -1
- data/lib/rant/progress.rb +33 -0
- data/lib/rant/rantenv.rb +7 -7
- data/lib/rant/rantlib.rb +246 -256
- data/lib/rant/rantsys.rb +61 -22
- data/lib/rant/rantvar.rb +7 -9
- data/misc/TODO +18 -0
- data/misc/devel-notes +4 -1
- data/test/Rantfile +17 -3
- data/test/deprecated/README +6 -0
- data/test/deprecated/test_0_4_8.rb +41 -0
- data/test/deprecated/test_0_5_2.rb +33 -0
- data/test/import/md5/root.rant +9 -0
- data/test/import/md5/test_md5.rb +45 -0
- data/test/import/metadata/Rantfile +2 -2
- data/test/import/metadata/test_metadata.rb +2 -2
- data/test/import/package/test_package.rb +40 -1
- data/test/import/signedfile/sub1/Rantfile +1 -1
- data/test/import/sys/data/pkg.tgz +0 -0
- data/test/import/sys/data/pkg.zip +0 -0
- data/test/import/sys/data/pkg/bin/test +0 -0
- data/test/import/sys/data/pkg/bin/test.o +0 -0
- data/test/import/sys/data/pkg/test.c +6 -0
- data/test/import/sys/data/pkg/test.h +7 -0
- data/test/import/sys/data/pkg2.zip +0 -0
- data/test/import/sys/test_tgz.rb +38 -0
- data/test/import/sys/test_zip.rb +68 -0
- data/test/import/sys/tgz.rf +6 -0
- data/test/import/sys/zip.rf +15 -0
- data/test/project2/{rantfile.rb → root.rant} +0 -0
- data/test/project2/test_project.rb +3 -8
- data/test/project_rb1/{rantfile.rb → rantfile} +1 -1
- data/test/project_rb1/test_project_rb1.rb +3 -5
- data/test/rant-import/test_rant-import.rb +22 -10
- data/test/subdirs/sub1/Rantfile +1 -1
- data/test/subdirs/sub2/{rantfile.rb → rantfile} +0 -0
- data/test/subdirs/sub2/sub/rantfile +1 -1
- data/test/subdirs2/root.rant +36 -0
- data/test/subdirs2/sub00/sub.rant +8 -0
- data/test/subdirs2/sub1/sub.rant +13 -0
- data/test/subdirs2/test_subdirs2.rb +239 -0
- data/test/test_examples.rb +91 -0
- data/test/test_filetask.rb +51 -11
- data/test/test_rant_interface.rb +24 -0
- data/test/test_rantfile_api.rb +54 -2
- data/test/test_sourcenode.rb +30 -0
- data/test/test_sys.rb +143 -15
- data/test/test_task.rb +16 -22
- data/test/tutil.rb +22 -38
- metadata +67 -9
data/test/tutil.rb
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
# This file contains methods that aid in testing Rant.
|
|
3
3
|
|
|
4
4
|
require 'rant/rantlib'
|
|
5
|
+
require 'rant/import/sys/tgz'
|
|
6
|
+
require 'rant/import/sys/zip'
|
|
5
7
|
require 'fileutils'
|
|
6
8
|
|
|
7
9
|
module Test
|
|
@@ -177,44 +179,6 @@ def run_ruby(*args)
|
|
|
177
179
|
`#{Rant::Sys.sp(Rant::Env::RUBY)} #{args.flatten.join(' ')}`
|
|
178
180
|
end
|
|
179
181
|
|
|
180
|
-
$have_unzip = !!Rant::Env.find_bin("unzip")
|
|
181
|
-
|
|
182
|
-
def unpack_archive(atype, archive)
|
|
183
|
-
case atype
|
|
184
|
-
when :tgz
|
|
185
|
-
if ::Rant::Env.have_tar?
|
|
186
|
-
`tar -xzf #{archive}`
|
|
187
|
-
else
|
|
188
|
-
minitar_unpack archive
|
|
189
|
-
end
|
|
190
|
-
when :zip
|
|
191
|
-
if $have_unzip
|
|
192
|
-
`unzip -q #{archive}`
|
|
193
|
-
else
|
|
194
|
-
rubyzip_unpack archive
|
|
195
|
-
end
|
|
196
|
-
else
|
|
197
|
-
raise "can't unpack archive type #{atype}"
|
|
198
|
-
end
|
|
199
|
-
end
|
|
200
|
-
def minitar_unpack(archive)
|
|
201
|
-
require 'zlib'
|
|
202
|
-
require 'rant/archive/minitar'
|
|
203
|
-
tgz = Zlib::GzipReader.new(File.open(archive, 'rb'))
|
|
204
|
-
# unpack closes tgz
|
|
205
|
-
Rant::Archive::Minitar.unpack(tgz, '.')
|
|
206
|
-
end
|
|
207
|
-
def rubyzip_unpack(archive)
|
|
208
|
-
require 'rant/archive/rubyzip'
|
|
209
|
-
f = Rant::Archive::Rubyzip::ZipFile.open archive
|
|
210
|
-
f.entries.each { |e|
|
|
211
|
-
dir, = File.split(e.name)
|
|
212
|
-
FileUtils.mkpath dir unless test ?d, dir
|
|
213
|
-
f.extract e, e.name
|
|
214
|
-
}
|
|
215
|
-
f.close
|
|
216
|
-
end
|
|
217
|
-
|
|
218
182
|
# Returns a list with the files required by the IO object script.
|
|
219
183
|
def extract_requires(script, dynamic_requires = [])
|
|
220
184
|
in_ml_comment = false
|
|
@@ -247,3 +211,23 @@ def extract_requires(script, dynamic_requires = [])
|
|
|
247
211
|
}
|
|
248
212
|
requires
|
|
249
213
|
end
|
|
214
|
+
|
|
215
|
+
module Rant::TestUtil
|
|
216
|
+
def in_local_temp_dir(dirname = "t")
|
|
217
|
+
dirname = dirname.dup
|
|
218
|
+
base_dir = Dir.pwd
|
|
219
|
+
raise "dir `#{t}' already exists" if test ?e, dirname
|
|
220
|
+
FileUtils.mkdir dirname
|
|
221
|
+
Dir.chdir dirname
|
|
222
|
+
yield
|
|
223
|
+
ensure
|
|
224
|
+
Dir.chdir base_dir
|
|
225
|
+
FileUtils.rm_rf dirname
|
|
226
|
+
end
|
|
227
|
+
def write_to_file(fn, content)
|
|
228
|
+
open fn, "w" do |f|
|
|
229
|
+
f.write content
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
extend self
|
|
233
|
+
end
|
metadata
CHANGED
|
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
|
3
3
|
specification_version: 1
|
|
4
4
|
name: rant
|
|
5
5
|
version: !ruby/object:Gem::Version
|
|
6
|
-
version: 0.4.
|
|
7
|
-
date: 2005-
|
|
6
|
+
version: 0.4.6
|
|
7
|
+
date: 2005-09-25 00:00:00 +02:00
|
|
8
8
|
summary: Rant is a Ruby based build tool.
|
|
9
9
|
require_paths:
|
|
10
10
|
- lib
|
|
@@ -47,6 +47,7 @@ files:
|
|
|
47
47
|
- lib/rant/rantenv.rb
|
|
48
48
|
- lib/rant/cs_compiler.rb
|
|
49
49
|
- lib/rant/rantlib.rb
|
|
50
|
+
- lib/rant/progress.rb
|
|
50
51
|
- lib/rant/rantsys.rb
|
|
51
52
|
- lib/rant/rantvar.rb
|
|
52
53
|
- lib/rant/import
|
|
@@ -59,6 +60,7 @@ files:
|
|
|
59
60
|
- lib/rant/import.rb
|
|
60
61
|
- lib/rant/c/include.rb
|
|
61
62
|
- lib/rant/import/c
|
|
63
|
+
- lib/rant/import/sys
|
|
62
64
|
- lib/rant/import/signedfile.rb
|
|
63
65
|
- lib/rant/import/directedrule.rb
|
|
64
66
|
- lib/rant/import/nodes
|
|
@@ -77,6 +79,9 @@ files:
|
|
|
77
79
|
- lib/rant/import/clean.rb
|
|
78
80
|
- lib/rant/import/autoclean.rb
|
|
79
81
|
- lib/rant/import/c/dependencies.rb
|
|
82
|
+
- lib/rant/import/sys/more.rb
|
|
83
|
+
- lib/rant/import/sys/tgz.rb
|
|
84
|
+
- lib/rant/import/sys/zip.rb
|
|
80
85
|
- lib/rant/import/nodes/default.rb
|
|
81
86
|
- lib/rant/import/nodes/signed.rb
|
|
82
87
|
- lib/rant/import/win32/rubycmdwrapper.rb
|
|
@@ -122,16 +127,18 @@ files:
|
|
|
122
127
|
- test/project1
|
|
123
128
|
- test/project2
|
|
124
129
|
- test/rant-import
|
|
130
|
+
- test/subdirs2
|
|
125
131
|
- test/test_clean.rb
|
|
126
132
|
- test/test_filelist.rb
|
|
133
|
+
- test/deprecated
|
|
127
134
|
- test/standalone.rf
|
|
128
135
|
- test/c/source.c
|
|
129
136
|
- test/c/test_parse_includes.rb
|
|
130
137
|
- test/project_rb1/bin
|
|
131
138
|
- test/project_rb1/lib
|
|
132
139
|
- test/project_rb1/test
|
|
133
|
-
- test/project_rb1/rantfile.rb
|
|
134
140
|
- test/project_rb1/README
|
|
141
|
+
- test/project_rb1/rantfile
|
|
135
142
|
- test/project_rb1/test_project_rb1.rb
|
|
136
143
|
- test/project_rb1/bin/wgrep
|
|
137
144
|
- test/project_rb1/lib/wgrep.rb
|
|
@@ -143,9 +150,11 @@ files:
|
|
|
143
150
|
- test/subdirs/test_subdirs.rb
|
|
144
151
|
- test/subdirs/sub1/Rantfile
|
|
145
152
|
- test/subdirs/sub2/sub
|
|
146
|
-
- test/subdirs/sub2/rantfile
|
|
153
|
+
- test/subdirs/sub2/rantfile
|
|
147
154
|
- test/subdirs/sub2/sub/rantfile
|
|
148
155
|
- test/import/c
|
|
156
|
+
- test/import/md5
|
|
157
|
+
- test/import/sys
|
|
149
158
|
- test/import/metadata
|
|
150
159
|
- test/import/nodes
|
|
151
160
|
- test/import/truth
|
|
@@ -170,6 +179,22 @@ files:
|
|
|
170
179
|
- test/import/c/dependencies/include/foo.h
|
|
171
180
|
- test/import/c/dependencies/include/with space.h
|
|
172
181
|
- test/import/c/dependencies/include/sub/sub.h
|
|
182
|
+
- test/import/md5/root.rant
|
|
183
|
+
- test/import/md5/test_md5.rb
|
|
184
|
+
- test/import/sys/data
|
|
185
|
+
- test/import/sys/test_tgz.rb
|
|
186
|
+
- test/import/sys/tgz.rf
|
|
187
|
+
- test/import/sys/test_zip.rb
|
|
188
|
+
- test/import/sys/zip.rf
|
|
189
|
+
- test/import/sys/data/pkg
|
|
190
|
+
- test/import/sys/data/pkg2.zip
|
|
191
|
+
- test/import/sys/data/pkg.tgz
|
|
192
|
+
- test/import/sys/data/pkg.zip
|
|
193
|
+
- test/import/sys/data/pkg/bin
|
|
194
|
+
- test/import/sys/data/pkg/test.c
|
|
195
|
+
- test/import/sys/data/pkg/test.h
|
|
196
|
+
- test/import/sys/data/pkg/bin/test
|
|
197
|
+
- test/import/sys/data/pkg/bin/test.o
|
|
173
198
|
- test/import/metadata/sub
|
|
174
199
|
- test/import/metadata/test_metadata.rb
|
|
175
200
|
- test/import/metadata/Rantfile
|
|
@@ -220,28 +245,60 @@ files:
|
|
|
220
245
|
- test/project1/test_project.rb
|
|
221
246
|
- test/project2/sub1
|
|
222
247
|
- test/project2/sub2
|
|
223
|
-
- test/project2/
|
|
248
|
+
- test/project2/root.rant
|
|
224
249
|
- test/project2/buildfile
|
|
225
250
|
- test/project2/test_project.rb
|
|
226
251
|
- test/project2/sub1/Rantfile
|
|
227
252
|
- test/rant-import/Rantfile
|
|
228
253
|
- test/rant-import/test_rant-import.rb
|
|
254
|
+
- test/subdirs2/sub1
|
|
255
|
+
- test/subdirs2/root.rant
|
|
256
|
+
- test/subdirs2/sub00
|
|
257
|
+
- test/subdirs2/test_subdirs2.rb
|
|
258
|
+
- test/subdirs2/sub1/sub.rant
|
|
259
|
+
- test/subdirs2/sub00/sub.rant
|
|
260
|
+
- test/deprecated/README
|
|
261
|
+
- test/deprecated/test_0_4_8.rb
|
|
262
|
+
- test/deprecated/test_0_5_2.rb
|
|
229
263
|
- doc/rantfile.rdoc
|
|
230
264
|
- doc/md5.rdoc
|
|
231
265
|
- doc/configure.rdoc
|
|
232
266
|
- doc/advanced.rdoc
|
|
267
|
+
- doc/subdirs.rdoc
|
|
233
268
|
- doc/rubyproject.rdoc
|
|
234
269
|
- doc/c.rdoc
|
|
270
|
+
- doc/homepage
|
|
235
271
|
- doc/rant.rdoc
|
|
236
272
|
- doc/jamis.rb
|
|
273
|
+
- doc/rant.1
|
|
237
274
|
- doc/csharp.rdoc
|
|
238
275
|
- doc/rant-import.rdoc
|
|
239
276
|
- doc/examples
|
|
240
277
|
- doc/package.rdoc
|
|
278
|
+
- doc/homepage/index.html
|
|
279
|
+
- doc/homepage/rant_home.css
|
|
280
|
+
- doc/examples/c_cpp
|
|
241
281
|
- doc/examples/c_cpp_examples
|
|
242
282
|
- doc/examples/directedrule
|
|
243
283
|
- doc/examples/myprog
|
|
244
284
|
- doc/examples/c_dependencies
|
|
285
|
+
- doc/examples/c_cpp/c
|
|
286
|
+
- doc/examples/c_cpp/c++
|
|
287
|
+
- doc/examples/c_cpp/root.rant
|
|
288
|
+
- doc/examples/c_cpp/c/template.rf
|
|
289
|
+
- doc/examples/c_cpp/c/problem_1_1
|
|
290
|
+
- doc/examples/c_cpp/c/problem_1_1/main.c
|
|
291
|
+
- doc/examples/c_cpp/c/problem_1_1/test.c
|
|
292
|
+
- doc/examples/c_cpp/c/problem_1_1/test.h
|
|
293
|
+
- doc/examples/c_cpp/c/problem_1_1/another_test.c
|
|
294
|
+
- doc/examples/c_cpp/c/problem_1_1/another_test.h
|
|
295
|
+
- doc/examples/c_cpp/c++/template.rf
|
|
296
|
+
- doc/examples/c_cpp/c++/problem_1_1
|
|
297
|
+
- doc/examples/c_cpp/c++/problem_1_1/main.cpp
|
|
298
|
+
- doc/examples/c_cpp/c++/problem_1_1/test.cpp
|
|
299
|
+
- doc/examples/c_cpp/c++/problem_1_1/another_test.cpp
|
|
300
|
+
- doc/examples/c_cpp/c++/problem_1_1/test.h
|
|
301
|
+
- doc/examples/c_cpp/c++/problem_1_1/another_test.h
|
|
245
302
|
- doc/examples/c_cpp_examples/c
|
|
246
303
|
- doc/examples/c_cpp_examples/c++
|
|
247
304
|
- doc/examples/c_cpp_examples/Rantfile
|
|
@@ -295,20 +352,21 @@ rdoc_options:
|
|
|
295
352
|
- "--main"
|
|
296
353
|
- README
|
|
297
354
|
extra_rdoc_files:
|
|
355
|
+
- README
|
|
356
|
+
- doc/examples/myprog/README
|
|
357
|
+
- lib/rant/plugin/README
|
|
358
|
+
- NEWS
|
|
298
359
|
- doc/rantfile.rdoc
|
|
299
360
|
- doc/md5.rdoc
|
|
300
361
|
- doc/configure.rdoc
|
|
301
362
|
- doc/advanced.rdoc
|
|
363
|
+
- doc/subdirs.rdoc
|
|
302
364
|
- doc/rubyproject.rdoc
|
|
303
365
|
- doc/c.rdoc
|
|
304
366
|
- doc/rant.rdoc
|
|
305
367
|
- doc/csharp.rdoc
|
|
306
368
|
- doc/rant-import.rdoc
|
|
307
369
|
- doc/package.rdoc
|
|
308
|
-
- README
|
|
309
|
-
- doc/examples/myprog/README
|
|
310
|
-
- lib/rant/plugin/README
|
|
311
|
-
- NEWS
|
|
312
370
|
executables:
|
|
313
371
|
- rant
|
|
314
372
|
- rant-import
|