Class: Dandelion::Command::Status
- Defined in:
- lib/dandelion/command/status.rb
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#adapter, command, commands, #initialize, #log, lookup, #setup
Constructor Details
This class inherits a constructor from Dandelion::Command::Base
Class Method Details
.parser(options) ⇒ Object
6 7 8 9 10 |
# File 'lib/dandelion/command/status.rb', line 6 def self.parser() OptionParser.new do |opts| opts. = 'Usage: dandelion status' end end |
Instance Method Details
#execute! ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/dandelion/command/status.rb', line 12 def execute! log.info("Connecting to #{adapter.to_s}") local_commit = workspace.local_commit remote_commit = workspace.remote_commit log.info("Remote revision: #{remote_commit ? remote_commit.oid : '---'}") log.info("Local HEAD revision: #{workspace.local_commit.oid}") end |