Class: Docman::GitPullCmd

Inherits:
Command
  • Object
show all
Defined in:
lib/docman/commands/git_pull_cmd.rb

Instance Attribute Summary

Attributes inherited from Command

#type

Instance Method Summary collapse

Methods inherited from Command

#add_action, #add_actions, #config, create, #describe, #initialize, #perform, #prefix, register_command, #replace_placeholder, #run_actions, #run_with_hooks

Methods included from Logging

#log, logger, #logger, #prefix, #properties_info, #with_logging

Constructor Details

This class inherits a constructor from Docman::Command

Instance Method Details

#executeObject



11
12
13
14
15
16
# File 'lib/docman/commands/git_pull_cmd.rb', line 11

def execute
  with_logging() do
    log "Git pull target"
    GitUtil.pull(@context['root']['full_build_path'])
  end
end

#validate_commandObject



6
7
8
9
# File 'lib/docman/commands/git_pull_cmd.rb', line 6

def validate_command
  raise "Please provide 'context'" if @context.nil?
  raise "Context should be of type 'Info'" unless @context.is_a? Docman::Info
end