proutils / setup
- Source
- Commits
- Network (2)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
.config/ | ||
| |
.gitignore | ||
| |
.setup/ | ||
| |
COPYING | ||
| |
HISTORY | ||
| |
README.rdoc | ||
| |
bin/ | ||
| |
doc/ | ||
| |
lib/ | ||
| |
meta/ | ||
| |
script/ | ||
| |
site/ | ||
| |
task/ | ||
| |
test/ | ||
| |
work/ |
Ruby Setup
INTRODUCTION
Every well practiced Rubyist is aware of Minero Aoki’s ever +setup.rb+ script. It’s how most of us used to install our Ruby programs before RubyGems came along. And it’s still mighty useful in certain scenarios, not the least of which is the job of the distro package maintainer.
Ruby Setup converts setup.rb into a stand-alone application. No longer requiring the distribution of the setup.rb script with every Ruby package. Just instruct one’s users to install Ruby Setup (gem install setup) and go from there. As long as a project is setup.rb compliant, as most are, then there is little to nothing it’s developer must do.
IMPORTANT
There a couple very important difference between the old 3.4.1 verison of the setup.rb and Ruby Setup.
- The directory convention ‘conf’ has been change to ‘etc’.
- Multi-package project layouts are no longer supported.
- Metaconfig and Hooks are handled via singleton extensions.
- No longer supports versions of Ruby older than v1.6.3.
STATUS
Version 5.0.0 is a major re-engineering of setup.rb. Although it is fairly well tested, as such, it should be considered betaware until it accumulates enough use in the field. I will update this message when I feel a new status has been achieved (likely accompanied by an updated release).
INSTALLATION
The easy way to install is via RubyGems.
$ sudo gem install setup
To install Setup manually you need to "boot-strap" it. Download the tarball, and from the decompressed package directory run:
$ ruby script/setup
HOW TO USE
To use setup.rb, a project must conform to the setup.rb standard layout. Please see the documentation on the website if you need to know more about what this entails. Most project already follow the standard since it was setup.rb that originally popularized most of the current layout conventions. (Note that the on-line documentation is slightly out of sync with the latest release.)
Usage is as simple as:
$ setup.rb
This is equivalent to running the four main phases in sequence.
$ setup.rb config $ setup.rb make $ setup.rb test $ setup.rb install
Where config determines the configuration of your Ruby distribution, make compiles any extensions, test runs any feature tests provided, and install copies project files to the appropriate places on your system.
All four can be run in one go via all.
$ setup.rb all
If you later decide you want to remove a program from your system, use uninstall.
$ setup.rb uninstall
Uninstalling is made possible by the ‘InstalledFiles’ file that is generated by the install process. If that file is deleted than you will not be able to uninstall. (You can get around this be reinstalling first though).
Setup also support an extra phase, document.
$ setup.rb document
Documenting generates ri documents for the program and automatically places them in the appropriate system location. Documenting is not part of the standard sequence due to the way ri documentation is handled by the rdoc tool. It is not possible to uninstall it. So this phase must be run seprate from the others. Please only use the document command when you know you for sure you want the documentation in your ri system. (Hopefully this can be fixed in the near future.)
Because there is now a deverse selection of testing tools available for Ruby, testing only happens if the developer has provided a test runner command script (.setup/testrc.rb). Keep in mind that testing may require support libraries such as RSpec, Lemon, Bacon, QED or Cucumber. You can deactivate testing via the —no-test option if needed.
You can clean up any by-products of the make process with:
$ setup.rb clean
And restore extensions to their pristine state with:
$ setup.rb distclean
For further details on using +setup.rb+, or developing a project that can take advantage of setup.rb’s special features, please see the website.
COPYRIGHTS
Copyright © 2008,2009 Thomas Sawyer
Copyright © 2002,2005 Minero Aoki
GNU LGPL, Lesser General Public License version 2.1.
For details of LGPL, see the COPYING file.
7trans
transfire@gmail.com
http://proutils.github.com
Minero Aoki
aamine@loveruby.net
http://i.loveruby.net

