Exception: Foobara::CommandConnector::Commands::QueryGitCommitInfo::GitCommitInfoFileNotFoundError

Inherits:
RuntimeError
  • Object
show all
Defined in:
foobara-0.0.110/projects/command_connectors/src/command_connector/commands/query_git_commit_info.rb

Overview

TODO: creating these types of error classes should be much much easier!

Instance Attribute Summary

Attributes inherited from Error

#backtrace_when_initialized, #backtrace_when_raised, #context, #error_key, #is_fatal, #message

Class Method Summary collapse

Methods inherited from RuntimeError

category, fatal?, #initialize

Methods inherited from Error

#==, abstract, abstract?, category, context, #eql?, fatal?, #fatal?, foobara_manifest, #initialize, #key, path, #prepend_path!, runtime_path, subclass, symbol, to_h, #to_h, types_depended_on

Methods included from Foobara::Concern

foobara_class_methods_module_for, foobara_concern?, included

Constructor Details

This class inherits a constructor from Foobara::RuntimeError

Class Method Details

.context_type_declarationObject



26
27
28
# File 'foobara-0.0.110/projects/command_connectors/src/command_connector/commands/query_git_commit_info.rb', line 26

def context_type_declaration
  {}
end

.messageObject



14
15
16
17
18
19
20
21
22
23
24
# File 'foobara-0.0.110/projects/command_connectors/src/command_connector/commands/query_git_commit_info.rb', line 14

def message
  format = '{"commit": "%H", "author": "%an <%ae>", "date": "%ad", "message": "%s"}'

  <<~HERE
    Could not find file: #{GIT_COMMIT_INFO_FILE}.#{" "}
    Are you sure you are executing the following in the right place in your infrastructure?

      git show -s --format='#{format}' HEAD > git_commit_info.json

  HERE
end