Initial commit of vmfloaty

This commit is contained in:
Brian Cain 2014-10-28 21:57:59 -07:00
parent 1f86113243
commit 99b03e2994
9 changed files with 76 additions and 3 deletions

6
.gitignore vendored
View file

@ -26,9 +26,9 @@ build/
# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset
Gemfile.lock
.ruby-version
.ruby-gemset
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc

5
Gemfile Normal file
View file

@ -0,0 +1,5 @@
source 'https://rubygems.org'
gem 'thor'
gemspec

15
LICENSE Normal file
View file

@ -0,0 +1,15 @@
vmpooler
Copyright (C) 2014 Puppet Labs
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

4
bin/floaty Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env ruby
$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
require 'vmfloaty/cli'

1
lib/vmfloaty.rb Normal file
View file

@ -0,0 +1 @@
require 'vmfloaty/cli'

25
lib/vmfloaty/cli.rb Normal file
View file

@ -0,0 +1,25 @@
require 'thor'
class CLI < Thor
desc "get", "Gets a vm"
def get
say 'Get a vm here'
end
desc "modify", "Modify a vm"
def modify
say 'Modify a vm'
end
desc "list", "List all active vms"
def list
say 'Listing your vms'
end
desc "release", "Schedules a vm for deletion"
def release
say 'Releases a vm'
end
end
CLI.start(ARGV)

5
lib/vmfloaty/version.rb Normal file
View file

@ -0,0 +1,5 @@
module Vmfloaty
module CLI
VERSION = '0.1.0'
end
end

1
spec/spec_helper.rb Normal file
View file

@ -0,0 +1 @@
require 'vmfloaty'

17
vmfloaty.gemspec Normal file
View file

@ -0,0 +1,17 @@
require File.expand_path '../lib/vmfloaty/version', __FILE__
Gem::Specification.new do |s|
s.name = 'vmfloaty'
s.version = Vmfloaty::CLI::VERSION.dup
s.authors = ['Brian Cain']
s.email = ['brian.cain@puppetlabs.com']
s.license = 'Apache'
s.homepage = 'https://github.com/briancain/vmfloaty'
s.description = 'A helper tool for vmpooler to help you stay afloat'
s.summary = 'CLI application to interface with vmpooler'
s.executables = ['floaty']
s.files = Dir['LICENSE', 'README.md', 'lib/**/*']
s.test_files = Dir['spec/**/*']
s.require_path = 'lib'
s.add_dependency 'thor', '~> 0.19'
end