Indeed! Those should always be considerations when making calls to
external binaries. But given those considerations, no need to repeat
things. Fact is, many things are ported easily because of such
binaries being pretty standard on *nix systems.
You could also always bundle those with it (if the licensing allows).
Point is, if you don't have to write something, don't do it.
I'm talking about duct tape, pretty much like what Perl is often used
for. (no offense to anyone, but I couldn't care less what anyone does
with windows, this sort of thing will work on most *nixes and a
windows DOS command should exist as well, it's part of porting. At
some level there are dependencies to care about and you can't support
ever version of every platform, it's just impossible.)
As for being a security risk, well, if you have Ruby executables then
you already have the same level of risk as calling any binary on the
system by any other means. You can't protect people from themselves.
Installers do this stuff all the time.
On Mar 10, 2007, at 6:20 PM, Choong Wei Tjeng wrote:
> Here's a little something I happened to stumble upon yesterday
> though. I
> think these are pretty sound arguments against calling external
> commands, when you have the choice. Might want to take them into
> consideration.
>
> http://www.caliban.org/ruby/rubyguide.shtml#external