Class: Docman::GitCommitCmd
- Defined in:
- lib/docman/commands/git_commit_cmd.rb
Instance Attribute Summary
Attributes inherited from Command
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
#execute ⇒ Object
17 18 19 20 21 22 |
# File 'lib/docman/commands/git_commit_cmd.rb', line 17 def execute = "name: #{@context['name']} updated, state: #{@context.state_name}" with_logging() do GitUtil.commit(@context['root']['full_build_path'], @context['full_build_path'], ) end end |
#validate_command ⇒ Object
6 7 8 9 |
# File 'lib/docman/commands/git_commit_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 |