reap 03.01 → 4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (231) hide show
  1. data/{LICENSE → COPYING} +0 -0
  2. data/ChangeLog +5 -0
  3. data/ProjectInfo +55 -15
  4. data/README +32 -31
  5. data/Rakefile +0 -141
  6. data/bin/reap +2 -158
  7. data/data/reap/scaffold/COPYING +11 -0
  8. data/data/reap/scaffold/ChangeLog +0 -0
  9. data/data/reap/scaffold/INSTALL +0 -0
  10. data/data/reap/scaffold/ProjectInfo +78 -0
  11. data/data/reap/scaffold/README +0 -0
  12. data/data/reap/scaffold/Rakefile +146 -0
  13. data/data/reap/scaffold/Todo +0 -0
  14. data/data/reap/scaffold/setup.rb +1551 -0
  15. data/dev/Rakefile +60 -0
  16. data/dev/composite_task.rb +27 -0
  17. data/dev/compositepublisher.rb +24 -0
  18. data/dev/ftptools.rb +139 -0
  19. data/dev/license-each.rb +85 -0
  20. data/dev/publisher.rb +75 -0
  21. data/dev/rubyforgepublisher.rb +18 -0
  22. data/dev/sshpublisher.rb +47 -0
  23. data/dev/suby-cvs.rb +46 -0
  24. data/{data/site_ruby/reap/template.yaml → dev/template.rb} +15 -37
  25. data/lib/reap/bin/reap.rb +134 -0
  26. data/lib/reap/lint.rb +0 -0
  27. data/lib/reap/projectinfo.rb +20 -9
  28. data/lib/reap/readymade.rb +21 -0
  29. data/lib/reap/task.rb +119 -70
  30. data/lib/reap/{announce_task.rb → task/announce.rb} +20 -25
  31. data/lib/reap/{filemod_task.rb → task/fileperm.rb} +12 -16
  32. data/lib/reap/task/info.rb +20 -0
  33. data/lib/reap/task/install.rb +33 -0
  34. data/lib/reap/task/noop.rb +26 -0
  35. data/lib/reap/{package_task.rb → task/package.rb} +88 -71
  36. data/lib/reap/{publish_task.rb → task/publish.rb} +5 -13
  37. data/lib/reap/{rdoc_task.rb → task/rdoc.rb} +29 -22
  38. data/lib/reap/task/scaffold.rb +114 -0
  39. data/lib/reap/{test_task.rb → task/test.rb} +33 -26
  40. data/lib/reap/task/testext.rb +110 -0
  41. data/lib/reap/{web_publish_task.rb → task/webpublish.rb} +5 -11
  42. data/lib/reap/tasks.rb +12 -8
  43. data/lib/reap/test.rb +138 -0
  44. data/setup.rb +726 -534
  45. data/web/ProjectInfo +57 -0
  46. data/{pub/www → web}/images/appleboy.jpg +0 -0
  47. data/{pub → web/images}/grape.jpg +0 -0
  48. data/web/index.html +124 -0
  49. data/web/rdoc/classes/Object.html +121 -0
  50. data/{pub/www → web}/rdoc/classes/ProjectInfo.html +36 -36
  51. data/{pub/www/rdoc/classes/ProjectInfo.src/M000055.html → web/rdoc/classes/ProjectInfo.src/M000094.html} +3 -3
  52. data/{pub/www/rdoc/classes/ProjectInfo.src/M000056.html → web/rdoc/classes/ProjectInfo.src/M000095.html} +2 -1
  53. data/web/rdoc/classes/ProjectInfo.src/M000096.html +22 -0
  54. data/{pub/www/rdoc/classes/ProjectInfo.src/M000058.html → web/rdoc/classes/ProjectInfo.src/M000097.html} +1 -1
  55. data/{pub/www/rdoc/classes/ProjectInfo.src/M000059.html → web/rdoc/classes/ProjectInfo.src/M000098.html} +1 -1
  56. data/web/rdoc/classes/Reap.html +248 -0
  57. data/web/rdoc/classes/Reap.src/M000023.html +16 -0
  58. data/web/rdoc/classes/Reap.src/M000024.html +21 -0
  59. data/web/rdoc/classes/Reap.src/M000025.html +16 -0
  60. data/web/rdoc/classes/Reap.src/M000026.html +21 -0
  61. data/{pub/www/rdoc/classes/Reap/AnnounceTask.html → web/rdoc/classes/Reap/Announce.html} +22 -40
  62. data/web/rdoc/classes/Reap/Announce.src/M000030.html +18 -0
  63. data/{pub/www/rdoc/classes/Reap/AnnounceTask.src/M000041.html → web/rdoc/classes/Reap/Announce.src/M000031.html} +13 -10
  64. data/{pub/www/rdoc/classes/Reap/AnnounceTask.src/M000042.html → web/rdoc/classes/Reap/Announce.src/M000032.html} +2 -2
  65. data/{pub/www/rdoc/classes/Reap/InfoTask.html → web/rdoc/classes/Reap/Info.html} +23 -41
  66. data/{pub/www/rdoc/classes/Reap/RDocTask.src/M000002.html → web/rdoc/classes/Reap/Info.src/M000033.html} +4 -4
  67. data/{pub/www/rdoc/classes/Reap/InfoTask.src/M000049.html → web/rdoc/classes/Reap/Info.src/M000034.html} +2 -2
  68. data/{pub/www/rdoc/classes/Reap/NoopTask.src/M000046.html → web/rdoc/classes/Reap/Info.src/M000035.html} +3 -3
  69. data/web/rdoc/classes/Reap/Install.html +193 -0
  70. data/web/rdoc/classes/Reap/Install.src/M000036.html +18 -0
  71. data/{pub/www/rdoc/classes/Reap/AnnounceTask.src/M000040.html → web/rdoc/classes/Reap/Install.src/M000037.html} +6 -4
  72. data/web/rdoc/classes/Reap/Install.src/M000038.html +26 -0
  73. data/{pub/www/rdoc/classes/Reap/NoopTask.html → web/rdoc/classes/Reap/Noop.html} +23 -41
  74. data/web/rdoc/classes/Reap/Noop.src/M000027.html +18 -0
  75. data/{pub/www/rdoc/classes/Reap/NoopTask.src/M000045.html → web/rdoc/classes/Reap/Noop.src/M000028.html} +2 -2
  76. data/{pub/www/rdoc/classes/Reap/InfoTask.src/M000050.html → web/rdoc/classes/Reap/Noop.src/M000029.html} +3 -3
  77. data/{pub/www/rdoc/classes/Reap/PackageTask.html → web/rdoc/classes/Reap/Package.html} +40 -68
  78. data/{pub/www/rdoc/classes/Reap/NoopTask.src/M000044.html → web/rdoc/classes/Reap/Package.src/M000055.html} +4 -4
  79. data/{pub/www/rdoc/classes/Reap/PackageTask.src/M000007.html → web/rdoc/classes/Reap/Package.src/M000056.html} +28 -13
  80. data/{pub/www/rdoc/classes/Reap/PackageTask.src/M000008.html → web/rdoc/classes/Reap/Package.src/M000057.html} +43 -32
  81. data/{pub/www/rdoc/classes/Reap/PackageTask.src/M000009.html → web/rdoc/classes/Reap/Package.src/M000058.html} +13 -3
  82. data/{pub/www/rdoc/classes/Reap/FilemodTask.html → web/rdoc/classes/Reap/Perm.html} +35 -53
  83. data/web/rdoc/classes/Reap/Perm.src/M000078.html +18 -0
  84. data/{pub/www/rdoc/classes/Reap/FilemodTask.src/M000029.html → web/rdoc/classes/Reap/Perm.src/M000079.html} +3 -3
  85. data/{pub/www/rdoc/classes/Reap/FilemodTask.src/M000030.html → web/rdoc/classes/Reap/Perm.src/M000080.html} +2 -2
  86. data/{pub/www/rdoc/classes/Reap/FilemodTask.src/M000031.html → web/rdoc/classes/Reap/Perm.src/M000081.html} +2 -2
  87. data/{pub/www/rdoc/classes/Reap/FilemodTask.src/M000032.html → web/rdoc/classes/Reap/Perm.src/M000082.html} +2 -2
  88. data/{pub/www/rdoc/classes/Reap/PublishTask.html → web/rdoc/classes/Reap/Publish.html} +23 -41
  89. data/web/rdoc/classes/Reap/Publish.src/M000070.html +18 -0
  90. data/{pub/www/rdoc/classes/Reap/PublishTask.src/M000025.html → web/rdoc/classes/Reap/Publish.src/M000071.html} +2 -2
  91. data/{pub/www/rdoc/classes/Reap/PublishTask.src/M000026.html → web/rdoc/classes/Reap/Publish.src/M000072.html} +3 -4
  92. data/{pub/www/rdoc/classes/Reap/RDocTask.html → web/rdoc/classes/Reap/RDoc.html} +23 -41
  93. data/web/rdoc/classes/Reap/RDoc.src/M000059.html +18 -0
  94. data/{pub/www/rdoc/classes/Reap/RDocTask.src/M000003.html → web/rdoc/classes/Reap/RDoc.src/M000060.html} +4 -5
  95. data/{pub/www/rdoc/classes/Reap/RDocTask.src/M000004.html → web/rdoc/classes/Reap/RDoc.src/M000061.html} +26 -9
  96. data/web/rdoc/classes/Reap/Task.html +396 -0
  97. data/web/rdoc/classes/Reap/Task.src/M000039.html +18 -0
  98. data/{pub/www/rdoc/classes/Reap/FilemodTask.src/M000027.html → web/rdoc/classes/Reap/Task.src/M000040.html} +3 -3
  99. data/web/rdoc/classes/Reap/Task.src/M000041.html +16 -0
  100. data/web/rdoc/classes/Reap/Task.src/M000042.html +16 -0
  101. data/{pub/www/rdoc/classes/Reap/NoopTask.src → web/rdoc/classes/Reap/Task.src}/M000043.html +3 -3
  102. data/web/rdoc/classes/Reap/Task.src/M000044.html +22 -0
  103. data/web/rdoc/classes/Reap/Task.src/M000045.html +16 -0
  104. data/web/rdoc/classes/Reap/Task.src/M000046.html +16 -0
  105. data/{pub/www/rdoc/classes/Reap/Task.src/M000034.html → web/rdoc/classes/Reap/Task.src/M000047.html} +2 -4
  106. data/{pub/www/rdoc/classes/Reap/Task.src/M000036.html → web/rdoc/classes/Reap/Task.src/M000048.html} +3 -3
  107. data/web/rdoc/classes/Reap/Task.src/M000049.html +16 -0
  108. data/web/rdoc/classes/Reap/Task.src/M000050.html +27 -0
  109. data/web/rdoc/classes/Reap/Task.src/M000051.html +19 -0
  110. data/{pub/www/rdoc/classes/Reap/Task.src/M000037.html → web/rdoc/classes/Reap/Task.src/M000052.html} +2 -2
  111. data/web/rdoc/classes/Reap/Task.src/M000053.html +18 -0
  112. data/web/rdoc/classes/Reap/Task.src/M000054.html +19 -0
  113. data/{pub/www/rdoc/classes/Reap/TestTask.html → web/rdoc/classes/Reap/Test.html} +47 -56
  114. data/web/rdoc/classes/Reap/Test.src/M000062.html +18 -0
  115. data/{pub/www/rdoc/classes/Reap/TestTask.src/M000016.html → web/rdoc/classes/Reap/Test.src/M000063.html} +5 -4
  116. data/{pub/www/rdoc/classes/Reap/TestTask.src/M000017.html → web/rdoc/classes/Reap/Test.src/M000064.html} +2 -2
  117. data/{pub/www/rdoc/classes/Reap/TestTask.src/M000018.html → web/rdoc/classes/Reap/Test.src/M000065.html} +2 -2
  118. data/{pub/www/rdoc/classes/Reap/TestTask.src/M000019.html → web/rdoc/classes/Reap/Test.src/M000066.html} +18 -4
  119. data/{pub/www/rdoc/classes/Reap/TestTask → web/rdoc/classes/Reap/Test}/TestResults.html +21 -19
  120. data/{pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000020.html → web/rdoc/classes/Reap/Test/TestResults.src/M000067.html} +2 -2
  121. data/{pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000021.html → web/rdoc/classes/Reap/Test/TestResults.src/M000068.html} +2 -2
  122. data/{pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000022.html → web/rdoc/classes/Reap/Test/TestResults.src/M000069.html} +2 -2
  123. data/web/rdoc/classes/Reap/TestExt.html +234 -0
  124. data/{pub/www/rdoc/classes/Reap/InfoTask.src/M000048.html → web/rdoc/classes/Reap/TestExt.src/M000073.html} +4 -4
  125. data/web/rdoc/classes/Reap/TestExt.src/M000074.html +20 -0
  126. data/web/rdoc/classes/Reap/TestExt.src/M000075.html +49 -0
  127. data/web/rdoc/classes/Reap/TestExt.src/M000076.html +34 -0
  128. data/web/rdoc/classes/Reap/TestExt.src/M000077.html +27 -0
  129. data/{pub/www/rdoc/classes/Reap/WebPublishTask.html → web/rdoc/classes/Reap/WebPublish.html} +23 -41
  130. data/{pub/www/rdoc/classes/Reap/WebPublishTask.src/M000011.html → web/rdoc/classes/Reap/WebPublish.src/M000083.html} +4 -4
  131. data/{pub/www/rdoc/classes/Reap/WebPublishTask.src/M000012.html → web/rdoc/classes/Reap/WebPublish.src/M000084.html} +2 -2
  132. data/{pub/www/rdoc/classes/Reap/WebPublishTask.src/M000013.html → web/rdoc/classes/Reap/WebPublish.src/M000085.html} +2 -2
  133. data/web/rdoc/classes/ReapCommand.html +425 -0
  134. data/web/rdoc/classes/ReapCommand.src/M000001.html +16 -0
  135. data/{pub/www/rdoc/classes/Reap/AnnounceTask.src/M000039.html → web/rdoc/classes/ReapCommand.src/M000003.html} +4 -4
  136. data/web/rdoc/classes/ReapCommand.src/M000005.html +16 -0
  137. data/{pub/www/rdoc/classes/Reap/InfoTask.src/M000047.html → web/rdoc/classes/ReapCommand.src/M000007.html} +4 -4
  138. data/web/rdoc/classes/ReapCommand.src/M000009.html +16 -0
  139. data/web/rdoc/classes/ReapCommand.src/M000011.html +16 -0
  140. data/web/rdoc/classes/ReapCommand.src/M000013.html +18 -0
  141. data/web/rdoc/classes/ReapCommand.src/M000014.html +19 -0
  142. data/web/rdoc/classes/ReapCommand.src/M000015.html +19 -0
  143. data/web/rdoc/classes/ReapCommand.src/M000016.html +24 -0
  144. data/web/rdoc/classes/ReapCommand.src/M000018.html +29 -0
  145. data/web/rdoc/classes/Scaffold.html +211 -0
  146. data/web/rdoc/classes/Scaffold.src/M000086.html +16 -0
  147. data/web/rdoc/classes/Scaffold.src/M000087.html +28 -0
  148. data/web/rdoc/classes/Scaffold.src/M000088.html +32 -0
  149. data/web/rdoc/classes/Scaffold.src/M000089.html +18 -0
  150. data/{pub/www/rdoc/classes/RakeTask.html → web/rdoc/classes/UnitTestKernel.html} +28 -34
  151. data/web/rdoc/classes/UnitTestKernel.src/M000019.html +18 -0
  152. data/web/rdoc/classes/UnitTestKernel.src/M000020.html +18 -0
  153. data/web/rdoc/classes/UnitTestKernel.src/M000021.html +22 -0
  154. data/web/rdoc/classes/UnitTestKernel.src/M000022.html +22 -0
  155. data/{pub/www/rdoc/classes/Reap.html → web/rdoc/classes/UnitTesting.html} +48 -54
  156. data/web/rdoc/classes/UnitTesting.src/M000090.html +34 -0
  157. data/web/rdoc/classes/UnitTesting.src/M000091.html +18 -0
  158. data/web/rdoc/classes/UnitTesting/Failure.html +156 -0
  159. data/web/rdoc/classes/UnitTesting/Failure.src/M000092.html +18 -0
  160. data/web/rdoc/classes/UnitTesting/Failure.src/M000093.html +21 -0
  161. data/web/rdoc/created.rid +1 -0
  162. data/web/rdoc/files/ANN.html +107 -0
  163. data/{pub/www/rdoc/files/LICENSE.html → web/rdoc/files/COPYING.html} +3 -3
  164. data/web/rdoc/files/ChangeLog.html +144 -0
  165. data/web/rdoc/files/ProjectInfo.html +190 -0
  166. data/{pub/www → web}/rdoc/files/README.html +38 -35
  167. data/web/rdoc/files/Rakefile.html +101 -0
  168. data/web/rdoc/files/lib/reap/bin/reap_rb.html +129 -0
  169. data/web/rdoc/files/lib/reap/lint_rb.html +101 -0
  170. data/{pub/www → web}/rdoc/files/lib/reap/projectinfo_rb.html +3 -4
  171. data/web/rdoc/files/lib/reap/readymade_rb.html +123 -0
  172. data/{pub/www/rdoc/files/lib/reap/announce_task_rb.html → web/rdoc/files/lib/reap/task/announce_rb.html} +5 -5
  173. data/{pub/www/rdoc/files/lib/reap/filemod_task_rb.html → web/rdoc/files/lib/reap/task/fileperm_rb.html} +5 -5
  174. data/{pub/www/rdoc/files/lib/reap/rdoc_task_rb.html → web/rdoc/files/lib/reap/task/info_rb.html} +5 -5
  175. data/web/rdoc/files/lib/reap/task/install_rb.html +108 -0
  176. data/{pub/www/rdoc/files/lib/reap/noop_task_rb.html → web/rdoc/files/lib/reap/task/noop_rb.html} +5 -5
  177. data/{pub/www/rdoc/files/lib/reap/package_task_rb.html → web/rdoc/files/lib/reap/task/package_rb.html} +5 -5
  178. data/web/rdoc/files/lib/reap/task/publish_rb.html +108 -0
  179. data/web/rdoc/files/lib/reap/task/rdoc_rb.html +108 -0
  180. data/web/rdoc/files/lib/reap/task/scaffold_rb.html +107 -0
  181. data/{pub/www/rdoc/files/lib/reap/test_task_rb.html → web/rdoc/files/lib/reap/task/test_rb.html} +5 -5
  182. data/web/rdoc/files/lib/reap/task/testext_rb.html +109 -0
  183. data/{pub/www/rdoc/files/lib/reap/publish_task_rb.html → web/rdoc/files/lib/reap/task/webpublish_rb.html} +5 -5
  184. data/{pub/www → web}/rdoc/files/lib/reap/task_rb.html +11 -3
  185. data/{pub/www → web}/rdoc/files/lib/reap/tasks_rb.html +10 -9
  186. data/{pub/www/rdoc/files/lib/reap/info_task_rb.html → web/rdoc/files/lib/reap/test_rb.html} +6 -5
  187. data/web/rdoc/fr_class_index.html +47 -0
  188. data/web/rdoc/fr_file_index.html +51 -0
  189. data/web/rdoc/fr_method_index.html +124 -0
  190. data/{pub/www → web}/rdoc/index.html +0 -0
  191. data/{pub/www → web}/rdoc/rdoc-style.css +0 -0
  192. metadata +236 -158
  193. data/lib/reap/info_task.rb +0 -29
  194. data/lib/reap/noop_task.rb +0 -35
  195. data/lib/reap/ready_made.rb +0 -12
  196. data/pub/www/Reapfile +0 -99
  197. data/pub/www/index.html +0 -90
  198. data/pub/www/rdoc/classes/ProjectInfo.src/M000057.html +0 -18
  199. data/pub/www/rdoc/classes/RakeTask.src/M000051.html +0 -18
  200. data/pub/www/rdoc/classes/RakeTask.src/M000052.html +0 -18
  201. data/pub/www/rdoc/classes/RakeTask.src/M000053.html +0 -18
  202. data/pub/www/rdoc/classes/RakeTask.src/M000054.html +0 -18
  203. data/pub/www/rdoc/classes/Reap/FilemodTask.src/M000028.html +0 -18
  204. data/pub/www/rdoc/classes/Reap/PackageTask.src/M000005.html +0 -16
  205. data/pub/www/rdoc/classes/Reap/PackageTask.src/M000006.html +0 -24
  206. data/pub/www/rdoc/classes/Reap/PublishTask.src/M000023.html +0 -16
  207. data/pub/www/rdoc/classes/Reap/PublishTask.src/M000024.html +0 -18
  208. data/pub/www/rdoc/classes/Reap/RDocTask.src/M000001.html +0 -16
  209. data/pub/www/rdoc/classes/Reap/Task.html +0 -239
  210. data/pub/www/rdoc/classes/Reap/Task.src/M000033.html +0 -21
  211. data/pub/www/rdoc/classes/Reap/Task.src/M000035.html +0 -41
  212. data/pub/www/rdoc/classes/Reap/Task.src/M000038.html +0 -19
  213. data/pub/www/rdoc/classes/Reap/TestTask.src/M000014.html +0 -16
  214. data/pub/www/rdoc/classes/Reap/TestTask.src/M000015.html +0 -18
  215. data/pub/www/rdoc/classes/Reap/WebPublishTask.src/M000010.html +0 -16
  216. data/pub/www/rdoc/classes/ReapTask.html +0 -287
  217. data/pub/www/rdoc/classes/ReapTask.src/M000060.html +0 -18
  218. data/pub/www/rdoc/classes/ReapTask.src/M000061.html +0 -18
  219. data/pub/www/rdoc/classes/ReapTask.src/M000062.html +0 -18
  220. data/pub/www/rdoc/classes/ReapTask.src/M000063.html +0 -18
  221. data/pub/www/rdoc/classes/ReapTask.src/M000064.html +0 -18
  222. data/pub/www/rdoc/classes/ReapTask.src/M000065.html +0 -18
  223. data/pub/www/rdoc/classes/ReapTask.src/M000066.html +0 -18
  224. data/pub/www/rdoc/classes/ReapTask.src/M000067.html +0 -18
  225. data/pub/www/rdoc/classes/ReapTask.src/M000068.html +0 -18
  226. data/pub/www/rdoc/created.rid +0 -1
  227. data/pub/www/rdoc/files/lib/reap/ready_made_rb.html +0 -115
  228. data/pub/www/rdoc/files/lib/reap/web_publish_task_rb.html +0 -108
  229. data/pub/www/rdoc/fr_class_index.html +0 -41
  230. data/pub/www/rdoc/fr_file_index.html +0 -41
  231. 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 'nano/string/margin'
6
- require 'nano/string/tab'
7
- require 'nano/string/align_center'
8
- require 'nano/string/fold'
9
- require 'nano/string/word_wrap'
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
- class Reap::AnnounceTask < Reap::Task
13
+ section_required true
19
14
 
20
- #register "announce"
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
- @sectype = @sectype.to_s
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 # fix
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
- # Filemod Task
5
+ # File Permissions Task
12
6
  #
13
- class Reap::FilemodTask < Reap::Task
7
+ class Reap::Perm < Reap::Task
14
8
 
15
- #register 'filemod'
9
+ attr_accessor :user, :group, :filemod, :dirmod
16
10
 
17
- def default_name ; 'filemod' ; end
18
- def default_desc
19
- "normalize ownership and permissions of package files [reap]"
20
- end
11
+ section_required true
21
12
 
22
- attr_accessor :user, :group, :filemod, :dirmod
13
+ def task_desc
14
+ "Normalize ownership and permissions of package files."
15
+ end
23
16
 
24
17
  def init
25
- #@user = section['user']
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 function
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::PackageTask < Reap::Task
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
- DEFAULT_INCLUDE = [ '[A-Z]*', 'setup.rb', 'lib/**/*', 'bin/**/*', 'data/**/*',
38
- 'doc/**/*', 'rdoc/**/*', 'test/**/*', 'bench/**/*',
39
- 'demo/**/*', 'samples/**/*', 'examples/**/*' ]
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
- MUST_EXCLUDE = [ 'InstalledFiles', '**/CVS/**/*', '**/*~' ]
23
+ attr_reader :package_name, :include
42
24
 
25
+ MUST_EXCLUDE = [ 'InstalledFiles', '**/CVS/**/*', '**/*~' ]
43
26
 
44
- attr_accessor :dir, :name, :version, :package_name,
45
- :author, :email, :summary, :project, :homepage,
46
- :include, :exclude, :zip, :gzip, :bzip2, :gem,
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
- @version ||= master['version'] || '0.0.1'
55
- @package_name ||= @name + '-' + @version
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.concat MUST_EXCLUDE
59
+ @exclude |= MUST_EXCLUDE
66
60
 
67
- @zip = @zip.nil? ? true : @zip
68
- @gzip = @gzip.nil? ? true : @gzip
69
- @bzip2 = @bzip2.nil? ? true : @bzip2
70
- @gem = @gem.nil? ? true : @gem
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
- if FileTest.directory?(@dir)
92
- print "Directory '#{@dir}' already exists. Clobber? [y/N] "
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(@dir)}'..."
96
- trash_dir = ".trash/#{File.basename(@dir)}"
97
- FileUtils.mkdir_p(".trash") unless FileTest.directory?(".trash")
98
- FileUtils.rm_r(trash_dir) if FileTest.exists?(trash_dir)
99
- FileUtils.mv(@dir, trash_dir)
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 |fn|
111
- f = File.join(package_dir_path, fn)
112
- fdir = File.dirname(f)
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?(fn)
115
- FileUtils.mkdir_p(f)
112
+ if File.directory?(f)
113
+ FileUtils.mkdir_p(pkgf)
116
114
  else
117
- FileUtils.rm_f(f)
118
- FileUtils.safe_ln(fn, f)
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
- # tar bzip2 for unix
125
- if @bzip2
126
- puts "\nReap is shelling out work to tar and bzip2..."
127
- sh %{tar --bzip2 -cvf #{@package_name}.tbz #{@package_name}}
128
- end
129
- # tar gzip for unix
130
- if @gzip
131
- puts "\nReap is shelling out work to tar and gzip..."
132
- sh %{tar --gzip -cvf #{@package_name}.tgz #{@package_name}}
133
- end
134
- # zip for windows
135
- if @zip
136
- puts "\nReap is shelling out work to zip..."
137
- sh %{zip -r #{@package_name}.zip #{@package_name}}
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
- s.version = @version
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