RAA - darb/0.2

darb / 0.2

Short description: DATA-Archived Ruby Script
Category: Application/Package management
Status: alpha
Created: 2005-08-13 18:52:23 GMT
Last update: 2005-08-13 18:53:37 GMT
Owner: Joel VanderWerf (Projects of this owner)
Homepage: http://redshift.sourceforge.net/darb/
Download: http://redshift.sourceforge.net/darb/
License: Ruby's
Dependency:
None
Description:

Combines a main script and a list of library files it requires into a single script file. The library files are embedded in the DATA section of this script and loaded on demand using a custom implementation of require that reads from DATA.

Synopsis

  $ cat main.rb
  require 'foo'
  require 'bar'
  p $LOADED_FEATURES[-2,2]

  $ touch foo.rb bar.rb
  $ darb main.rb foo.rb bar.rb >arc.rb
  $ rm foo.rb bar.rb
  $ ruby arc.rb
  ["foo.rb", "bar.rb"]

Changes since 0.1:

  • better help text
  • shows help if command line is empty or has -h or —help
  • generates a hashbang line if darb itself has one
  • format of feature name in $LOADED_FEATURES is now consistent with Kernel#require
  • now works correctly when some or all input files have cr-lf instead of just lf
  • archives generated on windows run on unix/linux and vice versa

Still broken:

  • autoload doesn’t look inside the archive, so autoload of external libraries is ok, but not autoload of archived files. Since ruby’s autoload code does not call #require, getting this to work will involve reimplementing autoload using #const_missing.
Versions: [0.3 (2006-04-29)] [0.2 (2005-08-13)]

Edit this project (for project owner)

back to RAA top