virtop 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. data/lib/libvirt/domain.rb +2 -8
  2. data/lib/virtop.rb +1 -1
  3. metadata +1 -1
@@ -8,14 +8,8 @@ class Libvirt::Domain
8
8
 
9
9
  # Return state as string symbol.
10
10
  def state
11
- case self.info.state
12
- when 1
13
- ">"
14
- when 3
15
- "||"
16
- else
17
- "?"
18
- end
11
+ states = ['none', 'run', 'block', 'pause', 'halting', 'off', 'crash']
12
+ states[self.info.state]
19
13
  end
20
14
 
21
15
  # Return current memory assignment in mebibytes as string.
data/lib/virtop.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'libvirt'
2
2
 
3
3
  module Virtop
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
6
6
 
7
7
  $:.unshift File.dirname(__FILE__)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: virtop
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.1
5
+ version: 0.1.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - henning mueller