vmfloaty 0.2.7 → 0.2.8

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: 55d5f11511ad84f602cc136d8d905e913229cf95
4
- data.tar.gz: 07e4766f0f69c219ab3d9d8cd797d5595f6f254c
3
+ metadata.gz: 2c54d93e6680a539d4eb2b3b9ff25c664b5d9f4f
4
+ data.tar.gz: 03eb1dc1ad20c59f57fc6479f140510752a6bd07
5
5
  SHA512:
6
- metadata.gz: cfc3e2dfec7fa52efe13908c89b1ecee23d74daec52e1b989aea6fb06a21c8d5bcfc9ceb69cad02bd58be34c1bb50d9caad9e7fe16a5ea41600d960f3ec8a2d2
7
- data.tar.gz: b0cbf57fedf7d227914c0de9aa3616fabbcb3b7c7d45be4d0f621330d14d86957060e38898b0684feac3eaccce9fd64e0b8564758984beaa7c3ec2becfef6f05
6
+ metadata.gz: cbdf78e59753019035e7bec56ec5fc8d254e06edf9ed46e616b0bf2529b2cd520406a77f6b311cf65f5b37043442ab23f34998e79334ba18dff634e95b9c8ed5
7
+ data.tar.gz: 0e9fdea1096ed68c5286beb69f2113b58104ba716e6b0d4aab2d0af7ec5c855e4873ce73e8415c9f103ebc5e01a8aaccd4d349733b98285698b128043358aa72
data/lib/vmfloaty.rb CHANGED
@@ -33,6 +33,10 @@ class Vmfloaty
33
33
  user = options.user ||= config['user']
34
34
  url = options.url ||= config['url']
35
35
 
36
+ if args.empty?
37
+ STDERR.puts "You did not provide any vms to grab"
38
+ end
39
+
36
40
  os_types = {}
37
41
  args.each do |arg|
38
42
  os_arr = arg.split("=")
@@ -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.7'
3
+ @version = '0.2.8'
4
4
 
5
5
  def self.get
6
6
  @version
data/spec/spec_helper.rb CHANGED
@@ -1 +1,2 @@
1
1
  require 'vmfloaty'
2
+ require 'webmock/rspec'
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+ require_relative '../../lib/vmfloaty/pooler'
3
+
4
+ describe Pooler do
5
+ describe "#list" do
6
+ it "fails to be a passing test" do
7
+ expect(true).to be false
8
+ end
9
+ end
10
+ end
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.7
4
+ version: 0.2.8
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-10 00:00:00.000000000 Z
11
+ date: 2015-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
@@ -57,6 +57,7 @@ files:
57
57
  - lib/vmfloaty/pooler.rb
58
58
  - lib/vmfloaty/version.rb
59
59
  - spec/spec_helper.rb
60
+ - spec/vmfloaty/pooler_spec.rb
60
61
  homepage: https://github.com/briancain/vmfloaty
61
62
  licenses:
62
63
  - Apache
@@ -83,3 +84,4 @@ specification_version: 4
83
84
  summary: CLI application to interface with vmpooler
84
85
  test_files:
85
86
  - spec/spec_helper.rb
87
+ - spec/vmfloaty/pooler_spec.rb