reap 6.0.2 → 9.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. data/CHANGES +6 -0
  2. data/COPYING +666 -395
  3. data/MANIFEST +139 -0
  4. data/NOTES +12 -0
  5. data/README +19 -163
  6. data/bin/reap-announce +7 -0
  7. data/bin/reap-check-load +8 -0
  8. data/bin/reap-check-syntax +7 -0
  9. data/bin/reap-clean +7 -0
  10. data/bin/reap-clobber +7 -0
  11. data/bin/reap-doc +7 -0
  12. data/bin/reap-doc-rdoc +7 -0
  13. data/bin/reap-doc-ri +7 -0
  14. data/bin/reap-init +69 -0
  15. data/bin/reap-inspect +7 -0
  16. data/bin/reap-install +8 -0
  17. data/bin/reap-install-gem +8 -0
  18. data/bin/reap-log +7 -0
  19. data/bin/reap-log-changes +8 -0
  20. data/bin/reap-log-notes +8 -0
  21. data/bin/reap-make +7 -0
  22. data/bin/reap-make-clean +7 -0
  23. data/bin/reap-make-distclean +7 -0
  24. data/bin/reap-make-extconf +7 -0
  25. data/bin/reap-make-static +8 -0
  26. data/bin/reap-package +8 -0
  27. data/bin/reap-package-gem +7 -0
  28. data/bin/reap-package-tgz +7 -0
  29. data/bin/reap-package-zip +7 -0
  30. data/bin/reap-prepare +7 -0
  31. data/bin/reap-publish +7 -0
  32. data/bin/reap-release +7 -0
  33. data/bin/reap-scaffold +8 -0
  34. data/bin/reap-scm-branch +7 -0
  35. data/bin/reap-scm-tag +7 -0
  36. data/bin/reap-spec +7 -0
  37. data/bin/reap-spec-doc +8 -0
  38. data/bin/reap-stamp +7 -0
  39. data/bin/reap-stats +7 -0
  40. data/bin/reap-test +7 -0
  41. data/bin/reap-test-cross +7 -0
  42. data/bin/reap-test-load +9 -0
  43. data/bin/reap-test-solo +7 -0
  44. data/bin/reap-uninstall +7 -0
  45. data/bin/reap-uninstall-gem +7 -0
  46. data/data/reap/base/CHANGES +19 -0
  47. data/data/reap/base/COPYING +674 -0
  48. data/data/reap/base/NOTES +12 -0
  49. data/data/reap/base/README +8 -0
  50. data/data/reap/build/rake/Rakefile +130 -0
  51. data/{forge/reference/installers → data/reap/build/rake}/setup.rb +155 -97
  52. data/data/reap/build/rake-lite/install.rb +79 -0
  53. data/data/reap/build/tasks/task/rdoc +211 -0
  54. data/data/reap/{setup.rb → build/tasks/task/setup} +248 -200
  55. data/data/reap/build/tasks/task/test +38 -0
  56. data/data/reap/init/meta/project.yaml +21 -0
  57. data/demo/README +15 -0
  58. data/demo/lib/foo/foo.rb +7 -0
  59. data/demo/meta/VERSION +1 -0
  60. data/demo/meta/project.yaml +21 -0
  61. data/lib/reap/application.rb +80 -0
  62. data/lib/reap/default.yaml +77 -0
  63. data/lib/reap/extensions/array.rb +50 -0
  64. data/lib/reap/extensions/hash.rb +63 -0
  65. data/lib/reap/extensions/string.rb +31 -0
  66. data/lib/reap/extensions.rb +6 -0
  67. data/lib/reap/iobject.rb +264 -0
  68. data/lib/reap/manager/announce.rb +193 -0
  69. data/lib/reap/manager/check.rb +109 -0
  70. data/lib/reap/manager/clean.rb +58 -0
  71. data/lib/reap/manager/gem.rb +200 -0
  72. data/lib/reap/manager/html.rb +69 -0
  73. data/lib/reap/manager/log.rb +214 -0
  74. data/lib/reap/manager/make.rb +109 -0
  75. data/lib/reap/manager/pack.rb +232 -0
  76. data/lib/reap/manager/publish.rb +72 -0
  77. data/lib/reap/manager/rdoc.rb +194 -0
  78. data/lib/reap/manager/release.rb +78 -0
  79. data/lib/reap/manager/rubyforge.rb +44 -0
  80. data/lib/reap/manager/scaffold.rb +138 -0
  81. data/lib/reap/manager/scm.rb +66 -0
  82. data/lib/reap/manager/site.rb +27 -0
  83. data/lib/reap/manager/spec.rb +94 -0
  84. data/lib/reap/manager/stats.rb +145 -0
  85. data/lib/reap/manager/svn.rb +76 -0
  86. data/lib/reap/manager/test.rb +389 -0
  87. data/lib/reap/manager.rb +74 -0
  88. data/lib/reap/metadata.rb +603 -0
  89. data/lib/reap/project.rb +165 -0
  90. data/lib/reap/settings.rb +67 -0
  91. data/lib/reap/systems/rubyforge.rb +737 -0
  92. data/lib/reap/systems/subversion.rb +333 -0
  93. data/lib/reap/utilities/fileutils.rb +304 -0
  94. data/lib/reap/utilities/netutils.rb +221 -0
  95. data/lib/reap/utilities/setuputils.rb +124 -0
  96. data/lib/reap/utilities/shellutils.rb +175 -0
  97. data/log/Changelog.txt +107 -0
  98. data/log/FIXME.txt +25 -0
  99. data/log/TODO.txt +72 -0
  100. data/meta/VERSION +1 -0
  101. data/meta/description +4 -0
  102. data/meta/project.yaml +20 -0
  103. data/task/man +14 -0
  104. data/task/rdoc +20 -0
  105. data/{data/reap/scaffold/standard/setup.rb → task/setup} +248 -200
  106. metadata +225 -153
  107. data/ProjectInfo +0 -105
  108. data/bin/reap +0 -5
  109. data/bin/rubytest +0 -5
  110. data/data/reap/install.rb +0 -62
  111. data/data/reap/scaffold/standard/COPYING +0 -403
  112. data/data/reap/scaffold/standard/ChangeLog +0 -0
  113. data/data/reap/scaffold/standard/INSTALL +0 -14
  114. data/data/reap/scaffold/standard/ProjectInfo +0 -77
  115. data/data/reap/scaffold/standard/README +0 -3
  116. data/data/reap/scaffold/standard/Rakefile +0 -10
  117. data/data/reap/scaffold/standard/TODO +0 -0
  118. data/data/reap/scaffold/subversion/trunk/COPYING +0 -403
  119. data/data/reap/scaffold/subversion/trunk/ChangeLog +0 -0
  120. data/data/reap/scaffold/subversion/trunk/INSTALL +0 -14
  121. data/data/reap/scaffold/subversion/trunk/ProjectInfo +0 -76
  122. data/data/reap/scaffold/subversion/trunk/README +0 -3
  123. data/data/reap/scaffold/subversion/trunk/Rakefile +0 -10
  124. data/data/reap/scaffold/subversion/trunk/TODO +0 -0
  125. data/data/reap/scaffold/subversion/trunk/setup.rb +0 -1568
  126. data/forge/ProjectInfo +0 -38
  127. data/forge/ProjectInfo.rb +0 -76
  128. data/forge/TODO +0 -10
  129. data/forge/installer.rb +0 -250
  130. data/forge/reference/Rakefile +0 -124
  131. data/forge/reference/Rakefile.htm +0 -69
  132. data/forge/reference/aRakefile +0 -60
  133. data/forge/reference/compositepublisher.rb +0 -24
  134. data/forge/reference/ftptools.rb +0 -139
  135. data/forge/reference/installers/package.rb +0 -629
  136. data/forge/reference/license-each.rb +0 -85
  137. data/forge/reference/publisher.rb +0 -75
  138. data/forge/reference/rubyforge.rb +0 -247
  139. data/forge/reference/rubyforgepublisher.rb +0 -18
  140. data/forge/reference/sshpublisher.rb +0 -47
  141. data/forge/reference/suby-cvs.rb +0 -46
  142. data/forge/scaffold.rb +0 -126
  143. data/forge/unit_runner/README +0 -6
  144. data/forge/unit_runner/commentrunner.rb +0 -62
  145. data/forge/unit_runner/cunit.rb +0 -17
  146. data/forge/unit_runner/forkedrunner.rb +0 -91
  147. data/forge/unit_runner/sample.rb +0 -16
  148. data/lib/reap/bin/reap.rb +0 -230
  149. data/lib/reap/bin/rubytest.rb +0 -53
  150. data/lib/reap/class/announce.rb +0 -220
  151. data/lib/reap/class/doap.rb +0 -80
  152. data/lib/reap/class/extest.rb +0 -146
  153. data/lib/reap/class/filer.rb +0 -62
  154. data/lib/reap/class/manifest.rb +0 -68
  155. data/lib/reap/class/package.rb +0 -576
  156. data/lib/reap/class/publish.rb +0 -152
  157. data/lib/reap/class/rdoc.rb +0 -123
  158. data/lib/reap/class/test.rb +0 -264
  159. data/lib/reap/projectinfo.rb +0 -208
  160. data/lib/reap/rake.rb +0 -42
  161. data/lib/reap/reap.rb +0 -89
  162. data/lib/reap/tasks.rb +0 -756
  163. data/lib/reap/taskutils.rb +0 -122
  164. data/note/LATEST +0 -44
  165. data/note/doap.xml +0 -28
  166. data/note/history/Rakefile-0.1 +0 -308
  167. data/sample/ProjectInfo +0 -96
  168. data/sample/Rakefile +0 -9
  169. data/sample/Reapfile +0 -11
  170. data/sample/task/demo.rb +0 -15
  171. data/setup.rb +0 -1568
  172. data/web/ProjectInfo.html +0 -75
  173. data/web/images/grape.jpg +0 -0
  174. data/web/index.html +0 -312
data/forge/ProjectInfo DELETED
@@ -1,38 +0,0 @@
1
- --- %YAML:1.0
2
-
3
- version : 6.0.1
4
- status : 'beta'
5
-
6
- title : Reap
7
- name : reap
8
- author : Thomas Sawyer
9
- created : '2004-04-01'
10
- email : &email transfire@gmail.com
11
- homepage : "http://reap.rubyforge.org"
12
-
13
- summary : The Flexible Ruby Project Management Assistant
14
-
15
- description: >
16
- Reap comprises a set of tasks commonly needed by Ruby package
17
- developers/deployers, such as testing, packaging, releasing, etc.
18
- You can also use Reap to create your own custom tasks.
19
- Reap utilizes a YAML configuration file to harvest common project
20
- information, significantly simplifying these chores.
21
-
22
- rubyforge:
23
- project : reap
24
- username : transami
25
-
26
- revision:
27
- type: darcs
28
- include:
29
- - '[A-Z]*'
30
- - 'trunk/*'
31
- - 'web/*.html'
32
- exclude:
33
- - 'trunk/setup.rb'
34
-
35
- trunk: !!subinfo
36
- merge: true
37
- location: trunk
38
-
data/forge/ProjectInfo.rb DELETED
@@ -1,76 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # This is an intersing example of a pure Ruby alternative to the
4
- # YAML based project file. I someway I find it more attractive
5
- # than the YAML. But of course, YAML is not limited to one langauge
6
- # so it is much better for that.
7
-
8
- title 'Reap'
9
- name 'reap'
10
- version '4.3.4'
11
- date '2006-04-07'
12
- created '2004-04-01'
13
- status 'beta/stable'
14
-
15
- author 'Thomas Sawyer'
16
- email 'transfire@gmail.com'
17
- homepage 'http://reap.rubyforge.org'
18
- summary 'Tools for Ruby project testing, management and assistance.'
19
-
20
- description %{
21
- Reap comprises a set of commonly needed tools for Ruby package
22
- developers/deployers. Because of the commonality,
23
- Reap utilizes a YAML configuration file to harvest project
24
- information, significantly simplifying usage.
25
- }
26
-
27
- distribute [ 'gem', 'deb' ] # zip, tar.gz, tbz, tgz, deb
28
- dependencies [ 'facets' ]
29
- executables [ 'reap' ]
30
-
31
- package {
32
- dir '../DISTRIBUTION'
33
- distribute [ 'deb' ]
34
- exclude [ 'dist', 'dev', 'scrap', 'web' ]
35
- }
36
-
37
- rubyforge {
38
- project 'reap'
39
- username 'transami'
40
- }
41
-
42
- release {
43
- host 'rubyforge.org'
44
- username 'transami'
45
- project 'reap'
46
- groupid '811'
47
- package 'Reap'
48
- dir '../DISTRIBUTION'
49
- }
50
-
51
- publish {
52
- type 'web'
53
- host 'rubyforge.org'
54
- username 'transami'
55
- dir 'web'
56
- }
57
-
58
- rdoc {
59
- dir 'web/doc/api'
60
- include [ 'A-Z*', 'lib/**/*' ]
61
- exclude [ 'lib/reap/data' ]
62
- }
63
-
64
- anncounce {
65
- to 'transfire@gmail.com' # ruby-talk@ruby-lang.org
66
- from 'transfire@gmail.com'
67
- domain 'unit.rubyforge.org'
68
- server 'smtp.gmail.com'
69
- port '587'
70
- account 'transfire@gmail.com'
71
- type 'login' # cram_md5, plain
72
- security 'tls' # ~, tls, ssl (not working yet)
73
- #file 'ANN' # which file contains announcement
74
- slogan 'REAP THE REWARDS!'
75
- links []
76
- }
data/forge/TODO DELETED
@@ -1,10 +0,0 @@
1
-
2
- 2006-06-04:
3
-
4
- Allow pattern amtching in tags? For exmaple
5
-
6
- % reap rdoc-*
7
-
8
- Would run all tasks with names starting with 'rdoc-'.
9
-
10
-
data/forge/installer.rb DELETED
@@ -1,250 +0,0 @@
1
- require 'rbconfig'
2
- require 'fileutils'
3
-
4
- module Reap
5
-
6
- # = Installer
7
- #
8
- # The Installer class generates a specialized install.rb
9
- # script specifically for your project. It currently
10
- # does not support c/c++ ext/ compilation.
11
-
12
- class Installer
13
-
14
- # Installer can not use the TaskUtils b/c it must also
15
- # be able to run as a stand alone accplication.
16
- #include TaskUtils
17
-
18
- # def self.config(name)
19
- # # XXX use pathname
20
- # prefix = Regexp.quote(Config::CONFIG["prefix"])
21
- # exec_prefix = Regexp.quote(Config::CONFIG["exec_prefix"])
22
- # Config::CONFIG[name].gsub(/\A\/?(#{prefix}|#{exec_prefix})\/?/, '')
23
- # end
24
-
25
- KINDS = [
26
- :bin, :lib, :ext, :data, :conf, :doc
27
- ]
28
-
29
- # SITE_DIRS = {
30
- # :bin => config("bindir"),
31
- # :lib => config("sitelibdir"),
32
- # :ext => config("sitearchdir"),
33
- # :data => config("datadir"),
34
- # :conf => config("sysconfdir"),
35
- # :doc => File.join(config("datadir"), "doc")
36
- # }
37
- #
38
- # VEND_DIRS = {
39
- # :bin => config("bindir"),
40
- # :lib => config("rubylibdir"),
41
- # :ext => config("archdir"),
42
- # :data => config("datadir"),
43
- # :conf => config("sysconfdir"),
44
- # :doc => File.join(config("datadir"), "doc")
45
- # }
46
- #
47
- # MODES = {
48
- # :bin => 0755,
49
- # :lib => 0644,
50
- # :ext => 0755, # was: 0555,
51
- # :data => 0644,
52
- # :conf => 0644,
53
- # :doc => 0644
54
- # }
55
-
56
- attr_accessor :trunk, :template, :name, :version #, :options
57
-
58
- def initialize( options )
59
- # prime attributes
60
- options.each do |k,v|
61
- send( "#{k}=", v ) if respond_to?("#{k}=")
62
- end
63
-
64
- @trunk = '.' unless @trunk
65
- @transfer = Hash.new { |h,k| h[k] = [] }
66
- @spec = parse( @template )
67
- end
68
-
69
- #--
70
- # TODO use shellwords
71
- #++
72
- def parse( spec )
73
- lines = spec.strip.split("\n")
74
- lines.each { |line|
75
- words = line.strip.split(/\s+/)
76
- #send( *words )
77
- kind, from, glob, to = *words
78
- @transfer[kind.to_sym] << { :from=>vsub(from), :glob=>vsub(glob), :to=>vsub(to) }
79
- }
80
- end
81
-
82
- # substitute variables
83
- def vsub( str )
84
- return nil if str.nil?
85
- str = str.gsub( '$version', @version.to_s ) #@options[:version].to_s )
86
- str = str.gsub( '$name', @name.to_s ) #options[:name].to_s )
87
- str
88
- end
89
-
90
-
91
- # # Return the installation directory.
92
- # def dir( kind, mode=:site )
93
- # case mode
94
- # when :site
95
- # SITE_DIRS[ kind ]
96
- # when :vendor
97
- # VEND_DIRS[ kind ]
98
- # else
99
- # raise ArgumentError, "unknown mode -- #{mode}"
100
- # end
101
- # end
102
- #
103
- # # Return installation prefix.
104
- # def prefix #( kind )
105
- # Config::CONFIG["prefix"]
106
- # end
107
-
108
-
109
- # #--
110
- # # DSL methods for setting installation spec.
111
- # #++
112
- #
113
- # # Setup a lib installation transfer.
114
- # def lib( from, glob, to )
115
- # to = '' if to == '.'
116
- # @transfer[:lib] << { :from=>vsub(from), :glob=>vsub(glob), :to=>vsub(to) }
117
- # end
118
- #
119
- # # Setup a bin installation transfer.
120
- # def bin( from, glob, to=nil )
121
- # #to = '' if to == '.'
122
- # @transfer[:bin] << { :from=>vsub(from), :glob=>vsub(glob), :to=>vsub(to) }
123
- # end
124
- #
125
- # # Setup a data installation transfer.
126
- # def data( from, glob, to=nil )
127
- # #to = '' if to == '.'
128
- # @transfer[:data] << { :from=>vsub(from), :glob=>vsub(glob), :to=>vsub(to) }
129
- # end
130
-
131
- # Compile script and write to install file (install.rb).
132
-
133
- def compile_and_write
134
- #write( compile )
135
- compile
136
- end
137
-
138
- alias_method :call, :compile_and_write
139
-
140
- # def compile
141
- # script = ""
142
- # script << "# INSTALL SCRIPT\n"
143
- # script << "# Generated by Reap\n"
144
- # script << "# #{Time.now}\n"
145
- # script << "\n"
146
- # script << instructions
147
- # script << "\n"
148
- # script << "# END"
149
- # script
150
- # end
151
-
152
-
153
- private
154
-
155
- # Compile installation instructions.
156
-
157
- def instructions
158
- KINDS.each do |kind|
159
- @transfer[kind].each { |trans|
160
- package( kind, trans[:from], trans[:glob], trans[:to] )
161
- }
162
- end
163
- end
164
-
165
-
166
-
167
- def package( kind, from, glob, to )
168
- mkdirp = []
169
- #script = ''
170
- Dir.chdir( @trunk ) do
171
- #KINDS.each { |kind|
172
- #@transfer[kind].each { |trans|
173
- next unless File.directory?( from )
174
- files = []
175
- Dir.chdir( from ) {
176
- files = Dir.glob( glob ).reject { |f| File.directory?( f ) }
177
- }
178
- files.each { |file|
179
- f = File.join( from, file )
180
- t = to ? File.join( @mirror_path, to, file ) : File.join( @mirror_path, file )
181
-
182
- m = "mode(:#{kind})" # MODES[kind]
183
-
184
- d = File.dirname(t)
185
- unless mkdirp.include?(d)
186
- #script << %{makedir :#{kind}, "%s"\n} % d
187
- puts "makedir_p #{d}"
188
- mkdirp << d
189
- end
190
-
191
- #script << %{install :#{kind}, "%s" => "%s"\n} % [ f, t ]
192
-
193
- puts "safe_ln #{from}, #{to}"
194
-
195
- #script << %{install "%s" =>\n dir(:#{kind})/"%s", :mode=>%s\n} % [ f, t, m ]
196
- #script << "install_#{kind} '%s', '%s', :mode=>%o\n" % [ f, t, m ]
197
- #}
198
- #}
199
- }
200
- end
201
- #script
202
- end
203
-
204
- end
205
-
206
- end #module Reap
207
-
208
-
209
- # def write( script )
210
- # install_file = File.join( @trunk, 'install.rb' )
211
- # if File.file?( install_file )
212
- # script_template = File.read( install_file )
213
- # script = script_template.gsub(/\# INSTALL SCRIPT.*\# END/, script)
214
- # exit 0
215
- # File.open( install_file, 'w+' ) do |f|
216
- # f << script
217
- # end
218
- # end
219
- # end
220
-
221
- # # Move to install.rb script
222
- # def package( kind, from, glob, to )
223
- # mkdirp = []
224
- # script = ''
225
- # Dir.chdir( @trunk ) do
226
- # @transfer[kind].each { |trans|
227
- # next unless File.directory?( transfrom )
228
- # files = []
229
- # Dir.chdir( from ) {
230
- # files = Dir.glob( trans[:glob] ).reject { |f| File.directory?( f ) }
231
- # }
232
- # files.each { |file|
233
- # f = File.join( trans[:from], file )
234
- # #t = File.join( prefix(kind), dir(kind), trans[:to], file )
235
- # t = trans[:to] ? File.join( trans[:to], file ) : file
236
- # m = "mode(:#{kind})" # MODES[kind]
237
- # d = File.dirname(t)
238
- # unless mkdirp.include?(d)
239
- # script << %{makedir :#{kind}, "%s"\n} % d
240
- # mkdirp << d
241
- # end
242
- # script << %{install :#{kind}, "%s" => "%s"\n} % [ f, t ]
243
- # #script << %{install "%s" =>\n dir(:#{kind})/"%s", :mode=>%s\n} % [ f, t, m ]
244
- # #script << "install_#{kind} '%s', '%s', :mode=>%o\n" % [ f, t, m ]
245
- # }
246
- # }
247
- # end
248
- # script
249
- # end
250
-
@@ -1,124 +0,0 @@
1
- #!/usr/bin/env ruby rake
2
- # Rakefile for Calibre
3
-
4
- require 'rake/rdoctask'
5
-
6
- desc "Run all the tests"
7
- task :default => [:test]
8
-
9
-
10
- # tests
11
-
12
- desc "Run all tests"
13
- task :test => [:"test-facets", :"test-carats"]
14
-
15
- desc "Run tests for Ruby Facets"
16
- Rake::TestTask.new(:"test-facets") do |t|
17
- t.libs << "packages/facets/lib"
18
- t.test_files = FileList['packages/facets/test/**/tc*.rb']
19
- t.verbose = true
20
- end
21
-
22
- desc "Run tests for Ruby Carats"
23
- Rake::TestTask.new(:"test-carats") do |t|
24
- t.libs << "packages/carats/lib"
25
- t.test_files = FileList['packages/carats/test/**/tc*.rb']
26
- t.verbose = true
27
- end
28
-
29
-
30
- # rdocs
31
-
32
- desc "Generate All RDoc documentation"
33
- task :rdoc => [:"rdoc-facets", :"rdoc-carats"]
34
-
35
- desc "Generate RDoc documentation for Facets"
36
- Rake::RDocTask.new(:"rdoc-facets") do |rd|
37
- cdir = Dir.pwd
38
- Dir.chdir 'packages/facets'
39
- rd.main = 'README'
40
- rd.template = 'html'
41
- rd.rdoc_dir = 'pub/facet/doc'
42
- rd.rdoc_files.include('README', 'LIC*', 'lib/facet/')
43
- rd.rdoc_files.exclude 'InstalledFiles'
44
- rd.options << '--promiscuous --merge --all'
45
- Dir.chdir(cdir)
46
- end
47
-
48
- desc "Generate RDoc documentation for Carats"
49
- Rake::RDocTask.new(:"carat-doc") do |rd|
50
- cdir = Dir.pwd
51
- Dir.chdir 'packages/carats'
52
- rd.main = 'README'
53
- rd.template = 'html'
54
- rd.rdoc_dir = 'doc'
55
- rd.rdoc_files.include('README', 'LIC*', 'lib/carat/')
56
- rd.rdoc_files.exclude 'InstalledFiles'
57
- rd.options << '--promiscuous --merge --all'
58
- Dir.chdir(cdir)
59
- end
60
-
61
- # web publish
62
-
63
- desc "Publish Rubyforge Website"
64
- task :webpub do
65
- rubyforge_project = 'calibre'
66
- username = 'transami'
67
- web_dir = 'pub/www'
68
- # do it
69
- current_dir = Dir.pwd
70
- Dir.chdir( web_dir )
71
- web_files = FileList.new
72
- web_files.include('**/*')
73
- web_files = '"' << web_files.join('" "') << '"'
74
- cmd = "scp #{web_files} #{username}@rubyforge.org:/var/www/gforge-projects/#{rubyforge_project}/"
75
- system cmd
76
- Dir.chdir( current_dir )
77
- end
78
-
79
-
80
- #desc "Do predistribution stuff"
81
- #task :predist => [:changelog, :doc]
82
-
83
-
84
-
85
- desc "Make an archive as .tar.gz"
86
- task :dist => :test do
87
- system "export DARCS_REPO=#{File.expand_path "."}; " +
88
- "darcs dist -d rand#{get_darcs_tree_version}"
89
- end
90
-
91
- desc "Generate a ChangeLog"
92
- task :changelog do
93
- system "darcs changes --repo=#{ENV["DARCS_REPO"] || "."} >ChangeLog"
94
- end
95
-
96
-
97
- # --- Helper Methods ---
98
-
99
- # Helper to retrieve the "revision number" of the darcs tree.
100
- def get_darcs_tree_version
101
-
102
- return "" unless File.directory? "_darcs"
103
-
104
- changes = `darcs changes`
105
- count = 0
106
- tag = "0.0"
107
-
108
- changes.each("\n\n") { |change|
109
- head, title, desc = change.split("\n", 3)
110
-
111
- if title =~ /^ \*/
112
- # Normal change.
113
- count += 1
114
- elsif title =~ /tagged (.*)/
115
- # Tag. We look for these.
116
- tag = $1
117
- break
118
- else
119
- warn "Unparsable change: #{change}"
120
- end
121
- }
122
-
123
- "-" + tag + "." + count.to_s
124
- end
@@ -1,69 +0,0 @@
1
- # Rakefile for xoxo-rb. -*-ruby-*-
2
- require 'rake/rdoctask'
3
- require 'rake/testtask'
4
-
5
-
6
- desc "Run all the tests"
7
- task :default => [:test]
8
-
9
- desc "Do predistribution stuff"
10
- task :predist => [:chmod, :changelog, :doc]
11
-
12
-
13
- desc "Run all the tests"
14
- Rake::TestTask.new do |t|
15
- t.libs << "test"
16
- t.test_files = FileList['test_*.rb']
17
- t.verbose = true
18
- end
19
-
20
- desc "Make an archive as .tar.gz"
21
- task :dist => :test do
22
- system "export DARCS_REPO=#{File.expand_path "."}; " +
23
- "darcs dist -d xoxo-rb#{get_darcs_tree_version}"
24
- end
25
-
26
- desc "Make binaries executable"
27
- task :chmod do
28
- Dir["bin/*"].each { |binary| File.chmod(0775, binary) }
29
- end
30
-
31
- desc "Generate a ChangeLog"
32
- task :changelog do
33
- system "darcs changes --repo=#{ENV["DARCS_REPO"] || "."} >ChangeLog"
34
- end
35
-
36
- desc "Generate RDoc documentation"
37
- Rake::RDocTask.new(:doc) do |rdoc|
38
- rdoc.options << '--line-numbers --inline-source'
39
- rdoc.rdoc_dir = "rdoc"
40
- rdoc.rdoc_files.include 'README'
41
- rdoc.rdoc_files.include 'xoxo.rb'
42
- end
43
-
44
-
45
- # Helper to retrieve the "revision number" of the darcs tree.
46
- def get_darcs_tree_version
47
- return "" unless File.directory? "_darcs"
48
-
49
- changes = `darcs changes`
50
- count = 0
51
- tag = "0.0"
52
-
53
- changes.each("\n\n") { |change|
54
- head, title, desc = change.split("\n", 3)
55
-
56
- if title =~ /^ \*/
57
- # Normal change.
58
- count += 1
59
- elsif title =~ /tagged (.*)/
60
- # Tag. We look for these.
61
- tag = $1
62
- break
63
- else
64
- warn "Unparsable change: #{change}"
65
- end
66
- }
67
-
68
- "-" + tag + "." + count.to_s
69
- end
@@ -1,60 +0,0 @@
1
- # Rakefile for rubypants -*-ruby-*-
2
- require 'rake/rdoctask'
3
-
4
-
5
- desc "Run all the tests"
6
- task :default => [:test]
7
-
8
- desc "Do predistribution stuff"
9
- task :predist => [:changelog, :doc]
10
-
11
-
12
- desc "Run all the tests"
13
- task :test do
14
- ruby 'rand.rb'
15
- end
16
-
17
- desc "Make an archive as .tar.gz"
18
- task :dist => :test do
19
- system "export DARCS_REPO=#{File.expand_path "."}; " +
20
- "darcs dist -d rand#{get_darcs_tree_version}"
21
- end
22
-
23
- desc "Generate a ChangeLog"
24
- task :changelog do
25
- system "darcs changes --repo=#{ENV["DARCS_REPO"] || "."} >ChangeLog"
26
- end
27
-
28
- desc "Generate RDoc documentation"
29
- Rake::RDocTask.new(:doc) do |rdoc|
30
- rdoc.options << '--line-numbers --inline-source --all'
31
- rdoc.rdoc_files.include 'README'
32
- rdoc.rdoc_files.include 'rand.rb'
33
- end
34
-
35
-
36
- # Helper to retrieve the "revision number" of the darcs tree.
37
- def get_darcs_tree_version
38
- return "" unless File.directory? "_darcs"
39
-
40
- changes = `darcs changes`
41
- count = 0
42
- tag = "0.0"
43
-
44
- changes.each("\n\n") { |change|
45
- head, title, desc = change.split("\n", 3)
46
-
47
- if title =~ /^ \*/
48
- # Normal change.
49
- count += 1
50
- elsif title =~ /tagged (.*)/
51
- # Tag. We look for these.
52
- tag = $1
53
- break
54
- else
55
- warn "Unparsable change: #{change}"
56
- end
57
- }
58
-
59
- "-" + tag + "." + count.to_s
60
- end
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- module Rake
4
-
5
- # Manage several publishers as a single entity.
6
- class CompositePublisher
7
- def initialize
8
- @publishers = []
9
- end
10
-
11
- # Add a publisher to the composite.
12
- def add(pub)
13
- @publishers << pub
14
- end
15
-
16
- # Upload all the individual publishers.
17
- def upload
18
- @publishers.each { |p| p.upload }
19
- end
20
- end
21
-
22
- end
23
-
24
-