R
R.. Kumar
I've written a command line program. Would like to distribute it as a
gem.
I've run jeweler <myproject> and generated a structure.
However, I am not sure how to go about it. My project consists of one
main file (lets call it main.rb), it include a couple other files. The
main file is executable, so when installed should go into the path (e.g.
/opt/local/bin).
Should my main file go into "lib" or "bin"?
Looking at jeweler itself, i see a file installed in
/opt/local/bin/jeweler that loads jeweler, it says its been generated by
rubygems. How is this done?
I presume the support files should go into lib/<myproject>.
Also, currently I do the argument parsing (optparse) in a if __FILE__ =
$0 block in the main file. Will this have to be moved to a method in the
class of the main file. Or will this have to be moved to a file in bin
folder?
thx for help.
gem.
I've run jeweler <myproject> and generated a structure.
However, I am not sure how to go about it. My project consists of one
main file (lets call it main.rb), it include a couple other files. The
main file is executable, so when installed should go into the path (e.g.
/opt/local/bin).
Should my main file go into "lib" or "bin"?
Looking at jeweler itself, i see a file installed in
/opt/local/bin/jeweler that loads jeweler, it says its been generated by
rubygems. How is this done?
I presume the support files should go into lib/<myproject>.
Also, currently I do the argument parsing (optparse) in a if __FILE__ =
$0 block in the main file. Will this have to be moved to a method in the
class of the main file. Or will this have to be moved to a file in bin
folder?
thx for help.