You can get the sysutils package (http://sysutils.rubyforge.org/) for
some quick and easy access to that sort of thing. The downside is
almost all of them are very gems dependent, so its difficult to
install them standalone.
Sys/Admin (User & Group information, as well as some other stuff I
don't use as much)
Sys/Uname (Has some or all of the stuff you want, and is quite usefull)
Sys/Host (just hostname stuff)
Sys/Cpu
Please search the archives - this has come up at least twice recently,
with discussion about regexps that do and don't work, and gems that
exist to do this for you.
···
On Nov 29, 8:39 am, unbewusst.s...@weltanschauung.com.invalid (Une Bévue) wrote:
because i have some part of a script only running on MacOS X ony i'd
like to know how to detect the platform from a ruby script.
You can detect the user's platform by utilizing the RUBY_PLATFORM special variable.
Phrogz wrote:
···
On Nov 29, 8:39 am, unbewusst.s...@weltanschauung.com.invalid (Une > Bévue) wrote:
because i have some part of a script only running on MacOS X ony i'd
like to know how to detect the platform from a ruby script.
Please search the archives - this has come up at least twice recently,
with discussion about regexps that do and don't work, and gems that
exist to do this for you.
You can get the sysutils package (http://sysutils.rubyforge.org/\) for
some quick and easy access to that sort of thing. The downside is
almost all of them are very gems dependent, so its difficult to
install them standalone.
hum, I'll see what's inside sys-uname-0.8.2...
i've found "tc_uname.rb" giving some light on what to check in
RUBY_PLATFORM
i think there is no need, for me, to install sys-uname.
thanks for your reply !
Sys/Uname (Has some or all of the stuff you want, and is quite usefull)