Sha256: 4b536fcc0b19a7a7a461ef168a96e52eff33e2f88fd8a32aa580f5a701d9b925
Contents?: true
Size: 757 Bytes
Versions: 20
Compression:
Stored size: 757 Bytes
Contents
require 'pivotal-github/command' class StoryPush < Command def parser OptionParser.new do |opts| opts.banner = "Usage: git story-push [options]" opts.on("-t", "--target TARGET", "push to a given target (defaults to origin)") do |t| self.options.target = t end opts.on_tail("-h", "--help", "this usage guide") do puts opts.to_s; exit 0 end end end # Returns a command appropriate for executing at the command line def cmd c = ['git push'] c << argument_string(unknown_options) unless unknown_options.empty? c << target c << story_branch c.join(' ') end def run! system cmd end private def target options.target || 'origin' end end
Version data entries
20 entries across 20 versions & 1 rubygems