Class: GitHttpsable::Push::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/git_httpsable/push/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/git_httpsable/push/cli.rb', line 6

def self.exit_on_failure?
  true
end

Instance Method Details

#push(*args) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/git_httpsable/push/cli.rb', line 22

def push(*args)
  setup_logger(options)
  params = {
    force: options[:force],
    tags: options[:tags]
  }
  repo = Repository.new('.')
  repo.push(args[0], args[1], params)
rescue StandardError => e
  suggest_messages(options)
  raise e
end

#versionObject



13
14
15
# File 'lib/git_httpsable/push/cli.rb', line 13

def version
  puts "GitHttpsable::Push version #{::GitHttpsable::Push::VERSION}"
end