reap 4.3.3 → 4.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. data/COPYING +400 -8
  2. data/ProjectInfo +26 -26
  3. data/ProjectInfo.rb +88 -0
  4. data/bin/reap +1 -1
  5. data/bin/rubytest +1 -1
  6. data/data/reap/scaffold/standard/COPYING +403 -0
  7. data/data/reap/scaffold/{ChangeLog → standard/ChangeLog} +0 -0
  8. data/data/reap/scaffold/standard/INSTALL +14 -0
  9. data/data/reap/scaffold/{ProjectInfo → standard/ProjectInfo} +12 -12
  10. data/data/reap/scaffold/standard/README +3 -0
  11. data/data/reap/scaffold/standard/Rakefile +10 -0
  12. data/data/reap/scaffold/{INSTALL → standard/TODO} +0 -0
  13. data/data/reap/scaffold/subversion/trunk/COPYING +403 -0
  14. data/data/reap/scaffold/{README → subversion/trunk/ChangeLog} +0 -0
  15. data/data/reap/scaffold/subversion/trunk/INSTALL +14 -0
  16. data/data/reap/scaffold/subversion/trunk/ProjectInfo +78 -0
  17. data/data/reap/scaffold/subversion/trunk/README +3 -0
  18. data/data/reap/scaffold/subversion/trunk/Rakefile +10 -0
  19. data/data/reap/scaffold/{Todo → subversion/trunk/TODO} +0 -0
  20. data/data/reap/{setup-3.4.1/setup.rb → setup.rb} +181 -202
  21. data/{ChangeLog → doc/ChangeLog} +0 -0
  22. data/doc/doap.xml +27 -0
  23. data/doc/note/Rakefile.htm +69 -0
  24. data/{note/Rakefile → doc/note/aRakefile} +0 -0
  25. data/{note → doc/note}/composite_task.rb +0 -0
  26. data/{note → doc/note}/compositepublisher.rb +0 -0
  27. data/{note → doc/note}/ftptools.rb +0 -0
  28. data/{note → doc/note}/interface/interface.rb +0 -0
  29. data/{note → doc/note}/interface/rubyforge.rb +0 -0
  30. data/{note → doc/note}/license-each.rb +0 -0
  31. data/{note → doc/note}/package.rb.0 +0 -0
  32. data/{note → doc/note}/publisher.rb +0 -0
  33. data/{note → doc/note}/rubyforgepublisher.rb +0 -0
  34. data/{lib/reap/task → doc/note}/scaffold.rb +4 -3
  35. data/{lib/reap → doc/note}/setup.rb +7 -6
  36. data/{note → doc/note}/sshpublisher.rb +0 -0
  37. data/{note → doc/note}/suby-cvs.rb +0 -0
  38. data/{note → doc/note}/template.rb +0 -0
  39. data/lib/reap/bin/reap.rb +75 -51
  40. data/lib/reap/bin/{lint.rb → rubylint.rb} +0 -0
  41. data/lib/reap/projectinfo.rb +107 -50
  42. data/lib/reap/reap.rb +60 -0
  43. data/lib/reap/task.rb +46 -60
  44. data/lib/reap/task/doap.rb +67 -0
  45. data/lib/reap/task/info.rb +2 -2
  46. data/lib/reap/task/install.rb +29 -18
  47. data/lib/reap/task/package.rb +56 -56
  48. data/lib/reap/task/release.rb +34 -13
  49. data/package.rb +627 -0
  50. data/setup.rb +287 -272
  51. data/test/tc_reap.rb +1 -1
  52. metadata +64 -61
  53. data/ANN +0 -8
  54. data/data/reap/scaffold/COPYING +0 -11
  55. data/data/reap/scaffold/Rakefile +0 -146
  56. data/data/reap/scaffold/setup.rb +0 -1551
  57. data/data/reap/setup-3.4.1/COPYING +0 -515
  58. data/data/reap/setup-3.4.1/ChangeLog +0 -732
  59. data/data/reap/setup-3.4.1/Makefile +0 -56
  60. data/data/reap/setup-3.4.1/NEWS.en +0 -155
  61. data/data/reap/setup-3.4.1/NEWS.ja +0 -152
  62. data/data/reap/setup-3.4.1/README.en +0 -30
  63. data/data/reap/setup-3.4.1/README.ja +0 -34
  64. data/data/reap/setup-3.4.1/TODO +0 -14
  65. data/data/reap/setup-3.4.1/Template.README.en +0 -41
  66. data/data/reap/setup-3.4.1/Template.README.ja +0 -46
  67. data/data/reap/setup-3.4.1/Usage_en.txt +0 -231
  68. data/data/reap/setup-3.4.1/Usage_ja.txt +0 -250
  69. data/data/reap/setup-3.4.1/doc.en/hookapi.html +0 -91
  70. data/data/reap/setup-3.4.1/doc.en/index.html +0 -28
  71. data/data/reap/setup-3.4.1/doc.en/metaconfapi.html +0 -79
  72. data/data/reap/setup-3.4.1/doc.en/news.html +0 -189
  73. data/data/reap/setup-3.4.1/doc.en/usage.html +0 -297
  74. data/data/reap/setup-3.4.1/doc.ja/hookapi.html +0 -84
  75. data/data/reap/setup-3.4.1/doc.ja/index.html +0 -28
  76. data/data/reap/setup-3.4.1/doc.ja/metaconfapi.html +0 -80
  77. data/data/reap/setup-3.4.1/doc.ja/news.html +0 -186
  78. data/data/reap/setup-3.4.1/doc.ja/usage.html +0 -319
  79. data/data/reap/setup-3.4.1/sample/add-task.rb +0 -15
  80. data/data/reap/setup-3.4.1/test/test_installer.rb +0 -136
@@ -1,15 +0,0 @@
1
- #
2
- # add original task using hook file
3
- #
4
-
5
- ToplevelInstaller::TASKS.push ['test', 'run test.']
6
- ToplevelInstaller.module_eval {
7
- def exec_test
8
- raise "test.rb not given; cannot test this package."\
9
- unless File.file?("#{srcdir_root()}/test.rb")
10
- old = Dir.pwd
11
- Dir.chdir srcdir_root()
12
- load 'test.rb'
13
- Dir.chdir old
14
- end
15
- }
@@ -1,136 +0,0 @@
1
- require 'setup'
2
- require 'fileutils'
3
- require 'stringio'
4
- require 'test/unit'
5
-
6
- class DummyConfig
7
- def initialize(config)
8
- @config = config
9
- end
10
-
11
- def [](key)
12
- @config[key]
13
- end
14
-
15
- def no_harm?
16
- false
17
- end
18
-
19
- def verbose?
20
- false
21
- end
22
- end
23
-
24
- class TestInstaller < Test::Unit::TestCase
25
-
26
- include FileUtils
27
-
28
- def setup
29
- rm_rf %w(srcdir objdir)
30
- mkdir %w(srcdir objdir)
31
- Dir.chdir 'objdir'
32
- $stderr, $orig_stderr = StringIO.new, $stderr
33
- end
34
-
35
- def teardown
36
- $stderr = $orig_stderr
37
- Dir.chdir '..'
38
- rm_rf %w(srcdir objdir)
39
- end
40
-
41
- def setup_installer(config = {})
42
- @installer = Installer.new(DummyConfig.new(config), '../srcdir', '.')
43
- end
44
-
45
- def do_update_shebang_line(id, str)
46
- create id, str
47
- @installer.update_shebang_line "../srcdir/#{id}"
48
- read(id)
49
- end
50
-
51
- def create(filename, content)
52
- File.open("../srcdir/#{filename}", 'wb') {|f|
53
- f.write content
54
- }
55
- end
56
-
57
- def read(filename)
58
- path = File.exist?(filename) ? filename : "../srcdir/#{filename}"
59
- File.open(path, 'rb') {|f|
60
- return f.read
61
- }
62
- end
63
-
64
- def test_update_shebang_line__never
65
- setup_installer 'shebang' => 'never', 'rubypath' => 'ERROR'
66
- assert_equal "#!/usr/local/bin/ruby\nprogram",
67
- do_update_shebang_line('ruby', "#!/usr/local/bin/ruby\nprogram")
68
- assert_equal "#! /usr/local/bin/ruby\nprogram",
69
- do_update_shebang_line('ruby-sp', "#! /usr/local/bin/ruby\nprogram")
70
- assert_equal "#!/usr/local/bin/ruby -Ke\nprogram",
71
- do_update_shebang_line('ruby-arg', "#!/usr/local/bin/ruby -Ke\nprogram")
72
- assert_equal "#!/usr/bin/ruby -n -p\nprogram",
73
- do_update_shebang_line('ruby-args', "#!/usr/bin/ruby -n -p\nprogram")
74
- assert_equal "#!/usr/bin/env ruby\nprogram",
75
- do_update_shebang_line('env-ruby', "#!/usr/bin/env ruby\nprogram")
76
- assert_equal "#!/usr/bin/env perl\nprogram",
77
- do_update_shebang_line('env-noruby', "#!/usr/bin/env perl\nprogram")
78
- assert_equal "#!/bin/sh\nprogram",
79
- do_update_shebang_line('interp', "#!/bin/sh\nprogram")
80
- assert_equal "#!/bin/sh -l -r -\nprogram",
81
- do_update_shebang_line('interp-args', "#!/bin/sh -l -r -\nprogram")
82
- assert_equal "program",
83
- do_update_shebang_line('bare', "program")
84
- assert_equal "\001\002\003\n\004\005\006",
85
- do_update_shebang_line('binary', "\001\002\003\n\004\005\006")
86
- end
87
-
88
- def test_update_shebang_line__all
89
- setup_installer 'shebang' => 'all', 'rubypath' => 'RUBYPATH'
90
- assert_equal "#! RUBYPATH\nprogram",
91
- do_update_shebang_line('ruby', "#!/usr/local/bin/ruby\nprogram")
92
- assert_equal "#! RUBYPATH\nprogram",
93
- do_update_shebang_line('ruby-sp', "#! /usr/local/bin/ruby\nprogram")
94
- assert_equal "#! RUBYPATH -Ke\nprogram",
95
- do_update_shebang_line('ruby-arg', "#!/usr/local/bin/ruby -Ke\nprogram")
96
- assert_equal "#! RUBYPATH -n -p\nprogram",
97
- do_update_shebang_line('ruby-args', "#!/usr/bin/ruby -n -p\nprogram")
98
- assert_equal "#! RUBYPATH\nprogram",
99
- do_update_shebang_line('env-ruby', "#!/usr/bin/env ruby\nprogram")
100
- assert_equal "#! RUBYPATH\nprogram",
101
- do_update_shebang_line('env-noruby', "#!/usr/bin/env perl\nprogram")
102
- assert_equal "#! RUBYPATH\nprogram",
103
- do_update_shebang_line('interp', "#!/bin/sh\nprogram")
104
- assert_equal "#! RUBYPATH\nprogram", # args removed
105
- do_update_shebang_line('interp-args', "#!/bin/sh -l -r -\nprogram")
106
- assert_equal "#! RUBYPATH\nprogram",
107
- do_update_shebang_line('bare', "program")
108
- assert_equal "#! RUBYPATH\n\001\002\003\n\004\005\006",
109
- do_update_shebang_line('binary', "\001\002\003\n\004\005\006")
110
- end
111
-
112
- def test_update_shebang_line__ruby
113
- setup_installer 'shebang' => 'ruby', 'rubypath' => 'RUBYPATH'
114
- assert_equal "#! RUBYPATH\nprogram",
115
- do_update_shebang_line('ruby', "#!/usr/local/bin/ruby\nprogram")
116
- assert_equal "#! RUBYPATH\nprogram",
117
- do_update_shebang_line('ruby-sp', "#! /usr/local/bin/ruby\nprogram")
118
- assert_equal "#! RUBYPATH -Ke\nprogram",
119
- do_update_shebang_line('ruby-arg', "#!/usr/local/bin/ruby -Ke\nprogram")
120
- assert_equal "#! RUBYPATH -n -p\nprogram",
121
- do_update_shebang_line('ruby-args', "#!/usr/bin/ruby -n -p\nprogram")
122
- assert_equal "#! RUBYPATH\nprogram",
123
- do_update_shebang_line('env-ruby', "#!/usr/bin/env ruby\nprogram")
124
- assert_equal "#!/usr/bin/env perl\nprogram",
125
- do_update_shebang_line('env-noruby', "#!/usr/bin/env perl\nprogram")
126
- assert_equal "#!/bin/sh\nprogram",
127
- do_update_shebang_line('interp', "#!/bin/sh\nprogram")
128
- assert_equal "#!/bin/sh -l -r -\nprogram",
129
- do_update_shebang_line('interp-args', "#!/bin/sh -l -r -\nprogram")
130
- assert_equal "program",
131
- do_update_shebang_line('bare', "program")
132
- assert_equal "\001\002\003\n\004\005\006",
133
- do_update_shebang_line('binary', "\001\002\003\n\004\005\006")
134
- end
135
-
136
- end