virtop 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
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