ruby-nessus
ruby-nessus copied to clipboard
Switch 'require' to 'require_relative'?
(I don't know what best practice is here.)
I want to extend a portion of the library. In my file that I'm using to test it I do require_relative '../ruby-nessus/lib/nessus.rb'
However, internal to the lib/ directory everything uses require. So my script does a 'relative require' which loads files that do a regular 'require', which is using the installed gem (this is my best understanding of what's actually happening). Short of creating a gem and installing it every time I make a change, what is the best way of handing this?
I don't have the gem installed where I'm doing the testing work, but this is what I'm using to load the file. Hope this works for you.
$LOAD_PATH << 'lib' require 'nessus'
@fwininger has this been fixed with anything added by you recently.
I think it's not a good pratices to extend the library with a require relative. I recommand to use a Gemfile and bundle to require the gem in a other project.
@fwininger cool, agree