what 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,7 +45,9 @@ module What
45
45
  free = line.match(/(\d+)\D+?free/)[1].to_i
46
46
  [used + free, free]
47
47
  else
48
- `cat /proc/meminfo`.split("\n")[0..1].map{|line| line.match(/(\d+)/)[1].to_i}
48
+ lines = `cat /proc/meminfo`.split("\n")[0...4]
49
+ total, free, buffers, cache = lines.map { |l| l[/\d+/].to_i }
50
+ [total, free - buffers + cache]
49
51
  end
50
52
  end
51
53
 
data/lib/what/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module What
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: what
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.6
5
+ version: 0.2.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ryan Fitzgerald
@@ -135,9 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  none: false
136
136
  requirements: []
137
137
  rubyforge_project: what
138
- rubygems_version: 1.8.23
138
+ rubygems_version: 1.8.24
139
139
  signing_key:
140
140
  specification_version: 3
141
141
  summary: Simple server monitoring tool
142
142
  test_files: []
143
- has_rdoc: