From 1d657b147e67f5435cdc6eb8e0586983ba5dfaf8 Mon Sep 17 00:00:00 2001 From: Beniamin Sarkisyan Date: Wed, 20 Jul 2016 19:53:30 +0300 Subject: [PATCH] [RESOLVED] Added more info to `generamba version` command #122 --- lib/generamba/cli/version_command.rb | 14 +++++++++++++- lib/generamba/version.rb | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/generamba/cli/version_command.rb b/lib/generamba/cli/version_command.rb index 7de460e..4eeb82c 100644 --- a/lib/generamba/cli/version_command.rb +++ b/lib/generamba/cli/version_command.rb @@ -7,7 +7,19 @@ class Application < Thor desc 'version', 'Prints out Generamba current version' def version - puts(Generamba::VERSION.green) + options = {} + options['Version'] = Generamba::VERSION.green + options['Release date'] = Generamba::RELEASE_DATE.green + options['Change notes'] = Generamba::RELEASE_LINK.green + + values = [] + + options.each do |title, value| + values.push("#{title}: #{value}") + end + + output = values.join("\n") + puts(output) end end end \ No newline at end of file diff --git a/lib/generamba/version.rb b/lib/generamba/version.rb index fb5fd29..124dff9 100644 --- a/lib/generamba/version.rb +++ b/lib/generamba/version.rb @@ -1,3 +1,5 @@ module Generamba VERSION = '0.7.8' + RELEASE_DATE = '16.05.2016' + RELEASE_LINK = "https://github.com/rambler-ios/Generamba/releases/tag/#{VERSION}" end