reap 4.3.2 → 4.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. data/ANN +6 -1
  2. data/ProjectInfo +9 -7
  3. data/README +44 -13
  4. data/data/reap/setup-3.4.1/COPYING +515 -0
  5. data/data/reap/setup-3.4.1/ChangeLog +732 -0
  6. data/data/reap/setup-3.4.1/Makefile +56 -0
  7. data/data/reap/setup-3.4.1/NEWS.en +155 -0
  8. data/data/reap/setup-3.4.1/NEWS.ja +152 -0
  9. data/data/reap/setup-3.4.1/README.en +30 -0
  10. data/data/reap/setup-3.4.1/README.ja +34 -0
  11. data/data/reap/setup-3.4.1/TODO +14 -0
  12. data/data/reap/setup-3.4.1/Template.README.en +41 -0
  13. data/data/reap/setup-3.4.1/Template.README.ja +46 -0
  14. data/data/reap/setup-3.4.1/Usage_en.txt +231 -0
  15. data/data/reap/setup-3.4.1/Usage_ja.txt +250 -0
  16. data/data/reap/setup-3.4.1/doc.en/hookapi.html +91 -0
  17. data/data/reap/setup-3.4.1/doc.en/index.html +28 -0
  18. data/data/reap/setup-3.4.1/doc.en/metaconfapi.html +79 -0
  19. data/data/reap/setup-3.4.1/doc.en/news.html +189 -0
  20. data/data/reap/setup-3.4.1/doc.en/usage.html +297 -0
  21. data/data/reap/setup-3.4.1/doc.ja/hookapi.html +84 -0
  22. data/data/reap/setup-3.4.1/doc.ja/index.html +28 -0
  23. data/data/reap/setup-3.4.1/doc.ja/metaconfapi.html +80 -0
  24. data/data/reap/setup-3.4.1/doc.ja/news.html +186 -0
  25. data/data/reap/setup-3.4.1/doc.ja/usage.html +319 -0
  26. data/data/reap/setup-3.4.1/sample/add-task.rb +15 -0
  27. data/data/reap/setup-3.4.1/setup.rb +1585 -0
  28. data/data/reap/setup-3.4.1/test/test_installer.rb +136 -0
  29. data/lib/reap/{lint.rb → bin/lint.rb} +0 -0
  30. data/lib/reap/bin/reap.rb +3 -2
  31. data/lib/reap/projectinfo.rb +4 -0
  32. data/lib/reap/task.rb +84 -74
  33. data/lib/reap/task/announce.rb +137 -91
  34. data/lib/reap/task/fileperm.rb +26 -9
  35. data/lib/reap/task/info.rb +19 -3
  36. data/lib/reap/task/install.rb +9 -7
  37. data/lib/reap/task/noop.rb +3 -5
  38. data/lib/reap/task/package.rb +247 -105
  39. data/lib/reap/task/publish.rb +40 -14
  40. data/lib/reap/task/rdoc.rb +53 -27
  41. data/lib/reap/task/release.rb +275 -73
  42. data/lib/reap/task/scaffold.rb +14 -6
  43. data/lib/reap/task/test.rb +67 -48
  44. data/lib/reap/task/testext.rb +38 -11
  45. data/lib/reap/vendor/http-access2.rb +1590 -0
  46. data/lib/reap/vendor/http-access2/cookie.rb +538 -0
  47. data/lib/reap/vendor/http-access2/http.rb +542 -0
  48. data/{lib/reap → note}/interface/interface.rb +0 -0
  49. data/{lib/reap → note}/interface/rubyforge.rb +0 -0
  50. data/note/package.rb.0 +394 -0
  51. metadata +43 -8
  52. data/lib/reap/reap.rb +0 -0
File without changes
File without changes
data/note/package.rb.0 ADDED
@@ -0,0 +1,394 @@
1
+
2
+ require 'reap/task'
3
+
4
+ begin
5
+ require 'rubygems'
6
+ rescue LoadError
7
+ # no rubygems
8
+ end
9
+
10
+ ##
11
+ # Package Task
12
+ #
13
+ # This task creates standard .zip, .tgz, or .tbz
14
+ # packages, plus .gem distributions.
15
+ #
16
+ class Reap::Package < Reap::Task
17
+
18
+ task_desc do
19
+ disttypes = $PROJECT_INFO['distribute'] || [ 'gem', 'tar.bz2', 'zip' ]
20
+ "Build distribution packages (#{disttypes.join(', ')})."
21
+ end
22
+
23
+ MUST_EXCLUDE = [ 'InstalledFiles', '**/CVS/**/*', '**/*~', 'dist', 'pkg' ]
24
+ LOCATIONS = [ '../leaf', '../dist', '../pkg', 'dist', 'pkg' ]
25
+
26
+ attr_master :name, :version, :date, :series, :status,
27
+ :author, :maintainer, :email, :homepage,
28
+ :summary, :description, :license
29
+
30
+ attr_master :dependencies, :executables, :requirements, :architecture,
31
+ :category, :recommends, :replaces
32
+
33
+ attr_accessor :source, :md5
34
+
35
+ attr_accessor :dir, :project, :exclude, :include, :format
36
+
37
+ subsection :gem,
38
+ :autorequire, :platform, :require_paths
39
+
40
+
41
+
42
+ # generated
43
+
44
+ attr_reader :package_name, :series_versioning
45
+
46
+
47
+ def init( options={} )
48
+ @dir ||= LOCATIONS.find { |f| File.directory?(f) } || 'dist'
49
+
50
+ #@name ||= master['name']
51
+ #@status ||= master['status'] || 'beta/stable'
52
+ #@date ||= master['date'] || Time.now.strftime("%Y-%m-%d")
53
+ #@series ||= master['series'] || '1'
54
+
55
+ @maintainer ||= @author
56
+ @status ||= 'beta/stable'
57
+ @date ||= Time.now.strftime("%Y-%m-%d")
58
+ @series ||= '1'
59
+ @architecture ||= 'any'
60
+ @license ||= 'Ruby/GPL'
61
+
62
+ d = @date.split('-').collect{ |e| e.to_i }
63
+ #d[0] = d[0] - 2000 # No need to keep the 2000
64
+ @version ||= d.join('.')
65
+
66
+ if $BUILD_VERSION
67
+ buildno = eval(Time.now.strftime("%H*60+%M"))
68
+ @version += ".#{buildno}"
69
+ end
70
+
71
+ unless @series
72
+ puts "Series is required."
73
+ exit 0
74
+ end
75
+
76
+ @package_name ||= @name + '-' + @version
77
+ #@package_name ||= @name + ',' + @date # rubyforge doesn't allow commas
78
+
79
+ #@author ||= master['author']
80
+ #@email ||= master['email']
81
+ #@summary ||= master['summary']
82
+ @project ||= master['rubyforge']['project']
83
+ #@homepage ||= master['homepage'] || master['rubyforge']['homepage']
84
+ @homepage ||= master['rubyforge']['homepage']
85
+
86
+ @exclude ||= []
87
+ @exclude |= MUST_EXCLUDE
88
+
89
+ @include ||= ['**/*']
90
+
91
+ # format types include 'tgz', 'tbz', 'zip', 'tar.gz' 'tar.bz2', 'gem' and 'deb'.
92
+ @format ||= master['distribute'] || [ 'gem', 'tar.bz2', 'zip' ]
93
+ @format = [@format].flatten
94
+ @format.collect! { |t| t.to_s.strip.downcase }
95
+
96
+ @dependencies ||= []
97
+ @executables ||= []
98
+ @requirements ||= []
99
+ @recommends ||= []
100
+ @conflicts ||= []
101
+ @replaces ||= []
102
+
103
+ # gem specific (at least in this context)
104
+ if defined?(Gem)
105
+ if @platform
106
+ begin
107
+ @platform = ::Gem.const_get(@platform)
108
+ rescue NameError
109
+ @platform = ::Gem::Platform::RUBY
110
+ end
111
+ else
112
+ @platform ||= ::Gem::Platform::RUBY
113
+ end
114
+ #@autorequire
115
+ end
116
+
117
+ end
118
+
119
+ def run( options={} )
120
+ puts "Creating #{@format.join(',')} packages..."
121
+
122
+ # create package image
123
+ group_dir_path = File.join( @dir, @package_name )
124
+ package_dir_path = File.join( @dir, @package_name, @package_name )
125
+
126
+ if FileTest.directory?(group_dir_path)
127
+ print "Package directory '#{package_name}' already exists. Conitnue anyway or [R]emove and continue? [y/r/N] "
128
+ until inp = $stdin.gets[0,1] ; sleep 1 ; end
129
+ inp = inp.to_s.downcase
130
+ case inp
131
+ when 'y'
132
+ # continue...
133
+ when 'r'
134
+ puts "Removing old directory '#{File.expand_path(group_dir_path)}'..."
135
+ FileUtils.rm_r(group_dir_path)
136
+ else
137
+ puts "Reap package task canceled."
138
+ return nil
139
+ end
140
+ end
141
+ package_files = FileList.new
142
+ package_files.include(*@include)
143
+ package_files.exclude(*@exclude) if @exclude and not @exclude.empty?
144
+ FileUtils.mkdir_p @dir #rescue nil
145
+ package_files.each do |f|
146
+ pkgf = File.join(package_dir_path, f)
147
+ fdir = File.dirname(pkgf)
148
+ FileUtils.mkdir_p(fdir) if not File.exist?(fdir)
149
+ if File.directory?(f)
150
+ FileUtils.mkdir_p(pkgf)
151
+ else
152
+ FileUtils.rm_f(pkgf)
153
+ FileUtils.safe_ln(f, pkgf)
154
+ end
155
+ end
156
+
157
+ # create standard package files
158
+ FileUtils.chdir( File.join( @dir, @package_name ) ) do
159
+ @format.each do |t|
160
+ sh_cmd = nil
161
+ prefix = 'ERROR' # in case of unforseen bug
162
+ case t
163
+ when 'tbz', 'bz2', 'bzip2', 'tar.bz2'
164
+ prefix = ( t == 'tbz' ? 'tbz' : 'tar.bz2' )
165
+ sh_cmd = 'tar --bzip2 -cvf'
166
+ puts "\nReap is shelling out work to tar and bzip2..."
167
+ when 'tgz', 'tar.gz'
168
+ prefix = ( t == 'tgz' ? 'tgz' : 'tar.gz' )
169
+ sh_cmd = 'tar --gzip -cvf'
170
+ puts "\nReap is shelling out work to tar and gzip..."
171
+ when 'zip'
172
+ prefix = 'zip'
173
+ sh_cmd = 'zip -r'
174
+ puts "\nReap is shelling out work to zip..."
175
+ when 'gem', 'deb', 'pac'
176
+ sh_cmd = nil
177
+ else
178
+ puts "Unknown package type '#{t}' skipped."
179
+ sh_cmd = nil
180
+ end
181
+ sh %{#{sh_cmd} #{@package_name}.#{prefix} #{@package_name}} if sh_cmd
182
+ end
183
+ puts
184
+ end
185
+
186
+ # create gem package
187
+
188
+ if @format.include?('gem')
189
+ if defined?(Gem)
190
+ run_gem
191
+ else
192
+ puts "Package .gem requested, but rubygems not found (skipped)."
193
+ end
194
+ end
195
+
196
+ # create debian package
197
+
198
+ if @format.include?('deb')
199
+ if true # TODO ensure required debian tools here
200
+ run_deb
201
+ else
202
+ puts "Package .deb requested, but debian tools not found (skipped)."
203
+ end
204
+ end
205
+
206
+ # create PKGBUILD (pacman, archlinux)
207
+
208
+ if @format.include?('pac')
209
+ if true # TODO ensure required tools here
210
+ run_pacman
211
+ else
212
+ puts "Pacman package requested, but required tools not found (skipped)."
213
+ end
214
+ end
215
+
216
+ return true
217
+ end
218
+
219
+ # support methods -------------------------------------------
220
+
221
+ private
222
+
223
+ # This builds the gem package.
224
+
225
+ def run_gem
226
+ spec = Gem::Specification.new { |s|
227
+ s.name = @name
228
+ s.version = @version
229
+
230
+ @dependencies.each { |d,v|
231
+ if v
232
+ s.add_dependency(d, v)
233
+ else
234
+ s.add_dependency(d)
235
+ end
236
+ }
237
+
238
+ s.platform = @platform
239
+ s.summary = @summary
240
+ s.requirements = @requirements
241
+
242
+ # s.files = Dir.glob("lib/**/*").delete_if {|item| item.include?("CVS")}
243
+ # s.files.concat Dir.glob("bin/**/*").delete_if {|item| item.include?("CVS")}
244
+ package_files = FileList.new
245
+ package_files.include(*@include)
246
+ package_files.exclude(*@exclude) if @exclude and not @exclude.empty?
247
+ s.files = package_files.to_a
248
+
249
+ s.require_path = 'lib'
250
+ s.autorequire = @autorequire if @autorequire
251
+ s.author = @author
252
+ s.email = @email
253
+ s.rubyforge_project = @project
254
+ s.homepage = @homepage
255
+ s.executables = @executables
256
+ s.require_paths = @require_paths if @require_paths
257
+ s.bindir = "bin"
258
+ s.has_rdoc = true
259
+ }
260
+
261
+ puts "Reap is shelling out work to the Gem Package Manager..."
262
+ Gem.manage_gems
263
+ Gem::Builder.new(spec).build
264
+ gems = Dir.glob( './*.gem' )
265
+ gems.each{ |f|
266
+ FileUtils.mv( f, File.join( @dir, @package_name ) )
267
+ }
268
+ #sh %{mv ./*.gem #{@dir}/}
269
+ end
270
+
271
+
272
+ # This build the Debiam package.
273
+
274
+ def run_deb
275
+
276
+ # build the debian control file
277
+
278
+ dep = dependencies.collect{ |d, v|
279
+ if v
280
+ "#{d} (#{v})"
281
+ else
282
+ d
283
+ end
284
+ }.join(', ')
285
+
286
+ # Some debian fields not yet used:
287
+ # Installed-Size: 1024
288
+ # Conflicts: wile-e-coyote, ...
289
+ # Replaces: sam-sheepdog
290
+ # Pre-Depends: perl, ...
291
+ # Suggests: docbook
292
+
293
+ ctrl = %{
294
+ Package: #{name}
295
+ Version: #{version}
296
+ Priority: optional
297
+ Architecture: #{architecture}
298
+ Essential: no
299
+ }.tabto(0)
300
+ ctrl << "Section: #{category}" if category
301
+ ctrl << "Depends: #{dep}" unless dep.empty?
302
+ ctrl << "Recommends: #{recommends.join(' | ')}" unless recommends.empty?
303
+ ctrl << %{
304
+ Maintainer: #{maintainer} [#{email}]
305
+ Provides: #{name}
306
+ Description: #{summary}
307
+ .
308
+ #{description}
309
+ }.tabto(0)
310
+
311
+ debname = architecture == 'any' ? "ruby_#{name}_#{version}.deb" : "ruby_#{name}_#{version}_#{architecture}.deb"
312
+ debdir = File.join( @dir, @package_name, 'debian' )
313
+ debdebdir = File.join( debdir, 'DEBIAN' )
314
+ debfile = File.join( debdir, debname )
315
+
316
+ puts "Reap is shelling out work to the deb-pkg..."
317
+ FileUtils.mkdir_p(debdir)
318
+ sh %{ruby setup.rb all --prefix=#{debdir}}
319
+ FileUtils.mkdir_p(debdebdir)
320
+ File.open( File.join(debdebdir, 'control'), 'w') { |f| f << ctrl }
321
+ #sh %{dpkg-deb -b #{debdir} #{debfile}}
322
+ end
323
+
324
+
325
+ # This builds a pacman/archlinux package
326
+
327
+ def run_pac
328
+
329
+ unless @source
330
+ puts "URL 'source' is require for proto package."
331
+ return nil
332
+ end
333
+
334
+ if section.key?('proto')
335
+ _dep = section['proto']['dependenciers'] || dependencies
336
+ _rep = section['proto']['replaces'] || replaces
337
+ _con = section['proto']['conflicts'] || conflicts
338
+ end
339
+
340
+ _dep = _dep.collect{ |d| "'#{d}'" }.join(' ')
341
+ _rep = _rep.collect{ |d| "'#{d}'" }.join(' ')
342
+ _con = _rep.collect{ |d| "'#{d}'" }.join(' ')
343
+
344
+ proto = %{
345
+ pkgname=#{name}
346
+ pkgver=#{version}
347
+ pkgrel=#{series}
348
+ pkgdesc="#{summary}"
349
+ url="#{homepage}"
350
+ license="#{license}"
351
+ depends=(#{_dep})
352
+ conflicts=(#{_con})
353
+ replaces=(#{_rep})
354
+ source=(#{source})
355
+ md5sums=(#{md5})
356
+ }.tabto(0)
357
+
358
+ # What are these for?
359
+ # install=
360
+ # backup=()
361
+
362
+ if usemake
363
+ s << %{
364
+ makedepends=()"
365
+ build() {
366
+ cd $startdir/src/$pkgname-$pkgver
367
+ ./ruby setup.rb --prefix=/usr
368
+ make || return 1
369
+ make DESTDIR=$startdir/pkg install
370
+ }
371
+ }.tabto(0)
372
+ else
373
+ s << %{
374
+ build() {
375
+ cd $startdir/src/$pkgname-$pkgver
376
+ ./ruby setup.rb --prefix=/usr
377
+ }
378
+ }
379
+ end
380
+
381
+ pacdir = File.join( @dir, @package_name, 'pacman' )
382
+ pacpacdir = File.join( pacdir, 'PACMAN' )
383
+ pacfile = File.join( pacdir, 'PKGBUILD' )
384
+
385
+ puts "Reap is shelling out work to the pacman..."
386
+ FileUtils.mkdir_p(pacdir)
387
+ #sh %{ruby setup.rb all --prefix=#{debdir}}
388
+ #FileUtils.mkdir_p(pacpacdir)
389
+ File.open( pacfile, 'w') { |f| f << proto }
390
+ #sh %{dpkg-deb -b #{debdir} #{debfile}}
391
+
392
+ end
393
+
394
+ end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: reap
5
5
  version: !ruby/object:Gem::Version
6
- version: 4.3.2
7
- date: 2006-03-29 00:00:00 -05:00
6
+ version: 4.3.3
7
+ date: 2006-04-01 00:00:00 -05:00
8
8
  summary: Tools for Ruby project testing, management and assistance.
9
9
  require_paths:
10
10
  - lib
@@ -22,7 +22,7 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
22
22
  - !ruby/object:Gem::Version
23
23
  version: 0.0.0
24
24
  version:
25
- platform: ruby
25
+ platform:
26
26
  signing_key:
27
27
  cert_chain:
28
28
  authors:
@@ -43,6 +43,7 @@ files:
43
43
  - bin/rubytest
44
44
  - data/reap
45
45
  - data/reap/scaffold
46
+ - data/reap/setup-3.4.1
46
47
  - data/reap/scaffold/Todo
47
48
  - data/reap/scaffold/Rakefile
48
49
  - data/reap/scaffold/README
@@ -51,16 +52,44 @@ files:
51
52
  - data/reap/scaffold/ChangeLog
52
53
  - data/reap/scaffold/COPYING
53
54
  - data/reap/scaffold/ProjectInfo
55
+ - data/reap/setup-3.4.1/TODO
56
+ - data/reap/setup-3.4.1/test
57
+ - data/reap/setup-3.4.1/Makefile
58
+ - data/reap/setup-3.4.1/README.en
59
+ - data/reap/setup-3.4.1/README.ja
60
+ - data/reap/setup-3.4.1/NEWS.en
61
+ - data/reap/setup-3.4.1/NEWS.ja
62
+ - data/reap/setup-3.4.1/doc.en
63
+ - data/reap/setup-3.4.1/doc.ja
64
+ - data/reap/setup-3.4.1/Template.README.en
65
+ - data/reap/setup-3.4.1/Template.README.ja
66
+ - data/reap/setup-3.4.1/Usage_en.txt
67
+ - data/reap/setup-3.4.1/sample
68
+ - data/reap/setup-3.4.1/Usage_ja.txt
69
+ - data/reap/setup-3.4.1/setup.rb
70
+ - data/reap/setup-3.4.1/ChangeLog
71
+ - data/reap/setup-3.4.1/COPYING
72
+ - data/reap/setup-3.4.1/test/test_installer.rb
73
+ - data/reap/setup-3.4.1/doc.en/hookapi.html
74
+ - data/reap/setup-3.4.1/doc.en/index.html
75
+ - data/reap/setup-3.4.1/doc.en/usage.html
76
+ - data/reap/setup-3.4.1/doc.en/news.html
77
+ - data/reap/setup-3.4.1/doc.en/metaconfapi.html
78
+ - data/reap/setup-3.4.1/doc.ja/hookapi.html
79
+ - data/reap/setup-3.4.1/doc.ja/index.html
80
+ - data/reap/setup-3.4.1/doc.ja/usage.html
81
+ - data/reap/setup-3.4.1/doc.ja/news.html
82
+ - data/reap/setup-3.4.1/doc.ja/metaconfapi.html
83
+ - data/reap/setup-3.4.1/sample/add-task.rb
54
84
  - lib/reap
55
85
  - lib/reap/bin
56
86
  - lib/reap/task
57
87
  - lib/reap/projectinfo.rb
58
- - lib/reap/lint.rb
88
+ - lib/reap/vendor
59
89
  - lib/reap/task.rb
60
90
  - lib/reap/setup.rb
61
- - lib/reap/reap.rb
62
- - lib/reap/interface
63
91
  - lib/reap/bin/reap.rb
92
+ - lib/reap/bin/lint.rb
64
93
  - lib/reap/bin/rubytest.rb
65
94
  - lib/reap/task/rdoc.rb
66
95
  - lib/reap/task/release.rb
@@ -74,8 +103,10 @@ files:
74
103
  - lib/reap/task/package.rb
75
104
  - lib/reap/task/info.rb
76
105
  - lib/reap/task/publish.rb
77
- - lib/reap/interface/interface.rb
78
- - lib/reap/interface/rubyforge.rb
106
+ - lib/reap/vendor/http-access2
107
+ - lib/reap/vendor/http-access2.rb
108
+ - lib/reap/vendor/http-access2/cookie.rb
109
+ - lib/reap/vendor/http-access2/http.rb
79
110
  - test/tc_reap.rb
80
111
  - note/Rakefile
81
112
  - note/license-each.rb
@@ -87,6 +118,10 @@ files:
87
118
  - note/composite_task.rb
88
119
  - note/rubyforgepublisher.rb
89
120
  - note/ftptools.rb
121
+ - note/package.rb.0
122
+ - note/interface
123
+ - note/interface/interface.rb
124
+ - note/interface/rubyforge.rb
90
125
  test_files: []
91
126
 
92
127
  rdoc_options: []