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.46.9 lib/takeltau/info/status/git.rb
takeltau-0.46.8 lib/takeltau/info/status/git.rb
takeltau-0.46.5 lib/takeltau/info/status/git.rb
takeltau-0.46.1 lib/takeltau/info/status/git.rb
takeltau-0.46.0 lib/takeltau/info/status/git.rb
takeltau-0.45.27 lib/takeltau/info/status/git.rb
takeltau-0.45.26 lib/takeltau/info/status/git.rb
takeltau-0.45.24 lib/takeltau/info/status/git.rb
takeltau-0.45.23 lib/takeltau/info/status/git.rb
takeltau-0.45.22 lib/takeltau/info/status/git.rb
takeltau-0.45.21 lib/takeltau/info/status/git.rb
takeltau-0.45.19 lib/takeltau/info/status/git.rb
takeltau-0.45.17 lib/takeltau/info/status/git.rb
takeltau-0.45.16 lib/takeltau/info/status/git.rb
takeltau-0.45.14 lib/takeltau/info/status/git.rb
takeltau-0.45.13 lib/takeltau/info/status/git.rb
takeltau-0.45.12 lib/takeltau/info/status/git.rb
takeltau-0.45.11 lib/takeltau/info/status/git.rb
takeltau-0.45.10 lib/takeltau/info/status/git.rb
takeltau-0.45.9 lib/takeltau/info/status/git.rb