reap 03.01 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/{LICENSE → COPYING} +0 -0
- data/ChangeLog +5 -0
- data/ProjectInfo +55 -15
- data/README +32 -31
- data/Rakefile +0 -141
- data/bin/reap +2 -158
- data/data/reap/scaffold/COPYING +11 -0
- data/data/reap/scaffold/ChangeLog +0 -0
- data/data/reap/scaffold/INSTALL +0 -0
- data/data/reap/scaffold/ProjectInfo +78 -0
- data/data/reap/scaffold/README +0 -0
- data/data/reap/scaffold/Rakefile +146 -0
- data/data/reap/scaffold/Todo +0 -0
- data/data/reap/scaffold/setup.rb +1551 -0
- data/dev/Rakefile +60 -0
- data/dev/composite_task.rb +27 -0
- data/dev/compositepublisher.rb +24 -0
- data/dev/ftptools.rb +139 -0
- data/dev/license-each.rb +85 -0
- data/dev/publisher.rb +75 -0
- data/dev/rubyforgepublisher.rb +18 -0
- data/dev/sshpublisher.rb +47 -0
- data/dev/suby-cvs.rb +46 -0
- data/{data/site_ruby/reap/template.yaml → dev/template.rb} +15 -37
- data/lib/reap/bin/reap.rb +132 -0
- data/lib/reap/lint.rb +0 -0
- data/lib/reap/projectinfo.rb +13 -8
- data/lib/reap/readymade.rb +21 -0
- data/lib/reap/task.rb +120 -68
- data/lib/reap/{announce_task.rb → task/announce.rb} +15 -20
- data/lib/reap/{filemod_task.rb → task/fileperm.rb} +12 -16
- data/lib/reap/task/info.rb +20 -0
- data/lib/reap/task/install.rb +33 -0
- data/lib/reap/task/noop.rb +26 -0
- data/lib/reap/{package_task.rb → task/package.rb} +88 -71
- data/lib/reap/{publish_task.rb → task/publish.rb} +5 -13
- data/lib/reap/{rdoc_task.rb → task/rdoc.rb} +29 -22
- data/lib/reap/task/scaffold.rb +114 -0
- data/lib/reap/{test_task.rb → task/test.rb} +32 -25
- data/lib/reap/task/testext.rb +110 -0
- data/lib/reap/{web_publish_task.rb → task/webpublish.rb} +5 -11
- data/lib/reap/tasks.rb +12 -8
- data/lib/reap/test.rb +138 -0
- data/setup.rb +726 -534
- data/web/ProjectInfo +57 -0
- data/{pub/www → web}/images/appleboy.jpg +0 -0
- data/{pub → web/images}/grape.jpg +0 -0
- data/web/index.html +123 -0
- data/web/rdoc/classes/Object.html +121 -0
- data/{pub/www → web}/rdoc/classes/ProjectInfo.html +36 -36
- data/{pub/www/rdoc/classes/ProjectInfo.src/M000055.html → web/rdoc/classes/ProjectInfo.src/M000092.html} +3 -3
- data/{pub/www/rdoc/classes/ProjectInfo.src/M000056.html → web/rdoc/classes/ProjectInfo.src/M000093.html} +2 -1
- data/{pub/www/rdoc/classes/ProjectInfo.src/M000057.html → web/rdoc/classes/ProjectInfo.src/M000094.html} +1 -1
- data/{pub/www/rdoc/classes/ProjectInfo.src/M000058.html → web/rdoc/classes/ProjectInfo.src/M000095.html} +1 -1
- data/{pub/www/rdoc/classes/ProjectInfo.src/M000059.html → web/rdoc/classes/ProjectInfo.src/M000096.html} +1 -1
- data/web/rdoc/classes/Reap.html +248 -0
- data/web/rdoc/classes/Reap.src/M000022.html +16 -0
- data/web/rdoc/classes/Reap.src/M000023.html +19 -0
- data/web/rdoc/classes/Reap.src/M000024.html +16 -0
- data/web/rdoc/classes/Reap.src/M000025.html +27 -0
- data/{pub/www/rdoc/classes/Reap/AnnounceTask.html → web/rdoc/classes/Reap/Announce.html} +22 -40
- data/web/rdoc/classes/Reap/Announce.src/M000029.html +18 -0
- data/{pub/www/rdoc/classes/Reap/AnnounceTask.src/M000041.html → web/rdoc/classes/Reap/Announce.src/M000030.html} +13 -10
- data/{pub/www/rdoc/classes/Reap/AnnounceTask.src/M000042.html → web/rdoc/classes/Reap/Announce.src/M000031.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/InfoTask.html → web/rdoc/classes/Reap/Info.html} +23 -41
- data/{pub/www/rdoc/classes/Reap/RDocTask.src/M000002.html → web/rdoc/classes/Reap/Info.src/M000032.html} +4 -4
- data/{pub/www/rdoc/classes/Reap/InfoTask.src/M000049.html → web/rdoc/classes/Reap/Info.src/M000033.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/NoopTask.src/M000046.html → web/rdoc/classes/Reap/Info.src/M000034.html} +3 -3
- data/web/rdoc/classes/Reap/Install.html +193 -0
- data/web/rdoc/classes/Reap/Install.src/M000035.html +18 -0
- data/{pub/www/rdoc/classes/Reap/AnnounceTask.src/M000040.html → web/rdoc/classes/Reap/Install.src/M000036.html} +6 -4
- data/web/rdoc/classes/Reap/Install.src/M000037.html +26 -0
- data/{pub/www/rdoc/classes/Reap/NoopTask.html → web/rdoc/classes/Reap/Noop.html} +23 -41
- data/web/rdoc/classes/Reap/Noop.src/M000026.html +18 -0
- data/{pub/www/rdoc/classes/Reap/NoopTask.src/M000045.html → web/rdoc/classes/Reap/Noop.src/M000027.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/InfoTask.src/M000050.html → web/rdoc/classes/Reap/Noop.src/M000028.html} +3 -3
- data/{pub/www/rdoc/classes/Reap/PackageTask.html → web/rdoc/classes/Reap/Package.html} +40 -68
- data/{pub/www/rdoc/classes/Reap/NoopTask.src/M000044.html → web/rdoc/classes/Reap/Package.src/M000053.html} +4 -4
- data/{pub/www/rdoc/classes/Reap/PackageTask.src/M000007.html → web/rdoc/classes/Reap/Package.src/M000054.html} +28 -13
- data/{pub/www/rdoc/classes/Reap/PackageTask.src/M000008.html → web/rdoc/classes/Reap/Package.src/M000055.html} +43 -32
- data/{pub/www/rdoc/classes/Reap/PackageTask.src/M000009.html → web/rdoc/classes/Reap/Package.src/M000056.html} +13 -3
- data/{pub/www/rdoc/classes/Reap/FilemodTask.html → web/rdoc/classes/Reap/Perm.html} +34 -52
- data/web/rdoc/classes/Reap/Perm.src/M000076.html +18 -0
- data/{pub/www/rdoc/classes/Reap/FilemodTask.src/M000029.html → web/rdoc/classes/Reap/Perm.src/M000077.html} +3 -3
- data/{pub/www/rdoc/classes/Reap/FilemodTask.src/M000030.html → web/rdoc/classes/Reap/Perm.src/M000078.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/FilemodTask.src/M000031.html → web/rdoc/classes/Reap/Perm.src/M000079.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/FilemodTask.src/M000032.html → web/rdoc/classes/Reap/Perm.src/M000080.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/PublishTask.html → web/rdoc/classes/Reap/Publish.html} +23 -41
- data/web/rdoc/classes/Reap/Publish.src/M000068.html +18 -0
- data/{pub/www/rdoc/classes/Reap/PublishTask.src/M000025.html → web/rdoc/classes/Reap/Publish.src/M000069.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/PublishTask.src/M000026.html → web/rdoc/classes/Reap/Publish.src/M000070.html} +3 -4
- data/{pub/www/rdoc/classes/Reap/RDocTask.html → web/rdoc/classes/Reap/RDoc.html} +23 -41
- data/web/rdoc/classes/Reap/RDoc.src/M000057.html +18 -0
- data/{pub/www/rdoc/classes/Reap/RDocTask.src/M000003.html → web/rdoc/classes/Reap/RDoc.src/M000058.html} +4 -5
- data/{pub/www/rdoc/classes/Reap/RDocTask.src/M000004.html → web/rdoc/classes/Reap/RDoc.src/M000059.html} +26 -9
- data/web/rdoc/classes/Reap/Task.html +381 -0
- data/web/rdoc/classes/Reap/Task.src/M000038.html +18 -0
- data/{pub/www/rdoc/classes/Reap/AnnounceTask.src → web/rdoc/classes/Reap/Task.src}/M000039.html +3 -3
- data/web/rdoc/classes/Reap/Task.src/M000040.html +16 -0
- data/web/rdoc/classes/Reap/Task.src/M000041.html +18 -0
- data/{pub/www/rdoc/classes/Reap/FilemodTask.src/M000027.html → web/rdoc/classes/Reap/Task.src/M000042.html} +5 -3
- data/{pub/www/rdoc/classes/Reap/NoopTask.src → web/rdoc/classes/Reap/Task.src}/M000043.html +3 -3
- data/web/rdoc/classes/Reap/Task.src/M000044.html +16 -0
- data/{pub/www/rdoc/classes/Reap/Task.src/M000034.html → web/rdoc/classes/Reap/Task.src/M000045.html} +2 -4
- data/{pub/www/rdoc/classes/Reap/Task.src/M000036.html → web/rdoc/classes/Reap/Task.src/M000046.html} +3 -3
- data/web/rdoc/classes/Reap/Task.src/M000047.html +16 -0
- data/web/rdoc/classes/Reap/Task.src/M000048.html +27 -0
- data/web/rdoc/classes/Reap/Task.src/M000049.html +19 -0
- data/{pub/www/rdoc/classes/Reap/Task.src/M000037.html → web/rdoc/classes/Reap/Task.src/M000050.html} +2 -2
- data/web/rdoc/classes/Reap/Task.src/M000051.html +18 -0
- data/web/rdoc/classes/Reap/Task.src/M000052.html +19 -0
- data/{pub/www/rdoc/classes/Reap/TestTask.html → web/rdoc/classes/Reap/Test.html} +47 -56
- data/web/rdoc/classes/Reap/Test.src/M000060.html +18 -0
- data/{pub/www/rdoc/classes/Reap/TestTask.src/M000016.html → web/rdoc/classes/Reap/Test.src/M000061.html} +5 -4
- data/{pub/www/rdoc/classes/Reap/TestTask.src/M000017.html → web/rdoc/classes/Reap/Test.src/M000062.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/TestTask.src/M000018.html → web/rdoc/classes/Reap/Test.src/M000063.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/TestTask.src/M000019.html → web/rdoc/classes/Reap/Test.src/M000064.html} +18 -4
- data/{pub/www/rdoc/classes/Reap/TestTask → web/rdoc/classes/Reap/Test}/TestResults.html +21 -19
- data/{pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000020.html → web/rdoc/classes/Reap/Test/TestResults.src/M000065.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000021.html → web/rdoc/classes/Reap/Test/TestResults.src/M000066.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000022.html → web/rdoc/classes/Reap/Test/TestResults.src/M000067.html} +2 -2
- data/web/rdoc/classes/Reap/TestExt.html +234 -0
- data/{pub/www/rdoc/classes/Reap/InfoTask.src/M000048.html → web/rdoc/classes/Reap/TestExt.src/M000071.html} +4 -4
- data/web/rdoc/classes/Reap/TestExt.src/M000072.html +20 -0
- data/web/rdoc/classes/Reap/TestExt.src/M000073.html +49 -0
- data/web/rdoc/classes/Reap/TestExt.src/M000074.html +34 -0
- data/web/rdoc/classes/Reap/TestExt.src/M000075.html +27 -0
- data/{pub/www/rdoc/classes/Reap/WebPublishTask.html → web/rdoc/classes/Reap/WebPublish.html} +23 -41
- data/{pub/www/rdoc/classes/Reap/WebPublishTask.src/M000011.html → web/rdoc/classes/Reap/WebPublish.src/M000081.html} +4 -4
- data/{pub/www/rdoc/classes/Reap/WebPublishTask.src/M000012.html → web/rdoc/classes/Reap/WebPublish.src/M000082.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/WebPublishTask.src/M000013.html → web/rdoc/classes/Reap/WebPublish.src/M000083.html} +2 -2
- data/web/rdoc/classes/ReapCommand.html +407 -0
- data/web/rdoc/classes/ReapCommand.src/M000001.html +16 -0
- data/web/rdoc/classes/ReapCommand.src/M000003.html +16 -0
- data/web/rdoc/classes/ReapCommand.src/M000005.html +16 -0
- data/{pub/www/rdoc/classes/Reap/InfoTask.src/M000047.html → web/rdoc/classes/ReapCommand.src/M000007.html} +4 -4
- data/web/rdoc/classes/ReapCommand.src/M000009.html +16 -0
- data/web/rdoc/classes/ReapCommand.src/M000011.html +16 -0
- data/web/rdoc/classes/ReapCommand.src/M000013.html +18 -0
- data/web/rdoc/classes/ReapCommand.src/M000014.html +19 -0
- data/web/rdoc/classes/ReapCommand.src/M000015.html +19 -0
- data/web/rdoc/classes/ReapCommand.src/M000016.html +23 -0
- data/web/rdoc/classes/Scaffold.html +211 -0
- data/web/rdoc/classes/Scaffold.src/M000084.html +16 -0
- data/web/rdoc/classes/Scaffold.src/M000085.html +28 -0
- data/web/rdoc/classes/Scaffold.src/M000086.html +32 -0
- data/web/rdoc/classes/Scaffold.src/M000087.html +18 -0
- data/{pub/www/rdoc/classes/RakeTask.html → web/rdoc/classes/UnitTestKernel.html} +28 -34
- data/web/rdoc/classes/UnitTestKernel.src/M000018.html +18 -0
- data/web/rdoc/classes/UnitTestKernel.src/M000019.html +18 -0
- data/web/rdoc/classes/UnitTestKernel.src/M000020.html +22 -0
- data/web/rdoc/classes/UnitTestKernel.src/M000021.html +22 -0
- data/{pub/www/rdoc/classes/Reap.html → web/rdoc/classes/UnitTesting.html} +48 -54
- data/web/rdoc/classes/UnitTesting.src/M000088.html +34 -0
- data/web/rdoc/classes/UnitTesting.src/M000089.html +18 -0
- data/web/rdoc/classes/UnitTesting/Failure.html +156 -0
- data/web/rdoc/classes/UnitTesting/Failure.src/M000090.html +18 -0
- data/web/rdoc/classes/UnitTesting/Failure.src/M000091.html +21 -0
- data/web/rdoc/created.rid +1 -0
- data/web/rdoc/files/ANN.html +107 -0
- data/{pub/www/rdoc/files/LICENSE.html → web/rdoc/files/COPYING.html} +3 -3
- data/web/rdoc/files/ChangeLog.html +144 -0
- data/web/rdoc/files/ProjectInfo.html +190 -0
- data/{pub/www → web}/rdoc/files/README.html +17 -24
- data/web/rdoc/files/Rakefile.html +101 -0
- data/web/rdoc/files/lib/reap/bin/reap_rb.html +124 -0
- data/web/rdoc/files/lib/reap/lint_rb.html +101 -0
- data/{pub/www → web}/rdoc/files/lib/reap/projectinfo_rb.html +3 -4
- data/web/rdoc/files/lib/reap/readymade_rb.html +123 -0
- data/{pub/www/rdoc/files/lib/reap/announce_task_rb.html → web/rdoc/files/lib/reap/task/announce_rb.html} +5 -5
- data/{pub/www/rdoc/files/lib/reap/filemod_task_rb.html → web/rdoc/files/lib/reap/task/fileperm_rb.html} +5 -5
- data/{pub/www/rdoc/files/lib/reap/rdoc_task_rb.html → web/rdoc/files/lib/reap/task/info_rb.html} +5 -5
- data/web/rdoc/files/lib/reap/task/install_rb.html +108 -0
- data/{pub/www/rdoc/files/lib/reap/noop_task_rb.html → web/rdoc/files/lib/reap/task/noop_rb.html} +5 -5
- data/{pub/www/rdoc/files/lib/reap/package_task_rb.html → web/rdoc/files/lib/reap/task/package_rb.html} +5 -5
- data/web/rdoc/files/lib/reap/task/publish_rb.html +108 -0
- data/web/rdoc/files/lib/reap/task/rdoc_rb.html +108 -0
- data/web/rdoc/files/lib/reap/task/scaffold_rb.html +107 -0
- data/{pub/www/rdoc/files/lib/reap/test_task_rb.html → web/rdoc/files/lib/reap/task/test_rb.html} +5 -5
- data/web/rdoc/files/lib/reap/task/testext_rb.html +109 -0
- data/{pub/www/rdoc/files/lib/reap/publish_task_rb.html → web/rdoc/files/lib/reap/task/webpublish_rb.html} +5 -5
- data/{pub/www → web}/rdoc/files/lib/reap/task_rb.html +11 -3
- data/{pub/www → web}/rdoc/files/lib/reap/tasks_rb.html +10 -9
- data/{pub/www/rdoc/files/lib/reap/info_task_rb.html → web/rdoc/files/lib/reap/test_rb.html} +6 -5
- data/web/rdoc/fr_class_index.html +47 -0
- data/web/rdoc/fr_file_index.html +51 -0
- data/web/rdoc/fr_method_index.html +122 -0
- data/{pub/www → web}/rdoc/index.html +0 -0
- data/{pub/www → web}/rdoc/rdoc-style.css +0 -0
- metadata +234 -158
- data/lib/reap/info_task.rb +0 -29
- data/lib/reap/noop_task.rb +0 -35
- data/lib/reap/ready_made.rb +0 -12
- data/pub/www/Reapfile +0 -99
- data/pub/www/index.html +0 -90
- data/pub/www/rdoc/classes/RakeTask.src/M000051.html +0 -18
- data/pub/www/rdoc/classes/RakeTask.src/M000052.html +0 -18
- data/pub/www/rdoc/classes/RakeTask.src/M000053.html +0 -18
- data/pub/www/rdoc/classes/RakeTask.src/M000054.html +0 -18
- data/pub/www/rdoc/classes/Reap/FilemodTask.src/M000028.html +0 -18
- data/pub/www/rdoc/classes/Reap/PackageTask.src/M000005.html +0 -16
- data/pub/www/rdoc/classes/Reap/PackageTask.src/M000006.html +0 -24
- data/pub/www/rdoc/classes/Reap/PublishTask.src/M000023.html +0 -16
- data/pub/www/rdoc/classes/Reap/PublishTask.src/M000024.html +0 -18
- data/pub/www/rdoc/classes/Reap/RDocTask.src/M000001.html +0 -16
- data/pub/www/rdoc/classes/Reap/Task.html +0 -239
- data/pub/www/rdoc/classes/Reap/Task.src/M000033.html +0 -21
- data/pub/www/rdoc/classes/Reap/Task.src/M000035.html +0 -41
- data/pub/www/rdoc/classes/Reap/Task.src/M000038.html +0 -19
- data/pub/www/rdoc/classes/Reap/TestTask.src/M000014.html +0 -16
- data/pub/www/rdoc/classes/Reap/TestTask.src/M000015.html +0 -18
- data/pub/www/rdoc/classes/Reap/WebPublishTask.src/M000010.html +0 -16
- data/pub/www/rdoc/classes/ReapTask.html +0 -287
- data/pub/www/rdoc/classes/ReapTask.src/M000060.html +0 -18
- data/pub/www/rdoc/classes/ReapTask.src/M000061.html +0 -18
- data/pub/www/rdoc/classes/ReapTask.src/M000062.html +0 -18
- data/pub/www/rdoc/classes/ReapTask.src/M000063.html +0 -18
- data/pub/www/rdoc/classes/ReapTask.src/M000064.html +0 -18
- data/pub/www/rdoc/classes/ReapTask.src/M000065.html +0 -18
- data/pub/www/rdoc/classes/ReapTask.src/M000066.html +0 -18
- data/pub/www/rdoc/classes/ReapTask.src/M000067.html +0 -18
- data/pub/www/rdoc/classes/ReapTask.src/M000068.html +0 -18
- data/pub/www/rdoc/created.rid +0 -1
- data/pub/www/rdoc/files/lib/reap/ready_made_rb.html +0 -115
- data/pub/www/rdoc/files/lib/reap/web_publish_task_rb.html +0 -108
- data/pub/www/rdoc/fr_class_index.html +0 -41
- data/pub/www/rdoc/fr_file_index.html +0 -41
- data/pub/www/rdoc/fr_method_index.html +0 -94
@@ -1,22 +1,13 @@
|
|
1
1
|
|
2
2
|
require 'reap/task'
|
3
3
|
|
4
|
-
module ReapTask
|
5
|
-
def rdoc_task(*args,&blk)
|
6
|
-
::Reap::RDocTask.new(*args,&blk)
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
4
|
#
|
11
5
|
# RDoc Task
|
12
6
|
#
|
13
|
-
class Reap::
|
14
|
-
|
15
|
-
#register 'rdoc'
|
7
|
+
class Reap::RDoc < Reap::Task
|
16
8
|
|
17
|
-
def
|
18
|
-
|
19
|
-
"generate RDocs (in #{dir}) [reap]"
|
9
|
+
def task_desc
|
10
|
+
"Generate RDocs (in #{dir})."
|
20
11
|
end
|
21
12
|
|
22
13
|
attr_accessor :dir, :main, :title, :template,
|
@@ -27,18 +18,21 @@ class Reap::RDocTask < Reap::Task
|
|
27
18
|
@main ||= 'README'
|
28
19
|
@title ||= master["title"]
|
29
20
|
@template ||= 'html' # 'jamis'
|
30
|
-
@include ||= ['
|
31
|
-
|
32
|
-
@exclude ||= []
|
21
|
+
@include ||= [ 'A-Z*', 'lib/**/*', 'ext/**/*' ]
|
22
|
+
@exclude ||= [ 'demo/**/*', 'example/**/*', 'sample/**/*' ]
|
33
23
|
@options ||= ['--merge', '--all']
|
34
24
|
end
|
35
25
|
|
36
26
|
def run
|
27
|
+
must_exclude = [ 'InstalledFiles', 'CVS/**/*' ]
|
28
|
+
|
37
29
|
if !File.exists?(@main) or File.directory?(@main)
|
38
30
|
warn "Specified RDoc Main file #{@main} not found. Ignored."
|
39
31
|
@main = nil
|
40
32
|
end
|
33
|
+
|
41
34
|
rdoc_dir = File.expand_path(@dir)
|
35
|
+
|
42
36
|
if FileTest.directory?(@dir)
|
43
37
|
print "Directory '#{@dir}' already exists. Clobber? [y/N] "
|
44
38
|
until inp = $stdin.gets[0,1] ; sleep 1 ; end ; puts
|
@@ -48,27 +42,40 @@ class Reap::RDocTask < Reap::Task
|
|
48
42
|
#trashdir = ".trash/#{File.basename(@dir)}"
|
49
43
|
#FileUtils.rm_r(trashdir) if FileTest.exists?(trashdir)
|
50
44
|
#FileUtils.mv(@dir, trashdir)
|
51
|
-
FileUtils.rm_r(@dir)
|
45
|
+
FileUtils.rm_r(@dir) unless $PRETEND
|
52
46
|
else
|
53
47
|
puts "Reap rdoc task canceled."
|
54
48
|
return nil
|
55
49
|
end
|
56
50
|
end
|
51
|
+
|
57
52
|
rdoc_target = "#{rdoc_dir}/index.html"
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
53
|
+
|
54
|
+
exc = []
|
55
|
+
(@exclude + must_exclude).each{ |e|
|
56
|
+
exc << e
|
57
|
+
exc |= Dir.glob(e+'/**/*')
|
58
|
+
}
|
59
|
+
|
60
|
+
inc = Dir.glob('[A-Z]*')
|
61
|
+
@include.each{ |i| inc |= Dir.glob(i) }
|
62
|
+
inc -= exc
|
63
|
+
|
64
|
+
inc = inc.select{ |f| File.file?(f) }
|
65
|
+
|
66
|
+
rdoc_files = inc
|
62
67
|
rdoc_files = '"' << rdoc_files.join('" "') << '"'
|
68
|
+
|
63
69
|
# build options string
|
64
|
-
build =
|
70
|
+
build = []
|
71
|
+
build += @options
|
65
72
|
build << "--main '#{@main}'" if @main
|
66
73
|
build << "--title '#{@title}'" if @title
|
67
74
|
build << "-T '#{@template}'" if @template
|
68
75
|
rdoc_opts = build.join(' ')
|
76
|
+
|
69
77
|
# do it!
|
70
78
|
puts "Reap is shelling work out to RDoc..."
|
71
|
-
puts %{rdoc -o #{@dir} #{rdoc_opts}}
|
72
79
|
sh %{rdoc -o #{rdoc_dir} #{rdoc_opts} #{rdoc_files}}
|
73
80
|
end
|
74
81
|
|
@@ -0,0 +1,114 @@
|
|
1
|
+
|
2
|
+
#require 'rbconfig'
|
3
|
+
#require 'reap/projectinfo'
|
4
|
+
|
5
|
+
module Scaffold
|
6
|
+
extend self
|
7
|
+
|
8
|
+
SCMPaths => %w{
|
9
|
+
trunk
|
10
|
+
branch
|
11
|
+
tag
|
12
|
+
scrap
|
13
|
+
package
|
14
|
+
}
|
15
|
+
|
16
|
+
TrunkPaths = %w{
|
17
|
+
bin
|
18
|
+
lib
|
19
|
+
ext
|
20
|
+
dev
|
21
|
+
data
|
22
|
+
test
|
23
|
+
demo
|
24
|
+
}
|
25
|
+
|
26
|
+
TrunkFiles = %w{
|
27
|
+
README
|
28
|
+
INSTALL
|
29
|
+
COPYING
|
30
|
+
ProjectInfo
|
31
|
+
ChangeLog
|
32
|
+
Todo
|
33
|
+
RakeFile
|
34
|
+
setup.rb
|
35
|
+
}
|
36
|
+
|
37
|
+
def go(name) ; scaffold(name) ; end
|
38
|
+
|
39
|
+
# Main method.
|
40
|
+
def scaffold(name=nil)
|
41
|
+
name ||= 'yourlib.projectdomain.org'
|
42
|
+
t = Time.now.strftime("%Y-%m-%d")
|
43
|
+
libdir = File.join( 'lib', "#{@name},#{t}" )
|
44
|
+
|
45
|
+
if @scm
|
46
|
+
SCMPaths.each { |d| makedir( d ) }
|
47
|
+
Dir.chdir 'trunk'
|
48
|
+
end
|
49
|
+
TrunkPaths.each { |d| makedir( d ) }
|
50
|
+
makedir_with_check( libdir )
|
51
|
+
TrunkFiles.each { |f| temlpate( f ) }
|
52
|
+
end
|
53
|
+
|
54
|
+
private
|
55
|
+
|
56
|
+
# Copy a file from lib/data to the current dir.
|
57
|
+
def template( filename )
|
58
|
+
dir = File.join(File.dirname(__FILE__), 'data' )
|
59
|
+
#dir = File.join( ::Config::CONFIG['datadir'], DATA_DIR )
|
60
|
+
f = File.join( dir, filename )
|
61
|
+
unless File.file?( f )
|
62
|
+
puts f
|
63
|
+
raise "Tempfile is missing."
|
64
|
+
end
|
65
|
+
|
66
|
+
if File.exists?(filename)
|
67
|
+
puts "#{filename} already exists."
|
68
|
+
return
|
69
|
+
end
|
70
|
+
# copy tmpf to Reapfile
|
71
|
+
FileUtils.cp( f, filename )
|
72
|
+
#puts "#{filename} created. You'll need to fill it out."
|
73
|
+
end
|
74
|
+
|
75
|
+
# Make a directory as long as it doesn't already exist.
|
76
|
+
def makedir( dir )
|
77
|
+
FileUtils.makedir_p( dir ) unless File.directory?( dir )
|
78
|
+
end
|
79
|
+
|
80
|
+
end
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
=begin
|
85
|
+
def scaffold
|
86
|
+
require 'reap/scaffold'
|
87
|
+
name =
|
88
|
+
domain =
|
89
|
+
Scaffold.go( name, domain )
|
90
|
+
end
|
91
|
+
|
92
|
+
def template( file_name = ProjectInfo )
|
93
|
+
#dir = File.dirname(File.dirname(__FILE__))
|
94
|
+
dir = File.join( ::Config::CONFIG['datadir'], DATA_DIR )
|
95
|
+
|
96
|
+
tmpf = File.join( dir, 'template.yaml' )
|
97
|
+
unless File.file?( tmpf )
|
98
|
+
puts tmpf
|
99
|
+
raise "Tempfile is missing."
|
100
|
+
end
|
101
|
+
|
102
|
+
if File.directory?(filename)
|
103
|
+
puts "#{filename} a directory. Cannot comply."
|
104
|
+
return
|
105
|
+
elsif File.file?(filename)
|
106
|
+
puts "#{filename} already exists."
|
107
|
+
return
|
108
|
+
end
|
109
|
+
# copy tmpf to Reapfile
|
110
|
+
FileUtils.cp( tmpf, filename )
|
111
|
+
puts "#{filename} created. You'll need to fill it out."
|
112
|
+
end
|
113
|
+
=end
|
114
|
+
|
@@ -1,3 +1,4 @@
|
|
1
|
+
|
1
2
|
require 'reap/task'
|
2
3
|
|
3
4
|
#require 'test/unit'
|
@@ -6,12 +7,6 @@ require 'nano/string/tabto'
|
|
6
7
|
|
7
8
|
Test::Unit.run = true # don't run auto tests
|
8
9
|
|
9
|
-
module ReapTask
|
10
|
-
def test_task(*args,&blk)
|
11
|
-
::Reap::TestTask.new(*args,&blk)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
10
|
#
|
16
11
|
# Test Task
|
17
12
|
#
|
@@ -19,30 +14,26 @@ end
|
|
19
14
|
# it's own process, making for purer
|
20
15
|
# test facility.
|
21
16
|
#
|
22
|
-
# NOTE:
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
# the tests themselves. This, hopefully can
|
29
|
-
# be remedied.
|
17
|
+
# NOTE: This works well enough but it is a bit of
|
18
|
+
# hack. It actually marshals test results across
|
19
|
+
# a stdout->stdin shell pipe. One consequence of
|
20
|
+
# this is that you can't send debug info to stdout
|
21
|
+
# (including #p and #puts). This, hopefully can be
|
22
|
+
# remedied in the future.
|
30
23
|
#
|
31
|
-
class Reap::
|
32
|
-
|
33
|
-
#register 'test'
|
24
|
+
class Reap::Test < Reap::Task
|
34
25
|
|
35
|
-
def
|
36
|
-
|
37
|
-
"run unit-tests (each in a separate process) [reap]"
|
26
|
+
def task_desc
|
27
|
+
"Run unit-tests (each in a separate process)."
|
38
28
|
end
|
39
29
|
|
40
|
-
attr_accessor :libs, :files, :
|
30
|
+
attr_accessor :libs, :files, :fixture, :against_installed
|
41
31
|
|
42
32
|
def init
|
43
33
|
@libs ||= ['lib']
|
44
|
-
@files ||= [ 'test/**/tc*.rb', 'test/**/test*.rb', 'test/**/*test.rb' ]
|
45
|
-
|
34
|
+
@files ||= [ 'test/*/**/*.rb', 'test/**/tc*.rb', 'test/**/test*.rb', 'test/**/*test.rb' ]
|
35
|
+
@fixture ||= []
|
36
|
+
@against_installed ||= false
|
46
37
|
|
47
38
|
# interal use
|
48
39
|
@results = TestResults.new
|
@@ -126,18 +117,34 @@ class Reap::TestTask < Reap::Task
|
|
126
117
|
@results << r
|
127
118
|
end
|
128
119
|
|
120
|
+
# Currently send program output to null device.
|
121
|
+
# Could send to a logger in future version.
|
129
122
|
def fork_test( testfile )
|
130
|
-
src =
|
123
|
+
src = ''
|
124
|
+
src << %{$:.unshift('lib')} unless against_installed
|
125
|
+
src << %{
|
131
126
|
#require 'test/unit'
|
132
127
|
require 'test/unit/collector'
|
133
128
|
require 'test/unit/collector/objectspace'
|
134
129
|
require 'test/unit/ui/testrunnermediator'
|
130
|
+
}
|
131
|
+
fixture.each do |fix|
|
132
|
+
src << %Q{
|
133
|
+
require '#{fix}'
|
134
|
+
}
|
135
|
+
end
|
136
|
+
src << %{
|
137
|
+
output = STDOUT.dup
|
138
|
+
STDOUT.reopen( PLATFORM =~ /mswin/ ? "NUL" : "/dev/null" )
|
135
139
|
|
136
140
|
load('#{testfile}')
|
137
141
|
tests = Test::Unit::Collector::ObjectSpace.new.collect
|
138
142
|
runner = Test::Unit::UI::TestRunnerMediator.new( tests )
|
139
143
|
result = runner.run_suite
|
140
|
-
|
144
|
+
output << Marshal.dump(result)
|
145
|
+
|
146
|
+
STDOUT.reopen(output)
|
147
|
+
output.close
|
141
148
|
}
|
142
149
|
result = IO.popen("ruby","w+") do |ruby|
|
143
150
|
ruby.puts src
|
@@ -0,0 +1,110 @@
|
|
1
|
+
require 'reap/task'
|
2
|
+
require 'nano/string/margin'
|
3
|
+
|
4
|
+
# Extract Test Task
|
5
|
+
#
|
6
|
+
# The Reap extract test task scans every package script
|
7
|
+
# looking for =begin testing ... =end sections.
|
8
|
+
# With appropriat headers, it copies these sections
|
9
|
+
# to files in the test dir, which then can be run
|
10
|
+
# using the Reap test taks.
|
11
|
+
#
|
12
|
+
class Reap::TestExt < Reap::Task
|
13
|
+
|
14
|
+
def task_desc
|
15
|
+
"Extract unit-tests from lib scripts."
|
16
|
+
end
|
17
|
+
|
18
|
+
attr_accessor :dir, :files, :options
|
19
|
+
|
20
|
+
def init
|
21
|
+
@dir ||= 'test'
|
22
|
+
@files ||= [ 'lib/**/*.rb' ]
|
23
|
+
#@options
|
24
|
+
end
|
25
|
+
|
26
|
+
def run
|
27
|
+
#test_libs = @libs.join(':')
|
28
|
+
files = FileList.new
|
29
|
+
files.include(*@files)
|
30
|
+
if files.empty?
|
31
|
+
puts "No script files found."
|
32
|
+
return
|
33
|
+
end
|
34
|
+
print "Reap is scanning and copying embedded tests..."
|
35
|
+
|
36
|
+
if @dir.strip.empty?
|
37
|
+
puts "Test directory must be specified."
|
38
|
+
return
|
39
|
+
end
|
40
|
+
|
41
|
+
unless File.directory?(@dir)
|
42
|
+
puts "Test directory doesn't exist: #{File.expand_path( @dir )}"
|
43
|
+
return
|
44
|
+
end
|
45
|
+
|
46
|
+
files.each { |file|
|
47
|
+
$stdout << '.'; $stdout.flush
|
48
|
+
testing = extract( file )
|
49
|
+
unless testing.strip.empty?
|
50
|
+
complete_test = create( testing, file )
|
51
|
+
fp = File.join(@dir,file)
|
52
|
+
unless File.directory?( File.dirname( fp ) )
|
53
|
+
FileUtils.mkdir_p( File.dirname(fp) )
|
54
|
+
end
|
55
|
+
File.open( fp, "w" ) { |fw| fw << complete_test }
|
56
|
+
end
|
57
|
+
}
|
58
|
+
puts "done."
|
59
|
+
end
|
60
|
+
|
61
|
+
def extract( file )
|
62
|
+
return nil if ! File.file?( file )
|
63
|
+
tests = ""; inside = false
|
64
|
+
fstr = File.read( file )
|
65
|
+
fstr.split(/\n/).each do |l|
|
66
|
+
if l =~ /^=[ ]*begin[ ]*testing/
|
67
|
+
tests << "\n"
|
68
|
+
inside = true
|
69
|
+
next
|
70
|
+
elsif inside and l =~ /^=[ ]*end/
|
71
|
+
inside = false
|
72
|
+
next
|
73
|
+
end
|
74
|
+
if inside
|
75
|
+
tests << l << "\n"
|
76
|
+
end
|
77
|
+
end
|
78
|
+
tests
|
79
|
+
end
|
80
|
+
|
81
|
+
def create( testing, file )
|
82
|
+
fp = file.split(/[\/]/)
|
83
|
+
if fp[0] == 'lib'
|
84
|
+
reqf = "require '#{fp[1..-1].join('/')}'"
|
85
|
+
else
|
86
|
+
reqf = ''
|
87
|
+
end
|
88
|
+
|
89
|
+
teststr = <<-HERE.margin
|
90
|
+
`# _____ _
|
91
|
+
`# |_ _|__ ___| |_
|
92
|
+
`# | |/ _ \\/ __| __|
|
93
|
+
`# | | __/\\__ \\ |_
|
94
|
+
`# |_|\\___||___/\\__|
|
95
|
+
`#
|
96
|
+
`# for #{file}
|
97
|
+
`#
|
98
|
+
`# Extracted #{Time.now}
|
99
|
+
`# Unit Tools Reap Test Extractor
|
100
|
+
`#
|
101
|
+
`
|
102
|
+
`#{reqf}
|
103
|
+
`
|
104
|
+
HERE
|
105
|
+
teststr << testing << "\n"
|
106
|
+
teststr
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
|
@@ -1,21 +1,15 @@
|
|
1
|
-
require 'reap/task'
|
2
1
|
|
3
|
-
|
4
|
-
def webpublish_task(*args,&blk)
|
5
|
-
::Reap::WebPublishTask.new(*args,&blk)
|
6
|
-
end
|
7
|
-
end
|
2
|
+
require 'reap/task'
|
8
3
|
|
9
4
|
#
|
10
5
|
# Web Publish Task
|
11
6
|
#
|
12
|
-
class Reap::
|
7
|
+
class Reap::WebPublish < Reap::Task
|
13
8
|
|
14
|
-
|
9
|
+
section_required true
|
15
10
|
|
16
|
-
def
|
17
|
-
|
18
|
-
"publish project website to your internet host [reap]"
|
11
|
+
def task_desc
|
12
|
+
"publish project website to your internet host *"
|
19
13
|
end
|
20
14
|
|
21
15
|
attr_accessor :host, :type, :dir, :project, :username
|
data/lib/reap/tasks.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
|
2
|
-
require 'reap/
|
3
|
-
require 'reap/
|
4
|
-
require 'reap/
|
5
|
-
require 'reap/
|
6
|
-
require 'reap/
|
7
|
-
require 'reap/
|
8
|
-
require 'reap/
|
9
|
-
require 'reap/
|
2
|
+
require 'reap/task/fileperm'
|
3
|
+
require 'reap/task/test'
|
4
|
+
require 'reap/task/testext'
|
5
|
+
require 'reap/task/rdoc'
|
6
|
+
require 'reap/task/announce'
|
7
|
+
require 'reap/task/package'
|
8
|
+
require 'reap/task/publish'
|
9
|
+
require 'reap/task/info'
|
10
|
+
require 'reap/task/install'
|
11
|
+
#require 'reap/task/noop'
|
12
|
+
#require 'reap/webpublish'
|
13
|
+
|