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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84071f80697d4710056550214dddb804ffa5dc16
4
- data.tar.gz: 81ca1c10c49c0ec05558f12b57aec85858c4a1f7
3
+ metadata.gz: e04a3143e6097ed642f76e19742196609e21a292
4
+ data.tar.gz: 8413045d1ed7a831b82c62ca524dd8b446081ddd
5
5
  SHA512:
6
- metadata.gz: 6dc3b64f3a23ec41378d85d239aafc4c6281082045e121c6267ca4e48c81da984151a29d21a4210b0d7d6c8c5c2c51f08d55dacf96c0e1fe8b1c76ecc61056d0
7
- data.tar.gz: 93265ea14f9c3b576be432fb9561e680f7f0eceba10d08e97eaf5a9b8de22b3a801d899798e869ebe50e1fab88c74ee5818ed3bd185ef54757b683e357b7c5e7
6
+ metadata.gz: ead2883c0135e76d9e590b953f25362238e2eb5f876b5b556d81a3c7d49178b641e0aa8294f2899cdb6135a99cfa040f8c2d87c28c85f44a5d321342e2553a42
7
+ data.tar.gz: 918ad38d4e785ec8467a2db3ce50ff30fc819bf08a6ef9c291d11d1e624f0c256731da9d2aa2f55d6a23e175431c18d29a79775300827283ff383422d615637a
@@ -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 == "domain"
13
- host_hash[type] = hosts
14
- else
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
@@ -1,6 +1,6 @@
1
1
 
2
2
  class Version
3
- @version = '0.3.1'
3
+ @version = '0.4.0'
4
4
 
5
5
  def self.get
6
6
  @version
@@ -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\",\"domain\":\"company.com\"}"
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.3.1
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-06-05 00:00:00.000000000 Z
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.2.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