If you're interested in trying it out, I just pushed
http://github.com/davidlee/boots

git clone git://github.com/davidlee/boots.git
cd boots
[sudo] ruby setup.rb

This will install it to the first site_ruby folder in your load path (should
work fine w/ rvm)

You should then be able to do
require 'boots'
boot '../spec_helper'

It should work in 1.8 and 1.9 - if anyone knows how I can set this thing up
so that a gem install can trigger the install to site_ruby, please let me
know.

cheers,
David

On Wed, Dec 23, 2009 at 12:39 PM, Chris Lloyd
<[email protected]>wrote:

> 2009/12/23 Tim Lucas <[email protected]>
>
> It'd be nice if Kernel#require detected "./" or ".." at the start,
>> similar to node.js
>>
>
> I can only dream about require one day working like:
>
> require :spec_helper    # Uses $:
> require '../spec_helper' # Path relative to __FILE__
>
> Unfortunately require is a global function so we can't override it like so:
>
> def require(file)
>   if file.is_a?(String)
>     # Would need to use caller hack here.
>     super(File.join(File.dirname(__FILE__), file.to_s))
>   else
>     super(file)
>   end
> end
>
> For those interested, look at lines 7380 & 8389 of eval.c. (1.8.7)
> --
> chrislloyd.com.au
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby or Rails Oceania" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rails-oceania%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rails-oceania?hl=en.
>



-- 
cheers,
David Lee

--

You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.


Reply via email to