lib/relish/commands/push.rb in relish-0.0.8 vs lib/relish/commands/push.rb in relish-0.0.9

- old
+ new

@@ -4,29 +4,24 @@ require 'stringio' require 'rest_client' require 'relish/commands/help' module Relish - module Command - Help.for_command(:push, "push your features to relishapp.com") - + module Command class Push < Base - option :version - def default; run end - - def run + desc 'push features to relishapp.com' + command :default do post files_as_tar_gz end + + private def post(tar_gz_data) resource["pushes?#{parameters}"].post(tar_gz_data, :content_type => 'application/x-gzip') puts "sent:\n#{files.join("\n")}" - rescue RestClient::Exception => exception - warn exception.response - exit 1 end def parameters "".tap do |str| str << "project_id=#{project}"