Sha256: d8e2887e3b360a9cf591febe8eb0d17a917a1e0a347dd6ceb8b5ba14ef3cdf36

Contents?: true

Size: 1.25 KB

Versions: 92

Compression:

Stored size: 1.25 KB

Contents

# frozen_string_literal: true

# tau info status git
module InfoStatusGit
  # Backend method for info status git.
  # @return [Boolean] is the git gpg signing key available?
  # rubocop:disable Metrics/MethodLength
  # rubocop:disable Metrics/AbcSize
  def info_status_git
    log.debug 'Check git status'

    root = config.active['project_root_dir']

    if root.chomp.empty?
      log.error 'Cannot determine project root directory'
      log.warn 'Is there a Rakefile in the project root directory?'
      return false
    end

    unless git_check_workspace(root)
      log.error 'Project root directory is not a git workspace'
      return false
    end

    if _info_status_lib_git_name(root).chomp.empty?
      log.error 'git config user.name is not available'
      return false
    end

    if _info_status_lib_git_email(root).chomp.empty?
      log.error 'git config user.email is not available'
      return false
    end

    key = _info_status_lib_git_signingkey(root)

    unless _info_status_lib_git_key_available(key).exitstatus.zero?
      log.error 'git config user.signingkey is not available'
      return false
    end

    log.debug 'git config is available'
    true
  end
  # rubocop:enable Metrics/AbcSize
  # rubocop:enable Metrics/MethodLength
end

Version data entries

92 entries across 92 versions & 1 rubygems

Version Path
takeltau-0.42.0 lib/takeltau/info/status/git.rb
takeltau-0.41.10 lib/takeltau/info/status/git.rb
takeltau-0.41.9 lib/takeltau/info/status/git.rb
takeltau-0.41.0 lib/takeltau/info/status/git.rb
takeltau-0.40.11 lib/takeltau/info/status/git.rb
takeltau-0.40.9 lib/takeltau/info/status/git.rb
takeltau-0.40.7 lib/takeltau/info/status/git.rb
takeltau-0.40.6 lib/takeltau/info/status/git.rb
takeltau-0.40.4 lib/takeltau/info/status/git.rb
takeltau-0.40.3 lib/takeltau/info/status/git.rb
takeltau-0.40.1 lib/takeltau/info/status/git.rb
takeltau-0.40.0 lib/takeltau/info/status/git.rb
takeltau-0.39.18 lib/takeltau/info/status/git.rb
takeltau-0.39.16 lib/takeltau/info/status/git.rb
takeltau-0.39.11 lib/takeltau/info/status/git.rb
takeltau-0.39.7 lib/takeltau/info/status/git.rb
takeltau-0.39.2 lib/takeltau/info/status/git.rb
takeltau-0.39.0 lib/takeltau/info/status/git.rb
takeltau-0.38.2 lib/takeltau/info/status/git.rb
takeltau-0.38.1 lib/takeltau/info/status/git.rb