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
@@ -1,208 +0,0 @@
1
-
2
- require 'yaml'
3
- #require 'facet/hash/traverse'
4
- require 'facet/hash/graph'
5
- require 'facet/string/tabto'
6
- require 'facet/dir/self/ascend'
7
-
8
- #require 'facet/basicobject'
9
- require 'facet/opencascade'
10
-
11
- # Project information.
12
- #
13
- # ProjectInfo is a Singleton. Access it via the
14
- # ProjectInfo.instance method.
15
-
16
- class ProjectInfo
17
-
18
- include Enumerable
19
-
20
- INFO_FILES = [ 'ProjectInfo','projectinfo' ]
21
-
22
- class << self
23
-
24
- # Singelton Pattern.
25
-
26
- private :new
27
-
28
- def instance( &block )
29
- @instance ||= block_given? ? new( &block ) : load
30
- end
31
-
32
- # Move to file's location.
33
-
34
- def prime_location( fpath=nil )
35
- if fpath
36
- Dir.chdir( File.dirname( fpath ) )
37
- else
38
- fpath = find
39
- if fpath
40
- Dir.chdir( File.dirname( fpath ) )
41
- end
42
- end
43
- end
44
-
45
- # Find project information file.
46
-
47
- def find
48
- info_dir, info_file = nil, nil
49
- Dir.ascend(Dir.pwd) do |info_dir|
50
- info_file = INFO_FILES.find{ |f| File.file?( File.join( info_dir, f ) ) }
51
- break if info_file
52
- end
53
- return nil unless info_file
54
- return File.join( info_dir, info_file )
55
- end
56
-
57
- # Load the project information from a file. Generally
58
- # no file needs to be specified; the file will be found
59
- # by ascending up the current path until a default
60
- # file name is found (eg. ProjectInfo or Reapfile).
61
-
62
- def load( fpath=nil )
63
- unless fpath
64
- fpath = find
65
- if fpath
66
- Dir.chdir( File.dirname( fpath ) )
67
- end
68
- end
69
- new.read( fpath )
70
- end
71
-
72
- def exist?
73
- @instance.info_file ? true : false
74
- end
75
- alias_method :exists?, :exist?
76
-
77
- end
78
-
79
-
80
- attr_reader :info, :info_stream, :info_dir, :info_file
81
-
82
- def initialize( &block )
83
- @info = {}
84
- @info_stream = nil
85
-
86
- # define( &block ) if block_given?
87
- end
88
-
89
- # Define project information programmatically.
90
-
91
- # def define( &block )
92
- # return unless block
93
- #
94
- # @info = HashBuilder.new( &block ).to_h
95
- # @info_stream = @info.to_yaml
96
- # @info_dir = Dir.pwd #?
97
- # @info_file = nil
98
- #
99
- # #validate
100
- # defaults
101
- #
102
- # self
103
- # end
104
-
105
- # Load project information from YAML file.
106
-
107
- def read( fpath )
108
- return self unless fpath
109
-
110
- @info_dir = File.dirname( fpath )
111
- @info_file = fpath #File.basename( fpath )
112
- @info_stream = File.read( fpath ).strip
113
- @info = YAML::load( info_stream )
114
- @info = @info.graph{ |k,v| [k.to_s.downcase, v] }
115
-
116
- #validate
117
- defaults
118
- =begin
119
- # register the task entries
120
- @info.each do |key, val|
121
- #value = @info[key] = {} if value.nil?
122
- if Reap::TaskDef === val
123
- val.name = key.to_s
124
- end
125
- end
126
- =end
127
- self
128
- end
129
-
130
- # # Update project information.
131
- #
132
- # def update( info=nil, &block )
133
- # if info
134
- # @info.update( info.traverse{ |k,v| [k.to_s.downcase, v] } )
135
- # end
136
- # if block_given?
137
- # @info.update( HashBuilder.new( &block ).to_h )
138
- # end
139
- # @info_stream = @info.to_yaml
140
- #
141
- # #validate
142
- # defaults
143
- #
144
- # self
145
- # end
146
-
147
- # Project information file exists? (may need to change to info exists?)
148
-
149
- def exists?
150
- @info_file
151
- end
152
- alias_method :exist?, :exists?
153
-
154
- # Validate project information.
155
-
156
- def validate #( *fields )
157
- val = true
158
- (puts "NAME is required in project information file."; val=false) unless info['name']
159
- (puts "VERSION is required in project information file."; val=false) unless info['version']
160
- exit -1 unless val
161
- end
162
-
163
- # Project information defaults.
164
-
165
- def defaults
166
- self['title'] ||= self['name'].capitalize
167
- self['series'] ||= '1'
168
- self['date'] ||= Time.now.strftime("%Y-%m-%d")
169
- self['author'] ||= "Anonymous"
170
- self['maintainer'] ||= self['author']
171
- self['arch'] ||= 'Any'
172
- self['license'] ||= 'Ruby/GPL'
173
- self['status'] ||= 'Beta'
174
- self['project'] ||= self['rubyforge'] ? self['rubyforge']['project'] : nil
175
- self['homepage'] ||= self['rubyforge'] ? self['rubyforge']['homepage'] : nil
176
- self['trunk'] ||= 'trunk' if File.directory?( File.join( @info_dir, 'trunk' ))
177
- end
178
-
179
- # Convert to a CascadinOpenObject.
180
-
181
- def to_opencascade
182
- OpenCascade.new( @info )
183
- end
184
-
185
- # Information fetch.
186
-
187
- def [](name)
188
- @info[name]
189
- end
190
-
191
- # Information store.
192
-
193
- def []=(name, x)
194
- @info[name] = x
195
- end
196
-
197
- def each( &block )
198
- @info.each( &block )
199
- end
200
-
201
- # Information to hash.
202
-
203
- def to_h
204
- @info.dup
205
- end
206
-
207
- end
208
-
data/lib/reap/rake.rb DELETED
@@ -1,42 +0,0 @@
1
-
2
- require 'facet/hash/to_proc'
3
- require 'facet/kernel/require_all'
4
-
5
- require 'facet/openobject'
6
-
7
- require 'reap/projectinfo'
8
-
9
- # Require tasks
10
- require 'reap/tasks'
11
- require_all('./task/*') if File.directory?('task')
12
-
13
- # Rake doesn't understand help.
14
- #def help name, text
15
- #end
16
-
17
- # Rake doesn't understand avail.
18
- def avail name, cond
19
- end
20
-
21
- # Modify Rake's desc method to return the last description
22
- # if no comment is given.
23
-
24
- def desc(comment=nil)
25
- if comment
26
- Rake.application.last_comment = comment
27
- else
28
- Rake.application.last_comment
29
- end
30
- end
31
-
32
- include Tasks
33
-
34
- # Let the default be the hidden task to display tasks.
35
- # You can change it just by overriding the default.
36
-
37
- task :default => [ :__tasks__ ]
38
-
39
- task :__tasks__ do
40
- Rake.application.options.show_task_pattern = //
41
- Rake.application.display_tasks_and_comments
42
- end
data/lib/reap/reap.rb DELETED
@@ -1,89 +0,0 @@
1
- # = Reap
2
-
3
- #--
4
- # NOTE With the latest rendition of Reap the Reap module
5
- # is not used as much. Perhaps Tasks and TaskSpace should
6
- # move into it but for the moment they are more convenient
7
- # outside of it.
8
- #++
9
-
10
- module Reap
11
- Version = "6.0.0"
12
- end
13
-
14
- require 'facet/hash/to_proc'
15
- require 'facet/kernel/require_all'
16
-
17
- # Reap project information object.
18
- require 'reap/projectinfo'
19
-
20
- # Prime ProjectInfo by moving to file's location.
21
- located = ProjectInfo.prime_location
22
-
23
- # Load task system.
24
- require 'facets/more/taskable'
25
-
26
- # Load built-in tasks.
27
- require 'reap/tasks'
28
-
29
- # Load custom project tasks.
30
- if located
31
- require_all('./task/*') if File.directory?('task')
32
- end
33
-
34
- # Setup YAML load types based on task generators.
35
- Tasks.public_instance_methods(false).each do |type|
36
- #Task.singleton_methods(true).each do |type|
37
- YAML.add_private_type( type.to_s ) do |syck_type, data|
38
- data = {} if data == "" or data.nil?
39
- data[:task_type] = type
40
- data
41
- end
42
- end
43
-
44
- # Load the ProjectInfo file.
45
- ProjectInfo.instance
46
-
47
- # Create the tasks.
48
- module TaskSpace
49
-
50
- # Tasks acts as our DSL for task generation.
51
- extend Tasks
52
-
53
- # Include the tools tasks use.
54
- include Reap::TaskUtils
55
-
56
- # Look up all defined task with descriptions.
57
- def self.visible_tasks
58
- described_tasks
59
- end
60
-
61
- # Look up all defined task without descriptions.
62
- def self.hidden_tasks
63
- undescribed_tasks
64
- end
65
-
66
- # Create specialty tasks (don't neccessarily require manual definition)
67
- Tasks.available.each do |type, cond|
68
- if cond.call
69
- send( type, type.to_s )
70
- end
71
- end
72
-
73
- # Create all tasks as define in the ProjectInfo file.
74
- ProjectInfo.instance.each do |name, value|
75
- if Hash === value and value.key?(:task_type)
76
- desc( value['desc'] ) if value.key?('desc') # desc okay?
77
- send( value[:task_type], name, &value )
78
- end
79
- end
80
-
81
- # Create any tasks define by a Reapfile script.
82
- [ 'Reapfile', 'reapfile', 'REAPFILE' ].each do |f|
83
- if File.file?(f)
84
- module_eval( File.read(f) )
85
- break
86
- end
87
- end
88
-
89
- end