Release Name: 0.7.0
Notes:
= SysInfo - v0.6
All your system-independent infoz in one handy class.
SysInfo does a takes a very quick glance at the system it's running on and exposes the results as YAML, JSON, CSV, or TSV. It also determines a platform identifier for the system that takes the form: VM-OS-IMPLEMENTATION-ARCHITECTURE.
=== Platform Identifier Examples
ruby-unix-osx-i386
ruby-unix-osx-powerpc
ruby-unix-linux-x86_64
java-win32-windows-i386
java-win32-mingw-i386
For the complete list of operating systems, implementations and architectures that SysInfo is aware of, see:
* <tt>$ sysinfo os</tt>
* <tt>$ sysinfo impl</tt>
* <tt>$ sysinfo arch</tt>
== Usage -- Library
sysinfo = SysInfo.new
p sysinfo.vm # => ruby
p sysinfo.os # => unix
p sysinfo.impl # => osx
p sysinfo.arch # => i386
p sysinfo.platform # => ruby-unix
p sysinfo.to_s # => ruby-unix-osx-i386
p sysinfo.user # => delano
p sysinfo.home # => /Users/delano
p sysinfo.uptime # => 290.429 (hours)
p sysinfo.shell # => /bin/bash
p sysinfo.paths # => [/sbin, /bin, /usr/bin, ...]
p sysinfo.hostname # => walter
p sysinfo.ipaddress_internal # => 10.0.1.2
p sysinfo.uptime # => 290.573655656974
p sysinfo.ruby # => [1,9,1]
== Usage -- Executable
$ sysinfo
ruby-unix-osx-i386
$ /usr/jruby/bin/sysinfo
java-unix-osx-x86_64
$ sysinfo -f yaml
:vm: :ruby
:os: :unix
:impl: :osx
...
:shell: :"/bin/bash"
:user: delano
$ sysinfo -f json
{"vm":"ruby","os":"unix","impl":"osx", ..., "shell":"\/bin\/bash","user":"delano"}
$ sysinfo -f csv
ruby,unix,osx, ... /bin/bash,delano
== Installation
Via Rubygems, one of:
$ sudo gem install sysinfo
$ sudo gem install delano-sysinfo --source http://gems.github.com/
or via download:
* sysinfo-latest.tar.gz[http://github.com/delano/sysinfo/tarball/latest]
* sysinfo-latest.zip[http://github.com/delano/sysinfo/zipball/latest]
== Prerequisites
* Ruby 1.8, Ruby 1.9, or JRuby 1.2
* Storable[http://github.com/delano/storable]
== Credits
* Delano Mandelbaum (delano@solutious.com)
* Portions of this code were originally from Amazon's EC2 AMI tools, specifically lib/platform.rb.
== License
See: LICENSE.txt
Changes:
SYSINFO, CHANGES
#### 0.7.0 (2009-08-24) #############################
NOTE: SysInfo strings are not compatible with previous releases.
* FIXED: Don't require Win32API when running in JRuby
* CHANGE: All references to "win32" are now "windows". This resolves
the ambiguity between the OS and the Win32 API.
* CHANGE: All references to "i386" are now "x86"
#### 0.6.3 (2009-08-03) #############################
* FIXED: "warning: already initialized constant System" in JRuby
#### 0.6.2 (2009-06-30) #############################
* CHANGE: Updated bin/sysinfo for Drydock 0.6.6
* CHANGE: Removed "require 'rubygems'"
#### 0.6.1 (2009-05-25) #############################
* CHANGE: Removed RedCloth dependency from gemspec.
#### 0.6.0 (2009-06-09) ###############################
* CHANGE: "universal" mapped to "i386". Now: "x86_64"
* CHANGE: "x86" mapped to "386". Now: "x86"
* CHANGE: /i\d86/ mapped to "386". Now: "x86"
#### 0.5.1 (2009-05-07) ###############################
* CHANGE: Hella cleanup in preparation for future expansion.
* CHANGE: Modified platform, now returns VM-OS instead of OS-IMPL
* ADDED: to_s which returns a full platform string
* ADDED: sysinfo executable
#### 0.5 (2009-05-07) ###############################
* First public release. See commit history for solutious-stella, solutious-rudy,
and delano-rye for complete history of SysInfo (was SystemInfo).
|