lib/relish/commands/push.rb in relish-0.1.4 vs lib/relish/commands/push.rb in relish-0.1.5

- old
+ new

@@ -4,14 +4,16 @@ require 'rest_client' module Relish module Command class Push < Base - option :version - usage 'push <project>' - desc 'push features to relishapp.com' + usage 'push <project>:<version>' + desc ['push features to relishapp.com', + '<version> is optional', + 'example: relish push rspec/rspec-core', + 'example: relish push rspec/rspec-core:2.0'] command :default do post files_as_tar_gz end private @@ -28,10 +30,14 @@ str << "&version_id=#{version}" if version end end def project - @param || super() + @param.without_option || super() + end + + def version + @param.extract_option if @param.has_option? end def files_as_tar_gz stream = StringIO.new begin