vmfloaty 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vmfloaty/utils.rb +8 -3
- data/lib/vmfloaty/version.rb +1 -1
- data/spec/vmfloaty/utils_spec.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e04a3143e6097ed642f76e19742196609e21a292
|
4
|
+
data.tar.gz: 8413045d1ed7a831b82c62ca524dd8b446081ddd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ead2883c0135e76d9e590b953f25362238e2eb5f876b5b556d81a3c7d49178b641e0aa8294f2899cdb6135a99cfa040f8c2d87c28c85f44a5d321342e2553a42
|
7
|
+
data.tar.gz: 918ad38d4e785ec8467a2db3ce50ff30fc819bf08a6ef9c291d11d1e624f0c256731da9d2aa2f55d6a23e175431c18d29a79775300827283ff383422d615637a
|
data/lib/vmfloaty/utils.rb
CHANGED
@@ -8,10 +8,15 @@ class Utils
|
|
8
8
|
host_hash = {}
|
9
9
|
|
10
10
|
hostname_hash.delete("ok")
|
11
|
+
domain = hostname_hash["domain"]
|
11
12
|
hostname_hash.each do |type, hosts|
|
12
|
-
if type
|
13
|
-
|
14
|
-
|
13
|
+
if type != "domain"
|
14
|
+
if hosts["hostname"].kind_of?(Array)
|
15
|
+
hosts["hostname"].map!{|host| host + "." + domain }
|
16
|
+
else
|
17
|
+
hosts["hostname"] = hosts["hostname"] + "." + domain
|
18
|
+
end
|
19
|
+
|
15
20
|
host_hash[type] = hosts["hostname"]
|
16
21
|
end
|
17
22
|
end
|
data/lib/vmfloaty/version.rb
CHANGED
data/spec/vmfloaty/utils_spec.rb
CHANGED
@@ -7,7 +7,7 @@ describe Utils do
|
|
7
7
|
describe "#get_hosts" do
|
8
8
|
before :each do
|
9
9
|
@hostname_hash = "{\"ok\":true,\"debian-7-i386\":{\"hostname\":[\"sc0o4xqtodlul5w\",\"4m4dkhqiufnjmxy\"]},\"debian-7-x86_64\":{\"hostname\":\"zb91y9qbrbf6d3q\"},\"domain\":\"company.com\"}"
|
10
|
-
@format_hash = "{\"debian-7-i386\":[\"sc0o4xqtodlul5w\",\"4m4dkhqiufnjmxy\"],\"debian-7-x86_64\":\"zb91y9qbrbf6d3q
|
10
|
+
@format_hash = "{\"debian-7-i386\":[\"sc0o4xqtodlul5w.company.com\",\"4m4dkhqiufnjmxy.company.com\"],\"debian-7-x86_64\":\"zb91y9qbrbf6d3q.company.com\"}"
|
11
11
|
end
|
12
12
|
|
13
13
|
it "formats a hostname hash into os, hostnames, and domain name" do
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmfloaty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Cain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: faraday
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0.9'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.9'
|
41
41
|
description: A helper tool for vmpooler to help you stay afloat
|
@@ -70,17 +70,17 @@ require_paths:
|
|
70
70
|
- lib
|
71
71
|
required_ruby_version: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- -
|
78
|
+
- - '>='
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.
|
83
|
+
rubygems_version: 2.4.8
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: CLI application to interface with vmpooler
|