vidibus-sysinfo 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,16 +10,15 @@ module Vidibus
10
10
 
11
11
  class << self
12
12
  def command
13
- "df -h"
13
+ 'df -m'
14
14
  end
15
15
 
16
16
  def parse(output)
17
17
  device = /(?:[\/a-z0-9]+)/
18
- size = /\s+([\d\.]+)(K|M|G|T)\i?/
18
+ size = /\s+(\d+)\i?/
19
19
  if output.match(/#{device}#{size}#{size}/m)
20
- amount = $3.to_f
21
- unit = $4
22
- gigabytes(amount, unit)
20
+ amount = $2.to_f
21
+ gigabytes(amount, 'M')
23
22
  end
24
23
  end
25
24
  end
@@ -1,5 +1,5 @@
1
1
  module Vidibus
2
2
  module Sysinfo
3
- VERSION = '0.0.6'
3
+ VERSION = '0.0.7'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vidibus-sysinfo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-06 00:00:00.000000000 Z
12
+ date: 2013-09-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -143,7 +143,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  segments:
145
145
  - 0
146
- hash: -2480571786429848009
146
+ hash: 191533599965467457
147
147
  required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  none: false
149
149
  requirements: