ratch 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/{log/history → CHANGES} +0 -0
- data/{log/todo → TODO} +0 -0
- data/bin/manifest +451 -0
- data/bin/ratch +3 -3
- data/demo/task/config.yaml +4 -0
- data/lib/ratch/{batch/argvutils.rb → dsl/argv.rb} +9 -4
- data/lib/ratch/dsl/batch.rb +226 -0
- data/lib/ratch/{batch → dsl}/build.rb +83 -4
- data/lib/ratch/{batch/consoleutils.rb → dsl/console.rb} +13 -5
- data/lib/ratch/{batch/emailutils.rb → dsl/email.rb} +21 -25
- data/lib/ratch/{batch/fileutils.rb → dsl/file.rb} +56 -56
- data/lib/ratch/dsl/meta.rb +132 -0
- data/lib/ratch/{batch → dsl}/options.rb +7 -5
- data/lib/ratch/dsl/setup.rb +124 -0
- data/lib/ratch/{support/signiture.rb → dsl/sign.rb} +9 -18
- data/lib/ratch/dsl/stage.rb +147 -0
- data/lib/ratch/dsl/task.rb +139 -0
- data/lib/ratch/{uploadutils.rb → dsl/upload.rb} +7 -5
- data/lib/ratch/{batch/task.rb → dsl/zip.rb} +30 -14
- data/lib/ratch/dsl.rb +52 -0
- data/lib/ratch/extra/email.rb +5 -0
- data/lib/ratch/extra/stage.rb +5 -0
- data/lib/ratch/extra/zip.rb +5 -0
- data/lib/ratch/manifest.rb +540 -0
- data/lib/ratch/{project → metadata}/information.rb +1 -0
- data/lib/ratch/{project → metadata}/package.rb +28 -2
- data/lib/ratch/{project → metadata}/project.rb +8 -16
- data/lib/ratch/{project → metadata}/release.rb +6 -6
- data/lib/ratch/support/errors.rb +4 -0
- data/lib/ratch/support/filename.rb +18 -0
- data/lib/ratch/toolset/ruby/compile +49 -0
- data/lib/ratch/toolset/ruby/pack/gem +26 -18
- data/lib/ratch/toolset/ruby/pack/tgz +25 -64
- data/lib/ratch/toolset/ruby/pack/zip +46 -0
- data/lib/ratch/toolset/ruby/publish +23 -24
- data/lib/ratch/toolset/ruby/release +8 -0
- data/lib/ratch/toolset/ruby/stamp +33 -0
- data/lib/ratch/toolset/sandbox +11 -0
- data/meta/MANIFEST +101 -23
- data/meta/ROLLRC +1 -1
- data/meta/config.yaml +10 -0
- data/meta/icli.yaml +2 -2
- data/meta/project.yaml +9 -10
- data/meta/xProjectInfo +41 -0
- data/task/release +1 -4
- metadata +82 -156
- data/demo/task/rdoc +0 -88
- data/demo/task/rdoc-old +0 -182
- data/doc/images/clipboard.jpg +0 -0
- data/doc/images/clipboard2.png +0 -0
- data/doc/images/milles-tn.jpg +0 -0
- data/doc/images/mints.png +0 -0
- data/doc/images/ratch2.png +0 -0
- data/doc/images/ruby-sm.png +0 -0
- data/doc/images/silver.gif +0 -0
- data/doc/images/toolbox.jpg +0 -0
- data/doc/index.html +0 -181
- data/doc/notes/original.rb +0 -308
- data/doc/rdoc/classes/Array.html +0 -194
- data/doc/rdoc/classes/Dir.html +0 -317
- data/doc/rdoc/classes/Hash.html +0 -217
- data/doc/rdoc/classes/Ratch/ArgvUtils/Ext.html +0 -285
- data/doc/rdoc/classes/Ratch/ArgvUtils.html +0 -173
- data/doc/rdoc/classes/Ratch/BatchFile.html +0 -207
- data/doc/rdoc/classes/Ratch/BatchManager.html +0 -250
- data/doc/rdoc/classes/Ratch/BatchScript.html +0 -127
- data/doc/rdoc/classes/Ratch/Batchable.html +0 -373
- data/doc/rdoc/classes/Ratch/Build.html +0 -321
- data/doc/rdoc/classes/Ratch/BuildManager.html +0 -319
- data/doc/rdoc/classes/Ratch/Buildable.html +0 -202
- data/doc/rdoc/classes/Ratch/ConfigUtils.html +0 -281
- data/doc/rdoc/classes/Ratch/ConsoleUtils.html +0 -189
- data/doc/rdoc/classes/Ratch/EmailUtils.html +0 -209
- data/doc/rdoc/classes/Ratch/FileUtils.html +0 -674
- data/doc/rdoc/classes/Ratch/GeneralOptions.html +0 -430
- data/doc/rdoc/classes/Ratch/Task.html +0 -201
- data/doc/rdoc/classes/Ratch/TaskManager.html +0 -330
- data/doc/rdoc/classes/Ratch/Taskable.html +0 -231
- data/doc/rdoc/classes/Ratch/UploadUtils.html +0 -566
- data/doc/rdoc/classes/Ratch.html +0 -201
- data/doc/rdoc/created.rid +0 -1
- data/doc/rdoc/files/COPYING.html +0 -1003
- data/doc/rdoc/files/README.html +0 -143
- data/doc/rdoc/files/lib/ratch/argvutils_rb.html +0 -131
- data/doc/rdoc/files/lib/ratch/batch_rb.html +0 -155
- data/doc/rdoc/files/lib/ratch/batchable_rb.html +0 -131
- data/doc/rdoc/files/lib/ratch/batchfile_rb.html +0 -148
- data/doc/rdoc/files/lib/ratch/buildable_rb.html +0 -131
- data/doc/rdoc/files/lib/ratch/consoleutils_rb.html +0 -131
- data/doc/rdoc/files/lib/ratch/emailutils_rb.html +0 -139
- data/doc/rdoc/files/lib/ratch/facets/multiglob_rb.html +0 -137
- data/doc/rdoc/files/lib/ratch/fileutils_rb.html +0 -139
- data/doc/rdoc/files/lib/ratch/options_rb.html +0 -131
- data/doc/rdoc/files/lib/ratch/taskable_rb.html +0 -131
- data/doc/rdoc/files/lib/ratch/uploadutils_rb.html +0 -150
- data/doc/rdoc/fr_class_index.html +0 -48
- data/doc/rdoc/fr_file_index.html +0 -41
- data/doc/rdoc/fr_method_index.html +0 -133
- data/doc/rdoc/index.html +0 -24
- data/doc/rdoc/rdoc-style.css +0 -208
- data/doc/scrap/flexihead-flip.jpg +0 -0
- data/doc/scrap/flexihead.jpg +0 -0
- data/doc/scrap/head1.jpg +0 -0
- data/doc/scrap/ratch.jpg +0 -0
- data/doc/scrap/ratch1.png +0 -0
- data/doc/scrap/ratch2.jpg +0 -0
- data/doc/scrap/ratch3.png +0 -0
- data/doc/scrap/red-ratch.jpg +0 -0
- data/doc/scrap/redratchet.jpg +0 -0
- data/doc/scrap/ruby-kit/ruby.png +0 -0
- data/doc/scrap/scrap.red +0 -256
- data/doc/sitemap.yaml +0 -10
- data/doc/siteparts/index.red +0 -100
- data/doc/siteparts/layout.rhtml +0 -56
- data/doc/siteparts/tutorial.red +0 -578
- data/doc/style.css +0 -112
- data/doc/tutorial.html +0 -722
- data/lib/ratch/batch.rb +0 -488
- data/lib/ratch/support/setuputils.rb +0 -124
- data/lib/ratch/support/stage.rb +0 -292
- data/lib/ratch/toolset/ruby/rdoc +0 -88
- data/task/rdoc +0 -6
- data/work/old/batchfile.rb +0 -95
- data/work/project-old.rb +0 -67
- data/work/scrap/install +0 -89
- data/work/scrap/install.0 +0 -49
- data/work/scrap/install.1 +0 -63
- data/work/scrap/ludo +0 -25
- data/work/scrap/oldtaskable.rb +0 -573
- data/work/scrap/ratch.man +0 -39
- data/work/scrap/taskable-simple.rb +0 -42
- data/work/scrap/taskable.rb +0 -120
data/demo/task/rdoc-old
DELETED
@@ -1,182 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ratch
|
2
|
-
|
3
|
-
# generate rdocs
|
4
|
-
#
|
5
|
-
# Geneate RDoc documentation. This uses the rdoc config entry.
|
6
|
-
# most entires are shodows of the argument the rdoc command
|
7
|
-
# takes. Three execptions -- you can use 'output' instead of
|
8
|
-
# 'op' if you prefer. You can sopecify 'chdir', from which
|
9
|
-
# rdoc will work relative. And you can specify 'groups'.
|
10
|
-
# Groups allow you to document groups of files separetely.
|
11
|
-
# Using groups, any file not part of a group will be document
|
12
|
-
# on it's own.
|
13
|
-
#
|
14
|
-
# Eg.
|
15
|
-
#
|
16
|
-
# rdoc:
|
17
|
-
# title : Foo Aop
|
18
|
-
# main : README
|
19
|
-
# output: doc/rdoc
|
20
|
-
# chdir : lib
|
21
|
-
#
|
22
|
-
# rdoc:
|
23
|
-
# doc/rdoc:
|
24
|
-
# title : Foo Aop
|
25
|
-
# main : README
|
26
|
-
# chdir : lib/core
|
27
|
-
# doc/rdoc/aop:
|
28
|
-
# title : Foo Aop
|
29
|
-
# main : README
|
30
|
-
# chdir : lib/core
|
31
|
-
#
|
32
|
-
#
|
33
|
-
# You can also specify more than one rdoc process by using
|
34
|
-
# an array of such entries.
|
35
|
-
|
36
|
-
# Load RDoc configuration.
|
37
|
-
rdoc_configs = configuration['rdoc']
|
38
|
-
rdoc_configs = [configs] unless Array===configs
|
39
|
-
|
40
|
-
targets = rdoc_configs.collect{ |config| config['output'] }
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
main :rdoc => targets do
|
45
|
-
puts "RDoc complete."
|
46
|
-
end
|
47
|
-
|
48
|
-
|
49
|
-
file configuration['rdoc'] do |config|
|
50
|
-
if config['groups']
|
51
|
-
rdoc_groups(config)
|
52
|
-
else
|
53
|
-
rdoc_target(config)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
#
|
59
|
-
|
60
|
-
rdoc_configs.each do |config|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
file config['output'] do |config|
|
65
|
-
if config['groups']
|
66
|
-
rdoc_groups(config)
|
67
|
-
else
|
68
|
-
rdoc_target(config)
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
end
|
73
|
-
|
74
|
-
# Docuement groups of targets.
|
75
|
-
|
76
|
-
def rdoc_groups(config)
|
77
|
-
site = config.delete('output') || config.delete('op') || 'doc/rdoc'
|
78
|
-
tdir = config['chdir']
|
79
|
-
|
80
|
-
groups = config.delete('groups')
|
81
|
-
groups = TrueClass===groups ? [] : groups
|
82
|
-
|
83
|
-
# the rest
|
84
|
-
rest = []
|
85
|
-
chdir(tdir){rest=glob('**/*').select{|f| File.file?(f)}}
|
86
|
-
rest = rest - groups.flatten
|
87
|
-
groups.concat(rest.collect{ |r| [r] })
|
88
|
-
|
89
|
-
title = config['title'].to_s
|
90
|
-
|
91
|
-
# rdoc each group
|
92
|
-
groups.each do |group|
|
93
|
-
gf1st = File.basename(group.first)
|
94
|
-
gname = gf1st.chomp(File.extname(gf1st))
|
95
|
-
gsite = File.join(site,gname) # *
|
96
|
-
gtitle = "#{title} #{gname.capitalize}".strip
|
97
|
-
|
98
|
-
gconfig = config.merge('title' => gtitle, 'op' => gsite, 'files' => group)
|
99
|
-
|
100
|
-
rdoc_target(gconfig)
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
|
-
# Document target.
|
105
|
-
|
106
|
-
def rdoc_target(config)
|
107
|
-
config = {
|
108
|
-
'template' => 'html',
|
109
|
-
'merge' => true,
|
110
|
-
'inline-source' => true,
|
111
|
-
'files' => '**/*'
|
112
|
-
}.merge(config)
|
113
|
-
|
114
|
-
site = config.delete('output') || config.delete('op') || 'doc/rdoc'
|
115
|
-
tgdir = config.delete('chdir')
|
116
|
-
files = config.delete('files')
|
117
|
-
|
118
|
-
config['op'] = File.expand_path(site)
|
119
|
-
|
120
|
-
config['main'] = File.expand_path(config['main']) if config['main']
|
121
|
-
|
122
|
-
# Helps to ensure we're in the right place.
|
123
|
-
#dir!(File.dirname(site))
|
124
|
-
|
125
|
-
# Remove all old rdocs.
|
126
|
-
rm_r(site) if dir?(site) and safe?(site)
|
127
|
-
|
128
|
-
# Prepare command arguments.
|
129
|
-
vector = [files, config] #.flatten.compact
|
130
|
-
|
131
|
-
# Create Documentation.
|
132
|
-
cd(tgdir) do
|
133
|
-
rdoc(vector.to_console)
|
134
|
-
end
|
135
|
-
|
136
|
-
insert_ads(site)
|
137
|
-
end
|
138
|
-
|
139
|
-
# Insert ads.
|
140
|
-
|
141
|
-
def insert_ads(site)
|
142
|
-
adfile = configuration['ad_file'] || 'meta/site_ad.html'
|
143
|
-
return unless adfile && File.file?(adfile)
|
144
|
-
adtext = File.read(adfile)
|
145
|
-
#puts
|
146
|
-
dirs = Dir.glob(File.join(site,'*/'))
|
147
|
-
dirs.each do |dir|
|
148
|
-
files = Dir.glob(File.join(dir, '**/*.html'))
|
149
|
-
files.each do |file|
|
150
|
-
html = file_read(file)
|
151
|
-
bodi = html.index('<body>')
|
152
|
-
html[bodi + 7] = "\n" + adtext
|
153
|
-
#print "Augmenting #{file}..."
|
154
|
-
file_write(file, html) unless dryrun?
|
155
|
-
#puts "[done]"
|
156
|
-
end
|
157
|
-
end
|
158
|
-
end
|
159
|
-
|
160
|
-
|
161
|
-
class RDocGroup
|
162
|
-
|
163
|
-
attr_accessor :title
|
164
|
-
attr_accessor :main
|
165
|
-
|
166
|
-
def initialize(config, group)
|
167
|
-
populate(config)
|
168
|
-
@group = group
|
169
|
-
end
|
170
|
-
|
171
|
-
def name
|
172
|
-
@name ||= (
|
173
|
-
name = File.basename(group.first)
|
174
|
-
name.chomp(File.extname(name))
|
175
|
-
)
|
176
|
-
end
|
177
|
-
|
178
|
-
def output
|
179
|
-
site = config.delete('output') || config.delete('op') || 'doc/rdoc'
|
180
|
-
end
|
181
|
-
|
182
|
-
end
|
data/doc/images/clipboard.jpg
DELETED
Binary file
|
data/doc/images/clipboard2.png
DELETED
Binary file
|
data/doc/images/milles-tn.jpg
DELETED
Binary file
|
data/doc/images/mints.png
DELETED
Binary file
|
data/doc/images/ratch2.png
DELETED
Binary file
|
data/doc/images/ruby-sm.png
DELETED
Binary file
|
data/doc/images/silver.gif
DELETED
Binary file
|
data/doc/images/toolbox.jpg
DELETED
Binary file
|
data/doc/index.html
DELETED
@@ -1,181 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title>Ratch</title>
|
4
|
-
<link href="style.css" rel="stylesheet" type="text/css"/>
|
5
|
-
<LINK REL="SHORTCUT ICON" HREF="images/ratch1.png"/>
|
6
|
-
</head>
|
7
|
-
<body>
|
8
|
-
|
9
|
-
<div class="promenu">
|
10
|
-
ProUtils :: <a href="http://proutils.rubyforge.org/">Home</a> ·
|
11
|
-
<a href="http://rubyforge.org/news/?group_id=4438">News</a> ·
|
12
|
-
<a href="http://rubyforge.org/frs/?group_id=4438">Download</a> ·
|
13
|
-
<a href="http://rubyforge.org/mail/?group_id=4438">Mail</a> ·
|
14
|
-
<a href="http://rubyforge.org/forum/?group_id=4438">Forum</a> ·
|
15
|
-
<a href="http://rubyforge.org/scm/?group_id=4438">Source</a> ·
|
16
|
-
<a href="http://rubyforge.org/tracker/?group_id=4438">Ticket</a>
|
17
|
-
</div>
|
18
|
-
|
19
|
-
<div class="container">
|
20
|
-
|
21
|
-
<div class="banner">
|
22
|
-
RATCH <img src="images/ruby-sm.png"/>
|
23
|
-
</div>
|
24
|
-
|
25
|
-
<div class="menu">
|
26
|
-
<a href="index.html">Welcome</a>
|
27
|
-
<a href="tutorial.html">Tutorial</a>
|
28
|
-
<a href="rdoc/index.html">Library</a>
|
29
|
-
</div>
|
30
|
-
|
31
|
-
<div class="ad">
|
32
|
-
<script type="text/javascript"><!--
|
33
|
-
google_ad_client = "pub-1126154564663472";
|
34
|
-
//RATCH 728x90, 11/8/07
|
35
|
-
google_ad_slot = "6500283279";
|
36
|
-
google_ad_width = 728;
|
37
|
-
google_ad_height = 90;
|
38
|
-
//--></script>
|
39
|
-
<script type="text/javascript"
|
40
|
-
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
41
|
-
</script>
|
42
|
-
</div>
|
43
|
-
|
44
|
-
<div class="content">
|
45
|
-
<h1 class="top">Welcome</h1>
|
46
|
-
|
47
|
-
|
48
|
-
<p>Ratch is a Ruby-based build tool in the linage of Rake and Reap, but distinguishes
|
49
|
-
itself in it’s closer adherence to the <span class="caps">UNIX</span>-way in that Ratch “targets” are independent
|
50
|
-
scripts. In fact, the name “ratch” derives from the phrase
|
51
|
-
“<u>R</u>uby b<u>atch</u> file”.</p>
|
52
|
-
|
53
|
-
|
54
|
-
<p>Ratch is part of the ProUtils collection. In particular Ratch scripts might take
|
55
|
-
advantage of the <a href="http://proutils.rubyforge.org/box">Box</a> system and can easily be
|
56
|
-
copied and updated via <a href="http://proutils.rubyforge.org/mint">Mint</a>.</p>
|
57
|
-
|
58
|
-
|
59
|
-
<h1>News</h1>
|
60
|
-
|
61
|
-
|
62
|
-
<h3 class="date">2007-11-11</h3>
|
63
|
-
|
64
|
-
|
65
|
-
<h2>From Special to Main</h2>
|
66
|
-
|
67
|
-
|
68
|
-
<p>Ratch is really starting to come together. And I dare say that’s no small statement.
|
69
|
-
I started development many, many months ago with only a hunch that the basic
|
70
|
-
design would be effective—was it even possible to effectively bridge the gap
|
71
|
-
between the shell and script? We may never have found out. Implementation has been
|
72
|
-
challenge at times and more than once a little voice in the back of my head would
|
73
|
-
say “just use Rake”. But if I am anything, it is determined. I really believe
|
74
|
-
in the underlying design of this project—as hard as it might have been get “right”.</p>
|
75
|
-
|
76
|
-
|
77
|
-
<p>But “right” is where I may finally be. Granted I’m still worried about tricky
|
78
|
-
dependency loops, but that’s a rare bird and I have yet to see it happen in practice.
|
79
|
-
And, sure there’s areas of the code that could just use some general spit-and-shine.
|
80
|
-
But in practice, it’s really starting to look good.</p>
|
81
|
-
|
82
|
-
|
83
|
-
<p>For instance, this evening I transitioned from executing all ratch files in an
|
84
|
-
instance of a special runner class (a subclass of Module), to executing
|
85
|
-
in top-level ‘main’ space. This simplifies the start up code a fair bit and now allows
|
86
|
-
<code>load()</code> to work for ratch files just as it does for ruby files—where as before
|
87
|
-
I had to create a special #import method to load the ratch file into the special object.
|
88
|
-
The benefit of this change is that one no longer <em>has</em> to copy any of the pre-made tools
|
89
|
-
distributed with ratch. Instead one can just depend on them like normal code.
|
90
|
-
For instance, my projects tool/stats file looks like this:</p>
|
91
|
-
|
92
|
-
|
93
|
-
<pre>
|
94
|
-
#!/usr/bin/env ratch
|
95
|
-
# code stats
|
96
|
-
load('ratch/toolset/ruby/stats')
|
97
|
-
</pre>
|
98
|
-
|
99
|
-
<p>Of course if you want to make project specific modifications you can still grab a copy
|
100
|
-
and have at it.</p>
|
101
|
-
|
102
|
-
|
103
|
-
<h1>Installation</h1>
|
104
|
-
|
105
|
-
|
106
|
-
<p>Via RubyGems:</p>
|
107
|
-
|
108
|
-
|
109
|
-
<pre><code>$ gem install ratch</code></pre>
|
110
|
-
|
111
|
-
|
112
|
-
<p>With the source code:</p>
|
113
|
-
|
114
|
-
|
115
|
-
<pre><code>$ tar -xzf ratch-x.y.z.tar.gz
|
116
|
-
$ cd ratch-x.y.z
|
117
|
-
$ sudo task/setup</code></pre>
|
118
|
-
|
119
|
-
|
120
|
-
<p>Microsoft Windows users, you’ll have to use ‘<code>ruby task/setup</code>’ instead.</p>
|
121
|
-
|
122
|
-
|
123
|
-
<h1>Development</h1>
|
124
|
-
|
125
|
-
|
126
|
-
<p>Ratch is part of the <a href="http://protuils.rubyforge.org">ProUtils</a> project.</p>
|
127
|
-
|
128
|
-
|
129
|
-
<h2>Anonymous Subversion Access</h2>
|
130
|
-
|
131
|
-
|
132
|
-
<p>This project’s <span class="caps">SVN</span> repository can be checked out through anonymous access with the following command(s).</p>
|
133
|
-
|
134
|
-
|
135
|
-
<pre><code>svn checkout svn://rubyforge.org/var/svn/proutils/ratch
|
136
|
-
svn checkout http://proutils.rubyforge.org/svn/ratch</code></pre>
|
137
|
-
|
138
|
-
|
139
|
-
<h2>Developer Subversion Access via <span class="caps">SSH</span></h2>
|
140
|
-
|
141
|
-
|
142
|
-
<p>Only project developers can access the <span class="caps">SVN</span> tree via this method. <span class="caps">SSH</span> must be installed on your client machine. Substitute developername with the proper values. Enter your site password when prompted.</p>
|
143
|
-
|
144
|
-
|
145
|
-
<pre><code>svn checkout svn+ssh://developername@rubyforge.org/var/svn/proutils/ratch</code></pre>
|
146
|
-
|
147
|
-
|
148
|
-
<h1>Copying</h1>
|
149
|
-
|
150
|
-
|
151
|
-
<p>Ratch—Ruby-based Batch Files</p>
|
152
|
-
|
153
|
-
|
154
|
-
<p>Copyright © 2007 Ψ Τ Corporation</p>
|
155
|
-
|
156
|
-
|
157
|
-
<p>This program is free software: you can redistribute it and/or modify
|
158
|
-
it under the terms of the <span class="caps">GNU</span> General Public License as published by
|
159
|
-
the Free Software Foundation, either version 3 of the License, or
|
160
|
-
(at your option) any later version.</p>
|
161
|
-
|
162
|
-
|
163
|
-
<p>This program is distributed in the hope that it will be useful,
|
164
|
-
but <span class="caps">WITHOUT ANY WARRANTY</span>; without even the implied warranty of
|
165
|
-
<span class="caps">MERCHANTABILITY</span> or <span class="caps">FITNESS FOR A PARTICULAR PURPOSE</span>. See the
|
166
|
-
<span class="caps">GNU</span> General Public License for more details.</p>
|
167
|
-
|
168
|
-
|
169
|
-
<p>You should have received a copy of the <span class="caps">GNU</span> General Public License
|
170
|
-
along with this program. If not, see <http://www.gnu.org/licenses/>.</p>
|
171
|
-
</div>
|
172
|
-
|
173
|
-
<div class="copyright">
|
174
|
-
Ratch, Copyright © 2007 <a href="http://psytower.info">Ψ Τ Corp.</a> <br/><br/>
|
175
|
-
Website design by <a href="http://psytower.info/transcode/">TransCrankItOut</a> using <a href="">Webrite</a>!
|
176
|
-
</div>
|
177
|
-
|
178
|
-
</div>
|
179
|
-
|
180
|
-
</body>
|
181
|
-
</html>
|
data/doc/notes/original.rb
DELETED
@@ -1,308 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
PKG_TITLE = 'WhiteCloth'
|
4
|
-
PKG_NAME = 'whitecloth'
|
5
|
-
PKG_VERSION = '1'
|
6
|
-
PKG_AUTHOR = 'Thomas Sawyer'
|
7
|
-
PKG_EMAIL = 'transami@runbox.com'
|
8
|
-
PKG_SUMMARY = 'WhiteCloth is an implementation of ArtML'
|
9
|
-
PKG_DESCRIPTION = 'WhiteCloth is a Ruby implementation of ArtML'
|
10
|
-
|
11
|
-
# site info
|
12
|
-
# remark out if you don't need
|
13
|
-
PKG_HOMEPAGE = 'http://whitecloth.rubyforge.org'
|
14
|
-
PKG_RUBYFORGE_PROJECT = 'whitecloth'
|
15
|
-
PKG_RUBYFORGE_PASS = nil
|
16
|
-
|
17
|
-
# all package files
|
18
|
-
PKG_FILES = [ 'lib/**/*', 'test/**/*', 'samples/**/*', 'doc/**/*', '[A-Z]*', 'Rakefile' ]
|
19
|
-
|
20
|
-
# rdoc
|
21
|
-
RDOC_TITLE = PKG_TITLE
|
22
|
-
RDOC_DIR = 'doc'
|
23
|
-
RDOC_TEMPLATE = 'kilmer'
|
24
|
-
RDOC_OPTIONS = ''
|
25
|
-
RDOC_INCLUDE = [ 'VERSION', 'README', 'CHANGELOG', 'TODO', 'COPYING', 'lib/**/*.rb', 'bin/**/*.rb' ]
|
26
|
-
RDOC_EXCLUDE = []
|
27
|
-
|
28
|
-
# include in distribution
|
29
|
-
PKG_DIST_DIRS = [ 'bin', 'lib', 'test', 'samples' ]
|
30
|
-
PKG_DIST_FILES = [ 'README', 'TODO', 'CHANGELOG', 'VERSION', 'LICENSE', 'Rakefile' ]
|
31
|
-
|
32
|
-
# tests
|
33
|
-
PKG_TEST_DIR = 'test'
|
34
|
-
PKG_TEST_FILES = [ 'test/*_test.rb', 'test/**/*_test.rb' ]
|
35
|
-
|
36
|
-
=begin
|
37
|
-
# library files for manual install
|
38
|
-
PKG_LIB_DIR = 'lib'
|
39
|
-
PKG_LIB_MKDIRS = '**/*/'
|
40
|
-
PKG_LIB_FILES = [ '**/*.rb', '**/*.yaml' ]
|
41
|
-
PKG_LIB_DEPRECATE = []
|
42
|
-
|
43
|
-
# binary files for manual install
|
44
|
-
PKG_BIN_DIR = 'bin'
|
45
|
-
PKG_BIN_FILES = '**/*'
|
46
|
-
PKG_BIN_DEPRECATE = []
|
47
|
-
=end
|
48
|
-
|
49
|
-
#***************************************************************************
|
50
|
-
# The PackMule Rakefile v0.1
|
51
|
-
# PackMule can run tests, build packages and gems, manually install,
|
52
|
-
# generate rdocs, and publish them. CVS support might be added later.
|
53
|
-
#
|
54
|
-
# In general, layout your project directory as follows:
|
55
|
-
# - lib/
|
56
|
-
# - lib/#{lib_name}/ if you need a lib dir
|
57
|
-
# - bin/
|
58
|
-
# - test/
|
59
|
-
# - demo/ -or- examples/ -or- samples/
|
60
|
-
# - doc/ -and;or- rdoc/
|
61
|
-
# The test dir can have subdirs, but tests should be named
|
62
|
-
# like '#{name}_test.rb' or 'test_#{name}.rb'.
|
63
|
-
#
|
64
|
-
# Then use the Rake.yaml config file designed for this form.
|
65
|
-
# To get a blank config for this form type:
|
66
|
-
# > rake form
|
67
|
-
# This will send the form to stdout. There may be a line like
|
68
|
-
# "(in ...)" at the beginning, just remove it or remark it.
|
69
|
-
#***************************************************************************
|
70
|
-
|
71
|
-
require 'rake'
|
72
|
-
require 'rubygems'
|
73
|
-
require 'rake/testtask'
|
74
|
-
require 'rake/rdoctask'
|
75
|
-
require 'rake/packagetask'
|
76
|
-
require 'rake/gempackagetask'
|
77
|
-
require 'rake/contrib/rubyforgepublisher'
|
78
|
-
|
79
|
-
#################################################
|
80
|
-
# load config from Rake.yaml and make constants #
|
81
|
-
#################################################
|
82
|
-
#YAML::load( File.open('Rake.yaml') ).each{|c,v| self.class.const_set(c,v)}
|
83
|
-
|
84
|
-
|
85
|
-
##
|
86
|
-
# = Default Task
|
87
|
-
##
|
88
|
-
|
89
|
-
desc "Default Task (test)"
|
90
|
-
task :default => [ :test ]
|
91
|
-
|
92
|
-
|
93
|
-
##
|
94
|
-
# = Run Unit Tests
|
95
|
-
##
|
96
|
-
|
97
|
-
Rake::TestTask.new("test") { |t|
|
98
|
-
#t.desc "Run all tests"
|
99
|
-
t.libs << PKG_TEST_DIR
|
100
|
-
PKG_TEST_FILES.each { |pat| t.pattern = pat }
|
101
|
-
t.verbose = true
|
102
|
-
}
|
103
|
-
|
104
|
-
|
105
|
-
##
|
106
|
-
# = Genereate RDoc Documentation
|
107
|
-
##
|
108
|
-
|
109
|
-
Rake::RDocTask.new { |rdoc|
|
110
|
-
rdoc.rdoc_dir = RDOC_DIR
|
111
|
-
rdoc.template = RDOC_TEMPLATE
|
112
|
-
rdoc.title = RDOC_TITLE
|
113
|
-
rdoc.options << '--line-numbers --inline-source ' + RDOC_OPTIONS
|
114
|
-
rdoc.rdoc_files.include(*RDOC_INCLUDE)
|
115
|
-
rdoc.rdoc_files.exclude(*RDOC_EXCLUDE)
|
116
|
-
rdoc.rdoc_files.delete_if { |f| ! File.exist?(f) }
|
117
|
-
}
|
118
|
-
|
119
|
-
|
120
|
-
##
|
121
|
-
# = Publish Documentation
|
122
|
-
##
|
123
|
-
|
124
|
-
# Publish documentation
|
125
|
-
#desc "Publish the API documentation"
|
126
|
-
#task :pdoc => [:rdoc] do
|
127
|
-
# Rake::SshDirPublisher.new("david@hunter.5th.dk", "sites/rubyonrails.org/ar", "doc").upload
|
128
|
-
#end
|
129
|
-
|
130
|
-
if PKG_RUBYFORGE_PROJECT
|
131
|
-
desc "Publish to RubyForge"
|
132
|
-
task :rubyforge do
|
133
|
-
Rake::RubyForgePublisher.new(PKG_RUBYFORGE_PROJECT, PKG_RUBYFORGE_PASS).upload
|
134
|
-
end
|
135
|
-
end
|
136
|
-
|
137
|
-
|
138
|
-
##
|
139
|
-
# = Create Compressed Packages
|
140
|
-
##
|
141
|
-
|
142
|
-
dist_dirs = PKG_DIST_DIRS
|
143
|
-
|
144
|
-
spec = Gem::Specification.new do |s|
|
145
|
-
s.name = PKG_NAME
|
146
|
-
s.version = PKG_VERSION
|
147
|
-
s.summary = PKG_SUMMARY
|
148
|
-
s.description = PKG_DESCRIPTION
|
149
|
-
|
150
|
-
s.files = PKG_DIST_FILES
|
151
|
-
dist_dirs.each do |dir|
|
152
|
-
s.files.concat Dir.glob( "#{dir}/**/*" ).delete_if { |item| item.include?( "CVS" ) }
|
153
|
-
end
|
154
|
-
#s.files.delete "test/fixtures/fixture_database.sqlite"
|
155
|
-
s.require_path = 'lib'
|
156
|
-
s.autorequire = '#{PKG_NAME}'
|
157
|
-
s.has_rdoc = true
|
158
|
-
s.author = PKG_AUTHOR
|
159
|
-
s.email = PKG_EMAIL
|
160
|
-
s.homepage = PKG_HOMEPAGE if PKG_HOMEPAGE
|
161
|
-
s.rubyforge_project = PKG_RUBYFORGE_PROJECT if PKG_RUBYFORGE_PROJECT
|
162
|
-
end
|
163
|
-
|
164
|
-
Rake::GemPackageTask.new(spec) do |p|
|
165
|
-
p.gem_spec = spec
|
166
|
-
p.need_tar = true
|
167
|
-
p.need_zip = true
|
168
|
-
end
|
169
|
-
|
170
|
-
|
171
|
-
##
|
172
|
-
# = Line Count
|
173
|
-
##
|
174
|
-
|
175
|
-
desc "Line Count"
|
176
|
-
task :lines do
|
177
|
-
lines = 0
|
178
|
-
codelines = 0
|
179
|
-
Dir.foreach("lib/#{PKG_NAME}") { |file_name|
|
180
|
-
next unless file_name =~ /.*rb/
|
181
|
-
|
182
|
-
f = File.open("lib/#{PKG_NAME}/" + file_name)
|
183
|
-
|
184
|
-
while line = f.gets
|
185
|
-
lines += 1
|
186
|
-
next if line =~ /^\s*$/
|
187
|
-
next if line =~ /^\s*#/
|
188
|
-
codelines += 1
|
189
|
-
end
|
190
|
-
}
|
191
|
-
puts "Lines #{lines}, LOC #{codelines}"
|
192
|
-
end
|
193
|
-
|
194
|
-
|
195
|
-
=begin
|
196
|
-
##
|
197
|
-
# = Manual Install
|
198
|
-
##
|
199
|
-
|
200
|
-
desc "Manual Installation"
|
201
|
-
task :install do
|
202
|
-
|
203
|
-
# install
|
204
|
-
# this was adapted from active record's install.rb
|
205
|
-
# by way of rdoc's install.rb
|
206
|
-
# by way of Log4r's install.rb
|
207
|
-
# with some modifications from ruby-gems' install.rb ;)
|
208
|
-
|
209
|
-
require 'rbconfig'
|
210
|
-
require 'find'
|
211
|
-
require 'ftools'
|
212
|
-
require 'fileutils'
|
213
|
-
|
214
|
-
include Config
|
215
|
-
|
216
|
-
#$sitedir = CONFIG["sitelibdir"]
|
217
|
-
#unless $sitedir
|
218
|
-
# version = CONFIG["MAJOR"] + "." + CONFIG["MINOR"]
|
219
|
-
# $libdir = File.join(CONFIG["libdir"], "ruby", version)
|
220
|
-
#
|
221
|
-
# $sitedir = $:.find {|x| x =~ /site_ruby/ }
|
222
|
-
# if !$sitedir
|
223
|
-
# $sitedir = File.join($libdir, "site_ruby")
|
224
|
-
# elsif $sitedir !~ Regexp.quote(version)
|
225
|
-
# $sitedir = File.join($sitedir, version)
|
226
|
-
# end
|
227
|
-
#end
|
228
|
-
|
229
|
-
$srcdir = CONFIG["srcdir"]
|
230
|
-
$version = CONFIG["MAJOR"]+"."+CONFIG["MINOR"]
|
231
|
-
$libdir = File.join(CONFIG["libdir"], "ruby", $version)
|
232
|
-
$bindir = CONFIG['bindir']
|
233
|
-
$archdir = File.join($libdir, CONFIG["arch"])
|
234
|
-
$sitedir = CONFIG["sitelibdir"]
|
235
|
-
if !$sitedir
|
236
|
-
$sitedir = $:.find {|x| x =~ /site_ruby$/}
|
237
|
-
if !$sitedir
|
238
|
-
$sitedir = File.join($libdir, "site_ruby")
|
239
|
-
elsif $sitedir !~ Regexp.new(Regexp.quote($version))
|
240
|
-
$sitedir = File.join($site_libdir, $version)
|
241
|
-
end
|
242
|
-
end
|
243
|
-
|
244
|
-
# get current dir
|
245
|
-
current_dir = Dir.pwd
|
246
|
-
|
247
|
-
### install lib files
|
248
|
-
|
249
|
-
if FileTest.directory?(PKG_LIB_DIR)
|
250
|
-
|
251
|
-
# change dir to package lib dir
|
252
|
-
Dir.chdir(PKG_LIB_DIR)
|
253
|
-
|
254
|
-
# make lib dirs in ruby sitelibdir
|
255
|
-
makedirs = FileList[*PKG_LIB_MKDIRS].to_a
|
256
|
-
makedirs.each {|f| File::makedirs( File.join( $sitedir, *f.split(/\//) ) ) }
|
257
|
-
|
258
|
-
# deprecated files that should be removed
|
259
|
-
deprecated = FileList[*PKG_LIB_DEPRECATE].to_a
|
260
|
-
|
261
|
-
# files to install in library path
|
262
|
-
files = FileList[*PKG_LIB_FILES].to_a
|
263
|
-
|
264
|
-
# the actual gruntwork
|
265
|
-
File::safe_unlink *deprecated.collect{|f| File.join($sitedir, f.split(/\//))}
|
266
|
-
files.each do |f|
|
267
|
-
File::install(f, File.join($sitedir, *f.split(/\//)), 0644, true)
|
268
|
-
end
|
269
|
-
|
270
|
-
# change dir back
|
271
|
-
Dir.chdir(current_dir)
|
272
|
-
|
273
|
-
end
|
274
|
-
|
275
|
-
### install bin files
|
276
|
-
|
277
|
-
if FileTest.directory?(PKG_BIN_DIR)
|
278
|
-
|
279
|
-
# change dir to package bin dir
|
280
|
-
Dir.chdir(PKG_BIN_DIR)
|
281
|
-
|
282
|
-
is_windows_platform = CONFIG["arch"] =~ /dos|win32/i
|
283
|
-
|
284
|
-
# files to install in bin path
|
285
|
-
files = FileList[*PKG_BIN_FILES].to_a
|
286
|
-
|
287
|
-
# deprecated files that should be removed
|
288
|
-
deprecated = FileList[*PKG_BIN_DEPRECATE].to_a
|
289
|
-
|
290
|
-
# the actual gruntwork
|
291
|
-
File::safe_unlink *deprecated.collect{|f| File.join($bindir, f.split(/\//))}
|
292
|
-
files.each do |f|
|
293
|
-
target = File.join($bindir, *f.split(/\//))
|
294
|
-
File::install(f, target, 0755, true)
|
295
|
-
if is_windows_platform
|
296
|
-
File.open("#{target}.cmd", "w") do |file|
|
297
|
-
file.puts "@ruby #{target} %1 %2 %3 %4 %5 %6 %7 %8 %9"
|
298
|
-
end
|
299
|
-
end
|
300
|
-
end
|
301
|
-
|
302
|
-
# change dir back
|
303
|
-
Dir.chdir(current_dir)
|
304
|
-
|
305
|
-
end
|
306
|
-
=end
|
307
|
-
|
308
|
-
end
|