[DRE-commits] [ruby-org] 163/303: Print version of the gem with --version of option
    Jérémy Bobbio 
    lunar at alioth.debian.org
       
    Fri Aug  9 17:33:50 UTC 2013
    
    
  
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository ruby-org.
commit 69864179543b3f392347e0990c8e783e7be49808
Author: Waldemar Quevedo <waldemar.quevedo at gmail.com>
Date:   Sun Jul 8 00:45:49 2012 +0900
    Print version of the gem with --version of option
---
 bin/org-ruby |   10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/bin/org-ruby b/bin/org-ruby
index 48e7e37..41678f9 100755
--- a/bin/org-ruby
+++ b/bin/org-ruby
@@ -21,10 +21,20 @@ options_parser = OptionParser.new do |opts|
           "Translate the ORG file to the specified format.") do |v|
     options[:format] = v
   end
+
+  opts.on("-v", "--version", "Print version") do |v|
+    options[:version] = true
+  end
 end
 
 begin
   options_parser.parse!
+
+  if options[:version]
+    puts OrgRuby::VERSION
+    exit
+  end
+
   if (ARGV.length == 0) then
     puts options_parser
   else
-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-org.git
    
    
More information about the Pkg-ruby-extras-commits
mailing list