vmfloaty 0.2.12 → 0.2.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vmfloaty.rb +6 -1
- data/lib/vmfloaty/format.rb +5 -1
- data/lib/vmfloaty/version.rb +1 -1
- data/spec/vmfloaty/pooler_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b950ce194ddc32be50b14e73b343a9b9358fa6d
|
4
|
+
data.tar.gz: 2dc5f421d0155603a5aa790160d6fa99fc1da869
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3043488a66a670178f94b8c47ff0271b9b0709d0b01cd4df58d0d960f218f0f0edeb25f62e8159f4f7874da10fc4734c2825f26c4effd41a6a9c8511d15aea8d
|
7
|
+
data.tar.gz: 87cfe6c1f9c171f5482b385e4d92908c4d2b017d05f56de9f1c71adc6d91051b6b3a060cf4de15d8be94a99bac7c5f04bdd9e3f40cb3859e3ac94a6a97447e27
|
data/lib/vmfloaty.rb
CHANGED
@@ -41,7 +41,12 @@ class Vmfloaty
|
|
41
41
|
os_types = {}
|
42
42
|
args.each do |arg|
|
43
43
|
os_arr = arg.split("=")
|
44
|
-
|
44
|
+
if os_arr.size == 1
|
45
|
+
# assume they didn't specify an = sign if split returns 1 size
|
46
|
+
os_types[os_arr[0]] = 1
|
47
|
+
else
|
48
|
+
os_types[os_arr[0]] = os_arr[1].to_i
|
49
|
+
end
|
45
50
|
end
|
46
51
|
|
47
52
|
no_token = options.notoken
|
data/lib/vmfloaty/format.rb
CHANGED
@@ -7,7 +7,11 @@ class Format
|
|
7
7
|
|
8
8
|
hostname_hash.delete("ok")
|
9
9
|
hostname_hash.each do |type, hosts|
|
10
|
-
|
10
|
+
if type == "domain"
|
11
|
+
host_hash[type] = hosts
|
12
|
+
else
|
13
|
+
host_hash[type] = hosts["hostname"]
|
14
|
+
end
|
11
15
|
end
|
12
16
|
|
13
17
|
puts host_hash.to_json
|
data/lib/vmfloaty/version.rb
CHANGED
@@ -82,7 +82,7 @@ describe Pooler do
|
|
82
82
|
|
83
83
|
it "modifies the TTL of a vm" do
|
84
84
|
stub_request(:put, "#{@vmpooler_url}/vm/fq6qlpjlsskycq6").
|
85
|
-
with(:body => {"lifetime"
|
85
|
+
with(:body => {"{\"lifetime\":12}"=>true},
|
86
86
|
:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded', 'User-Agent'=>'Faraday v0.9.1', 'X-Auth-Token'=>'mytokenfile'}).
|
87
87
|
to_return(:status => 200, :body => @modify_response_body_success, :headers => {})
|
88
88
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmfloaty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Cain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|