My current implementation uses the autorequire attribute of a Gem object to determine which is the root library that needs to be require'd by rails on start up.
Then I was reminded that autorequire is being/has been deprecated - http://redhanded.hobix.com/inspect/autorequireIsBasicallyGoneEveryone.html
So now I'm unsure of how rubygems + require work together.
If I have a gem called "project_one", and a file "lib/project_one.rb", and my external code does "require 'project_one'" I expect that the gem's project_one.rb file will be loaded, which probably then loads other files in the lib/ folder structure. But I don't know why, and I don't know what happens if the gem is called "project_one" and there isn't a "lib/project_one.rb" file, instead a "lib/code.rb" file that needs to be required instead.
Is there docco around to explain this?
Also, in the gems-instead-of-plugins case, if I shouldn't use autorequire (or if there are lots of gems that haven't set it) is it a safe bet to assume that there will be a "lib/<gem_name>.rb" file that should be loaded/required?
Nic
--
Dr Nic Williams
http://www.drnicwilliams.com - Ruby/Rails blog
skype: nicwilliams
(m) +31 62 494 8552
(p) +61 7 3102 3237 (finds me anywhere in the world)
(f) +61 7 3305 7572 (sends fax to my email)
_______________________________________________ Rubygems-developers mailing list [email protected] http://rubyforge.org/mailman/listinfo/rubygems-developers
