Sha256: cd85183258c7dd28dd13444f94c5405e5ed45a0545f1f6607a2c884507bf2dcb

Contents?: true

Size: 640 Bytes

Versions: 10

Compression:

Stored size: 640 Bytes

Contents

require 'toolshed/commands/base'
require 'toolshed/git'

class Toolshed::Commands::PushBranch < Toolshed::Commands::Base
  def initialize(options = {})
    super(options)
  end

  def self.cli_options
    {
      banner: 'Usage: push_branch [options]',
      options: {
        force_command: {
          short_on: '-f',
          default: true
        },
        branch_name: {
          short_on: '-b'
        }
      }
    }
  end

  def execute(args, options = {})
    Toolshed.logger.info "Running toolshed push_branch with #{options.inspect}"
    branch = Toolshed::Git::Branch.new(options)
    branch.push
    Toolshed.die
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
toolshed-1.0.12 lib/toolshed/commands/push_branch.rb
toolshed-1.0.11 lib/toolshed/commands/push_branch.rb
toolshed-1.0.10 lib/toolshed/commands/push_branch.rb
toolshed-1.0.9 lib/toolshed/commands/push_branch.rb
toolshed-1.0.8 lib/toolshed/commands/push_branch.rb
toolshed-1.0.7 lib/toolshed/commands/push_branch.rb
toolshed-1.0.6 lib/toolshed/commands/push_branch.rb
toolshed-1.0.5 lib/toolshed/commands/push_branch.rb
toolshed-1.0.4 lib/toolshed/commands/push_branch.rb
toolshed-1.0.3 lib/toolshed/commands/push_branch.rb