mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 05:28:40 -05:00
Use the Classname::VERSION pattern
Instead of having a hardcoded version identifier in multiple locations, we can leverage the Classname::VERSION pattern to have a single canonical version number that everything can reference programmatically.
This commit is contained in:
parent
0380b5fc9a
commit
5c794cd2b0
3 changed files with 7 additions and 9 deletions
|
|
@ -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,6 +1,9 @@
|
||||||
|
$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-2.0'
|
s.license = 'Apache-2.0'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue