quickmox 0.2.5 → 0.2.8b

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2d80adb7cbf1ba2056919ea76d04af3d2b52f0d
4
- data.tar.gz: 915a3263b72ed38de52303bc5077edea044ae29a
3
+ metadata.gz: 45113866e728125e37e8411f3bfc27ef3d86808e
4
+ data.tar.gz: 6d2881ac93fdc416caa696b334b2d405f0c269da
5
5
  SHA512:
6
- metadata.gz: 146f1fb36ae4e9bf251b69aa00bbac38087f896b94ca10df307584be31169c4f1dbde2f2e48264cd5288e371dbaa3304bfe63e91502275d582f33035759cd279
7
- data.tar.gz: 9f9d0f2c1d677a850eb7e08f12c71014ff420033658cc88e1e3ae7009356f548a02f6734ee960dfe8479f3ee200105b2a93438362876152a9cbaa9507a2a27e6
6
+ metadata.gz: 63b308f70af1d2402ed25fc438b5dc0a35e9af67a290d764b99364c9822941d0bcf882b1b76cf9aaf514aebdbddaa1a95cf0ef3244f989c5cf53cf05dbef218a
7
+ data.tar.gz: 49446941756b473163afd4b1f289fc9fb354dd7a74c0907c10cb3424a575dcd84aa560df39a76fe4480c02cf4cee478066c3b8f55b04bc372b332944b020f44d
data/lib/quickmox/host.rb CHANGED
@@ -53,10 +53,10 @@ module Quickmox
53
53
  list = String.new
54
54
  handle_exceptions do
55
55
  list = Array.new
56
- table = session.exec!('qm list')
56
+ table = exec('qm list')
57
57
  lines = table.split("\n")
58
58
  lines.each do |line|
59
- if line =~ /^ *([0-9]{1,4}) */
59
+ if line =~ /^ *([0-9]{1,6}) */
60
60
  list << $1
61
61
  end
62
62
  end
@@ -65,11 +65,11 @@ module Quickmox
65
65
  end
66
66
 
67
67
  def localname
68
- handle_exceptions { session.exec!('hostname').chomp }
68
+ handle_exceptions { exec('hostname') }
69
69
  end
70
70
 
71
71
  def uptime
72
- handle_exceptions { session.exec!('uptime').chomp }
72
+ handle_exceptions { exec('uptime') }
73
73
  end
74
74
 
75
75
  def close
@@ -82,12 +82,12 @@ module Quickmox
82
82
 
83
83
  def is_proxmox?
84
84
  output = String.new
85
- handle_exceptions { output = session.exec!('qm list') }
85
+ handle_exceptions { output = exec('qm list') }
86
86
  (output =~ /VMID NAME/) ? true : false
87
87
  end
88
88
 
89
89
  def exec(cmd)
90
- handle_exceptions {session.exec!(cmd).chomp}
90
+ handle_exceptions { session.exec!(cmd) }
91
91
  end
92
92
 
93
93
  private
@@ -34,7 +34,7 @@ module Quickmox
34
34
 
35
35
  def exec!(cmd)
36
36
  handle_exceptions do
37
- session.exec!(cmd).chomp
37
+ session.exec!(cmd).to_s.chomp
38
38
  end
39
39
  end
40
40
 
@@ -1,3 +1,3 @@
1
1
  module Quickmox
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.8b'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quickmox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.8b
5
5
  platform: ruby
6
6
  authors:
7
7
  - J.K.Valk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-31 00:00:00.000000000 Z
11
+ date: 2017-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -161,9 +161,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
161
161
  version: '0'
162
162
  required_rubygems_version: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - ">"
165
165
  - !ruby/object:Gem::Version
166
- version: '0'
166
+ version: 1.3.1
167
167
  requirements: []
168
168
  rubyforge_project:
169
169
  rubygems_version: 2.2.2