From 9b176a7bd58006f112f1f24afe12eae7ca5c7676 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Thu, 1 Oct 2015 23:30:12 -0700 Subject: [PATCH] Add class for getting version --- lib/vmfloaty.rb | 3 ++- lib/vmfloaty/version.rb | 8 ++++++++ vmfloaty.gemspec | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 lib/vmfloaty/version.rb diff --git a/lib/vmfloaty.rb b/lib/vmfloaty.rb index 2c6e3ee..ca9c7de 100644 --- a/lib/vmfloaty.rb +++ b/lib/vmfloaty.rb @@ -5,12 +5,13 @@ require 'commander' require 'yaml' require 'vmfloaty/auth' require 'vmfloaty/pooler' +require 'vmfloaty/version' class Vmfloaty include Commander::Methods def run - program :version, '0.2.5' + program :version, Version.get program :description, 'A CLI helper tool for Puppet Labs vmpooler to help you stay afloat' config = read_config diff --git a/lib/vmfloaty/version.rb b/lib/vmfloaty/version.rb new file mode 100644 index 0000000..2e021a9 --- /dev/null +++ b/lib/vmfloaty/version.rb @@ -0,0 +1,8 @@ + +class Version + @version = '0.2.6' + + def self.get + @version + end +end diff --git a/vmfloaty.gemspec b/vmfloaty.gemspec index 28d1a84..c2aebe9 100644 --- a/vmfloaty.gemspec +++ b/vmfloaty.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'vmfloaty' - s.version = '0.2.5' + s.version = '0.2.6' s.authors = ['Brian Cain'] s.email = ['brian.cain@puppetlabs.com'] s.license = 'Apache'