Skip to content

Commit

Permalink
Merge pull request #125 from rambler-ios/feature/task-122
Browse files Browse the repository at this point in the history
[RESOLVED] Added more info to `generamba version` command #122
  • Loading branch information
etolstoy authored Jul 21, 2016
2 parents 278fdc9 + 1d657b1 commit 0c73804
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/generamba/cli/version_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions lib/generamba/version.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0c73804

Please sign in to comment.