vmfloaty 0.2.10 → 0.2.11

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: 8f09dbf2b9d0f35b0808470cd0913480f87eae42
4
- data.tar.gz: 6f1b92985bd4e5b5efdab23096cefcef4f2b921c
3
+ metadata.gz: f942bcd5ddc548accf16ebceec7fd78b0e6f4795
4
+ data.tar.gz: b4d7b1384b11904812e817631498148a09a306d8
5
5
  SHA512:
6
- metadata.gz: 41309e6fc9a023bed2ff6ea0e2f8a7ac9743546d87797c0ca0a9c271a1384d8a0aaa558c63780fdb70421d7b0f23092dcd097ffd5542ef85086102a19fbf4351
7
- data.tar.gz: 5c18209cde9a8fe5d43a6ffd79b0c37e335818b00da08d7edc889ae89548187451e4e0c5678b9da7241de93ff5ab2b2e26580edc7bcf6c3c5913b83e46f056e8
6
+ metadata.gz: 910b7a6eea2ce7dafefe28578c4c9870c524ded710b376e6a06c395054339e450f2decf39a8bb6b677fa5fbe5b5df805a77a780bc15d397ba410fa8b1665870c
7
+ data.tar.gz: 5df65439b3e6d2c9926c2b1179e43a3bdbd11ad04d0a24cab10dde897d9a991f5b4647fe99d1d2191664a7736bb1f9f5d75ff6abf877d5d2cf3a20804d01dd21
data/lib/vmfloaty.rb CHANGED
@@ -34,6 +34,10 @@ class Vmfloaty
34
34
  user = options.user ||= config['user']
35
35
  url = options.url ||= config['url']
36
36
 
37
+ if args.empty?
38
+ STDERR.puts "You did not provide any vms to grab"
39
+ end
40
+
37
41
  os_types = {}
38
42
  args.each do |arg|
39
43
  os_arr = arg.split("=")
@@ -117,6 +121,10 @@ class Vmfloaty
117
121
  modify_req = Pooler.modify(verbose, url, hostname, token, lifetime, tags)
118
122
  if modify_req["ok"]
119
123
  puts "Successfully modified vm #{hostname}."
124
+ else
125
+ STDERR.puts "Something went wrong with your request"
126
+ puts modify_req
127
+ exit 1
120
128
  end
121
129
  end
122
130
  end
@@ -33,6 +33,11 @@ class Pooler
33
33
 
34
34
  os_string = os_string.chomp("+")
35
35
 
36
+ if os_string.size == 0
37
+ STDERR.puts "No request was made, os hash specified no vms #{os_type}"
38
+ exit 1
39
+ end
40
+
36
41
  response = conn.post "/vm/#{os_string}"
37
42
 
38
43
  res_body = JSON.parse(response.body)
@@ -1,6 +1,6 @@
1
1
 
2
2
  class Version
3
- @version = '0.2.10'
3
+ @version = '0.2.11'
4
4
 
5
5
  def self.get
6
6
  @version
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.2.10
4
+ version: 0.2.11
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-14 00:00:00.000000000 Z
11
+ date: 2015-10-15 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
@@ -68,17 +68,17 @@ require_paths:
68
68
  - lib
69
69
  required_ruby_version: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - ">="
71
+ - - '>='
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  requirements:
76
- - - ">="
76
+ - - '>='
77
77
  - !ruby/object:Gem::Version
78
78
  version: '0'
79
79
  requirements: []
80
80
  rubyforge_project:
81
- rubygems_version: 2.2.2
81
+ rubygems_version: 2.4.8
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: CLI application to interface with vmpooler