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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d67a4c4bc4b5526634147421d834b1047f8362d
4
- data.tar.gz: b2e13713a389a207a0492c7994465d940e31fb5a
3
+ metadata.gz: 3b950ce194ddc32be50b14e73b343a9b9358fa6d
4
+ data.tar.gz: 2dc5f421d0155603a5aa790160d6fa99fc1da869
5
5
  SHA512:
6
- metadata.gz: 8c6b2053d6ead50b25f95b133391c71b62bbf6ec7cc5402a6f14c41f56092933c11283e714439fa947c9cec4fec2342c4155fc4aadf5edd29c046baae81db126
7
- data.tar.gz: a1f4cf6d846b0af51e78f09fccb2bbd188327efb79b9a2cade4db305f14b9977fee264008ab20fc4de99728a5b53ca9bb1c2cd619acb64f2a92b5b765a742efb
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
- os_types[os_arr[0]] = os_arr[1].to_i
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
@@ -7,7 +7,11 @@ class Format
7
7
 
8
8
  hostname_hash.delete("ok")
9
9
  hostname_hash.each do |type, hosts|
10
- host_hash[type] = hosts["hostname"]
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
@@ -1,6 +1,6 @@
1
1
 
2
2
  class Version
3
- @version = '0.2.12'
3
+ @version = '0.2.13'
4
4
 
5
5
  def self.get
6
6
  @version
@@ -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"=>"12"},
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.12
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-15 00:00:00.000000000 Z
11
+ date: 2015-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander