Skip to content
Browse files

0.8.0 (json is the default format)

  • Loading branch information...
1 parent 4404798 commit 5d845aa77c0f9ffa0e91bfc679ebac5208bffb50 @delano committed Apr 30, 2012
Showing with 13 additions and 13 deletions.
  1. +6 −0 CHANGES.txt
  2. +2 −2 bin/sysinfo
  3. +4 −10 lib/sysinfo.rb
  4. +1 −1 sysinfo.gemspec
View
6 CHANGES.txt
@@ -1,5 +1,11 @@
SYSINFO, CHANGES
+#### 0.8.0 (2012-04-30) #############################
+
+* CHANGE: Removed #to_s
+* CHANGE: #platform now returns VM-OS-IMPL-ARCH
+* CHANGE: json is the default output format
+
#### 0.7.2 (2010-02-12) #############################
* CHANGE: Removed hanna dependency [Diego Elio 'Flameeyes' Pettenò]
View
4 bin/sysinfo
@@ -29,9 +29,9 @@ module SysInfoCLI #:nodoc:
about "Display system information"
command :info do |obj|
format = obj.global.format || :string
- format = :yaml if obj.global.verbose == true
+ format = :json if obj.global.verbose == true
si = SysInfo.new
- puts si.dump(format)
+ puts format.to_s == 'string' ? si.platform : si.dump(format)
end
about "Display list of known architectures"
View
14 lib/sysinfo.rb
@@ -9,7 +9,7 @@
# specifically lib/platform.rb.
class SysInfo < Storable
unless defined?(IMPLEMENTATIONS)
- VERSION = "0.7.3".freeze
+ VERSION = "0.8.0".freeze
IMPLEMENTATIONS = [
# These are for JRuby, System.getproperty('os.name').
@@ -140,16 +140,10 @@ def find_ipaddress_internal
Socket.do_not_reverse_lookup = orig
end
- # Returns a Symbol of the short platform descriptor in the format: VM-OS
- # e.g. <tt>:java-unix</tt>
- def platform
- "#{@vm}-#{@os}".to_sym
- end
-
# Returns a String of the full platform descriptor in the format: VM-OS-IMPL-ARCH
# e.g. <tt>java-unix-osx-x86_64</tt>
- def to_s(*args)
- "#{@vm}-#{@os}-#{@impl}-#{@arch}".to_sym
+ def platform
+ "#{@vm}-#{@os}-#{@impl}-#{@arch}"
end
# Returns the environment paths as an Array
@@ -275,5 +269,5 @@ def ip_address_internal_alt
if $0 == __FILE__
- puts SysInfo.new.to_yaml
+ puts SysInfo.new.dump('json')
end
View
2 sysinfo.gemspec
@@ -1,7 +1,7 @@
@spec = Gem::Specification.new do |s|
s.name = "sysinfo"
s.rubyforge_project = "sysinfo"
- s.version = "0.7.3"
+ s.version = "0.8.0"
s.summary = "SysInfo: All your system-independent infoz in one handy class. "
s.description = s.summary
s.author = "Delano Mandelbaum"

0 comments on commit 5d845aa

Please sign in to comment.
Something went wrong with that request. Please try again.