Class: Docman::GitCommitCmd
- Inherits:
-
Command
- Object
- Hash
- Command
- Docman::GitCommitCmd
show all
- Defined in:
- lib/docman/commands/git_commit_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
Instance Method Details
#execute ⇒ Object
17
18
19
20
21
22
|
# File 'lib/docman/commands/git_commit_cmd.rb', line 17
def execute
message = "name: #{@context['name']} updated, state: #{@context.state_name}"
with_logging(message) do
GitUtil.commit(@context['root']['full_build_path'], @context['full_build_path'], message)
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
|