reap 03.01 → 4.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 +134 -0
- data/lib/reap/lint.rb +0 -0
- data/lib/reap/projectinfo.rb +20 -9
- data/lib/reap/readymade.rb +21 -0
- data/lib/reap/task.rb +119 -70
- data/lib/reap/{announce_task.rb → task/announce.rb} +20 -25
- 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} +33 -26
- 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 +124 -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/M000094.html} +3 -3
- data/{pub/www/rdoc/classes/ProjectInfo.src/M000056.html → web/rdoc/classes/ProjectInfo.src/M000095.html} +2 -1
- data/web/rdoc/classes/ProjectInfo.src/M000096.html +22 -0
- data/{pub/www/rdoc/classes/ProjectInfo.src/M000058.html → web/rdoc/classes/ProjectInfo.src/M000097.html} +1 -1
- data/{pub/www/rdoc/classes/ProjectInfo.src/M000059.html → web/rdoc/classes/ProjectInfo.src/M000098.html} +1 -1
- data/web/rdoc/classes/Reap.html +248 -0
- data/web/rdoc/classes/Reap.src/M000023.html +16 -0
- data/web/rdoc/classes/Reap.src/M000024.html +21 -0
- data/web/rdoc/classes/Reap.src/M000025.html +16 -0
- data/web/rdoc/classes/Reap.src/M000026.html +21 -0
- data/{pub/www/rdoc/classes/Reap/AnnounceTask.html → web/rdoc/classes/Reap/Announce.html} +22 -40
- data/web/rdoc/classes/Reap/Announce.src/M000030.html +18 -0
- data/{pub/www/rdoc/classes/Reap/AnnounceTask.src/M000041.html → web/rdoc/classes/Reap/Announce.src/M000031.html} +13 -10
- data/{pub/www/rdoc/classes/Reap/AnnounceTask.src/M000042.html → web/rdoc/classes/Reap/Announce.src/M000032.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/M000033.html} +4 -4
- data/{pub/www/rdoc/classes/Reap/InfoTask.src/M000049.html → web/rdoc/classes/Reap/Info.src/M000034.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/NoopTask.src/M000046.html → web/rdoc/classes/Reap/Info.src/M000035.html} +3 -3
- data/web/rdoc/classes/Reap/Install.html +193 -0
- data/web/rdoc/classes/Reap/Install.src/M000036.html +18 -0
- data/{pub/www/rdoc/classes/Reap/AnnounceTask.src/M000040.html → web/rdoc/classes/Reap/Install.src/M000037.html} +6 -4
- data/web/rdoc/classes/Reap/Install.src/M000038.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/M000027.html +18 -0
- data/{pub/www/rdoc/classes/Reap/NoopTask.src/M000045.html → web/rdoc/classes/Reap/Noop.src/M000028.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/InfoTask.src/M000050.html → web/rdoc/classes/Reap/Noop.src/M000029.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/M000055.html} +4 -4
- data/{pub/www/rdoc/classes/Reap/PackageTask.src/M000007.html → web/rdoc/classes/Reap/Package.src/M000056.html} +28 -13
- data/{pub/www/rdoc/classes/Reap/PackageTask.src/M000008.html → web/rdoc/classes/Reap/Package.src/M000057.html} +43 -32
- data/{pub/www/rdoc/classes/Reap/PackageTask.src/M000009.html → web/rdoc/classes/Reap/Package.src/M000058.html} +13 -3
- data/{pub/www/rdoc/classes/Reap/FilemodTask.html → web/rdoc/classes/Reap/Perm.html} +35 -53
- data/web/rdoc/classes/Reap/Perm.src/M000078.html +18 -0
- data/{pub/www/rdoc/classes/Reap/FilemodTask.src/M000029.html → web/rdoc/classes/Reap/Perm.src/M000079.html} +3 -3
- data/{pub/www/rdoc/classes/Reap/FilemodTask.src/M000030.html → web/rdoc/classes/Reap/Perm.src/M000080.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/FilemodTask.src/M000031.html → web/rdoc/classes/Reap/Perm.src/M000081.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/FilemodTask.src/M000032.html → web/rdoc/classes/Reap/Perm.src/M000082.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/M000070.html +18 -0
- data/{pub/www/rdoc/classes/Reap/PublishTask.src/M000025.html → web/rdoc/classes/Reap/Publish.src/M000071.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/PublishTask.src/M000026.html → web/rdoc/classes/Reap/Publish.src/M000072.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/M000059.html +18 -0
- data/{pub/www/rdoc/classes/Reap/RDocTask.src/M000003.html → web/rdoc/classes/Reap/RDoc.src/M000060.html} +4 -5
- data/{pub/www/rdoc/classes/Reap/RDocTask.src/M000004.html → web/rdoc/classes/Reap/RDoc.src/M000061.html} +26 -9
- data/web/rdoc/classes/Reap/Task.html +396 -0
- data/web/rdoc/classes/Reap/Task.src/M000039.html +18 -0
- data/{pub/www/rdoc/classes/Reap/FilemodTask.src/M000027.html → web/rdoc/classes/Reap/Task.src/M000040.html} +3 -3
- data/web/rdoc/classes/Reap/Task.src/M000041.html +16 -0
- data/web/rdoc/classes/Reap/Task.src/M000042.html +16 -0
- 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 +22 -0
- data/web/rdoc/classes/Reap/Task.src/M000045.html +16 -0
- data/web/rdoc/classes/Reap/Task.src/M000046.html +16 -0
- data/{pub/www/rdoc/classes/Reap/Task.src/M000034.html → web/rdoc/classes/Reap/Task.src/M000047.html} +2 -4
- data/{pub/www/rdoc/classes/Reap/Task.src/M000036.html → web/rdoc/classes/Reap/Task.src/M000048.html} +3 -3
- data/web/rdoc/classes/Reap/Task.src/M000049.html +16 -0
- data/web/rdoc/classes/Reap/Task.src/M000050.html +27 -0
- data/web/rdoc/classes/Reap/Task.src/M000051.html +19 -0
- data/{pub/www/rdoc/classes/Reap/Task.src/M000037.html → web/rdoc/classes/Reap/Task.src/M000052.html} +2 -2
- data/web/rdoc/classes/Reap/Task.src/M000053.html +18 -0
- data/web/rdoc/classes/Reap/Task.src/M000054.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/M000062.html +18 -0
- data/{pub/www/rdoc/classes/Reap/TestTask.src/M000016.html → web/rdoc/classes/Reap/Test.src/M000063.html} +5 -4
- data/{pub/www/rdoc/classes/Reap/TestTask.src/M000017.html → web/rdoc/classes/Reap/Test.src/M000064.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/TestTask.src/M000018.html → web/rdoc/classes/Reap/Test.src/M000065.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/TestTask.src/M000019.html → web/rdoc/classes/Reap/Test.src/M000066.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/M000067.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000021.html → web/rdoc/classes/Reap/Test/TestResults.src/M000068.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000022.html → web/rdoc/classes/Reap/Test/TestResults.src/M000069.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/M000073.html} +4 -4
- data/web/rdoc/classes/Reap/TestExt.src/M000074.html +20 -0
- data/web/rdoc/classes/Reap/TestExt.src/M000075.html +49 -0
- data/web/rdoc/classes/Reap/TestExt.src/M000076.html +34 -0
- data/web/rdoc/classes/Reap/TestExt.src/M000077.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/M000083.html} +4 -4
- data/{pub/www/rdoc/classes/Reap/WebPublishTask.src/M000012.html → web/rdoc/classes/Reap/WebPublish.src/M000084.html} +2 -2
- data/{pub/www/rdoc/classes/Reap/WebPublishTask.src/M000013.html → web/rdoc/classes/Reap/WebPublish.src/M000085.html} +2 -2
- data/web/rdoc/classes/ReapCommand.html +425 -0
- data/web/rdoc/classes/ReapCommand.src/M000001.html +16 -0
- data/{pub/www/rdoc/classes/Reap/AnnounceTask.src/M000039.html → web/rdoc/classes/ReapCommand.src/M000003.html} +4 -4
- 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 +24 -0
- data/web/rdoc/classes/ReapCommand.src/M000018.html +29 -0
- data/web/rdoc/classes/Scaffold.html +211 -0
- data/web/rdoc/classes/Scaffold.src/M000086.html +16 -0
- data/web/rdoc/classes/Scaffold.src/M000087.html +28 -0
- data/web/rdoc/classes/Scaffold.src/M000088.html +32 -0
- data/web/rdoc/classes/Scaffold.src/M000089.html +18 -0
- data/{pub/www/rdoc/classes/RakeTask.html → web/rdoc/classes/UnitTestKernel.html} +28 -34
- data/web/rdoc/classes/UnitTestKernel.src/M000019.html +18 -0
- data/web/rdoc/classes/UnitTestKernel.src/M000020.html +18 -0
- data/web/rdoc/classes/UnitTestKernel.src/M000021.html +22 -0
- data/web/rdoc/classes/UnitTestKernel.src/M000022.html +22 -0
- data/{pub/www/rdoc/classes/Reap.html → web/rdoc/classes/UnitTesting.html} +48 -54
- data/web/rdoc/classes/UnitTesting.src/M000090.html +34 -0
- data/web/rdoc/classes/UnitTesting.src/M000091.html +18 -0
- data/web/rdoc/classes/UnitTesting/Failure.html +156 -0
- data/web/rdoc/classes/UnitTesting/Failure.src/M000092.html +18 -0
- data/web/rdoc/classes/UnitTesting/Failure.src/M000093.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 +38 -35
- data/web/rdoc/files/Rakefile.html +101 -0
- data/web/rdoc/files/lib/reap/bin/reap_rb.html +129 -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 +124 -0
- data/{pub/www → web}/rdoc/index.html +0 -0
- data/{pub/www → web}/rdoc/rdoc-style.css +0 -0
- metadata +236 -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/ProjectInfo.src/M000057.html +0 -18
- 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
@@ -2,26 +2,18 @@
|
|
2
2
|
require 'reap/task'
|
3
3
|
|
4
4
|
require 'net/smtp'
|
5
|
-
require '
|
6
|
-
require '
|
7
|
-
require '
|
8
|
-
require '
|
9
|
-
require '
|
10
|
-
|
11
|
-
module ReapTask
|
12
|
-
def announce_task(*args,&blk)
|
13
|
-
::Reap::AnnounceTask.new(*args,&blk)
|
14
|
-
end
|
15
|
-
end
|
5
|
+
require 'facet/string/margin'
|
6
|
+
require 'facet/string/tab'
|
7
|
+
require 'facet/string/align_center'
|
8
|
+
require 'facet/string/fold'
|
9
|
+
require 'facet/string/word_wrap'
|
16
10
|
|
11
|
+
class Reap::Announce < Reap::Task
|
17
12
|
|
18
|
-
|
13
|
+
section_required true
|
19
14
|
|
20
|
-
|
21
|
-
|
22
|
-
def default_name ; "announce" ; end
|
23
|
-
def default_desc
|
24
|
-
"send [ANN] email to ruby-talk or other list [reap]"
|
15
|
+
def task_desc
|
16
|
+
"Send announcement email to ruby-talk or other address."
|
25
17
|
end
|
26
18
|
|
27
19
|
attr_accessor :title, :version, :summary, :description, :subject
|
@@ -30,14 +22,17 @@ class Reap::AnnounceTask < Reap::Task
|
|
30
22
|
attr_accessor :links, :slogan, :memo, :file
|
31
23
|
|
32
24
|
def init
|
33
|
-
@to = @to.to_s
|
34
|
-
@from = @from.to_s
|
35
|
-
@server = @server.strip
|
25
|
+
@to = (@to || 'ruby-talk@ruby-lang.org').to_s.strip
|
26
|
+
@from = (@from || master['email']).to_s.strip
|
27
|
+
@server = @server.to_s.strip
|
36
28
|
@port = (@port || 25).to_i
|
37
|
-
@domain = @domain.strip if @domain
|
38
|
-
@account = @account.to_s
|
39
|
-
@authtype = @authtype.to_s
|
40
|
-
|
29
|
+
@domain = @domain.to_s.strip if @domain
|
30
|
+
@account = @account.to_s.strip
|
31
|
+
@authtype = (@authtype || 'plain').to_s.strip #cram_md5 #plain #login
|
32
|
+
#@sectype = @sectype
|
33
|
+
|
34
|
+
raise "server is a require announce field" if @server.empty?
|
35
|
+
raise "account is a require announce field" if @account.empty?
|
41
36
|
|
42
37
|
@title ||= master['title']
|
43
38
|
@version ||= master['version']
|
@@ -46,7 +41,7 @@ class Reap::AnnounceTask < Reap::Task
|
|
46
41
|
@links ||= []
|
47
42
|
@subject ||= "[ANN] #{@title}, v#{@version}"
|
48
43
|
|
49
|
-
@address = @to #
|
44
|
+
@address = @to # TODO
|
50
45
|
|
51
46
|
#raise "DOMAIN is a required field" if @domain.empty?
|
52
47
|
|
@@ -1,28 +1,21 @@
|
|
1
1
|
|
2
2
|
require 'reap/task'
|
3
3
|
|
4
|
-
module ReapTask
|
5
|
-
def filemod_task(*args,&blk)
|
6
|
-
::Reap::FilemodTask.new(*args,&blk)
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
4
|
#
|
11
|
-
#
|
5
|
+
# File Permissions Task
|
12
6
|
#
|
13
|
-
class Reap::
|
7
|
+
class Reap::Perm < Reap::Task
|
14
8
|
|
15
|
-
|
9
|
+
attr_accessor :user, :group, :filemod, :dirmod
|
16
10
|
|
17
|
-
|
18
|
-
def default_desc
|
19
|
-
"normalize ownership and permissions of package files [reap]"
|
20
|
-
end
|
11
|
+
section_required true
|
21
12
|
|
22
|
-
|
13
|
+
def task_desc
|
14
|
+
"Normalize ownership and permissions of package files."
|
15
|
+
end
|
23
16
|
|
24
17
|
def init
|
25
|
-
|
18
|
+
@user = section['user']
|
26
19
|
@group ||= @user
|
27
20
|
@filemod ||= 644
|
28
21
|
@dirmod ||= 755
|
@@ -56,7 +49,8 @@ class Reap::FilemodTask < Reap::Task
|
|
56
49
|
chmod( bins, 755 ) unless bins.empty?
|
57
50
|
end
|
58
51
|
|
59
|
-
# support
|
52
|
+
# support functions
|
53
|
+
|
60
54
|
def chmod( file_list, file_mode=644, dir_mode=755 )
|
61
55
|
dirs, files = file_list.partition{ |l| File.directory?(l) }
|
62
56
|
unless files.empty?
|
@@ -84,3 +78,5 @@ class Reap::FilemodTask < Reap::Task
|
|
84
78
|
# end
|
85
79
|
|
86
80
|
end
|
81
|
+
|
82
|
+
#Reap.register( Reap::Perm )
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
require 'reap/task'
|
3
|
+
|
4
|
+
#
|
5
|
+
# Info Task - Displays the ProjectInfo file.
|
6
|
+
#
|
7
|
+
class Reap::Info < Reap::Task
|
8
|
+
|
9
|
+
def task_desc
|
10
|
+
"Display ProjectInfo file."
|
11
|
+
end
|
12
|
+
|
13
|
+
def init
|
14
|
+
end
|
15
|
+
|
16
|
+
def run
|
17
|
+
puts ProjectInfo.info_stream
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
require 'reap/task'
|
3
|
+
|
4
|
+
#
|
5
|
+
# Install Task
|
6
|
+
#
|
7
|
+
class Reap::Install < Reap::Task
|
8
|
+
|
9
|
+
def task_desc
|
10
|
+
"Locally install package using setup.rb or install.rb."
|
11
|
+
end
|
12
|
+
|
13
|
+
attr_accessor :options, :quiet #, :sudo
|
14
|
+
|
15
|
+
def init
|
16
|
+
@quiet ||= !$VERBOSE
|
17
|
+
@options ||= []
|
18
|
+
#@sudo ||= true
|
19
|
+
end
|
20
|
+
|
21
|
+
def run
|
22
|
+
exe = %w{ setup.rb install.rb }.find{ |f| File.exists?(f) }
|
23
|
+
raise "setup.rb or install.rb not found" if exe == nil
|
24
|
+
|
25
|
+
puts "Reap is shelling out work to #{exe}..."
|
26
|
+
|
27
|
+
options << '-q' if @quiet
|
28
|
+
|
29
|
+
c = "sudo ruby #{exe} #{options.join(' ')}"
|
30
|
+
sh c
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
require 'reap/task'
|
3
|
+
|
4
|
+
#
|
5
|
+
# Noop Task
|
6
|
+
#
|
7
|
+
# This task doesn't do anything except
|
8
|
+
# display a message. It is used simply
|
9
|
+
# for test purposes when debugging Reap.
|
10
|
+
#
|
11
|
+
class Reap::Noop < Reap::Task
|
12
|
+
|
13
|
+
def task_desc
|
14
|
+
"A no-op task to help debug reap itself."
|
15
|
+
end
|
16
|
+
|
17
|
+
attr_accessor :message
|
18
|
+
|
19
|
+
def init
|
20
|
+
end
|
21
|
+
|
22
|
+
def run
|
23
|
+
puts ( message || 'No message field in noop section.' )
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -7,52 +7,47 @@ rescue
|
|
7
7
|
# no rubygems
|
8
8
|
end
|
9
9
|
|
10
|
-
module ReapTask
|
11
|
-
def package_task(*args,&blk)
|
12
|
-
::Reap::PackageTask.new(*args,&blk)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
10
|
##
|
17
11
|
# Package Task
|
18
12
|
#
|
19
13
|
# This task creates standard .zip, .tgz, or .tbz
|
20
14
|
# packages, plus .gem distributions.
|
21
15
|
#
|
22
|
-
class Reap::
|
23
|
-
|
24
|
-
#register 'package'
|
25
|
-
|
26
|
-
def default_name ; 'package' ; end
|
27
|
-
def default_desc
|
28
|
-
w = []
|
29
|
-
w << (@gzip ? 'tgz' : nil)
|
30
|
-
w << (@bzip2 ? 'tbz' : nil)
|
31
|
-
w << (@zip ? 'zip' : nil)
|
32
|
-
w << (@gem ? 'gem' : nil)
|
33
|
-
w.compact!
|
34
|
-
"build distribution packages (#{w.join(',')}) [reap]"
|
35
|
-
end
|
16
|
+
class Reap::Package < Reap::Task
|
36
17
|
|
37
|
-
|
38
|
-
|
39
|
-
|
18
|
+
attr_accessor :dir, :name, :date, :series, :status,
|
19
|
+
:author, :email, :summary, :project, :homepage,
|
20
|
+
:exclude, :types, :platform, :autorequire,
|
21
|
+
:dependencies, :requirements, :executables
|
40
22
|
|
41
|
-
|
23
|
+
attr_reader :package_name, :include
|
42
24
|
|
25
|
+
MUST_EXCLUDE = [ 'InstalledFiles', '**/CVS/**/*', '**/*~' ]
|
43
26
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
:platform, :autorequire,
|
48
|
-
:dependencies, :requirements, :executables
|
27
|
+
def task_desc
|
28
|
+
"Build distribution packages (#{(types||[]).join(', ')})."
|
29
|
+
end
|
49
30
|
|
50
31
|
def init
|
51
|
-
@dir ||= 'pkg'
|
32
|
+
@dir ||= ( File.directory?('../leaf') ? '../leaf' : 'pkg')
|
52
33
|
|
53
34
|
@name ||= master['name']
|
54
|
-
@
|
55
|
-
@
|
35
|
+
@status ||= master['status'] || 'beta/stable'
|
36
|
+
@date ||= master['date'] || Time.now.strftime("%Y-%m-%d")
|
37
|
+
|
38
|
+
@series ||= master['series']
|
39
|
+
@version ||= master['version']
|
40
|
+
|
41
|
+
unless @series || @version
|
42
|
+
puts "Series or Version is a required field."
|
43
|
+
exit 0
|
44
|
+
end
|
45
|
+
|
46
|
+
if @version
|
47
|
+
@package_name ||= @name + '-' + @version
|
48
|
+
else
|
49
|
+
@package_name ||= @name + ',' + @date
|
50
|
+
end
|
56
51
|
|
57
52
|
@author ||= master['author']
|
58
53
|
@email ||= master['email']
|
@@ -60,14 +55,15 @@ class Reap::PackageTask < Reap::Task
|
|
60
55
|
@project ||= master['rubyforge']['project']
|
61
56
|
@homepage ||= master['homepage'] || master['rubyforge']['homepage']
|
62
57
|
|
63
|
-
@include ||= DEFAULT_INCLUDE
|
64
58
|
@exclude ||= []
|
65
|
-
@exclude
|
59
|
+
@exclude |= MUST_EXCLUDE
|
66
60
|
|
67
|
-
|
68
|
-
@
|
69
|
-
@
|
70
|
-
|
61
|
+
# types include 'tgz', 'tbz', 'zip', 'tar.gz' 'tar.bz2' and 'gem'.
|
62
|
+
@types ||= master['distribute'] || [ 'gem', 'tar.gz', 'zip' ]
|
63
|
+
@types.collect! { |t| t.to_s.strip.downcase }
|
64
|
+
|
65
|
+
# not setable
|
66
|
+
@include ||= ['**/*']
|
71
67
|
|
72
68
|
# gem specific (at least in this context)
|
73
69
|
if defined?(Gem)
|
@@ -80,75 +76,93 @@ class Reap::PackageTask < Reap::Task
|
|
80
76
|
end
|
81
77
|
@platform = ::Gem::Platform::RUBY unless @plaform
|
82
78
|
#@autorequire
|
83
|
-
@requirements ||= []
|
79
|
+
@requirements ||= master['requirements'] || []
|
84
80
|
@dependencies ||= master['dependencies'] || []
|
85
|
-
@executables ||= master['executables']
|
81
|
+
@executables ||= master['executables'] || []
|
86
82
|
end
|
87
83
|
end
|
88
84
|
|
89
85
|
def run
|
90
86
|
# create package image
|
91
|
-
|
92
|
-
|
87
|
+
package_dir_path = "#{@dir}/#{@package_name}"
|
88
|
+
|
89
|
+
if FileTest.directory?(package_dir_path)
|
90
|
+
print "Package '#{package_name}' already exists. Clobber? [y/N] "
|
93
91
|
until inp = $stdin.gets[0,1] ; sleep 1 ; end
|
94
92
|
if (inp || 'y').downcase == 'y'
|
95
|
-
puts "Removing old directory '#{File.expand_path(
|
96
|
-
|
97
|
-
FileUtils.
|
98
|
-
|
99
|
-
FileUtils.
|
93
|
+
puts "Removing old directory '#{File.expand_path(package_dir_path)}'..."
|
94
|
+
FileUtils.rm_r(package_dir_path)
|
95
|
+
#FileUtils.rm("#{package_dir_path}/*")
|
96
|
+
#trash_dir = ".trash/#{File.basename(@dir)}"
|
97
|
+
#FileUtils.mkdir_p(".trash") unless FileTest.directory?(".trash")
|
98
|
+
#FileUtils.mv(@dir, trash_dir)
|
100
99
|
else
|
101
100
|
puts "Reap package task canceled."
|
102
101
|
exit 0
|
103
102
|
end
|
104
103
|
end
|
105
|
-
package_dir_path = "#{@dir}/#{@package_name}"
|
106
104
|
package_files = FileList.new
|
107
105
|
package_files.include(*@include)
|
108
106
|
package_files.exclude(*@exclude) if @exclude and not @exclude.empty?
|
109
107
|
FileUtils.mkdir_p @dir #rescue nil
|
110
|
-
package_files.each do |
|
111
|
-
|
112
|
-
fdir = File.dirname(
|
108
|
+
package_files.each do |f|
|
109
|
+
pkgf = File.join(package_dir_path, f)
|
110
|
+
fdir = File.dirname(pkgf)
|
113
111
|
FileUtils.mkdir_p(fdir) if not File.exist?(fdir)
|
114
|
-
if File.directory?(
|
115
|
-
FileUtils.mkdir_p(
|
112
|
+
if File.directory?(f)
|
113
|
+
FileUtils.mkdir_p(pkgf)
|
116
114
|
else
|
117
|
-
FileUtils.rm_f(
|
118
|
-
FileUtils.safe_ln(
|
115
|
+
FileUtils.rm_f(pkgf)
|
116
|
+
FileUtils.safe_ln(f, pkgf)
|
119
117
|
end
|
120
118
|
end
|
121
119
|
|
122
120
|
# create standard package files
|
123
121
|
FileUtils.chdir(@dir) do
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
122
|
+
@types.each do |t|
|
123
|
+
sh_cmd = nil
|
124
|
+
prefix = 'ERROR' # in case of unforseen bug
|
125
|
+
case t
|
126
|
+
when 'tbz', 'bz2', 'bzip2', 'tar.bz2'
|
127
|
+
prefix = ( t == 'tbz' ? 'tbz' : 'tar.bz2' )
|
128
|
+
sh_cmd = 'tar --bzip2 -cvf'
|
129
|
+
puts "\nReap is shelling out work to tar and bzip2..."
|
130
|
+
when 'tgz', 'tar.gz'
|
131
|
+
prefix = ( t == 'tgz' ? 'tgz' : 'tar.gz' )
|
132
|
+
sh_cmd = 'tar --gzip -cvf'
|
133
|
+
puts "\nReap is shelling out work to tar and gzip..."
|
134
|
+
when 'zip'
|
135
|
+
prefix = 'zip'
|
136
|
+
sh_cmd = 'zip -r'
|
137
|
+
puts "\nReap is shelling out work to zip..."
|
138
|
+
when 'gem'
|
139
|
+
sh_cmd = nil
|
140
|
+
else
|
141
|
+
puts "Unknown package type '#{t}' skipped."
|
142
|
+
sh_cmd = nil
|
143
|
+
end
|
144
|
+
sh %{#{sh_cmd} #{@package_name}.#{prefix} #{@package_name}} if sh_cmd
|
138
145
|
end
|
139
146
|
puts
|
140
147
|
end
|
141
148
|
|
142
149
|
# create gem package
|
143
|
-
run_gem if defined?(Gem) and @gem
|
150
|
+
run_gem if defined?(Gem) and @types.include?('gem')
|
144
151
|
|
145
152
|
return true
|
146
153
|
end
|
147
154
|
|
148
155
|
def run_gem
|
149
156
|
spec = Gem::Specification.new { |s|
|
157
|
+
|
150
158
|
s.name = @name
|
151
|
-
|
159
|
+
|
160
|
+
if @version
|
161
|
+
s.version = @version
|
162
|
+
else
|
163
|
+
s.version = @series
|
164
|
+
end
|
165
|
+
|
152
166
|
@dependencies.each{ |d,v|
|
153
167
|
if v
|
154
168
|
s.add_dependency(d, v)
|
@@ -156,6 +170,7 @@ class Reap::PackageTask < Reap::Task
|
|
156
170
|
s.add_dependency(d)
|
157
171
|
end
|
158
172
|
}
|
173
|
+
|
159
174
|
s.platform = @platform
|
160
175
|
s.summary = @summary
|
161
176
|
s.requirements = @requirements
|
@@ -175,7 +190,9 @@ class Reap::PackageTask < Reap::Task
|
|
175
190
|
s.homepage = @homepage
|
176
191
|
s.executables = @executables
|
177
192
|
s.bindir = "bin"
|
193
|
+
|
178
194
|
}
|
195
|
+
|
179
196
|
puts "Reap is shelling out work to the Gem Package Manager..."
|
180
197
|
Gem.manage_gems
|
181
198
|
Gem::Builder.new(spec).build
|