reap 9.2.1 → 9.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. data/CHANGES +4 -0
  2. data/COPYING +675 -674
  3. data/MANIFEST +37 -44
  4. data/NOTES +4 -4
  5. data/Rakefile +1486 -0
  6. data/data/reap/base/COPYING +674 -674
  7. data/data/reap/base/README +23 -2
  8. data/data/reap/base/Rakefile +1486 -0
  9. data/data/reap/base/test/template.rb +16 -0
  10. data/data/reap/init/meta/project.yaml +19 -14
  11. data/lib/reap/default.yaml +57 -45
  12. data/lib/reap/extensions/file.rb +8 -0
  13. data/lib/reap/extensions/net/smtp_tls.rb +108 -0
  14. data/lib/reap/extensions.rb +2 -0
  15. data/lib/reap/metadata.rb +3 -2
  16. data/lib/reap/{manager → project}/announce.rb +3 -3
  17. data/lib/reap/{manager → project}/check.rb +1 -1
  18. data/lib/reap/{manager → project}/clean.rb +1 -1
  19. data/lib/reap/{manager → project}/gem.rb +5 -5
  20. data/lib/reap/{manager → project}/html.rb +25 -24
  21. data/lib/reap/{manager → project}/log.rb +19 -9
  22. data/lib/reap/{manager → project}/make.rb +29 -36
  23. data/lib/reap/{manager → project}/package.rb +4 -8
  24. data/lib/reap/{manager → project}/publish.rb +3 -3
  25. data/lib/reap/{manager → project}/rdoc.rb +13 -30
  26. data/lib/reap/{manager → project}/release.rb +5 -5
  27. data/lib/reap/{manager → project}/rubyforge.rb +7 -6
  28. data/lib/reap/{manager → project}/scaffold.rb +7 -2
  29. data/lib/reap/{manager → project}/scm.rb +3 -3
  30. data/lib/reap/{manager → project}/site.rb +1 -1
  31. data/lib/reap/{manager → project}/spec.rb +1 -1
  32. data/lib/reap/{manager → project}/stamp.rb +14 -11
  33. data/lib/reap/{manager → project}/stats.rb +1 -1
  34. data/lib/reap/{manager → project}/svn.rb +1 -1
  35. data/lib/reap/{manager → project}/test.rb +2 -20
  36. data/lib/reap/project.rb +34 -2
  37. data/lib/reap/systems/rubyforge.rb +5 -12
  38. data/lib/reap/systems/subversion.rb +4 -6
  39. data/lib/reap/{utilities/fileutils.rb → utilities.rb} +148 -60
  40. data/log/Changelog.txt +118 -0
  41. data/log/Fixme.txt +26 -0
  42. data/log/Todo.txt +94 -0
  43. data/meta/VERSION +1 -1
  44. data/meta/project.yaml +1 -1
  45. data/meta/unixname +1 -0
  46. data/test/unit/lib/reap/extensions/test_array.rb +12 -0
  47. metadata +44 -46
  48. data/data/reap/build/rake/Rakefile +0 -130
  49. data/data/reap/build/rake/setup.rb +0 -1616
  50. data/data/reap/build/rake-lite/install.rb +0 -79
  51. data/data/reap/build/tasks/task/rdoc +0 -211
  52. data/data/reap/build/tasks/task/setup +0 -1616
  53. data/data/reap/build/tasks/task/test +0 -38
  54. data/lib/reap/manager.rb +0 -75
  55. data/lib/reap/utilities/netutils.rb +0 -221
  56. data/lib/reap/utilities/setuputils.rb +0 -124
  57. data/lib/reap/utilities/shellutils.rb +0 -175
  58. data/log/FIXME.txt +0 -25
  59. data/log/TODO.txt +0 -72
  60. data/task/man +0 -14
  61. data/task/rdoc +0 -20
  62. data/task/setup +0 -1616
@@ -1,79 +0,0 @@
1
- module Reap
2
-
3
- # Install package to site_ruby.
4
- #
5
- # This script installs project to site_ruby location
6
- # using Ruby's defualt configuration settings.
7
- # If you want to change these, you can supply
8
- # configuration settings for 'prefix' and/or 'sitedir'.
9
-
10
- def install
11
-
12
- system_prefix = Config::CONFIG['prefix']
13
- system_libdir = Config::CONFIG['sitelibdir']
14
-
15
- config = configuration['install'] || {}
16
-
17
- prefix = config['prefix'] || system_prefix
18
- libdir = config['libdir']
19
-
20
- unless libdir
21
- if (prefix == system_prefix) then
22
- libdir = system_libdir
23
- else
24
- libdir = File.join(prefix, system_libdir[system_prefix.size..-1])
25
- end
26
- end
27
-
28
- # If a roll file is being used.
29
-
30
- if roll_file = File.glob('{,meta/}*.roll').first
31
- roll = Roll::Package.open
32
- lib_paths = roll.lib_paths
33
- else
34
- lib_paths = config['lib_path'] || ['lib']
35
- end
36
-
37
- # We need to copy them into site_ruby in the opposite order they
38
- # would be searched for by require.
39
-
40
- lib_paths.reverse!
41
-
42
- # Copy lib files to site_ruby location, in proper order!
43
-
44
- lib_paths.each do |loc|
45
- files = glob(File.join(loc, "**/*"))
46
- files = files.select{ |f| File.file?(f) }
47
- files.each do |file|
48
- dest = File.dirname(file)
49
- dest.sub!(loc, '')
50
- dest = File.join(libdir, dest)
51
- if noharm?
52
- puts "mkdir -p #{dest}" unless File.directory?(dest)
53
- puts "install -m 0444 #{file} #{dest}"
54
- else
55
- mkdir_p dest unless File.directory?(dest)
56
- install file, dest, :mode => 0444
57
- end
58
- end
59
- end
60
-
61
- # Copy bin files to site_ruby location.
62
-
63
- bin_files = glob("bin/*")
64
- bin_files = bin_files.select{ |f| File.file?(f) }
65
- bin_files.each do |file|
66
- dest = File.dirname(file)
67
- dest = File.join(prefix, dest)
68
- if noharm?
69
- puts "mkdir -p #{dest}" unless File.directory?(dest)
70
- puts "install -m 0555 #{file} #{dest}"
71
- else
72
- mkdir_p dest unless File.directory?(dest)
73
- install file, dest, :mode => 0555
74
- end
75
- end
76
-
77
- end
78
-
79
- end
@@ -1,211 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # Generate rdocs.
4
- #
5
- # Geneate documentation. This uses the rdoc config entry,
6
- # but only documents one designated target at a time.
7
- #
8
- # NOTE: THIS IS WRITTEN SPECIALLY FOR FACETS!!!
9
-
10
- RDOC_SETTINGS = YAML.load %{
11
- - title : Facets
12
- main : README
13
- chdir : lib/core
14
- output : doc/rdoc/core
15
- - title : Facets
16
- chdir : lib/more
17
- output : doc/rdoc
18
- groups :
19
- - [ facets/annotations.rb, facets/settings.rb ]
20
- - [ facets/aop.rb, facets/cut.rb ]
21
- - [ facets/buildable.rb, facets/buildingblock.rb, facets/hashbuilder.rb ]
22
- - [ facets/command.rb, facets/arguments.rb, facets/ansicode.rb ] # facets/bbcode.rb
23
- - [ facets/dictionary.rb, facets/orderedhash.rb ]
24
- - [ facets/fileable.rb, facets/filelist.rb, facets/pathlist.rb, facets/fileshell.rb ]
25
- - [ facets/heap.rb, facets/pqueue.rb ]
26
- - [ facets/openobject.rb, facets/opencascade.rb, facets/opencollection.rb, facets/ostruct.rb ]
27
- - [ facets/syncarray.rb, facets/synchash.rb ]
28
- }
29
-
30
- RDOC_ADFILE = 'doc/rdoc_ad.html'
31
-
32
- # Generate rdocs.
33
-
34
- def rdoc
35
- configs = RDOC_SETTINGS
36
- configs = [configs] unless Array===configs
37
-
38
- configs.each do |config|
39
- if config['groups']
40
- rdoc_groups(config)
41
- else
42
- rdoc_target(config)
43
- end
44
- end
45
-
46
- puts "RDoc complete."
47
- end
48
-
49
- # Docuement groups of targets.
50
-
51
- def rdoc_groups(config)
52
- site = config.delete('output') || config.delete('op') || 'doc/rdoc'
53
- tdir = config['chdir']
54
-
55
- groups = config.delete('groups')
56
- groups = TrueClass===groups ? [] : groups
57
-
58
- # the rest
59
- rest = []
60
- chdir(tdir){rest=glob('**/*').select{|f| File.file?(f)}}
61
- rest = rest - groups.flatten
62
- groups.concat(rest.collect{ |r| [r] })
63
-
64
- title = config['title'].to_s
65
-
66
- # rdoc each group
67
- groups.each do |group|
68
- gf1st = File.basename(group.first)
69
- gname = gf1st.chomp(File.extname(gf1st))
70
- gsite = File.join(site,gname)
71
- gtitle = "#{title} #{gname.capitalize}".strip
72
-
73
- gconfig = config.merge('title' => gtitle, 'op' => gsite, 'files' => group)
74
-
75
- rdoc_target(gconfig)
76
- end
77
- end
78
-
79
- # Document target.
80
-
81
- def rdoc_target(config)
82
- config = {
83
- 'template' => 'html',
84
- 'merge' => true,
85
- 'inline-source' => true,
86
- }.merge(config)
87
-
88
- site = config['output'] || 'doc/rdoc'
89
- tgdir = config['chdir'] || '.'
90
- files = config['files'] || '**/*'
91
- main = config['main']
92
- template = config['template']
93
- merge = config['merge']
94
- inline = config['inline']
95
-
96
- output = File.expand_path(site)
97
- main = File.expand_path(main) if main
98
- files = [files].flatten
99
-
100
- # Remove all old rdocs.
101
- fu.rm_r(site) if File.directory?(site) #and safe?(site)
102
-
103
- otps = []
104
- opts << "--output #{output}"
105
- opts << "--main #{main}" if main
106
- opts << "--template #{template}" if template
107
- opts << "--merge" if merge
108
- opts << "--inline-source" if inline
109
-
110
- cmd = "rdoc #{opts.join(' ')} #{files.join(' ')}"
111
-
112
- # Create Documentation.
113
- Dir.chdir(tgdir) do
114
- if dryrun?
115
- puts cmd
116
- else
117
- system cmd
118
- end
119
- end
120
-
121
- insert_ads(site)
122
- end
123
-
124
- # Insert ads.
125
-
126
- def insert_ads(site)
127
- adfile = RDOC_ADFILE
128
- return unless adfile && File.file?(adfile)
129
- adtext = File.read(adfile)
130
- #puts
131
- dirs = Dir.glob(File.join(site,'*/'))
132
- dirs.each do |dir|
133
- files = Dir.glob(File.join(dir, '**/*.html'))
134
- files.each do |file|
135
- html = file_read(file)
136
- bodi = html.index('<body>')
137
- html[bodi + 7] = "\n" + adtext
138
- #print "Augmenting #{file}..."
139
- file_write(file, html) unless dryrun?
140
- #puts "[done]"
141
- end
142
- end
143
- end
144
-
145
- #
146
-
147
- def fu
148
- DRYRUN ? FileUtils::Dryrun : FileUtils
149
- end
150
-
151
- #
152
-
153
- def dryrun?
154
- @dryrun ||= ARGV.include?('--dryrun')
155
- end
156
-
157
- # Go!
158
- if $0 == __FILE__
159
- rdoc
160
- end
161
-
162
-
163
- __END__
164
-
165
- # Build RDoc's for each target,
166
-
167
- # task :rdoc_targets do
168
- #
169
- # #targets.each do |name, files|
170
- # # targets[name] = files.split(/\s+/) if String===files
171
- # #end
172
- #
173
- #
174
- # # single = ARGV[0]
175
- #
176
- # # # Just do the one requested.
177
- # # if targets.keys.include?(single)
178
- # # targets = { single => targets[single] }
179
- # # single_site = File.join(site, single)
180
- # # # Remove just the one doc directory.
181
- # # rm_r(single_site) if dir?(single_site) and safe?(single_site)
182
- # # else
183
- # # # Remove all old rdocs.
184
- # # rm_r(site) if dir?(site) and safe?(site)
185
- # # end
186
- #
187
- # # Document each target.
188
- # targets.each do |name, options|
189
- # tgdir = options.delete('chdir')
190
- # files = options.delete('files')
191
- #
192
- # #files.collect!{|f| "lib/more/facets/#{f}" }
193
- #
194
- # outdir = File.expand_path(File.join(site, name.gsub(' ','')))
195
- # title = "Facets #{name.capitalize}"
196
- #
197
- # config = config.merge(
198
- # 'op' => outdir,
199
- # 'title' => title
200
- # )
201
- #
202
- # # Prepare command arguments.
203
- # vector = [files, config] #.flatten.compact
204
- #
205
- # # Create Documentation.
206
- # cd(tgdir) do
207
- # rdoc(vector.to_params)
208
- # end
209
- # end
210
- #
211
- # end