From 3352e3d6d420f574b4c473a4c9b6385946cc4119 Mon Sep 17 00:00:00 2001 From: Brett O'Connor Date: Tue, 19 May 2015 10:08:42 -0600 Subject: [PATCH] binary now shows version number when requested --- bin/ebooks | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bin/ebooks b/bin/ebooks index 24a5120..c564df8 100755 --- a/bin/ebooks +++ b/bin/ebooks @@ -28,6 +28,7 @@ Usage: ebooks gen [input] ebooks archive [path] ebooks tweet + ebooks version STR def self.help(command=nil) @@ -275,6 +276,17 @@ STR require 'pry'; Ebooks.module_exec { pry } end + HELP.version = <<-STR + Usage: ebooks version + + Shows you twitter_ebooks' version number. + STR + + def self.version + require File.expand_path('../../lib/twitter_ebooks/version', __FILE__) + log Ebooks::VERSION + end + HELP.start = <<-STR Usage: ebooks s[tart] [botname] @@ -378,6 +390,7 @@ STR when "start" then start(args[1]) when "s" then start(args[1]) when "help" then help(args[1]) + when "version" then version else log "No such command '#{args[0]}'" help