mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 13:28:42 -05:00
Merge branch 'master' of github.com:briancain/vmfloaty
This commit is contained in:
commit
5fa65b6400
7 changed files with 38 additions and 25 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
sudo: false
|
sudo: false
|
||||||
language: ruby
|
language: ruby
|
||||||
rvm:
|
rvm:
|
||||||
- 2.0.0-p247
|
- 2.1
|
||||||
script: rspec spec
|
script: rspec spec
|
||||||
|
|
|
||||||
16
Gemfile
16
Gemfile
|
|
@ -1,11 +1,11 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gem 'commander'
|
|
||||||
gem 'faraday', '0.9.2'
|
|
||||||
gem 'colorize', '~> 0.8'
|
|
||||||
|
|
||||||
gem 'rspec'
|
|
||||||
gem 'webmock', '1.21.0'
|
|
||||||
gem 'rake'
|
|
||||||
|
|
||||||
gemspec
|
gemspec
|
||||||
|
|
||||||
|
gem 'rake', require: false
|
||||||
|
|
||||||
|
group :test do
|
||||||
|
gem 'rspec', '~> 3.5.0'
|
||||||
|
gem 'rubocop', '~> 0.47'
|
||||||
|
gem 'webmock', '1.21.0'
|
||||||
|
end
|
||||||
|
|
|
||||||
13
Rakefile
13
Rakefile
|
|
@ -1,6 +1,7 @@
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'bundler/setup'
|
require 'bundler/setup'
|
||||||
require 'rspec/core/rake_task'
|
require 'rspec/core/rake_task'
|
||||||
|
require 'rubocop/rake_task'
|
||||||
|
|
||||||
# Immediately sync all stdout so that tools like buildbot can
|
# Immediately sync all stdout so that tools like buildbot can
|
||||||
# immediately load in the output.
|
# immediately load in the output.
|
||||||
|
|
@ -8,7 +9,7 @@ $stdout.sync = true
|
||||||
$stderr.sync = true
|
$stderr.sync = true
|
||||||
|
|
||||||
# Change to the directory of this file.
|
# Change to the directory of this file.
|
||||||
Dir.chdir(File.expand_path("../", __FILE__))
|
Dir.chdir(File.expand_path('../', __FILE__))
|
||||||
|
|
||||||
# This installs the tasks that help with gem creation and
|
# This installs the tasks that help with gem creation and
|
||||||
# publishing.
|
# publishing.
|
||||||
|
|
@ -16,7 +17,13 @@ Bundler::GemHelper.install_tasks
|
||||||
|
|
||||||
# Install the `spec` task so that we can run tests.
|
# Install the `spec` task so that we can run tests.
|
||||||
RSpec::Core::RakeTask.new(:spec) do |t|
|
RSpec::Core::RakeTask.new(:spec) do |t|
|
||||||
t.rspec_opts = "--order defined"
|
t.rspec_opts = '--order defined'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc 'Run RuboCop'
|
||||||
|
RuboCop::RakeTask.new(:rubocop) do |task|
|
||||||
|
task.options << '--display-cop-names'
|
||||||
|
end
|
||||||
|
|
||||||
# Default task is to run the unit tests
|
# Default task is to run the unit tests
|
||||||
task :default => :spec
|
task default: :spec
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ class Vmfloaty
|
||||||
include Commander::Methods
|
include Commander::Methods
|
||||||
|
|
||||||
def run
|
def run
|
||||||
program :version, Version.get
|
program :version, Vmfloaty::VERSION
|
||||||
program :description, 'A CLI helper tool for Puppet Labs vmpooler to help you stay afloat'
|
program :description, 'A CLI helper tool for Puppet Labs vmpooler to help you stay afloat'
|
||||||
|
|
||||||
config = Conf.read_config
|
config = Conf.read_config
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,3 @@
|
||||||
|
class Vmfloaty
|
||||||
class Version
|
VERSION = '0.7.8'.freeze
|
||||||
@version = '0.7.8'
|
|
||||||
|
|
||||||
def self.get
|
|
||||||
@version
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,8 @@
|
||||||
require 'vmfloaty'
|
require 'vmfloaty'
|
||||||
require 'webmock/rspec'
|
require 'webmock/rspec'
|
||||||
|
|
||||||
|
RSpec.configure do |config|
|
||||||
|
config.color = true
|
||||||
|
config.tty = true
|
||||||
|
config.formatter = :documentation
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,22 @@
|
||||||
|
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
|
||||||
|
require 'vmfloaty/version'
|
||||||
|
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = 'vmfloaty'
|
s.name = 'vmfloaty'
|
||||||
s.version = '0.7.8'
|
s.version = Vmfloaty::VERSION
|
||||||
s.authors = ['Brian Cain']
|
s.authors = ['Brian Cain']
|
||||||
s.email = ['brian.cain@puppetlabs.com']
|
s.email = ['brian.cain@puppetlabs.com']
|
||||||
s.license = 'Apache'
|
s.license = 'Apache-2.0'
|
||||||
s.homepage = 'https://github.com/briancain/vmfloaty'
|
s.homepage = 'https://github.com/briancain/vmfloaty'
|
||||||
s.description = 'A helper tool for vmpooler to help you stay afloat'
|
s.description = 'A helper tool for vmpooler to help you stay afloat'
|
||||||
s.summary = 'CLI application to interface with vmpooler'
|
s.summary = 'CLI application to interface with vmpooler'
|
||||||
|
|
||||||
s.executables = ['floaty']
|
s.executables = ['floaty']
|
||||||
s.files = Dir['LICENSE', 'README.md', 'lib/**/*']
|
s.files = Dir['LICENSE', 'README.md', 'lib/**/*']
|
||||||
s.test_files = Dir['spec/**/*']
|
s.test_files = Dir['spec/**/*']
|
||||||
s.require_path = 'lib'
|
s.require_path = 'lib'
|
||||||
s.add_dependency 'commander', '~> 4.3'
|
|
||||||
s.add_dependency 'faraday', '~> 0.9'
|
s.add_dependency 'commander', '~> 4.3.0'
|
||||||
s.add_dependency 'colorize', '0.8.1'
|
s.add_dependency 'faraday', '~> 0.9.0'
|
||||||
|
s.add_dependency 'colorize', '~> 0.8.1'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue