From 4cc890172e18ec47f9ab44f2ca34390e844220c7 Mon Sep 17 00:00:00 2001 From: Jose Asuncion Date: Mon, 9 Oct 2017 17:32:14 -0700 Subject: [PATCH] add knife spork version --- knife-spork.gemspec | 4 +++- lib/chef/knife/spork-version.rb | 12 ++++++++++++ lib/knife-spork/version.rb | 5 +++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 lib/chef/knife/spork-version.rb create mode 100644 lib/knife-spork/version.rb diff --git a/knife-spork.gemspec b/knife-spork.gemspec index 32d7a67..8e67747 100644 --- a/knife-spork.gemspec +++ b/knife-spork.gemspec @@ -1,8 +1,10 @@ $:.push File.expand_path('../lib', __FILE__) +require "knife-spork/version" + Gem::Specification.new do |gem| gem.name = 'knife-spork' - gem.version = '1.6.3' + gem.version = KnifeSpork::Version::VERSION gem.authors = ["Jon Cowie", "Katherine Daniels"] gem.email = ['jonlives@gmail.com', 'kdaniels@etsy.com'] gem.homepage = 'https://github.com/jonlives/knife-spork' diff --git a/lib/chef/knife/spork-version.rb b/lib/chef/knife/spork-version.rb new file mode 100644 index 0000000..45388a3 --- /dev/null +++ b/lib/chef/knife/spork-version.rb @@ -0,0 +1,12 @@ +require 'chef/knife' +require 'knife-spork/version' + +module KnifeSpork + class SporkVersion < Chef::Knife + banner 'knife spork version' + + def run + ui.info KnifeSpork::Version::VERSION + end + end +end diff --git a/lib/knife-spork/version.rb b/lib/knife-spork/version.rb new file mode 100644 index 0000000..3496d71 --- /dev/null +++ b/lib/knife-spork/version.rb @@ -0,0 +1,5 @@ +module KnifeSpork + module Version + VERSION = "1.6.3" + end +end