vidibus-sysinfo 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -43,8 +43,8 @@ module Vidibus
43
43
  end
44
44
 
45
45
  # Returns consumed storage in gigabytes.
46
- def storage
47
- Storage.call
46
+ def storage(mount_point = '/')
47
+ Storage.call(mount_point)
48
48
  end
49
49
 
50
50
  # Returns used memory in megabytes.
@@ -21,8 +21,15 @@ module Vidibus
21
21
  end
22
22
 
23
23
  class << self
24
- def command
25
- 'df -m'
24
+ def command(mount_point)
25
+ mp = mount_point.gsub(/[^\/a-z0-9]/, '')
26
+ "df -m | grep '#{mp}'"
27
+ end
28
+
29
+ def call(mount_point)
30
+ cmd = command(mount_point)
31
+ output, error = perform(cmd)
32
+ respond(output, error)
26
33
  end
27
34
 
28
35
  def parse(output)
@@ -1,5 +1,5 @@
1
1
  module Vidibus
2
2
  module Sysinfo
3
- VERSION = '1.0.3'
3
+ VERSION = '1.1.0'
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: 1.0.3
4
+ version: 1.1.0
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: 2014-08-01 00:00:00.000000000 Z
12
+ date: 2015-11-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -145,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  segments:
147
147
  - 0
148
- hash: 1223332183346536001
148
+ hash: 686684159047158853
149
149
  required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  none: false
151
151
  requirements: